From bb296b8597acb90eddc88ff3291f7e4deea94ef8 Mon Sep 17 00:00:00 2001 From: JoJH Date: Mon, 11 Nov 2024 16:13:52 +0900 Subject: [PATCH] =?UTF-8?q?1.=20=EA=B0=90=EC=95=A1=20=EC=88=98=EC=A0=95.?= =?UTF-8?q?=202.=20=EA=B8=B0=ED=83=80=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/excl/excl01010-main.jsp | 2 +- .../WEB-INF/jsp/fims/levy/levy01020-info.jsp | 6 +- .../WEB-INF/jsp/fims/rdca/rdca01010-main.jsp | 1360 +++++++---------- .../resources/js/fims/levy/levy01020.js | 5 - .../resources/js/fims/levy/levy02020.js | 5 - .../resources/js/fims/rdca/rdca01010.js | 148 ++ 6 files changed, 739 insertions(+), 787 deletions(-) create mode 100644 src/main/webapp/resources/js/fims/rdca/rdca01010.js 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 4b9b304f..8574aed0 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 @@ -57,7 +57,7 @@
- + - + +
@@ -27,7 +27,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/jsp/fims/rdca/rdca01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/rdca/rdca01010-main.jsp index c2229281..69a1eb41 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/rdca/rdca01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/rdca/rdca01010-main.jsp @@ -1,783 +1,597 @@ <%@ 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/resources/js/fims/levy/levy01020.js b/src/main/webapp/resources/js/fims/levy/levy01020.js index 28c51375..c15f1c8d 100644 --- a/src/main/webapp/resources/js/fims/levy/levy01020.js +++ b/src/main/webapp/resources/js/fims/levy/levy01020.js @@ -9,11 +9,6 @@ function newLevy01020Control(pageName, doctx="[data-doctx='levy01020']") { create: "/create.do" , update: "/update.do" } - , formats: { - TNOCS: numberFormat - , GRAMT_FFNLG_AMT: numberFormat - , GRAMT_ADVNTCE_AMT: numberFormat - } }); /************************************************************************** diff --git a/src/main/webapp/resources/js/fims/levy/levy02020.js b/src/main/webapp/resources/js/fims/levy/levy02020.js index cfb20429..5366683e 100644 --- a/src/main/webapp/resources/js/fims/levy/levy02020.js +++ b/src/main/webapp/resources/js/fims/levy/levy02020.js @@ -9,11 +9,6 @@ function newLevy02020Control(pageName, doctx="[data-doctx='levy02020']") { create: "/create.do" , update: "/update.do" } - , formats: { - FFNLG_CRDN_AMT: numberFormat // 과태료 단속 금액 - , WKSN_RDCRT: numberFormat // 사회적약자 감경율 - , RDCT_AMT: numberFormat // 감경 금액 - } }); /************************************************************************** diff --git a/src/main/webapp/resources/js/fims/rdca/rdca01010.js b/src/main/webapp/resources/js/fims/rdca/rdca01010.js new file mode 100644 index 00000000..40e59b30 --- /dev/null +++ b/src/main/webapp/resources/js/fims/rdca/rdca01010.js @@ -0,0 +1,148 @@ +function newRdca01010Control(pageName, doctx="[data-doctx='rdca01010']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "rdcamt" + , prefixName: "감액" + , dataGetter: obj => obj["List"] + , keys: ["RDAMT_ID"] + , appendData: true + , infoSize: "md" + , urls: { + load: "/list.do" + , getInfo: "/info.do" + , remove: "/remove.do" + } + , formats : { + RDAMT_YMD: dateFormat + , FFNLG_CRDN_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 + **************************************************************************/ + // 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='btnCreateSlctnTrgt']"), 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; +}