|
|
|
@ -51,13 +51,13 @@
|
|
|
|
|
<div>
|
|
|
|
|
<span class="container-page-btn">
|
|
|
|
|
<div class="d-flex flex-row justify-content-between">
|
|
|
|
|
<label id="requestPaging--${pageName}PagingInfo" class="dataTables_info"
|
|
|
|
|
<label id="dmndPaging--${pageName}PagingInfo" class="dataTables_info"
|
|
|
|
|
role="status" aria-live="polite"></label>
|
|
|
|
|
<ul id="requestPaging--${pageName}" class="pagination pagination-primary">
|
|
|
|
|
<ul id="dmndPaging--${pageName}" class="pagination pagination-primary">
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
|
<button type="button" id="btnOpenRequestPop--${pageName}"
|
|
|
|
|
<button type="button" id="btnOpenDmndPop--${pageName}"
|
|
|
|
|
class="btn btn-primary" title="요청 등록">요청 등록</button>
|
|
|
|
|
<button type="button" id="btnDelete--${pageName}"
|
|
|
|
|
class="btn btn-primary" title="한 건 삭제">한 건 삭제</button>
|
|
|
|
@ -73,7 +73,7 @@
|
|
|
|
|
style="overflow-x: scroll;height:550px;overflow-y: scroll;">
|
|
|
|
|
<table id="DataTables_Table_0--${pageName}"
|
|
|
|
|
class="datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
<thead id="requestThead--${pageName}">
|
|
|
|
|
<thead id="dmndThead--${pageName}">
|
|
|
|
|
<tr data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
|
|
|
|
|
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
|
|
|
|
|
<th style="min-width: 80px;">No.</th>
|
|
|
|
@ -86,8 +86,8 @@
|
|
|
|
|
<th style="min-width: 80px;">상태</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="requestTbody--${pageName}"></tbody>
|
|
|
|
|
<template id="requestRow--${pageName}">
|
|
|
|
|
<tbody id="dmndTbody--${pageName}"></tbody>
|
|
|
|
|
<template id="dmndRow--${pageName}">
|
|
|
|
|
<tr data-key="{INDIV_ID}">
|
|
|
|
|
<td onclick="{onclick}" class="text-end">{ROW_NUM}</td>
|
|
|
|
|
<td onclick="{onclick}" class="text-center">{DMND_YMD}</td>
|
|
|
|
@ -96,10 +96,10 @@
|
|
|
|
|
<td onclick="{onclick}" class="text-center">{PST_NO}</td>
|
|
|
|
|
<td onclick="{onclick}" class="text-center">{RGTR}</td>
|
|
|
|
|
<td onclick="{onclick}" class="text-center">{RSPNS_DT}</td>
|
|
|
|
|
<td onclick="{onclick}" class="text-center">{STTS_CD}</td>
|
|
|
|
|
<td onclick="{onclick}" class="text-center">{STTS_NM}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="requestNotFound--${pageName}">
|
|
|
|
|
<template id="dmndNotFound--${pageName}">
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="8" class="dataTables_empty text-center">요청 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -111,8 +111,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="toast-container position-fixed bottom-0 end-0 p-3">
|
|
|
|
|
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
|
|
|
|
<div class="toast-body bg-black text-white">
|
|
|
|
|
삭제 되었습니다.
|
|
|
|
|
<div id="toastText--${pageName}" class="toast-body bg-black text-white">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -125,21 +124,21 @@
|
|
|
|
|
<div class="content-backdrop fade"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<template id="rcptRequestDialogTemplate--${pageName}">
|
|
|
|
|
<template id="seallDmndDialogTemplate--${pageName}">
|
|
|
|
|
<form id="frmEdit--${pageName}">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="row g-1">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<label for="requestYmd--${pageName}"
|
|
|
|
|
<label for="rcptYmd--${pageName}"
|
|
|
|
|
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수일자</label>
|
|
|
|
|
<input type="text" id="requestYmd--${pageName}" name="requestYmd" required
|
|
|
|
|
<input type="text" id="rcptYmd--${pageName}" name="rcptYmd" required
|
|
|
|
|
class="form-control form-date" data-fmt-type="day" />
|
|
|
|
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<label for="listNo--${pageName}"
|
|
|
|
|
<label for="pstNo--${pageName}"
|
|
|
|
|
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">목록번호</label>
|
|
|
|
|
<input type="text" id="listNo--${pageName}" name="listNo" required
|
|
|
|
|
<input type="text" id="pstNo--${pageName}" name="pstNo" required
|
|
|
|
|
class="form-control" type="text" maxlength="6" data-maxlengthb="6" data-fmt-type="zeroLpadNumber" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -176,83 +175,83 @@ $(document).ready(function(){
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.requestControl = new DatasetControl({
|
|
|
|
|
$P.dmndControl = new DatasetControl({
|
|
|
|
|
urls : { load : "", create : "", remove : "" },
|
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
|
keymapper : info => info ? info.INDIV_ID : "",
|
|
|
|
|
formats : {
|
|
|
|
|
DMND_SE_CD : FIM062,
|
|
|
|
|
STTS_CD : FIM063,
|
|
|
|
|
DMND_YMD : dateFormat,
|
|
|
|
|
RCPT_YMD : dateFormat,
|
|
|
|
|
RSPNS_DT : datetimeFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$P.requestControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.requestControl.untilPageNum = 0;
|
|
|
|
|
$P.requestControl.beforeCurrent = null;
|
|
|
|
|
$P.requestControl.tableRenderComplete = false;
|
|
|
|
|
$P.dmndControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.dmndControl.untilPageNum = 0;
|
|
|
|
|
$P.dmndControl.beforeCurrent = null;
|
|
|
|
|
$P.dmndControl.tableRenderComplete = false;
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.requestControl.onDatasetChange = (obj) => {
|
|
|
|
|
$P.dmndControl.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
$P.renderRequestList(obj["Total"]);
|
|
|
|
|
$P.renderDmndList(obj["Total"]);
|
|
|
|
|
|
|
|
|
|
$("#requestPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.requestControl.dataset,
|
|
|
|
|
prefix: "requestPaging--${pageName}",
|
|
|
|
|
$("#dmndPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.dmndControl.dataset,
|
|
|
|
|
prefix: "dmndPaging--${pageName}",
|
|
|
|
|
start: obj["Start"],
|
|
|
|
|
totalSize: obj["Total"],
|
|
|
|
|
fetchSize: obj["Fetch"],
|
|
|
|
|
func: "pageObject['${pageName}'].requestControl.load({index})"
|
|
|
|
|
func: "pageObject['${pageName}'].dmndControl.load({index})"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$P.requestControl.tableRenderComplete = true;
|
|
|
|
|
$P.dmndControl.tableRenderComplete = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.requestControl.onCurrentChange = (item) => {
|
|
|
|
|
if(!$P.requestControl.tableRenderComplete){
|
|
|
|
|
$P.dmndControl.onCurrentChange = (item) => {
|
|
|
|
|
if(!$P.dmndControl.tableRenderComplete){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($P.requestControl.beforeCurrent != null){
|
|
|
|
|
var beforeCurrentKey = $P.requestControl.beforeCurrent.key;
|
|
|
|
|
var beforeCurrentIndex = $P.requestControl.beforeCurrent.index;
|
|
|
|
|
$P.requestControl.beforeCurrent = null;
|
|
|
|
|
if($P.dmndControl.beforeCurrent != null){
|
|
|
|
|
var beforeCurrentKey = $P.dmndControl.beforeCurrent.key;
|
|
|
|
|
var beforeCurrentIndex = $P.dmndControl.beforeCurrent.index;
|
|
|
|
|
$P.dmndControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
if(!$P.requestControl.dataset.empty){
|
|
|
|
|
var info = $P.requestControl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
if(!$P.dmndControl.dataset.empty){
|
|
|
|
|
var info = $P.dmndControl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
if(info != null){
|
|
|
|
|
$P.requestControl.dataset.setCurrent(beforeCurrentKey,true);
|
|
|
|
|
$P.dmndControl.dataset.setCurrent(beforeCurrentKey,true);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(beforeCurrentIndex > ($P.requestControl.dataset.length - 1)){
|
|
|
|
|
info = $P.requestControl.dataset.getDataset()[$P.requestControl.dataset.length - 1];
|
|
|
|
|
if(beforeCurrentIndex > ($P.dmndControl.dataset.length - 1)){
|
|
|
|
|
info = $P.dmndControl.dataset.getDataset()[$P.dmndControl.dataset.length - 1];
|
|
|
|
|
} else {
|
|
|
|
|
info = $P.requestControl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
info = $P.dmndControl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.requestControl.dataset.setCurrent(info["INDIV_ID"],true);
|
|
|
|
|
$P.dmndControl.dataset.setCurrent(info["INDIV_ID"],true);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.requestControl.tableRenderComplete = false;
|
|
|
|
|
$P.dmndControl.tableRenderComplete = false;
|
|
|
|
|
if(!item){
|
|
|
|
|
$P.clickRequestList("", true);
|
|
|
|
|
$P.clickDmndList("", true);
|
|
|
|
|
} else {
|
|
|
|
|
$P.clickRequestList($P.requestControl.getCurrent()["INDIV_ID"], true);
|
|
|
|
|
$P.clickDmndList($P.dmndControl.getCurrent()["INDIV_ID"], true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.requestControl.onRemove = (selected, resp) => {
|
|
|
|
|
$P.dmndControl.onRemove = (selected, resp) => {
|
|
|
|
|
if (resp.saved){
|
|
|
|
|
$("#toastText--${pageName}").html("삭제 되었습니다.");
|
|
|
|
|
$P.toast.show();
|
|
|
|
|
$P.refreshRequestList();
|
|
|
|
|
$P.refreshDmndList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -263,31 +262,35 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
$('#schDmndYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
|
|
|
|
|
$('#schDmndYmdTo--${pageName}').datepicker('setDate', new Date());
|
|
|
|
|
$P.requestControl.setData([]);
|
|
|
|
|
$P.dmndControl.setData([]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnResetAndChangeBiz = (taskSeCd) => {
|
|
|
|
|
$P.fnReset();
|
|
|
|
|
$P.requestControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/list.do");
|
|
|
|
|
$P.requestControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do");
|
|
|
|
|
$P.requestControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do");
|
|
|
|
|
$P.dmndControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/list.do");
|
|
|
|
|
$P.dmndControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do");
|
|
|
|
|
$P.dmndControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.refreshRequestList = () => {
|
|
|
|
|
$P.requestControl.untilPageNum = $P.requestControl.query.pageNum;
|
|
|
|
|
$P.requestControl.query.fetchSize = $P.requestControl.defaultFetchSize * $P.requestControl.query.pageNum;
|
|
|
|
|
$P.requestControl.beforeCurrent = {
|
|
|
|
|
key : $P.requestControl.getCurrent()["INDIV_ID"],
|
|
|
|
|
index : $P.requestControl.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
};
|
|
|
|
|
$P.requestControl.load(1);
|
|
|
|
|
$P.refreshDmndList = () => {
|
|
|
|
|
$P.dmndControl.untilPageNum = $P.dmndControl.query.pageNum;
|
|
|
|
|
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize * $P.dmndControl.query.pageNum;
|
|
|
|
|
|
|
|
|
|
if(!$P.dmndControl.dataset.empty){
|
|
|
|
|
$P.dmndControl.beforeCurrent = {
|
|
|
|
|
key : $P.dmndControl.getCurrent()["INDIV_ID"],
|
|
|
|
|
index : $P.dmndControl.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.dmndControl.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.searchRequestList = () => {
|
|
|
|
|
$P.searchDmndList = () => {
|
|
|
|
|
|
|
|
|
|
$P.requestControl.query = $P.getParams();
|
|
|
|
|
$P.dmndControl.query = $P.getParams();
|
|
|
|
|
|
|
|
|
|
$P.requestControl.load(1);
|
|
|
|
|
$P.dmndControl.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollEnd = (obj) => {
|
|
|
|
@ -302,15 +305,15 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()){
|
|
|
|
|
obj.dataset.scrollStatus = "waiting";
|
|
|
|
|
$P.scrollRequestList();
|
|
|
|
|
$P.scrollDmndList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollRequestList = () => {
|
|
|
|
|
$P.requestControl.load($P.requestControl.query.pageNum + 1);
|
|
|
|
|
$P.scrollDmndList = () => {
|
|
|
|
|
$P.dmndControl.load($P.dmndControl.query.pageNum + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.clickRequestList = (dataKey, auto) => {
|
|
|
|
|
$P.clickDmndList = (dataKey, auto) => {
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
if(auto){
|
|
|
|
|
$("label[for='table-responsive--${pageName}']").trigger("refreshEnd");
|
|
|
|
@ -318,120 +321,135 @@ $(document).ready(function(){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#requestTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
$("#dmndTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
|
|
|
|
|
if(!auto){
|
|
|
|
|
$P.requestControl.setCurrent(dataKey);
|
|
|
|
|
$P.dmndControl.setCurrent(dataKey);
|
|
|
|
|
} else {
|
|
|
|
|
$("label[for='table-responsive--${pageName}']").trigger("refreshEnd");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.renderRequestList = (total) => {
|
|
|
|
|
$P.renderDmndList = (total) => {
|
|
|
|
|
|
|
|
|
|
var requestList = $P.requestControl.dataset;
|
|
|
|
|
var empty = requestList.empty;
|
|
|
|
|
var notFound = [document.getElementById("requestNotFound--${pageName}").innerHTML];
|
|
|
|
|
var found = document.getElementById("requestRow--${pageName}").innerHTML;
|
|
|
|
|
var dmndList = $P.dmndControl.dataset;
|
|
|
|
|
var empty = dmndList.empty;
|
|
|
|
|
var notFound = [document.getElementById("dmndNotFound--${pageName}").innerHTML];
|
|
|
|
|
var found = document.getElementById("dmndRow--${pageName}").innerHTML;
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickRequestList('" + dataItem.getValue("INDIV_ID") + "');");
|
|
|
|
|
var trs = empty ? notFound : requestList.inStrings(found, replacer);
|
|
|
|
|
$("#requestTbody--${pageName}").html(trs.join());
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDmndList('" + dataItem.getValue("INDIV_ID") + "');");
|
|
|
|
|
var trs = empty ? notFound : dmndList.inStrings(found, replacer);
|
|
|
|
|
$("#dmndTbody--${pageName}").html(trs.join());
|
|
|
|
|
|
|
|
|
|
if(total == requestList.length){
|
|
|
|
|
if(total == dmndList.length){
|
|
|
|
|
$("#table-responsive--${pageName}").attr("data-scroll-status", "complete");
|
|
|
|
|
} else {
|
|
|
|
|
$("#table-responsive--${pageName}").removeAttr("data-scroll-status");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($P.requestControl.untilPageNum != 0){
|
|
|
|
|
$P.requestControl.query.fetchSize = $P.requestControl.defaultFetchSize;
|
|
|
|
|
$P.requestControl.query.pageNum = $P.requestControl.untilPageNum;
|
|
|
|
|
$P.requestControl.untilPageNum = 0;
|
|
|
|
|
if($P.dmndControl.untilPageNum != 0){
|
|
|
|
|
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize;
|
|
|
|
|
$P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum;
|
|
|
|
|
$P.dmndControl.untilPageNum = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.getParams = () => {
|
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
var data = formFields.get();
|
|
|
|
|
data.fetchSize = $P.requestControl.defaultFetchSize;
|
|
|
|
|
data.fetchSize = $P.dmndControl.defaultFetchSize;
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnRemove = (allCompleteData) => {
|
|
|
|
|
if(allCompleteData != null){
|
|
|
|
|
var ds = $P.requestControl.dataset.getDataset();
|
|
|
|
|
if(allCompleteData){
|
|
|
|
|
var ds = $P.dmndControl.dataset.getDataset();
|
|
|
|
|
|
|
|
|
|
var requestIds = ds.map(function(item){
|
|
|
|
|
if(item['STTS_CD'] == 'complete'){
|
|
|
|
|
var indivIds = ds.map(function(item){
|
|
|
|
|
if(item['STTS_CD'] == '9'){
|
|
|
|
|
return item["INDIV_ID"];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$P.requestControl.select(requestIds,true);
|
|
|
|
|
$P.dmndControl.select(indivIds,true);
|
|
|
|
|
} else {
|
|
|
|
|
var cur = $P.requestControl.getCurrent();
|
|
|
|
|
var cur = $P.dmndControl.getCurrent();
|
|
|
|
|
if(cur == null){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var curKey = cur["INDIV_ID"];
|
|
|
|
|
$P.requestControl.select(curKey,true);
|
|
|
|
|
$P.dmndControl.select(curKey,true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO : 요청 삭제 서비스 //$P.requestControl.remove();
|
|
|
|
|
// TODO : 요청 삭제 서비스 //$P.dmndControl.remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnRemoveAllCompleteData = () => {
|
|
|
|
|
var cur = $P.requestControl.getCurrent();
|
|
|
|
|
var cur = $P.dmndControl.getCurrent();
|
|
|
|
|
if(cur == null){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "완료된 자료를 모두 삭제하시겠습니까?"
|
|
|
|
|
, onOK : () => {
|
|
|
|
|
$P.fnRemove('allCompleteData');
|
|
|
|
|
content : "완료된 자료를 모두 삭제하시겠습니까?",
|
|
|
|
|
onOK : () => {
|
|
|
|
|
$P.fnRemove(true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//요청 등록 팝업 호출
|
|
|
|
|
$P.fnOpenRequestPop = () => {
|
|
|
|
|
$P.fnOpenDmndPop = () => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : "rcptRequestDialog--${pageName}",
|
|
|
|
|
id : "seallDmndDialog--${pageName}",
|
|
|
|
|
title : "새올 접수 요청",
|
|
|
|
|
content : document.getElementById("rcptRequestDialogTemplate--${pageName}").innerHTML,
|
|
|
|
|
content : document.getElementById("seallDmndDialogTemplate--${pageName}").innerHTML,
|
|
|
|
|
size : "lg",
|
|
|
|
|
init : () => {
|
|
|
|
|
initDatepicker("rcptRequestDialog--${pageName}");
|
|
|
|
|
$('#requestYmd--${pageName}').datepicker('setDate', new Date());
|
|
|
|
|
$('#btnCreate--${pageName}').on("click", () => $P.fnCreateRequest());
|
|
|
|
|
initDatepicker("seallDmndDialog--${pageName}");
|
|
|
|
|
$('#rcptYmd--${pageName}').datepicker('setDate', new Date());
|
|
|
|
|
$('#btnCreate--${pageName}').on("click", () => $P.fnCreateDmnd());
|
|
|
|
|
},
|
|
|
|
|
onClose : () => {}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//요청 등록
|
|
|
|
|
$P.fnCreateRequest = () => {
|
|
|
|
|
$P.fnCreateDmnd = () => {
|
|
|
|
|
|
|
|
|
|
if(!customValidate($("#frmEdit--${pageName} input"))) return;
|
|
|
|
|
|
|
|
|
|
var info = (new FimsFormFields("#frmEdit--${pageName}")).get();
|
|
|
|
|
|
|
|
|
|
// TODO : 요청 등록 서비스 //ajax
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : $P.dmndControl.urls.create,
|
|
|
|
|
data : info,
|
|
|
|
|
success : resp => {
|
|
|
|
|
if(resp.saved){
|
|
|
|
|
dialog.close("seallDmndDialog--${pageName}");
|
|
|
|
|
|
|
|
|
|
$("#toastText--${pageName}").html("등록 되었습니다.");
|
|
|
|
|
$P.toast.show();
|
|
|
|
|
|
|
|
|
|
if(!$P.dmndControl.dataset.empty){
|
|
|
|
|
$P.refreshDmndList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* element.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
|
|
|
|
|
$('#btnSearch--${pageName}').on('click', () => $P.searchRequestList());
|
|
|
|
|
$('#btnSearch--${pageName}').on('click', () => $P.searchDmndList());
|
|
|
|
|
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
|
|
|
|
|
|
|
|
|
|
$("#btnOpenRequestPop--${pageName}").on("click", () => $P.fnOpenRequestPop());
|
|
|
|
|
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove());
|
|
|
|
|
$("#btnOpenDmndPop--${pageName}").on("click", () => $P.fnOpenDmndPop());
|
|
|
|
|
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove(false));
|
|
|
|
|
$("#btnDeleteAllCompleteData--${pageName}").on("click", () => $P.fnRemoveAllCompleteData());
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|