From a678def771688a20e9144274f6dbac9d281c797d Mon Sep 17 00:00:00 2001 From: JoJH Date: Fri, 1 Nov 2024 14:27:42 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A9=EB=B6=80=EC=9E=90=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/fims/payer/payer01020-info.jsp | 804 +++++++++--------- .../resources/js/fims/payer/payer01020.js | 62 ++ 2 files changed, 442 insertions(+), 424 deletions(-) create mode 100644 src/main/webapp/resources/js/fims/payer/payer01020.js diff --git a/src/main/webapp/WEB-INF/jsp/fims/payer/payer01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/payer/payer01020-info.jsp index eda005e3..35e85fa1 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/payer/payer01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/payer/payer01020-info.jsp @@ -4,433 +4,389 @@ 납부자 상세 정보 -
- -
-
- -
- - - - - - - - - -
- -
- - -
- -
- - - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - - - -
- -
- - - -
- -
- - - - - - -
- -
- - - - - -
- -
- - -
-
-
- - - -
- - - - - - -
- -
-
- +
+ +
+
+ +
+ + + + + + + + + +
+
+ + +
+
+ + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + + +
+
+ + + +
+
+ + + + + + +
+
+ + + + + +
+
+ + +
+
+
+ + + +
+ + + + + + +
+ +
+
+
diff --git a/src/main/webapp/resources/js/fims/payer/payer01020.js b/src/main/webapp/resources/js/fims/payer/payer01020.js new file mode 100644 index 00000000..c5fc02ec --- /dev/null +++ b/src/main/webapp/resources/js/fims/payer/payer01020.js @@ -0,0 +1,62 @@ +function newPayer01020Control(pageName, doctx="[data-doctx='payer01020']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "payer" + , prefixName: "납부자" + , dataGetter: obj => obj["Info"] + , keys: ["RTPYR_ID"] + , urls: { + load: "/list.do" + , create: "/create.do" + , update: "/update.do" + } + , formats: { + CRDN_YMD_TM: datetimeFormat + } + }); + + /************************************************************************** + * DatasetControl Events + **************************************************************************/ + // 현재 선택 자료 변경 이벤트 + ctrl.onCurrentChange = (item) => { + if (!item) return; + + // 화면에 단속 Dataset 셋팅 + let formFields = new FimsFormFields(ctrl.selector("[name='frmEdit']")); + formFields.set(ctrl, item); + + // 업무구분에 따른 URL 변경 + pageObject[pageName].fnSetURL(item.data.TASK_SE_CD); + }; + + // 저장 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; +}