From 0e74e6cec03f739bb8483060c9510ac54397ef5e Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Fri, 19 Jul 2024 13:01:58 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=8F=90=EA=B8=B0=EA=B2=B0=EA=B3=BC=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20fix=20=20=20=20=20=20->=20=EB=8F=99?= =?UTF-8?q?=EC=9D=BC=ED=95=9C=20=ED=8F=90=EA=B8=B0=EC=9D=BC=EC=9E=90=20+?= =?UTF-8?q?=20=ED=8F=90=EA=B8=B0=EB=B0=A9=EB=B2=95=EC=9D=98=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=83=80=EA=B0=80=202=EA=B1=B4=20=EC=9D=B4=EC=83=81?= =?UTF-8?q?=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20=20=20=20=20=20->=20=ED=8F=90?= =?UTF-8?q?=EA=B8=B0=EC=9D=BC=EC=9E=90,=20=ED=8F=90=EA=B8=B0=EB=B0=A9?= =?UTF-8?q?=EB=B2=95=20=EB=B3=80=EA=B2=BD=20=EB=B6=88=EA=B0=80=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/adds/nims/dsuseMgtRslt-mapper.xml | 6 ++++++ .../jsp/adds/nims/dsuseMgtRslt-info.jsp | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/resources/sql/mapper/adds/nims/dsuseMgtRslt-mapper.xml b/src/main/resources/sql/mapper/adds/nims/dsuseMgtRslt-mapper.xml index 9e393fc..cacd758 100644 --- a/src/main/resources/sql/mapper/adds/nims/dsuseMgtRslt-mapper.xml +++ b/src/main/resources/sql/mapper/adds/nims/dsuseMgtRslt-mapper.xml @@ -11,6 +11,12 @@ , tcc.CODE_VAL AS DSUSE_MTH_NM , tdm.DSUSE_DE , IF(#{dscdmngId} = tdm.DSCDMNG_ID, 'Y', 'N') AS SEL_YN + , (SELECT count(dscdmng_id) + FROM tb_dsuse_mgt + WHERE use_yn = 'Y' + AND dept_cd = #{deptCd} + AND dsuse_mth_cd = #{dsuseMthCd} + AND dsuse_de = #{dsuseDe}) AS SAVE_CNT FROM tb_dsuse_mgt tdm JOIN tb_cmn_code tcc ON (tdm.dsuse_mth_cd = tcc.code diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp index 0e576ae..74e762d 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp @@ -55,7 +55,7 @@ - +
@@ -72,7 +72,7 @@ - +
@@ -146,6 +146,8 @@ let isImgChange = true; // 원 데이타셋 저장 let orgDataset = {}; + // 이전 폐기결과이미지 목록 + <%--let dsuseRsltImgList = ${dsuseRsltImgList};--%> const searchRsltImgList = () => { document.getElementById("rsltImgList").innerHTML = ""; @@ -175,11 +177,15 @@ // 폐기결과 이미지를 등록한 폐기관리 ID면 skip - 이미지 추가 삭제 가능 let isSelf = list.filter(item => item.SEL_YN == 'Y') + if(isSelf.length > 0){ - $('#dsuseDe--${pageName}').prop('disabled', true); - $('#dsuseMthCd--${pageName}').prop('disabled', true); - $('#spnDsuseDe').show(); - $('#spnDsuseMthCd').show(); + // 등록된 폐기 관리가 2개 이상이면 폐기일자, 폐기방법 변경 불가 + if(list[0].SAVE_CNT > 1){ + $('#dsuseDe--${pageName}').prop('disabled', true); + $('#dsuseMthCd--${pageName}').prop('disabled', true); + $('#spnDsuseDe').show(); + $('#spnDsuseMthCd').show(); + } return; }