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){