From d34bf086b3e12955284bbaeaa3be81d1a1457704 Mon Sep 17 00:00:00 2001 From: leebj Date: Mon, 30 Sep 2024 10:55:45 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=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/mngt/mngt01010-main.jsp | 20 +++++++--- .../WEB-INF/jsp/fims/mngt/mngt01020-info.jsp | 40 ++++++++++++++++--- 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp index 39690d7e..06781c66 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp @@ -62,8 +62,12 @@ + @@ -257,14 +261,16 @@ $(document).ready(function(){ $P.getInfo(dataKey); } - $P.createNtc = () => { - $P.getInfo(); + $P.createNtc = (cntnSeCd) => { + $P.getInfo(null,cntnSeCd); } - $P.getInfo = (ntcId) => { + $P.getInfo = (ntcId,cntnSeCd) => { var params = {}; if(ntcId != null){ params.ntcId = ntcId; + } else { + params.cntnSeCd = cntnSeCd; } ajax.get({ @@ -314,7 +320,8 @@ $(document).ready(function(){ **************************************************************************/ $P.$findn("btnReset").on('click', () => $P.fnReset()); $P.$findn("btnSearch").on('click', () => $P.searchNtcList()); - $P.$findn("btnAdd").on('click', () => $P.createNtc()); + $P.$findn("btnAdd").on('click', () => $P.createNtc('01')); + $P.$findn("btnAdd2").on('click', () => $P.createNtc('02')); /************************************************************************** * 초기화 @@ -327,6 +334,7 @@ $(document).ready(function(){ if(!MY_INFO.info.isAdmin){ $P.$findn("btnAdd").attr("hidden","hidden"); + $P.$findn("btnAdd2").attr("hidden","hidden"); } }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp index 765bf699..c852c0f4 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp @@ -13,10 +13,10 @@
- @@ -163,14 +163,44 @@ $(document).ready(function(){ * 초기화 **************************************************************************/ var ntcInfo = ${ntcInfo}; - + if(ntcInfo == null){ + $P.$findn("sggCd").html(""); + + if(MY_INFO.orgID == "ADMIN"){ + $P.$findn("sggCd").append(""); + } + let selectableSggList = ${selectableSggList}; + if(selectableSggList != null){ + for(let i=0; i"+selectableSggList[i].SGG_NM+""); + } + } + ctrl.dataset.setData([]); + $P.$findn("cntnSeCd").val("${cntnSeCd}"); + $P.$findn("cntnSeCd").attr("disabled","disabled"); + + if(MY_INFO.orgID != "ADMIN"){ + if(selectableSggList != null && selectableSggList.length > 1){ + if("${cntnSeCd}" == "01"){ + $P.$findn("sggCd").val(MY_INFO.orgID); + } else { + if("${upSggCd}" != ""){ + $P.$findn("sggCd").val("${upSggCd}"); + } else { + $P.$findn("sggCd").val(MY_INFO.orgID); + } + } + } + } + $P.$findn("btnRemove").attr("hidden","hidden"); } else { - ctrl.dataset.setData([ntcInfo]); + ctrl.dataset.setData([ntcInfo]); + $P.$findn("sggCd").attr("disabled","disabled"); $P.$findn("cntnSeCd").attr("disabled","disabled"); @@ -180,7 +210,7 @@ $(document).ready(function(){ } } - + }); \ No newline at end of file