From 0f2e4e4cf93931d68bd4255b74d37415d9ab7611 Mon Sep 17 00:00:00 2001 From: jjh Date: Tue, 6 Feb 2024 18:37:08 +0900 Subject: [PATCH] =?UTF-8?q?1.=20=EB=B0=9C=EC=86=A1=EB=B0=98=EC=86=A1=20-?= =?UTF-8?q?=20=EC=82=AC=EC=A0=84=ED=86=B5=EC=A7=80=20=EB=B0=9C=EC=86=A1=20?= =?UTF-8?q?=EB=8C=80=EC=83=81=20=EC=88=98=EC=A0=95.=202.=20=EB=B0=9C?= =?UTF-8?q?=EC=86=A1=EB=B0=98=EC=86=A1=20-=20=EC=82=AC=EC=A0=84=ED=86=B5?= =?UTF-8?q?=EC=A7=80=20=EB=B0=9C=EC=86=A1=20=ED=98=84=ED=99=A9=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 --- .../java/cokr/xit/fims/sndb/SndbQuery.java | 20 + .../xit/fims/sndb/web/Sndb01Controller.java | 20 +- .../sql/mapper/fims/sndb/sndng-mapper.xml | 68 +- .../WEB-INF/jsp/fims/excl/excl01010-main.jsp | 5 +- .../WEB-INF/jsp/fims/excl/excl02010-main.jsp | 1 + .../WEB-INF/jsp/fims/levy/levy01020-info.jsp | 6 +- .../WEB-INF/jsp/fims/levy/levy02010-main.jsp | 1 + .../WEB-INF/jsp/fims/sndb/sndb01010-main.jsp | 62 +- .../WEB-INF/jsp/fims/sndb/sndb01020-info.jsp | 18 +- .../WEB-INF/jsp/fims/sndb/sndb01030-main.jsp | 82 +- .../WEB-INF/jsp/fims/sndb/sndb01050-main.jsp | 786 ++++++++++-------- .../WEB-INF/jsp/fims/sndb/sndb01060-info.jsp | 482 ++++++----- .../WEB-INF/jsp/fims/sndb/sndb01070-main.jsp | 704 +++++++++------- 13 files changed, 1314 insertions(+), 941 deletions(-) diff --git a/src/main/java/cokr/xit/fims/sndb/SndbQuery.java b/src/main/java/cokr/xit/fims/sndb/SndbQuery.java index d52ab51f..ab8f5817 100644 --- a/src/main/java/cokr/xit/fims/sndb/SndbQuery.java +++ b/src/main/java/cokr/xit/fims/sndb/SndbQuery.java @@ -51,6 +51,8 @@ public class SndbQuery extends CmmnQuery { private String vhrno; // 단속(TB_CRDN)_차량번호 private String rtpyrNm; // 납부자(TB_PAYER)_납부자 명 private String crdnSttsCd; // 단속(TB_CRDN)_단속 상태 코드 + private String crdnSttsCdFrom; // 단속(TB_CRDN)_단속 상태 코드 시작 + private String crdnSttsCdTo; // 단속(TB_CRDN)_단속 상태 코드 종료 private String sndngSeCd; // 발송 구분 코드 private String sndngSeCdFrom; // 발송 구분 코드 시작 private String sndngSeCdTo; // 발송 구분 코드 종료 @@ -347,6 +349,24 @@ public class SndbQuery extends CmmnQuery { return self(); } + public String getCrdnSttsCdFrom() { + return ifEmpty(crdnSttsCdFrom, () -> null); + } + + public T setCrdnSttsCdFrom(String crdnSttsCdFrom) { + this.crdnSttsCdFrom = crdnSttsCdFrom; + return self(); + } + + public String getCrdnSttsCdTo() { + return ifEmpty(crdnSttsCdTo, () -> null); + } + + public T setCrdnSttsCdTo(String crdnSttsCdTo) { + this.crdnSttsCdTo = crdnSttsCdTo; + return self(); + } + public String getSndngSeCd() { return ifEmpty(sndngSeCd, () -> null); } diff --git a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java index c1a8dc36..b7048230 100644 --- a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java +++ b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java @@ -244,7 +244,7 @@ public class Sndb01Controller extends ApplicationController { .addObject("infoPrefix", "wrngTrgt") // prefix .addObject("callPurpose", req.getCallPurpose()) // 호출 용도 .addObject("mainQuery", toJson(req)) // 검색 조건 - .addObject("wrngTrgtList", toJson(mav.getModel().get("wrngTrgtList"))) // 자료 + .addObject("wrngTrgtList", toJson(mav.getModel().get("wrngTrgtList"))) // 자료 ; } @@ -569,22 +569,22 @@ public class Sndb01Controller extends ApplicationController { * } */ public ModelAndView getAdvanceNoticeTargetInfo(SndbQuery req) { - List advntceTrgts = sndngService.getAdvntceTrgts(req); + // + ModelAndView mav = getAdvanceNoticeTargetList(req); // 사전통지 납기일자 DataObject advntceYmdInfo = taskBean.getAdvntceYmdInfo(new CmmnQuery().setSggCd(req.getSggCd()) - .setTaskSeCd(req.getTaskSeCd())); - - boolean json = jsonResponse(); + .setTaskSeCd(req.getTaskSeCd())); - ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/sndb/sndb01060-info"); + mav.setViewName("fims/sndb/sndb01060-info"); return mav - .addObject("pageName", "sndb01060") + .addObject("pageName", "sndb01060") // View(jsp)에서 사용할 id 뒤에 붙일 suffix + .addObject("infoPrefix", "advntceTrgt") // prefix .addObject("callPurpose", req.getCallPurpose()) // 호출 용도 - .addObject("advntceTrgtQuery", json ? req : toJson(req)) // Query - .addObject("advntceTrgt", json ? advntceTrgts : toJson(advntceTrgts)) // 사전통지 발송 대상 정보 - .addObject("advntceYmdInfo", json ? advntceYmdInfo : toJson(advntceYmdInfo)) // 사전통지 기간 정보 + .addObject("mainQuery", toJson(req)) // 검색 조건 + .addObject("advntceTrgtList", toJson(mav.getModel().get("advntceTrgtList"))) // 자료 + .addObject("advntceYmdInfo", toJson(advntceYmdInfo)) // 사전통지 기간 정보 ; } diff --git a/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml b/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml index 03877f86..190173fb 100644 --- a/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml @@ -403,14 +403,14 @@ @@ -434,11 +434,11 @@ , C.MDFCN_DT , C.MDFR , (CONCAT(C.CRDN_YMD, C.CRDN_TM)) AS CRDN_YMD_TM - , (SELECT GET_CODE_NM('FIM054', C.TASK_SE_CD) FROM DUAL) AS TASK_SE_NM - , (SELECT GET_CODE_NM('FIM003', C.CRDN_INPT_SE_CD) FROM DUAL) AS CRDN_INPT_SE_NM - , (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = C.RGTR) AS RGTR_NM - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = C.MDFR) AS MDFR_NM + , (SELECT GET_CODE_NM('FIM054', C.TASK_SE_CD) FROM DUAL) AS TASK_SE_NM + , (SELECT GET_CODE_NM('FIM003', C.CRDN_INPT_SE_CD) FROM DUAL) AS CRDN_INPT_SE_NM + , (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = C.RGTR) AS RGTR_NM + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = C.MDFR) AS MDFR_NM , CA.CRDN_SE_CD , CA.DTL_CRDN_PLC , CA.CRDN_SPAREA_CD @@ -450,10 +450,10 @@ , CA.PARKNG_PSBLTY_RSLT_CD , CA.VLTN_NMTM , CA.OVTIME_YN - , (SELECT GET_CODE_NM('FIM002', CA.CRDN_SE_CD) FROM DUAL) AS CRDN_SE_NM - , (SELECT GET_CODE_NM('FIM007', CA.CRDN_SPAREA_CD) FROM DUAL) AS CRDN_SPAREA_NM - , (SELECT GET_CODE_NM('LVS005', CA.USE_FUEL_CD) FROM DUAL) AS USE_FUEL_NM - , (SELECT GET_CODE_NM('FIM009', CA.FFNLG_CARMDL_CD) FROM DUAL) AS FFNLG_CARMDL_NM + , (SELECT GET_CODE_NM('FIM002', CA.CRDN_SE_CD) FROM DUAL) AS CRDN_SE_NM + , (SELECT GET_CODE_NM('FIM007', CA.CRDN_SPAREA_CD) FROM DUAL) AS CRDN_SPAREA_NM + , (SELECT GET_CODE_NM('LVS005', CA.USE_FUEL_CD) FROM DUAL) AS USE_FUEL_NM + , (SELECT GET_CODE_NM('FIM009', CA.FFNLG_CARMDL_CD) FROM DUAL) AS FFNLG_CARMDL_NM , (SELECT GET_CODE_NM('FIM034', CA.PARKNG_PSBLTY_RSLT_CD) FROM DUAL) AS PARKNG_PSBLTY_RSLT_NM , V.VLTN_ID , V.VLTN_CD @@ -467,8 +467,9 @@ , CC.CVLCPT_PRCS_PIC_NM , CC.CVLCPT_PRCS_CD , CC.CVLCPT_PRCS_CMPTN_DT - , (SELECT GET_CODE_NM('FIM017', CC.CVLCPT_PRCS_CD) FROM DUAL) AS CVLCPT_PRCS_NM + , (SELECT GET_CODE_NM('FIM017', CC.CVLCPT_PRCS_CD) FROM DUAL) AS CVLCPT_PRCS_NM , P.RTPYR_ID + , P.RTPYR_SE_CD , P.RTPYR_NO , P.RTPYR_NM , P.RTPYR_BRDT @@ -485,25 +486,23 @@ INNER JOIN TB_VLTN V ON (C.VLTN_ID = V.VLTN_ID AND C.SGG_CD = V.SGG_CD AND C.TASK_SE_CD = V.TASK_SE_CD) LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_ID = CC.CVLCPT_LINK_ID AND C.CVLCPT_LINK_YN = 'Y' AND CC.DEL_YN = 'N') LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) - WHERE C.SGG_CD = #{sggCd} - AND C.TASK_SE_CD = #{taskSeCd} + WHERE C.SGG_CD = #{sggCd} + AND C.TASK_SE_CD = #{taskSeCd} AND (CC.CVLCPT_PRCS_CD IS NULL OR CC.CVLCPT_PRCS_CD ]]> '00') - AND C.CRDN_ID IN ( + AND C.CRDN_ID IN ( #{crdnId} ) - AND C.CRDN_ID = #{crdnId} + AND C.CRDN_ID = #{crdnId} + + + AND C.CRDN_STTS_CD =]]> #{crdnSttsCdFrom} + + + AND C.CRDN_STTS_CD #{crdnSttsCdTo} - - - AND C.CRDN_STTS_CD BETWEEN '23' AND '31' - - - AND C.CRDN_STTS_CD BETWEEN '21' AND '23' - - AND C.CRDN_YMD =]]> #{schCrdnYmdFrom} @@ -511,15 +510,15 @@ AND C.CRDN_YMD #{schCrdnYmdTo} - AND V.VLTN_CD = #{schVltnCd} + AND V.VLTN_CD = #{schVltnCd} - AND C.VHRNO = #{schVhrno} + AND C.VHRNO = #{schVhrno} - AND P.RTPYR_NM = #{schRtpyrNm} + AND P.RTPYR_NM = #{schRtpyrNm} - AND C.DEL_YN = 'N' + AND C.DEL_YN = 'N' @@ -543,12 +542,12 @@ - AND C.RGTR = #{schRgtrCd} + AND C.RGTR = #{schRgtrCd} - AND C.MDFR = #{schRgtrCd} + AND C.MDFR = #{schRgtrCd} @@ -606,7 +605,8 @@ 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 13202b80..a26a28ac 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 @@ -190,8 +190,8 @@ 부과제외구분 부과제외사유 기타내용 - 민원신청번호 - 민원접수번호 + 민원신청번호 + 민원접수번호 민원접수일자 단속일시 차량번호 @@ -373,6 +373,7 @@ // 삭제 버튼 $("#btnRemove--${pageName}").prop("disabled", keys.length < 1); + // DataTables(그리드) 전체 선택(checkbox) if (keys.length < 1) { $("th input[type='checkbox']").prop("checked", false); // 체크 해제 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 627f980d..e71cae7e 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 @@ -419,6 +419,7 @@ // 삭제 버튼 $("#btnRemove--${pageName}").prop("disabled", keys.length < 1); + // DataTables(그리드) 전체 선택(checkbox) if (keys.length < 1) { $("th input[type='checkbox']").prop("checked", false); // 체크 해제 diff --git a/src/main/webapp/WEB-INF/jsp/fims/levy/levy01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/levy/levy01020-info.jsp index 2461015f..57ba56d5 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/levy/levy01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/levy/levy01020-info.jsp @@ -185,9 +185,6 @@ }); }); - // 업무 버튼 이벤트 - $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 - // 부과 일자 변경 이벤트 $("#levyYmd--${pageName}").on("change", function() { let levyYmd = $("#levyYmd--${pageName}").val(); @@ -195,6 +192,9 @@ $("#dudtYmd--${pageName}").val(addDate(levyYmd, Number(advntceDayCnt))); }); + + // 업무 버튼 이벤트 + $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 } // 초기 화면 설정 diff --git a/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp index c622c859..439ab4f6 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp @@ -324,6 +324,7 @@ // 삭제 버튼 $("#btnRemove--${pageName}").prop("disabled", keys.length < 1); + // DataTables(그리드) 전체 선택(checkbox) if (keys.length < 1) { $("th input[type='checkbox']").prop("checked", false); // 체크 해제 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 7c384ac3..7cb62bda 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 @@ -192,8 +192,8 @@ 계고일자 계고사유 기타내용 - 민원신청번호 - 민원접수번호 + 민원신청번호 + 민원접수번호 민원접수일자 민원처리담당자 민원처리결과 @@ -377,6 +377,7 @@ // 선택 대상 등록 버튼 $("#btnSlctnTrgtInfo--${pageName}").prop("disabled", keys.length < 1); + // DataTables(그리드) 전체 선택(checkbox) if (keys.length < 1) { $("th input[type='checkbox']").prop("checked", false); // 체크 해제 @@ -524,6 +525,15 @@ }); } + // 검색 자료 재조회 + $P.refreshList = () => { + $P.control.untilPageNum = $P.control.query.pageNum; + $P.control.query.fetchSize = $P.control.defaultFetchSize * $P.control.query.pageNum; + $P.control.query.crdnIDs = null; + + $P.control.load(1); + } + // 계고 수정 dialog -> callback 추가 $P.getLevyExclInfo = (params) => { if (!params) return; @@ -543,15 +553,6 @@ }); } - // 검색 자료 재조회 - $P.refreshList = () => { - $P.control.untilPageNum = $P.control.query.pageNum; - $P.control.query.fetchSize = $P.control.defaultFetchSize * $P.control.query.pageNum; - $P.control.query.crdnIDs = null; - - $P.control.load(1); - } - /************************************************************************** * 버튼 clickEvent **************************************************************************/ @@ -578,7 +579,7 @@ // 검색조건 $P.control.query = $P.formFields.get(); $P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수 - $P.control.query.crdnSttsCd = "83"; // 계고 상태 + $P.control.query.crdnSttsCd = "83"; // 단속 처리 상태 - 83:계고 $P.control.query.delYN = "N"; // 삭제 여부 $P.control.load(1); @@ -646,14 +647,14 @@ // 파라미터 설정 let params = $P.control.query; // 검색 조건 params.callPurpose = "create"; // 호출 용도 (등록) - params.resndYN = "N"; // 재발송 여부 - params.delYN = "N"; // 삭제 여부 if (params.taskSeCd == "DPV" && params.schVltnId == "05") { params.sndngSeCd = "12"; // 발송 구분 코드 - 12 계고장 구형표지 } else { params.sndngSeCd = "11"; // 발송 구분 코드 - 11 계고장 } params.crdnIDs = selected.join(","); // IDs + params.resndYN = "N"; // 재발송 여부 + params.delYN = "N"; // 삭제 여부 $P.control.getInfo(params); } @@ -672,13 +673,13 @@ // 파라미터 설정 let params = $P.control.query; // 검색 조건 params.callPurpose = "create"; // 호출 용도 (등록) - params.resndYN = "N"; // 재발송 여부 - params.delYN = "N"; // 삭제 여부 if (params.taskSeCd == "DPV" && params.schVltnId == "05") { params.sndngSeCd = "12"; // 발송 구분 코드 - 12 계고장 구형표지 } else { params.sndngSeCd = "11"; // 발송 구분 코드 - 11 계고장 } + params.resndYN = "N"; // 재발송 여부 + params.delYN = "N"; // 삭제 여부 $P.control.getInfo(params); } @@ -775,20 +776,6 @@ renderForTask("frmSearch--${pageName}", clsForTask); - // 업무별 그리드 th - $("#DataTables_Table_0--${pageName}").find("th").resizable( "destroy" ); - - let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; - let cols = $(colContent).find("." + clsForTask + ",.cmn"); - let colsOuterHTML = ""; - - cols.each(function() { - colsOuterHTML += this.outerHTML; - }); - - $("#theadTr--${pageName}").html(colsOuterHTML); - $("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} ); - // 업무에 따른 위반 내용 let vltnIdCode = []; @@ -808,12 +795,25 @@ // 위반 항목 $("#schVltnId--${pageName}").empty(); - $("#schVltnId--${pageName}").append(""); $(vltnIdCode).each(function(index, item) { $("#schVltnId--${pageName}").append(""); }); + // 업무별 그리드 th + $("#DataTables_Table_0--${pageName}").find("th").resizable( "destroy" ); + + let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; + let cols = $(colContent).find("." + clsForTask + ",.cmn"); + let colsOuterHTML = ""; + + cols.each(function() { + colsOuterHTML += this.outerHTML; + }); + + $("#theadTr--${pageName}").html(colsOuterHTML); + $("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} ); + // URL 설정 $P.setURL(taskSeCd); } 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 f0357b3e..dc3192e0 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 @@ -5,7 +5,7 @@
- 계고장 발송대상 정보 + 계고장 발송 대상 정보
@@ -62,7 +62,7 @@
- @@ -81,8 +81,8 @@ No. 계고일자 계고사유 - 민원신청번호 - 민원접수번호 + 민원신청번호 + 민원접수번호 민원접수일자 민원처리결과 단속일시 @@ -305,9 +305,9 @@ let params = { callControlName : "pageObject['${pageName}'].control" , callPurpose : "view" - , sggCd : $("#sggCd--${pageName}").val() - , taskSeCd : $("input[name=taskSeCd]:checked").val() , crdnId : crdnId + , sggCd : $P.control.dataset.getValue("SGG_CD") + , taskSeCd : $P.control.dataset.getValue("TASK_SE_CD") } ajax.get({ @@ -406,9 +406,9 @@ // 초기 데이터 설정 $P.initData = () => { - $("#tnocs--${pageName}").val(${wrngTrgtTotal}); // 총건수 - $("#gramt--${pageName}").val($P.control.dataset.getValue("GRAMT")); // 총금액 - + // 총건수 / 총금액 + $("#tnocs--${pageName}").val(${wrngTrgtTotal}); + $("#gramt--${pageName}").val($P.control.dataset.getValue("GRAMT")); // 발송 종료 일자 $("#sndngEndYmd--${pageName}").val(""); $("#sndngEndYmd--${pageName}").prop("disabled", true); 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 a940305d..8b1ae861 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 @@ -299,6 +299,7 @@ // 삭제 버튼 $("#btnRemove--${pageName}").prop("disabled", keys.length < 1); + // DataTables(그리드) 전체 선택(checkbox) if (keys.length < 1) { $("th input[type='checkbox']").prop("checked", false); // 체크 해제 @@ -314,15 +315,16 @@ if (typeof sndngId == "undefined" || sndngId == null || sndngId == "") return; let params = $P.control.query; - params.callPurpose = "view"; // 호출 용도 - params.sndngId = sndngId; // 발송 ID + params.callPurpose = "view"; // 호출 용도 + params.pageNum = 1; // 페이지 번호 + params.sndngId = sndngId; // 발송 ID ajax.get({ url : $P.control.urls.getInfo , data : params || {} , success : resp => { dialog.open({ - id : "wrngSndngDtlDialog" + id : $P.control.prefixed("DtlDialog") , title : "계고장 발송 상세 정보" , content : resp , size : $P.control.infoSize @@ -331,6 +333,33 @@ }); } + // 삭제 callback + $P.control.onRemove = (resp) => { + let btnTitle = $("#btnRemove--${pageName}").attr("title"); + let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, btnTitle); + + // 메시지 출력 + dialog.alert({ + content : showMessage + , onOK : () => { } + }); + + if (resp.saved) { + $P.refreshList(); + } + } + + // 삭제 + $P.control.remove = (params) => { + if (!params) return; + + ajax.post({ + url : $P.control.urls.remove + , data : params + , success : resp => $P.control.onRemove(resp) + }); + } + /************************************************************************** * DataTables 이벤트 **************************************************************************/ @@ -420,6 +449,16 @@ $P.control.load(1); } + // 삭제 callback + $P.callbackRemove = (obj) => { + // 서버에 전송할 data(파라미터) 생성 + let params = {}; + params.sndngIDs = selected.join(","); // IDs + params.delRsn = obj.reason; // 삭제 사유 + + $P.control.remove(params); + } + /************************************************************************** * 버튼 clickEvent **************************************************************************/ @@ -477,6 +516,37 @@ $P.getFindUser(); } + // 삭제 버튼 이벤트 + $P.fnRemove = () => { + // 선택 자료 + let selected = $P.control.dataset.getKeys("selected"); + + if (selected.length < 1) return; + + // 삭제 메세지 확인 + dialog.alert({ + content : "선택하신 " + selected.length + "건의 " + $P.control.prefixName + " 정보를 삭제하시겠습니까?" + , onOK : () => { + // 삭제 사유 입력 + let popupWidth = 640; + let popupHeight = 240; + let popupX = (window.screen.width / 2) - (popupWidth / 2); + let popupY = (window.screen.height / 2) - (popupHeight / 2); + + window.open( + encodeURI(wctx.url("/resources/html/inputRsnDialog.html" + + "?openerPageName=${pageName}" + + "&prefix=" + $P.control.prefix + + "&usePurpose=" + "remove" + + "&ttlNm=" + "삭제" + )) + , "inputDelRsnDialog" + , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY + ); + } + }); + } + /************************************************************************** * 초기 셋팅 **************************************************************************/ @@ -509,6 +579,7 @@ }); // 업무 버튼 이벤트 + $("#btnRemove--${pageName}").on("click", () => $P.fnRemove()); // 계고장 발송 삭제 // DataTables width 변경 조정 $("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} ); @@ -586,8 +657,9 @@ // 업무구분에 따른 URL 설정 $P.setURL = (taskSeCd) => { - $P.control.urls.load = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/030/list.do"); // 조회 - $P.control.urls.getInfo = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/040/info.do"); // 계고장 발송 정보 + $P.control.urls.load = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/030/list.do"); // 조회 + $P.control.urls.remove = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/030/remove.do"); // 삭제 + $P.control.urls.getInfo = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/040/info.do"); // 계고장 발송 정보 } /************************************************************************** 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 f8da986e..7e00f637 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 @@ -149,8 +149,11 @@
- + @@ -169,11 +172,13 @@ +