|
|
|
@ -12,13 +12,13 @@
|
|
|
|
|
<label class="col-form-label bg-label-danger pe-2 w-px-120 text-sm-center">민원상담 이력</label>
|
|
|
|
|
<!-- 버튼 우측 정렬 -->
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" name="btnCreateCvlcptDscsn" title="민원상담 등록">
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" name="btnCreateCvlcptDscsn" title="민원상담 등록" disabled>
|
|
|
|
|
민원상담 등록
|
|
|
|
|
</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateCvlcptDscsn" title="민원상담 수정">
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" name="btnUpdateCvlcptDscsn" title="민원상담 수정" disabled>
|
|
|
|
|
민원상담 수정
|
|
|
|
|
</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" name="btnRemoveCvlcptDscsn" title="민원상담 삭제">
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" name="btnRemoveCvlcptDscsn" title="민원상담 삭제" disabled>
|
|
|
|
|
민원상담 삭제
|
|
|
|
|
</button>
|
|
|
|
|
</span> <!-- <span class="container-window-btn-right"> -->
|
|
|
|
@ -36,7 +36,7 @@
|
|
|
|
|
<div class="table-responsive ox-scroll oy-scroll h-px-400" name="tableRspnsCvlcptDscsn">
|
|
|
|
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" aria-describedby="DataTables_Table_0_info">
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr name="theadTrCvlcptDscsn">
|
|
|
|
|
<tr name="theadTrCvlcptDscsn" data-search-target="[data-doctx='${pageName}']">
|
|
|
|
|
<th class="cmn sorting" style="width: 180px" data-field="MDFCN_DT">수정일시</th>
|
|
|
|
|
<th class="cmn sorting" style="width: 100px" data-field="WEEK_NM">요일</th>
|
|
|
|
|
<th class="cmn sorting" style="width: 140px" data-field="MDFR_NM">수정사용자</th>
|
|
|
|
@ -52,7 +52,7 @@
|
|
|
|
|
<tbody name="tbodyCvlcptDscsnList">
|
|
|
|
|
</tbody>
|
|
|
|
|
<template is="curly-brackets" name="tmpltCvlcptDscsnRows">
|
|
|
|
|
<tr data-key="CVLCPT_DSCSN_ID">
|
|
|
|
|
<tr data-key="{data-index}">
|
|
|
|
|
<td class="text-center" onclick>{REG_DT}</td>
|
|
|
|
|
<td class="text-center" onclick>{WEEK_NM}</td>
|
|
|
|
|
<td class="text-center" onclick>{RGTR_NM}</td>
|
|
|
|
@ -89,6 +89,8 @@
|
|
|
|
|
</div> <!-- <div class="content-pop"> -->
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
LoadScript("sprt02080Script", wctx.url("/webjars/js/fims/sprt/sprt02080.js?ver=${ver}"));
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* Global Variable
|
|
|
|
|
**************************************************************************/
|
|
|
|
@ -101,133 +103,42 @@
|
|
|
|
|
// pageObject
|
|
|
|
|
let $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
|
// FormFields
|
|
|
|
|
$P.formFields = new FimsFormFields($P.selectorn("frmEditCvlcptDscsn"));
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.ctrlCvlcptDscsn = new DatasetControl({
|
|
|
|
|
prefix: "cvlcptDscsn"
|
|
|
|
|
, prefixName: "민원상담"
|
|
|
|
|
, keymapper: info => info ? info.CVLCPT_DSCSN_ID : ""
|
|
|
|
|
, dataGetter: obj => obj.cvlcptDscsns
|
|
|
|
|
, appendData: true
|
|
|
|
|
, infoSize: "lg"
|
|
|
|
|
, formats: {
|
|
|
|
|
REG_DT: datetimeFormat
|
|
|
|
|
, MDFCN_DT: datetimeFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// datasetControl
|
|
|
|
|
$P.ctrlCvlcptDscsn = newSprt02080Control("${pageName}", "[data-doctx=${pageName}]", "${pageNameMain}");
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl 이벤트
|
|
|
|
|
* 사용자 함수(function)
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// Dataset 변경 이벤트
|
|
|
|
|
$P.ctrlCvlcptDscsn.onDatasetChange = (obj, option) => {
|
|
|
|
|
$P.renderList();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
|
$P.ctrlCvlcptDscsn.onCurrentChange = (item) => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
$P.formFields.set($P.ctrlCvlcptDscsn, item); // 화면에 자료 셋팅
|
|
|
|
|
|
|
|
|
|
let key = item.data.CVLCPT_DSCSN_ID;
|
|
|
|
|
|
|
|
|
|
$P.$findn("tbodyCvlcptDscsnList").setCurrentRow(key); // datatable에 자료 셋팅
|
|
|
|
|
// 사유 callback
|
|
|
|
|
$P.callbackRsn = (obj) => {
|
|
|
|
|
// 서버에 전송할 data(파라미터) 생성
|
|
|
|
|
let params = {
|
|
|
|
|
callPurpose: "remove"
|
|
|
|
|
, sggCd: $P.ctrlCvlcptDscsn.getValue("SGG_CD") // 시군구 코드
|
|
|
|
|
, taskSeCd: $P.ctrlCvlcptDscsn.getValue("TASK_SE_CD") // 업무 구분 코드
|
|
|
|
|
, cvlcptDscsnId: $P.ctrlCvlcptDscsn.getValue("CVLCPT_DSCSN_ID") // 민원상담 ID
|
|
|
|
|
, btnTitle: obj.btnTitle // 버튼 title
|
|
|
|
|
, delRsn: obj.reason // 삭제 사유
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 민원 상담 내용 Dialog
|
|
|
|
|
$P.ctrlCvlcptDscsn.getInfo = (params) => {
|
|
|
|
|
if (!params) return;
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url: wctx.url("/" + params.taskSeCd +"/sprt/sprt04/020/info.do")
|
|
|
|
|
, data: params || {}
|
|
|
|
|
, success: (resp) => {
|
|
|
|
|
let dialogName = $P.ctrlCvlcptDscsn.prefixed("Dialog");
|
|
|
|
|
let dialogId = dialogName + "-" + uuid();
|
|
|
|
|
|
|
|
|
|
dialog.open({
|
|
|
|
|
id: dialogId
|
|
|
|
|
, title: params.btnTitle
|
|
|
|
|
, size: "lg"
|
|
|
|
|
, content: resp
|
|
|
|
|
, init: () => {
|
|
|
|
|
$("#" + dialogId).attr("name", dialogName);
|
|
|
|
|
$("#" + dialogId).attr("data-ref-doctx", "${pageName}");
|
|
|
|
|
|
|
|
|
|
AppSupport.setDialogZindex();
|
|
|
|
|
}
|
|
|
|
|
, onClose: () => { $P.fnRefreshDataInfo(); } // 자료 재조회
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 민원 상담 삭제 callback
|
|
|
|
|
$P.ctrlCvlcptDscsn.onRemove = (params, resp) => {
|
|
|
|
|
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, params.btnTitle);
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: showMessage
|
|
|
|
|
, init: () => { AppSupport.setDialogZindex(); }
|
|
|
|
|
, onOK: () => { }
|
|
|
|
|
, onClose: () => {
|
|
|
|
|
if (resp.saved) { $P.fnRefreshDataInfo(); } // 자료 재조회
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 민원 상담 삭제
|
|
|
|
|
$P.ctrlCvlcptDscsn.remove = (params) => {
|
|
|
|
|
if (!params) return;
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url: wctx.url("/" + params.taskSeCd + "/sprt/sprt04/010/remove.do")
|
|
|
|
|
, data: params || {}
|
|
|
|
|
, success: (resp) => {
|
|
|
|
|
$P.ctrlCvlcptDscsn.onRemove(params, resp);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DataTables 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// DataTables에 click, dbclick 이벤트
|
|
|
|
|
$P.renderList = (totalSize, option) => {
|
|
|
|
|
let cvlcptDscsnList = $P.ctrlCvlcptDscsn.dataset;
|
|
|
|
|
let empty = cvlcptDscsnList.empty;
|
|
|
|
|
|
|
|
|
|
let trs = empty ? [$P.findn("tmpltNotFoundCvlcptDscsn").innerHTML] :
|
|
|
|
|
cvlcptDscsnList.inStrings($P.findn("tmpltCvlcptDscsnRows").innerHTML
|
|
|
|
|
, (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrlCvlcptDscsn.setCurrent('" + dataItem.getValue("CVLCPT_DSCSN_ID") + "');")
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$P.$findn("tbodyCvlcptDscsnList").html(trs.join());
|
|
|
|
|
$P.ctrlCvlcptDscsn.remove(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 사용자 함수(function)
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 자료 재조회
|
|
|
|
|
$P.fnRefreshDataInfo = () => {
|
|
|
|
|
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID
|
|
|
|
|
// 정보 새로고침
|
|
|
|
|
$P.fnRefresh = () => {
|
|
|
|
|
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain;
|
|
|
|
|
|
|
|
|
|
// 단속 ID 가 없다면.. return
|
|
|
|
|
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
|
|
|
|
|
if (!crdnId) return;
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
callPurpose: "refresh"
|
|
|
|
|
, inquiryCondition: "crdnId_vhrno"
|
|
|
|
|
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD")
|
|
|
|
|
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD")
|
|
|
|
|
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID")
|
|
|
|
|
, vhrno: pageObject["${mainPageName}"].mainCtrl.getValue("VHRNO")
|
|
|
|
|
, sggCd: ctrlMain.getValue("SGG_CD")
|
|
|
|
|
, taskSeCd: ctrlMain.getValue("TASK_SE_CD")
|
|
|
|
|
, crdnId: ctrlMain.getValue("CRDN_ID")
|
|
|
|
|
, vhrno: ctrlMain.getValue("VHRNO")
|
|
|
|
|
, delYn: "N"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -237,46 +148,34 @@
|
|
|
|
|
, data: params || {}
|
|
|
|
|
, success: (resp) => {
|
|
|
|
|
// 초기화
|
|
|
|
|
$P.findn("frmEditCvlcptDscsn").reset(); // 화면 초기화
|
|
|
|
|
$P.ctrlCvlcptDscsn.dataset.clear(); // 수납 Dataset 초기화
|
|
|
|
|
$P.findn("frmEditCvlcptDscsn").reset(); // 민원상담 화면
|
|
|
|
|
$P.ctrlCvlcptDscsn.dataset.clear(); // 민원상담 Dataset
|
|
|
|
|
|
|
|
|
|
// sprt02010-main 단속 정보
|
|
|
|
|
ctrlMain.setData([resp.totalInfo]);
|
|
|
|
|
|
|
|
|
|
// Dataset 셋팅
|
|
|
|
|
$P.ctrlCvlcptDscsn.setData(resp.cvlcptDscsns); // 민원상담 정보
|
|
|
|
|
// 민원상담 정보
|
|
|
|
|
$P.ctrlCvlcptDscsn.setData(resp.cvlcptDscsns);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 사유 callback
|
|
|
|
|
$P.callbackRsn = (obj) => {
|
|
|
|
|
// 서버에 전송할 data(파라미터) 생성
|
|
|
|
|
let params = {
|
|
|
|
|
callPurpose: "remove"
|
|
|
|
|
, sggCd: $P.ctrlCvlcptDscsn.getValue("SGG_CD") // 시군구 코드
|
|
|
|
|
, taskSeCd: $P.ctrlCvlcptDscsn.getValue("TASK_SE_CD") // 업무 구분 코드
|
|
|
|
|
, cvlcptDscsnId: $P.ctrlCvlcptDscsn.getValue("CVLCPT_DSCSN_ID") // 민원상담 ID
|
|
|
|
|
, btnTitle: obj.btnTitle // 버튼 title
|
|
|
|
|
, delRsn: obj.reason // 삭제 사유
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.ctrlCvlcptDscsn.remove(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 버튼 clickEvent
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 민원 상담 내용 등록
|
|
|
|
|
$P.fnCreateCvlcptDscsn = (btnTitle) => {
|
|
|
|
|
let crdnId = pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID"); // 단속 ID
|
|
|
|
|
|
|
|
|
|
// 단속 ID 가 없다면.. return
|
|
|
|
|
let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // sprt02010 control
|
|
|
|
|
let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID
|
|
|
|
|
if (!crdnId) return;
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
callPurpose: "create"
|
|
|
|
|
, btnTitle: btnTitle
|
|
|
|
|
, sggCd: pageObject["${mainPageName}"].mainCtrl.getValue("SGG_CD") // 시군구 코드
|
|
|
|
|
, taskSeCd: pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD") // 업무 구분 코드
|
|
|
|
|
, crdnId: pageObject["${mainPageName}"].mainCtrl.getValue("CRDN_ID") // 단속 ID
|
|
|
|
|
, sggCd: ctrlMain.getValue("SGG_CD") // 시군구 코드
|
|
|
|
|
, taskSeCd: ctrlMain.getValue("TASK_SE_CD") // 업무 구분 코드
|
|
|
|
|
, crdnId: ctrlMain.getValue("CRDN_ID") // 단속 ID
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.ctrlCvlcptDscsn.getInfo(params);
|
|
|
|
@ -284,9 +183,8 @@
|
|
|
|
|
|
|
|
|
|
// 민원 상담 내용 수정
|
|
|
|
|
$P.fnUpdateCvlcptDscsn = (btnTitle) => {
|
|
|
|
|
let cvlcptDscsnId = $P.ctrlCvlcptDscsn.getValue("CVLCPT_DSCSN_ID"); // 민원 상담 ID
|
|
|
|
|
|
|
|
|
|
// 민원 상담 ID 가 없다면.. return
|
|
|
|
|
let cvlcptDscsnId = $P.ctrlCvlcptDscsn.getValue("CVLCPT_DSCSN_ID"); // 민원 상담 ID
|
|
|
|
|
if (!cvlcptDscsnId) return;
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
@ -303,9 +201,8 @@
|
|
|
|
|
|
|
|
|
|
// 민원상담 내용 삭제
|
|
|
|
|
$P.fnRemoveCvlcptDscsn = (btnTitle) => {
|
|
|
|
|
let cvlcptDscsnId = $P.ctrlCvlcptDscsn.getValue("CVLCPT_DSCSN_ID"); // 민원 상담 ID
|
|
|
|
|
|
|
|
|
|
// 민원 상담 ID 가 없다면.. return
|
|
|
|
|
let cvlcptDscsnId = $P.ctrlCvlcptDscsn.getValue("CVLCPT_DSCSN_ID"); // 민원 상담 ID
|
|
|
|
|
if (!cvlcptDscsnId) return;
|
|
|
|
|
|
|
|
|
|
// 삭제 메세지 확인
|
|
|
|
@ -344,7 +241,7 @@
|
|
|
|
|
$P.fnCreateCvlcptDscsn($P.$findn("btnCreateCvlcptDscsn").attr("title")); // 민원상담 등록
|
|
|
|
|
});
|
|
|
|
|
$P.$findn("btnUpdateCvlcptDscsn").on("click", function() {
|
|
|
|
|
$P.fnCreateCvlcptDscsn($P.$findn("btnUpdateCvlcptDscsn").attr("title")); // 민원상담 수정
|
|
|
|
|
$P.fnUpdateCvlcptDscsn($P.$findn("btnUpdateCvlcptDscsn").attr("title")); // 민원상담 수정
|
|
|
|
|
});
|
|
|
|
|
$P.$findn("btnRemoveCvlcptDscsn").on("click", function() {
|
|
|
|
|
$P.fnRemoveCvlcptDscsn($P.$findn("btnRemoveCvlcptDscsn").attr("title")); // 민원상담 삭제
|
|
|
|
@ -355,17 +252,14 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
|
$P.initForm = () => {
|
|
|
|
|
// 초기화
|
|
|
|
|
$P.findn("frmEditCvlcptDscsn").reset(); // 화면 초기화
|
|
|
|
|
$P.ctrlCvlcptDscsn.dataset.clear(); // 수납 Dataset 초기화
|
|
|
|
|
$P.fnReset = () => {
|
|
|
|
|
// 화면 초기화
|
|
|
|
|
$P.findn("frmEditCvlcptDscsn").reset();
|
|
|
|
|
// Dataset 초기화
|
|
|
|
|
$P.ctrlCvlcptDscsn.dataset.clear(); // 수납 Dataset
|
|
|
|
|
|
|
|
|
|
// 화면 호출(callPurpose)이 view라면 버튼 비활성화 disabled = true
|
|
|
|
|
if (pageObject['${mainPageName}'].callPurpose == "view") {
|
|
|
|
|
$P.$findn("btnCreateCvlcptDscsn").prop("disabled", true);
|
|
|
|
|
$P.$findn("btnUpdateCvlcptDscsn").prop("disabled", true);
|
|
|
|
|
$P.$findn("btnRemoveCvlcptDscsn").prop("disabled", true);
|
|
|
|
|
} else {
|
|
|
|
|
if (pageObject['${pageNameMain}'].callPurpose != "view") {
|
|
|
|
|
$P.$findn("btnCreateCvlcptDscsn").prop("disabled", false);
|
|
|
|
|
$P.$findn("btnUpdateCvlcptDscsn").prop("disabled", false);
|
|
|
|
|
$P.$findn("btnRemoveCvlcptDscsn").prop("disabled", false);
|
|
|
|
@ -379,7 +273,7 @@
|
|
|
|
|
$P.setEvent();
|
|
|
|
|
|
|
|
|
|
// 2. 초기 화면 설정
|
|
|
|
|
$P.initForm();
|
|
|
|
|
$P.fnReset();
|
|
|
|
|
|
|
|
|
|
// 3. Dataset 설정
|
|
|
|
|
$P.ctrlCvlcptDscsn.setData(${cvlcptDscsns}); // 민원 상담 정보
|
|
|
|
|