From 160b2f8fed480d23c520e02a279ff66f2cb2296c Mon Sep 17 00:00:00 2001 From: JoJH Date: Wed, 13 Nov 2024 15:33:12 +0900 Subject: [PATCH] =?UTF-8?q?1.=20=EA=B3=84=EA=B3=A0=EC=9E=A5=20=EB=B0=9C?= =?UTF-8?q?=EC=86=A1=20=ED=98=84=ED=99=A9=20=EC=88=98=EC=A0=95.=202.=20?= =?UTF-8?q?=EA=B3=84=EA=B3=A0=EC=9E=A5=20=EC=82=AD=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/epst/epst02010-main.jsp | 2 +- .../WEB-INF/jsp/fims/excl/excl01010-main.jsp | 10 +- .../WEB-INF/jsp/fims/excl/excl02010-main.jsp | 6 +- .../WEB-INF/jsp/fims/excl/excl03010-main.jsp | 6 +- .../WEB-INF/jsp/fims/sndb/sndb01010-main.jsp | 15 +- .../WEB-INF/jsp/fims/sndb/sndb01030-main.jsp | 1134 ++++++++--------- .../WEB-INF/jsp/fims/sndb/sndb01040-info.jsp | 656 +++++----- .../WEB-INF/jsp/fims/sprt/sprt02050-info.jsp | 26 +- .../resources/js/fims/excl/excl01010.js | 2 - .../resources/js/fims/excl/excl01020.js | 5 +- .../resources/js/fims/sndb/sndb01030.js | 149 +++ .../resources/js/fims/sndb/sndb01040.js | 96 ++ .../resources/js/fims/sprt/sprt02050.js | 3 +- 13 files changed, 1089 insertions(+), 1021 deletions(-) create mode 100644 src/main/webapp/resources/js/fims/sndb/sndb01030.js create mode 100644 src/main/webapp/resources/js/fims/sndb/sndb01040.js diff --git a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02010-main.jsp index ba94ff31..aa04a9df 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02010-main.jsp @@ -181,7 +181,7 @@ - +
diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp index bafc63a3..324d2c55 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp @@ -3,7 +3,7 @@ 부과제외 - +
@@ -279,11 +279,11 @@
- +
- + diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01040-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01040-info.jsp index 50e06e11..548606c7 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01040-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01040-info.jsp @@ -3,370 +3,302 @@ 계고장 발송 현황 상세 정보 - -
- -
- - -
- -
- - - -
- - - -
- - -
- -
    -
-
- - - - - -
-
- - -
- -
-
- - -
- + +
+ +
+ +
+ +
+ + + +
+ + + +
+ + +
+ +
    +
