From 8d5c3db24ac2c03f35056936d92123cca5631b00 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 10 Aug 2023 14:12:56 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=EC=A0=91=EC=88=98=EC=9E=90?= =?UTF-8?q?=EB=A3=8C=20=EC=83=81=EC=84=B8=EC=A0=95=EB=B3=B4=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 --- .../WEB-INF/jsp/fims/crdn/crdn01010-main.jsp | 13 ++- .../WEB-INF/jsp/fims/crdn/crdn01020-info.jsp | 79 ++++++++++++++++--- 2 files changed, 81 insertions(+), 11 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 02482bb2..551875b5 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 @@ -307,7 +307,18 @@ $(document).ready(function(){ content : resp, size : "xxl", init : () => { - + var parentRes = new Object(); + var childReq = pageObject.childReq.pop(); + + for(var reqKey in childReq) { + if($P.provide[reqKey]){ + parentRes[reqKey] = $P.provide[reqKey]; + } else { + parentRes[reqKey] = function(){}; + } + } + + pageObject.parentRes.push(parentRes); } }); } 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 c722dba7..90f55e21 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 @@ -315,11 +315,26 @@ * Global Variable **************************************************************************/ pageObject["${pageName}"] = {}; +pageObject["${pageName}"].provided = {}; + +pageObject.childReq = []; +pageObject.childReq.push({ + getCountStatus : function(){}, + getNextKey : function(){}, + getPrevKey : function(){}, + selectRow : function(){} +}); $(document).ready(function(){ var $P = pageObject["${pageName}"]; - + + if(pageObject.parentRes.length > 0){ + $P.provided = pageObject.parentRes.pop(); + } else { + $P.provided = pageObject.childReq.pop(); + } + $P.existFileArr = []; $P.captureFileArr = []; @@ -573,7 +588,21 @@ $(document).ready(function(){ } }); }; - + + $P.fnPrev = () => { + var prevKey = $P.provided.getPrevKey($("#crdnId--${pageName}").val()); + if(prevKey != ""){ + $P.fnGo(prevKey); + } + } + + $P.fnNext = () => { + var nextKey = $P.provided.getNextKey($("#crdnId--${pageName}").val()); + if(nextKey != ""){ + $P.fnGo(nextKey); + } + } + $P.fnGo = (crdnId) => { ajax.get({ url: $P.crdnControl.urls.getInfo, @@ -586,9 +615,33 @@ $(document).ready(function(){ crdnInfo.CVLCPT_APLY_CN = escapeHTMLEntity(crdnInfo.CVLCPT_APLY_CN); $P.crdnControl.setData([crdnInfo]); - //var cs = $P.provided.getCountStatus($("#crdnId--${pageName}").val()); - //$("#countStauts--${pageName}").val(cs); - //$P.provided.selectRow(crdnId); + //보안모드 + fn_securityModeToggle($("#securityMode--top").is(":checked")); + + var cs = $P.provided.getCountStatus($("#crdnId--${pageName}").val()); + $("#countStauts--${pageName}").val(cs); + $P.provided.selectRow(crdnId); + + if(crdnInfo.videoExist == "N"){ + $("#btnOpenVideoCapture--${pageName}").hide(); + } else { + $("#btnOpenVideoCapture--${pageName}").show(); + } + + $P.existFileArr = []; + if(crdnInfo.fileList){ + crdnInfo.fileList.forEach(function(item){ + item.status = ""; + $P.existFileArr.push(item); + }); + } + $P.fnDisplay(true); + + $P.captureFileArr = []; + $P.localUploadArr = []; + $P.numberPlateArr = []; + $("#inputUploadSet--${pageName}")[0].value = ""; + $P.fnDisplay(false); } }); } @@ -596,6 +649,9 @@ $(document).ready(function(){ /************************************************************************** * element.on **************************************************************************/ + $("#btnPrev--${pageName}").on("click", () => $P.fnPrev() ); + $("#btnNext--${pageName}").on("click", () => $P.fnNext() ); + $("#btnInstLevyExcl1--${pageName}").on("click", () => $P.openLevyExclPop("1")); $("#btnInstLevyExcl2--${pageName}").on("click", () => $P.openLevyExclPop("2")); @@ -795,17 +851,20 @@ $(document).ready(function(){ }); }); - //보안모드 - fn_securityModeToggle($("#securityMode--top").is(":checked")); - - - var crdnInfo = ${crdnInfo}; crdnInfo.CVLCPT_APLY_CN = escapeHTMLEntity(crdnInfo.CVLCPT_APLY_CN); $P.crdnControl.setData([crdnInfo]); + //보안모드 + fn_securityModeToggle($("#securityMode--top").is(":checked")); + + var cs = $P.provided.getCountStatus($("#crdnId--${pageName}").val()); + $("#countStauts--${pageName}").val(cs); + if(crdnInfo.videoExist == "N"){ $("#btnOpenVideoCapture--${pageName}").hide(); + } else { + $("#btnOpenVideoCapture--${pageName}").show(); } if(crdnInfo.fileList){