From dee17927e6f14b0563aea6fd6e10c3f79f709dab Mon Sep 17 00:00:00 2001 From: JoJH Date: Thu, 7 Nov 2024 18:24:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9A=B0=ED=8E=B8=ED=86=B5=ED=95=A9=20?= =?UTF-8?q?=EC=95=88=EB=82=B4=EB=AC=B8=20=EC=88=98=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 | 1038 ++++++++--------- .../WEB-INF/jsp/fims/epst/epst02020-info.jsp | 325 ++---- .../WEB-INF/jsp/fims/excl/excl01010-main.jsp | 11 +- .../WEB-INF/jsp/fims/excl/excl01020-info.jsp | 4 +- .../WEB-INF/jsp/fims/excl/excl02010-main.jsp | 11 +- .../WEB-INF/jsp/fims/excl/excl03010-main.jsp | 11 +- .../WEB-INF/jsp/fims/sprt/sprt04010-main.jsp | 19 +- .../resources/js/fims/epst/epst02010.js | 130 +++ .../resources/js/fims/epst/epst02020.js | 61 + 9 files changed, 813 insertions(+), 797 deletions(-) create mode 100644 src/main/webapp/resources/js/fims/epst/epst02010.js create mode 100644 src/main/webapp/resources/js/fims/epst/epst02020.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 de8dc458..757cdf6a 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 @@ -1,449 +1,352 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> -우편통합 안내문 +안내문 -
- -
-
- -
- - - - - -
- - - -
- - - - -
+
+ + + + +
+
+
+ + + + +
+ + +
+ +
    +