+
+ + + + + +
+
+ + +
+ +
+
+ +
+
- + diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02050-info.jsp index b06bd0e8..f362b521 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02050-info.jsp @@ -133,6 +133,12 @@
+ + + +
@@ -143,9 +149,11 @@ 등록일시 등록사용자 + 사용여부 단속상태 기타내용 - 사용여부 + 수정일시 + 수정사용자 @@ -155,15 +163,17 @@ {REG_DT} {RGTR_NM} + {USE_YN_NM} {CRDN_STTS_NM} {ETC_CN} - {USE_YN_NM} + {MDFCN_DT} + {MDFR_NM} @@ -267,7 +277,7 @@ // 서버에 전송할 data(파라미터) 생성 let params = { callPurpose: "remove" - , sggCd: $P.ctrlLevyExcl.getValue("SGG_CD") // 시군구 코드 + , sggCd: $P.ctrlLevyExcl.getValue("SGG_CD") // 시군구 코드 , taskSeCd: $P.ctrlLevyExcl.getValue("TASK_SE_CD") // 업무 구분 코드 , levyExclId: $P.ctrlLevyExcl.getValue("LEVY_EXCL_ID") // 부과제외 ID , btnTitle: obj.btnTitle // 버튼 title @@ -278,18 +288,24 @@ } // 정보 새로고침 - $P.fnRefresh = () => { + $P.fnRefresh = (crdnSttsHstryUseYn) => { let ctrlMain = pageObject["${pageNameMain}"].ctrlMain; // 단속 ID 가 없다면.. return let crdnId = ctrlMain.getValue("CRDN_ID"); // 단속 ID if (!crdnId) return; + let unusedInq = "N"; + if (crdnSttsHstryUseYn == true) { + unusedInq = "Y"; + } + let params = { callPurpose: "refresh" , sggCd: ctrlMain.getValue("SGG_CD") , taskSeCd: ctrlMain.getValue("TASK_SE_CD") , crdnId: ctrlMain.getValue("CRDN_ID") + , unusedInq: unusedInq , delYn: "N" }; diff --git a/src/main/webapp/resources/js/fims/excl/excl01010.js b/src/main/webapp/resources/js/fims/excl/excl01010.js index 8c0f2c9e..c974fdad 100644 --- a/src/main/webapp/resources/js/fims/excl/excl01010.js +++ b/src/main/webapp/resources/js/fims/excl/excl01010.js @@ -10,8 +10,6 @@ function newExcl01010Control(pageName, doctx="[data-doctx='excl01010']") { , urls: { load: "/list.do" , getInfo: "/info.do" - , create: "/create.do" - , update: "/update.do" , remove: "/remove.do" } , formats: { diff --git a/src/main/webapp/resources/js/fims/excl/excl01020.js b/src/main/webapp/resources/js/fims/excl/excl01020.js index bde71eb2..e006877e 100644 --- a/src/main/webapp/resources/js/fims/excl/excl01020.js +++ b/src/main/webapp/resources/js/fims/excl/excl01020.js @@ -6,11 +6,8 @@ function newExcl01020Control(pageName, doctx="[data-doctx='excl01020']") { , dataGetter: obj => obj["Info"] , keys: ["LEVY_EXCL_ID"] , urls: { - load: "/list.do" - , getInfo: "/info.do" - , create: "/create.do" + create: "/create.do" , update: "/update.do" - , remove: "/remove.do" } }); diff --git a/src/main/webapp/resources/js/fims/sndb/sndb01030.js b/src/main/webapp/resources/js/fims/sndb/sndb01030.js new file mode 100644 index 00000000..cc54a5f4 --- /dev/null +++ b/src/main/webapp/resources/js/fims/sndb/sndb01030.js @@ -0,0 +1,149 @@ +function newSndb01030Control(pageName, doctx="[data-doctx='sndb01030']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "wrngSndng" + , prefixName: "계고장 발송 현황" + , dataGetter: obj => obj["List"] + , keys: ["SNDNG_ID"] + , appendData: true + , infoSize: "xxl" + , urls: { + load: "/list.do" + , getInfo: "/info.do" + , remove: "/remove.do" + } + , formats: { + SNDNG_YMD: dateFormat + , SNDNG_END_YMD: dateFormat + , TNOCS: numberFormat + , GRAMT: numberFormat + , REG_DT: datetimeFormat + , MDFCN_DT: datetimeFormat + } + }); + + // 검색 조건 + ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인 + // paging + ctrl.pagingSupport = new FimsPagingSupport({ + ctrl: ctrl // DatasetControl + , ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시 + , linkContainer: "[name='dataPaging']" //
    + }); + + /************************************************************************** + * DatasetControl Events + **************************************************************************/ + // Dataset 변경 이벤트 + ctrl.onDatasetChange = (obj, option) => { + // 데이터 셋 + let dataList = ctrl.dataset; + let empty = dataList.empty; + let clsForTask = $(ctrl.find("[name='frmSearch']")).find("[name='taskSeCd']:checked").val().toLowerCase(); + + // 업무별 dataTables(그리드) tr, td + let foundContent = ctrl.find("[name='tmpltRows']").content; + let foundTr = $(foundContent).find("tr")[0].cloneNode(false); + let foundTds = $(foundContent).find("." + clsForTask + ",.cmn"); + + foundTds.each(function() { + foundTr.appendChild(this.cloneNode(true)); + }); + + let replacer = (str, dataItem) => str + .replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');") + .replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');"); + + let trs = empty ? + [ctrl.find("[name='tmpltNotFound']").content.querySelector("." + clsForTask + ",.cmn").outerHTML] + : dataList.inStrings(foundTr.outerHTML, replacer); + + let noMore = (dataList.length >= obj["Paging"]?.totalSize); // 전체 건수 + let initScroll = (ctrl.query.pageNum < 2); + + if (option != null && option.reloaded) { + initScroll = false; + } + + // dataTables(그리드)에 자료 표시 td + ctrl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore); + + // checkbox 체크 해제 + $(ctrl.find("[name='gridAllCheckbox']")).prop("checked", false); + + // dataTables(그리드)에 페이지 표시 pagingInfo + ctrl.pagingSupport.setPagingInfo(obj); + + // 보안모드 + fn_securityModeToggle($("#securityMode--top").is(":checked")); + }; + + // 현재 선택 자료 변경 이벤트 + ctrl.onCurrentChange = (item) => { + Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']")); + }; + + // 선택(체크) 변경 이벤트 + ctrl.onSelectionChange = (selectedArr) => { + // gridCheckbox + Apply.fromDataset.gridCheckbox(ctrl.dataset, ctrl.find("[name='tbodyList']"), 1, selectedArr); + // gridButton + Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnRemove']"), selectedArr); // 삭제 버튼 + }; + + // 상세 정보 dialog + ctrl.getInfo = (params) => { + if (!params) return; + + ajax.get({ + url: ctrl.urls.getInfo + , data: params || {} + , success: (resp) => { + let dialogName = ctrl.prefixed("Dialog"); + let dialogId = dialogName + "-" + uuid(); + + dialog.open({ + id: dialogId + , title: params.btnTitle + , size: ctrl.infoSize + , content: resp + , init: () => { + $("#" + dialogId).attr("name", dialogName); + $("#" + dialogId).attr("data-ref-doctx", pageName); + + AppSupport.setDialogZindex(); + } + , onClose: () => { ctrl.reload({all : true}); } // 자료 재조회 + }); + } + }); + } + + // 삭제 callback + ctrl.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) { ctrl.reload({ all: true }); } // 자료 재조회 + } + }); + } + + // 삭제 + ctrl.remove = (params) => { + if (!params) return; + + ajax.post({ + url: ctrl.urls.remove + , data: params || {} + , success: (resp) => { ctrl.onRemove(params, resp); } + }); + } + + return ctrl; +} diff --git a/src/main/webapp/resources/js/fims/sndb/sndb01040.js b/src/main/webapp/resources/js/fims/sndb/sndb01040.js new file mode 100644 index 00000000..0a707f01 --- /dev/null +++ b/src/main/webapp/resources/js/fims/sndb/sndb01040.js @@ -0,0 +1,96 @@ +function newSndb01040Control(pageName, doctx="[data-doctx='sndb01040']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "wrngSndng" + , prefixName: "계고장 발송 현황" + , dataGetter: obj => obj["List"] + , keys: ["SNDNG_DTL_ID"] + , appendData: true + , urls: { + load: "/list.do" + } + , formats: { + SNDNG_YMD: dateFormat + , DUDT_YMD: dateFormat + , FFNLG_AMT: numberFormat + , REG_DT: datetimeFormat + , MDFCN_DT: datetimeFormat + } + }); + + // 검색 조건 + ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인 + // paging + ctrl.pagingSupport = new FimsPagingSupport({ + ctrl: ctrl // DatasetControl + , ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시 + , linkContainer: "[name='dataPaging']" //
      + }); + + /************************************************************************** + * DatasetControl Events + **************************************************************************/ + ctrl.onDatasetChange = (obj, option) => { + // 데이터 셋 + let dataList = ctrl.dataset; + let empty = dataList.empty; + + let replacer = (str, dataItem) => str + .replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');"); + + let trs = empty ? + [ctrl.find("[name='tmpltNotFound']").innerHTML] + : dataList.inStrings(ctrl.find("[name='tmpltRows']").innerHTML, replacer); + + let noMore = (dataList.length >= obj["Paging"]?.totalSize); // 전체 건수 + let initScroll = (ctrl.query.pageNum < 2); + + if (option != null && option.reloaded) { + initScroll = false; + } + + // dataTables(그리드)에 자료 표시 td + ctrl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore); + + // dataTables(그리드)에 페이지 표시 pagingInfo + ctrl.pagingSupport.setPagingInfo(obj); + + // 보안모드 + fn_securityModeToggle($("#securityMode--top").is(":checked")); + }; + + // 현재 선택 자료 변경 이벤트 + ctrl.onCurrentChange = (item) => { + Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']")); + }; + + // 저장 callback + ctrl.onSave = (params, resp) => { + let modalId = $(document.querySelector(doctx)).parents(".modal")[0].id; + let dialogTitle = $("#" + modalId).find("h5.modal-title").html(); + let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle); + + // 메시지 출력 + dialog.alert({ + content: showMessage + , init: () => { AppSupport.setDialogZindex(); } + , onOK: () => { } + , onClose: () => { + if (resp.saved) { dialog.close(modalId); } + } + }); + } + + // 저장 + ctrl.save = (params) => { + if (!params) return; + + ajax.post({ + url: ctrl.urls.create + , data: params || {} + , success: (resp) => { ctrl.onSave(params, resp); } + }); + } + + return ctrl; +} diff --git a/src/main/webapp/resources/js/fims/sprt/sprt02050.js b/src/main/webapp/resources/js/fims/sprt/sprt02050.js index cf76c7a5..b1713183 100644 --- a/src/main/webapp/resources/js/fims/sprt/sprt02050.js +++ b/src/main/webapp/resources/js/fims/sprt/sprt02050.js @@ -190,7 +190,8 @@ function newSprt02050ControlCSH(pageName, doctx="[data-doctx='sprt02050']", main , getInfo: "/info.do" } , formats: { - REG_DT: datetimeFormat + REG_DT: datetimeFormat + , MDFCN_DT: datetimeFormat } });