From 62db4b7590b925bed0f66ebeadb802d71774c539 Mon Sep 17 00:00:00 2001 From: JoJH Date: Wed, 13 Nov 2024 18:18:44 +0900 Subject: [PATCH] =?UTF-8?q?1.=20=EC=82=AC=EC=A0=84=ED=86=B5=EC=A7=80=20?= =?UTF-8?q?=EB=B0=9C=EC=86=A1=20=EB=8C=80=EC=83=81=20=EC=88=98=EC=A0=95.?= =?UTF-8?q?=202.=20=EA=B8=B0=ED=83=80=20=EC=98=A4=EB=A5=98=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/sndb/sndb01010-main.jsp | 58 +- .../WEB-INF/jsp/fims/sndb/sndb01020-info.jsp | 2 + .../WEB-INF/jsp/fims/sndb/sndb01030-main.jsp | 28 +- .../WEB-INF/jsp/fims/sndb/sndb01040-info.jsp | 48 +- .../WEB-INF/jsp/fims/sndb/sndb01050-main.jsp | 1329 ++++++++--------- .../WEB-INF/jsp/fims/sprt/sprt02020-info.jsp | 12 +- .../WEB-INF/jsp/fims/sprt/sprt02030-info.jsp | 2 +- .../resources/js/fims/sndb/sndb01010.js | 2 +- .../resources/js/fims/sndb/sndb01020.js | 3 +- .../resources/js/fims/sndb/sndb01040.js | 3 +- .../resources/js/fims/sndb/sndb01050.js | 127 ++ 11 files changed, 808 insertions(+), 806 deletions(-) create mode 100644 src/main/webapp/resources/js/fims/sndb/sndb01050.js diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01010-main.jsp index a1552e9f..b1ba96da 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01010-main.jsp @@ -150,10 +150,10 @@ - - @@ -223,27 +223,27 @@ {CRDN_YMD_TM} {VHRNO} {RTPYR_SE_NM} - + {RTPYR_NO} ************* - {RTPYR_NM} - {VLTN_ARTCL} - {CRDN_STDG_NM} - {CRDN_PLC} - {DTL_CRDN_PLC} - {FFNLG_CRDN_AMT} - {CRDN_STTS_NM} - {CRDN_SPAREA_NM} - {USE_FUEL_NM} - {PRK_PSBLTY_RSLT_NM} - {ZIP} - {ADDR} - {DTL_ADDR} - {REG_DT} - {RGTR_NM} - {MDFCN_DT} - {MDFR_NM} + {RTPYR_NM} + {VLTN_ARTCL} + {CRDN_STDG_NM} + {CRDN_PLC} + {DTL_CRDN_PLC} + {FFNLG_CRDN_AMT} + {CRDN_STTS_NM} + {CRDN_SPAREA_NM} + {USE_FUEL_NM} + {PRK_PSBLTY_RSLT_NM} + {ZIP} + {ADDR} + {DTL_ADDR} + {REG_DT} + {RGTR_NM} + {MDFCN_DT} + {MDFR_NM} @@ -318,7 +318,7 @@ let atLeastOne = GRID.checkbox.countChecked(element) > 0; - $P.$findn("btnCreateSlctnTrgtInfo").prop("disabled", !atLeastOne); + $P.$findn("btnCreateSlctnTrgt").prop("disabled", !atLeastOne); Apply.toDataset.selection($P.ctrl.dataset, element, bool); } @@ -562,14 +562,13 @@ } // 선택 발송대상 등록 버튼 이벤트 - $P.fnCreateSlctnTrgtInfo = (btnTitle) => { + $P.fnCreateSlctnTrgt = (btnTitle) => { let selected = $P.ctrl.getDataset("selected"); // 선택 자료 if (selected.length < 1) return; // 파라미터 설정 let params = $P.ctrl.query; // 검색 조건 - params.btnTitle = btnTitle; // 버튼 title params.callPurpose = "create"; // 호출 용도 (등록) params.crdnIds = selected.map(info => info.CRDN_ID).join(",") // 단속 IDs @@ -585,7 +584,7 @@ } // 전체 발송대상 등록 버튼 이벤트 - $P.fnCreateWholTrgtInfo = (btnTitle) => { + $P.fnCreateWholTrgt = (btnTitle) => { if ($P.ctrl.dataset.empty) { dialog.alert({ content: "검색된 자료가 없습니다." @@ -597,7 +596,6 @@ // 파라미터 설정 let params = $P.ctrl.query; // 검색 조건 - params.btnTitle = btnTitle; // 버튼 title params.callPurpose = "create"; // 호출 용도 (등록) params.crdnIds = null; // 단속 IDs @@ -628,13 +626,13 @@ // 업무 버튼 이벤트 $P.$findn("btnUpdateWrng").on("click", function() { - $P.fnUpdateWrng($P.$findn("btnUpdateWrng").attr("title")); // 계고 수정 + $P.fnUpdateWrng($P.$findn("btnUpdateWrng").attr("title")); // 계고 수정 }); - $P.$findn("btnCreateSlctnTrgtInfo").on("click", function() { - $P.fnCreateSlctnTrgtInfo($P.$findn("btnCreateSlctnTrgtInfo").attr("title")); // 선택 대상 등록 + $P.$findn("btnCreateSlctnTrgt").on("click", function() { + $P.fnCreateSlctnTrgt($P.$findn("btnCreateSlctnTrgt").attr("title")); // 선택 대상 등록 }); - $P.$findn("btnCreateWholTrgtInfo").on("click", function() { - $P.fnCreateWholTrgtInfo($P.$findn("btnCreateWholTrgtInfo").attr("title")); // 전체 대상 등록 + $P.$findn("btnCreateWholTrgt").on("click", function() { + $P.fnCreateWholTrgt($P.$findn("btnCreateWholTrgt").attr("title")); // 전체 대상 등록 }); // DataTables width 변경 조정 diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01020-info.jsp index ed129da1..9ed7c5bf 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01020-info.jsp @@ -12,6 +12,7 @@
+
@@ -299,6 +300,7 @@ // 기본 데이터 설정 $P.$findn("sggCd").val("${sggCd}"); // 시군구 코드 $P.$findn("taskSeCd").val("${taskSeCd}"); // 업무 구분 코드 + $P.$findn("vltnCd").val("${vltnCd}"); // 위반 코드 $P.$findn("sndngYmd").datepicker("setDate", TODAY()); // 발송 일자 $P.$findn("sndngEndYmd").datepicker("setDate", TODAY()); // 납기 일자 diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01030-main.jsp index de726ba1..5b242426 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01030-main.jsp @@ -171,20 +171,20 @@ {ROW_NUM} - {TASK_SE_NM} - {SNDNG_REG_SE_NM} - {SNDNG_SE_NM} - {VLTN_ARTCL} - {SNDNG_YMD} - {SNDNG_END_YMD} - {TNOCS} - {GRAMT} - {DOC_NO} - {TTL_NM} - {REG_DT} - {RGTR_NM} - {MDFCN_DT} - {MDFR_NM} + {TASK_SE_NM} + {SNDNG_REG_SE_NM} + {SNDNG_SE_NM} + {VLTN_ARTCL} + {SNDNG_YMD} + {SNDNG_END_YMD} + {TNOCS} + {GRAMT} + {DOC_NO} + {TTL_NM} + {REG_DT} + {RGTR_NM} + {MDFCN_DT} + {MDFR_NM} 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 548606c7..b7cdf127 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 @@ -75,29 +75,29 @@ @@ -277,7 +277,7 @@ // 초기화 이벤트 $P.fnReset = (taskSeCd) => { // 초기화 - $P.findn("frmSearch").reset(); // 화면 초기화 + $P.findn("frmEdit").reset(); // 화면 초기화 // 기본 데이터 설정 $P.$findn("sggCd").val("${sggCd}"); // 시군구 코드 diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01050-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01050-main.jsp index 2a857475..d950af8b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01050-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01050-main.jsp @@ -3,740 +3,607 @@ 사전통지 발송 대상 - -
- -
-
- -
- - - - - -
- - - - - - - - - - - - +
+ + +
- + diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp index 76be8d36..20933428 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp @@ -237,10 +237,10 @@ - - @@ -942,7 +942,13 @@ existVideo = true; } - initPhotoMain("${pageName}", crdnPayerInfo.fileList, existVideo); + // 사진 버튼 visible + let showBtn = true; + if (pageObject["${pageNameMain}"].callPurpose == "view") { + showBtn = false; + } + + initPhotoMain("${pageName}", crdnPayerInfo.fileList, existVideo, showBtn); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02030-info.jsp index 2ecd9bf9..d9fe35df 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02030-info.jsp @@ -127,7 +127,7 @@ - diff --git a/src/main/webapp/resources/js/fims/sndb/sndb01010.js b/src/main/webapp/resources/js/fims/sndb/sndb01010.js index 8a011f83..dd93ec8d 100644 --- a/src/main/webapp/resources/js/fims/sndb/sndb01010.js +++ b/src/main/webapp/resources/js/fims/sndb/sndb01010.js @@ -88,7 +88,7 @@ function newSndb01010Control(pageName, doctx="[data-doctx='sndb01010']") { // gridCheckbox Apply.fromDataset.gridCheckbox(ctrl.dataset, ctrl.find("[name='tbodyList']"), 1, selectedArr); // gridButton - Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnCreateSlctnTrgtInfo']"), selectedArr); // 선택 대상 등록 버튼 + Apply.fromDataset.gridButton(ctrl.dataset, ctrl.find("[name='btnCreateSlctnTrgt']"), selectedArr); // 선택 대상 등록 버튼 }; // 상세 정보 dialog diff --git a/src/main/webapp/resources/js/fims/sndb/sndb01020.js b/src/main/webapp/resources/js/fims/sndb/sndb01020.js index 07355eef..e3c81239 100644 --- a/src/main/webapp/resources/js/fims/sndb/sndb01020.js +++ b/src/main/webapp/resources/js/fims/sndb/sndb01020.js @@ -40,7 +40,8 @@ function newSndb01020Control(pageName, doctx="[data-doctx='sndb01020']") { let empty = dataList.empty; let replacer = (str, dataItem) => str - .replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');"); + .replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');") + .replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');"); let trs = empty ? [ctrl.find("[name='tmpltNotFound']").innerHTML] diff --git a/src/main/webapp/resources/js/fims/sndb/sndb01040.js b/src/main/webapp/resources/js/fims/sndb/sndb01040.js index 0a707f01..2c44dda0 100644 --- a/src/main/webapp/resources/js/fims/sndb/sndb01040.js +++ b/src/main/webapp/resources/js/fims/sndb/sndb01040.js @@ -36,7 +36,8 @@ function newSndb01040Control(pageName, doctx="[data-doctx='sndb01040']") { let empty = dataList.empty; let replacer = (str, dataItem) => str - .replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');"); + .replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');") + .replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');"); let trs = empty ? [ctrl.find("[name='tmpltNotFound']").innerHTML] diff --git a/src/main/webapp/resources/js/fims/sndb/sndb01050.js b/src/main/webapp/resources/js/fims/sndb/sndb01050.js new file mode 100644 index 00000000..3e8f3b0d --- /dev/null +++ b/src/main/webapp/resources/js/fims/sndb/sndb01050.js @@ -0,0 +1,127 @@ +function newSndb01050Control(pageName, doctx="[data-doctx='sndb01050']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "advntceTrgt" + , prefixName: "사전통지 발송 대상" + , dataGetter: obj => obj["List"] + , keys: ["CRDN_ID"] + , appendData: true + , infoSize: "xl" + , urls: { + load: "/list.do" + , getInfo: "/info.do" + , remove: "/remove.do" + } + , formats: { + CVLCPT_RCPT_YMD: dateFormat + , CRDN_YMD_TM: datetimeFormat + , FFNLG_AMT: numberFormat + , ADVNTCE_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.query.crdnIds = null; // 단속 IDs + + ctrl.reload({all : true}); // 자료 재조회 + } + }); + } + }); + } + + return ctrl; +}