+
+ + + + + + +
+
+ + + +
+ +
+ +
+ + + +
diff --git a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02020-info.jsp index 6f8e5dd9..bd9d958c 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02020-info.jsp @@ -1,207 +1,140 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> -우편통합 안내문 정보 +안내문 상세 정보 -
- -
-
- -
- - - - - -
- -
- - -
- -
- - -
- -
- -
-
- -
-
-
- - - -
- - - - - - -
- -
-
- +
+ +
+
+ +
+ + + + + +
+
+ + +
+
+ + +
+ +
+ +
+
+ +
+
+
+ +
+ + +
+ + + + + + +
+ +
+
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 0f897975..4619bbba 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 @@ -599,13 +599,10 @@ // 초기화 이벤트 $P.fnReset = (taskSeCd) => { - // 화면 초기화 - $P.findn("frmSearch").reset(); - - // 달력 초기화 - AppSupport.initDatepicker($P.findn("frmSearch")); - // 상세검색 버튼 화살표 - AppSupport.initDetailSearchButton($P.findn("frmSearch")); + // 초기화 + $P.findn("frmSearch").reset(); // 화면 초기화 + AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화 + AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표 // input, select 초기화 let searchForm = $P.$findn("frmSearch"); diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01020-info.jsp index fb84355b..284b36fd 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01020-info.jsp @@ -47,7 +47,9 @@
- +
+
+
diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl02010-main.jsp index a8adf5e6..74e23325 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl02010-main.jsp @@ -784,13 +784,10 @@ // 초기화 버튼 이벤트 $P.fnReset = (taskSeCd) => { - // 화면 초기화 - $P.findn("frmSearch").reset(); - - // 달력 초기화 - AppSupport.initDatepicker($P.findn("frmSearch")); - // 상세검색 버튼 화살표 - AppSupport.initDetailSearchButton($P.findn("frmSearch")); + // 초기화 + $P.findn("frmSearch").reset(); // 화면 초기화 + AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화 + AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표 // input, select 초기화 let searchForm = $P.$findn("frmSearch"); diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl03010-main.jsp index eb5f0358..87247397 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl03010-main.jsp @@ -493,13 +493,10 @@ // 초기화 버튼 이벤트 $P.fnReset = (taskSeCd) => { - // 화면 초기화 - $P.findn("frmSearch").reset(); - - // 달력 초기화 - AppSupport.initDatepicker($P.findn("frmSearch")); - // 상세검색 버튼 화살표 - AppSupport.initDetailSearchButton($P.findn("frmSearch")); + // 초기화 + $P.findn("frmSearch").reset(); // 화면 초기화 + AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화 + AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표 // input, select 초기화 let searchForm = $P.$findn("frmSearch"); diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt04010-main.jsp index 977a88c4..a600ba92 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt04010-main.jsp @@ -197,7 +197,7 @@ -
+
@@ -250,7 +250,7 @@ Apply.toDataset.current($P.ctrl.dataset, dataIndex); } - // dataTable 더블 클릭 이벤트 - 개별총정보 dialog + // dataTable 더블 클릭 이벤트 - 상세정보 dialog $P.dataTableDblClick = (dataIndex) => { if (!dataIndex) return; @@ -468,10 +468,10 @@ // 업무 버튼 이벤트 $P.$findn("btnUpdate").on("click", function() { - $P.fnUpdate($P.$findn("btnUpdate").attr("title")); // 수정 + $P.fnUpdate($P.$findn("btnUpdate").attr("title")); // 민원상담 수정 }); $P.$findn("btnRemove").on("click", function() { - $P.fnRemove($P.$findn("btnRemove").attr("title")); // 삭제 + $P.fnRemove($P.$findn("btnRemove").attr("title")); // 민원상담 삭제 }); // DataTables width 변경 조정 @@ -482,13 +482,10 @@ // 초기화 이벤트 $P.fnReset = (taskSeCd) => { - // 화면 초기화 - $P.findn("frmSearch").reset(); - - // 달력 초기화 - AppSupport.initDatepicker($P.findn("frmSearch")); - // 상세검색 버튼 화살표 - AppSupport.initDetailSearchButton($P.findn("frmSearch")); + // 초기화 + $P.findn("frmSearch").reset(); // 화면 초기화 + AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화 + AppSupport.initDetailSearchButton($P.findn("frmSearch")); // 상세검색 버튼 화살표 // input, select 초기화 let searchForm = $P.$findn("frmSearch"); diff --git a/src/main/webapp/resources/js/fims/epst/epst02010.js b/src/main/webapp/resources/js/fims/epst/epst02010.js new file mode 100644 index 00000000..826e8372 --- /dev/null +++ b/src/main/webapp/resources/js/fims/epst/epst02010.js @@ -0,0 +1,130 @@ +function newEpst02010Script(pageName, doctx="[data-doctx='epst02010']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "epostGdntc" + , prefixName: "전자우편 안내문" + , dataGetter: obj => obj["List"] + , keys: ["GDNTC_ID"] + , appendData: true + , infoSize: "md" + , urls: { + load: "/list.do" + , getInfo: "/info.do" + , remove: "/remove.do" + } + , formats: { + LAST_USE_DT: datetimeFormat + , REG_DT: datetimeFormat + , MDFCN_DT: datetimeFormat + } + }); + + // 검색 조건 + ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인 + + /************************************************************************** + * DatasetControl Events + **************************************************************************/ + // Dataset 변경 이벤트 + 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}');") + .replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{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); + + // checkbox 체크 해제 + $(ctrl.find("[name='gridAllCheckbox']")).prop("checked", false); + + // dataTables(그리드)에 페이지 표시 pagingInfo + pageObject[pageName].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/epst/epst02020.js b/src/main/webapp/resources/js/fims/epst/epst02020.js new file mode 100644 index 00000000..2336b302 --- /dev/null +++ b/src/main/webapp/resources/js/fims/epst/epst02020.js @@ -0,0 +1,61 @@ +function newEpst02020Control(pageName, doctx="[data-doctx='epst02020']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "epostGdntc" + , prefixName: "안내문" + , dataGetter: obj => obj["info"] + , keys: ["GDNTC_ID"] + , urls: { + create: "/create.do" + , update: "/update.do" + } + }); + + /************************************************************************** + * DatasetControl Events + **************************************************************************/ + // 현재 선택 자료 변경 이벤트 + ctrl.onCurrentChange = (item) => { + if (!item) return; + + // 화면에 단속 Dataset 셋팅 + let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']")); + formFields.set(ctrl, item); + + // 업무구분에 따른 URL 변경 + ctrl.urls.create = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/020/create.do"); // 등록 + ctrl.urls.update = wctx.url("/" + item.data.TASK_SE_CD + pageObject[pageName].prefixUrl + "/020/update.do"); // 수정 + }; + + // 저장 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; + + let create = (params.gdntcId == ""); + + ajax.post({ + url: !create ? ctrl.urls.update : ctrl.urls.create + , data: params || {} + , success: (resp) => { ctrl.onSave(params, resp); } + }); + } + + return ctrl; +}