From 01abe0542647923f7b4b70cef9572d0a1c249c95 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 10 Aug 2023 15:51:55 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=EC=A0=91=EC=88=98=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=EC=A0=95=EB=B3=B4=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=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/crdn/crdn01010-main.jsp | 23 ++++- .../WEB-INF/jsp/fims/crdn/crdn01020-info.jsp | 93 ++++++++++++++++--- .../WEB-INF/jsp/fims/crdn/crdn01050-info.jsp | 12 ++- .../WEB-INF/jsp/fims/crdn/crdn01060-info.jsp | 6 +- .../WEB-INF/jsp/fims/crdn/crdn05030-info.jsp | 64 +++++++------ 5 files changed, 144 insertions(+), 54 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp index 551875b5..69a2393f 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp @@ -233,6 +233,7 @@ $(document).ready(function(){ **************************************************************************/ $P.fnReset = () => { $P.holdList = []; + $("#btnOpenCvlcptOrgnl--${pageName}").show(); $("#btnDelete--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show(); @@ -282,9 +283,11 @@ $(document).ready(function(){ $("#crdnTbody--${pageName}").setCurrentRow(dataKey); if($P.holdList.includes(dataKey)){ + $("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnDelete--${pageName}").hide(); $("#btnDeleteSameRcptYmd--${pageName}").hide(); } else { + $("#btnOpenCvlcptOrgnl--${pageName}").show(); $("#btnDelete--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show(); } @@ -292,6 +295,10 @@ $(document).ready(function(){ $P.dblclickCrdnList = (dataKey) => { + if($P.holdList.includes(dataKey)){ + return; + } + var dialogId = "cvlcptInitialDataEditDialog--${pageName}"; ajax.get({ @@ -367,6 +374,7 @@ $(document).ready(function(){ $P.holdList.push(curKey); $("#crdnTbody--${pageName}").find("tr[data-key='"+curKey+"']").addClass("bg-dark"); + $("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnDelete--${pageName}").hide(); $("#btnDeleteSameRcptYmd--${pageName}").hide(); } @@ -456,7 +464,11 @@ $(document).ready(function(){ var ds = $P.crdnControl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(ds.length > index+1){ - return ds[index+1]["CRDN_ID"]; + if($P.holdList.includes(ds[index+1]["CRDN_ID"])){ + return $P.provide.getNextKey(ds[index+1]["CRDN_ID"]); + } else { + return ds[index+1]["CRDN_ID"]; + } } else { return ""; } @@ -465,13 +477,20 @@ $(document).ready(function(){ var ds = $P.crdnControl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(index != 0 && ds.length > 1){ - return ds[index-1]["CRDN_ID"]; + if($P.holdList.includes(ds[index-1]["CRDN_ID"])){ + return $P.provide.getPrevKey(ds[index-1]["CRDN_ID"]); + } else { + return ds[index-1]["CRDN_ID"]; + } } else { return ""; } }, "selectRow" : function(currentKey){ $P.clickCrdnList(currentKey); + }, + "holdRow" : function(currentKey){ + $P.fnHold(currentKey); } }; diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp index 90f55e21..f51740ea 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp @@ -2,7 +2,7 @@ <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
-
+
@@ -89,13 +89,13 @@
+ class="form-control" readonly />
@@ -263,11 +263,11 @@
- - - - - + + + + +
@@ -319,10 +319,11 @@ pageObject["${pageName}"].provided = {}; pageObject.childReq = []; pageObject.childReq.push({ - getCountStatus : function(){}, - getNextKey : function(){}, - getPrevKey : function(){}, - selectRow : function(){} + getCountStatus : function(){ return ""; }, + getNextKey : function(){ return ""; }, + getPrevKey : function(){ return ""; }, + selectRow : function(){}, + holdRow : function(){} }); $(document).ready(function(){ @@ -500,6 +501,13 @@ $(document).ready(function(){ } }; + + $P.fnReset = () => { + var crdnId = $("#crdnId--${pageName}").val(); + + $P.fnGo(crdnId); + } + $P.fnSave = () => { if(!customValidate($("#frmEdit--${pageName} input"))) return; @@ -646,16 +654,71 @@ $(document).ready(function(){ }); } + $P.fnCopy = () => { + var crdnId = $("#crdnId--${pageName}").val(); + + dialog.alert({ + content : "현 자료의 복사본을 생성하겠습니까?", + onOK : () => { + + } + }); + } + + $P.fnOpenCvlcptOrgnl = () => { + var crdnId = $("#crdnId--${pageName}").val(); + + var dialogId = "cvlcptOrgnlDialog--${pageName}"; + + ajax.get({ + url : wctx.url("/${taskSeCd}/crdn/crdn01/050/info.do"), + data : { crdnId : crdnId }, + success : resp => { + dialog.open({ + id : dialogId, + title : "민원내역 원본", + content : resp, + size : "xl", + init : () => { + + } + }); + } + }); + } + + $P.fnHold = () => { + var crdnId = $("#crdnId--${pageName}").val(); + + $P.provided.holdRow(crdnId); + + var nextKey = $P.provided.getNextKey(crdnId); + if(nextKey != ""){ + $P.fnGo(nextKey); + return; + } + var prevKey = $P.provided.getPrevKey(crdnId); + if(prevKey != ""){ + $P.fnGo(prevKey); + return; + } + + dialog.close("cvlcptInitialDataEditDialog--${openerPageName}"); + } + /************************************************************************** * element.on **************************************************************************/ $("#btnPrev--${pageName}").on("click", () => $P.fnPrev() ); $("#btnNext--${pageName}").on("click", () => $P.fnNext() ); - + + $("#btnReset--${pageName}").on("click", () => $P.fnReset() ); $("#btnInstLevyExcl1--${pageName}").on("click", () => $P.openLevyExclPop("1")); $("#btnInstLevyExcl2--${pageName}").on("click", () => $P.openLevyExclPop("2")); - - $("#btnInst--${pageName}").on('click', () => $P.fnSave()); + $("#btnDataCopy--${pageName}").on("click", () => $P.fnCopy()); + $("#btnHold--${pageName}").on("click", () => $P.fnHold()); + $("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl()); + $("#btnSave--${pageName}").on('click', () => $P.fnSave()); $("#btnAddFile--${pageName}").on('click', () => { $("#inputUploadSet--${pageName}").trigger("click"); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp index 56861e3b..1ed29dcd 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01050-info.jsp @@ -47,7 +47,8 @@
-
@@ -63,7 +64,7 @@
-
+