From 6ec2698e22fa34a3f73516f3f9e019300fa3a7a8 Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Mon, 1 Jul 2024 12:19:29 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=8F=90=EA=B8=B0=EB=B3=B4=EA=B3=A0=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=EB=90=9C=20=EB=8D=B0=EC=9D=B4=ED=83=80=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=B2=98=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/adds/cmm/model/DsuseMappingInfo.java | 1 + .../jsp/adds/nims/dsuseMgtMapping-info.jsp | 39 +++++------------ .../jsp/adds/nims/dsuseMgtMapping-main.jsp | 42 +++++++++++++++---- 3 files changed, 44 insertions(+), 38 deletions(-) diff --git a/src/main/java/cokr/xit/adds/cmm/model/DsuseMappingInfo.java b/src/main/java/cokr/xit/adds/cmm/model/DsuseMappingInfo.java index 439e45b..41f2397 100644 --- a/src/main/java/cokr/xit/adds/cmm/model/DsuseMappingInfo.java +++ b/src/main/java/cokr/xit/adds/cmm/model/DsuseMappingInfo.java @@ -75,4 +75,5 @@ public class DsuseMappingInfo { private String dsuseSeCd; private String dsuseMthCd; private String dsuseLoc; + private String prgrsSttsCd; } diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-info.jsp index 1f4656a..ad4e761 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-info.jsp @@ -13,6 +13,7 @@
+
@@ -395,27 +396,8 @@ $("#tbody--${pageName}MappingDtl").setCurrentRow(key); } -/* - - // 저장 callback - $P.control.onSave = (resp) => { - let dialogTitle = $("#" + $P.control.prefix + "Dialog--${openerPageName}").find("h5.modal-title").html(); - let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle); - - // 메시지 출력 - dialog.alert({ - content: showMessage - , init: () => { setDialogZindex(); } - , onOK: () => { } - }); - - if (resp.saved) { - dialog.close($P.control.prefix + "Dialog--${openerPageName}"); - } - } */ // 저장 $P.control.save = () => { -// debugger; ajax.post({ url: '' , data: JSON.stringify({ @@ -529,9 +511,6 @@ **************************************************************************/ // 저장 $P.fnSave = () => { - // validate 확인 - //if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; - //let checkData = $("input[name='maapingCheck']:checked").val(); let checkData = $("#setUsrRptIdNo--${pageName}").val(); $P.mappingControl.setCurrent(checkData); const row = $P.mappingControl.getCurrent(); @@ -556,16 +535,11 @@ $P.setEvent = () => { // 버튼 이벤트 - $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 + $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 } // 초기 화면 설정 $P.initForm = () => { -// fnMakeScrollableTable($("#table-responsive-0--${pageName}")[0], $P.scrollDataList); -// fnMakeScrollableTable($("#table-responsive-1--${pageName}")[0], $P.scrollDataList); -// fnMakeScrollableTable($("#table-responsive-2--${pageName}")[0], $P.scrollDataList); - // Dialog 마우스로 드래그 할 수 있도록 설정. - //fnMakeDraggableDialog(document.getElementById($P.control.prefix + "Dialog")); } @@ -580,7 +554,14 @@ // 3. Dataset 설정 $P.control.setData([${dsuseMappingInfo}]); -// $P.productControl.setData([${dsuseMappingInfo}]); + + // NIMS 보고 완료 확인인 경우 저장 버튼 숨김 + if($P.control.getCurrent().prgrsSttsCd == "99"){ + $("#btnSave--${pageName}").hide(); + }else{ + $("#btnSave--${pageName}").show(); + } + }); diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp index 2b906c9..253b830 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp @@ -91,6 +91,7 @@ 업체명 보고건수 처리상태 + NIMS보고ID 폐기구분 폐기사유 폐기방법 @@ -108,6 +109,9 @@ {BSSH_NM} {RND_DTL_RPT_CNT} {PRGRS_STTS_NM} + + {USR_RPT_ID_NO} + {DSUSE_SE_NM} {DSUSE_PRV_NM} {DSUSE_MTH_NM} @@ -221,11 +225,7 @@ $P.detailControl = new DatasetControl({ urls : { load : wctx.url("/adds/nims/dsuseMgtDetail-list.do") - // FIXME: POST로 변경 - //load : '' } -// , query.schDscdmngId : $P.control.getValue("DSCDMNG_ID") -// , data : {"schDscdmngId" : $P.control.getValue("DSCDMNG_ID")} , prefix : "dsuseMgtDetail" , prefixName : "신청서접수상세" , keymapper : info => info ? info.DSCDMNG_SN : "" @@ -285,10 +285,33 @@ // 맵핑 dialog - $P.control.getInfo = (gdccId) => { - let dialogTitle = "폐기 보고 확인 등록"; + $P.control.getInfo = (dscdmngId, isConfirm) => { + let dialogTitle = "NIMS 폐기 보고 확인 등록"; let row = $P.control.dataset.getCurrent(); if (typeof row == "undefined" || row == null || row == "") return; + + // 그리드 더블클릭시 - NIMS 보고 완료 미 처리된 데이타인 경우 + if(isConfirm){ + $P.control.setCurrent(dscdmngId); + row = $P.control.dataset.getCurrent(); + if(!row.USR_RPT_ID_NO) return false; + + if(row.PRGRS_STTS_CD != "99") { + dialog.alert('NIMS 보고 완료 처리 되지 않은 데이타 입니다'); + return false; + } + } + + // 처리상태가 완료인 경우 + if(row.PRGRS_STTS_CD == "99") { + dialogTitle = "NIMS 폐기 보고 완료 확인"; + + // NIMS폐기보고확인 버튼 클릭시 - 보고 완료 처리된 데이타인 경우 매핑 조회 불가 + if(!isConfirm) { + dialog.alert('NIMS 보고 완료 처리된 데이타 입니다'); + return false; + } + } let params = { dscdmngId: row.DSCDMNG_ID, bsshNm: row.BSSH_NM, @@ -302,7 +325,8 @@ dsusePrvCd: row.DSUSE_PRV_CD, dsuseSeCd: row.DSUSE_SE_CD, dsuseMthCd: row.DSUSE_MTH_CD, - dsuseLoc: row.DSUSE_LOC + dsuseLoc: row.DSUSE_LOC, + prgrsSttsCd: row.PRGRS_STTS_CD }; ajax.get({ @@ -374,8 +398,8 @@ // let replacer = (str, dataItem) => str - .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("DSCDMNG_ID") + "');"); -// .replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');"); + .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("DSCDMNG_ID") + "');") + .replace(/{ondblclick}/gi, "pageObject['${pageName}'].control.getInfo('" + dataItem.getValue("DSCDMNG_ID") + "'," + true + ");"); let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML] : ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);