From d4792eb9a15bd106dc51687c559c227ce097f573 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 22 Aug 2023 09:29:48 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=9E=AC=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=ED=95=A8=EC=88=98=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/crdn/crdn05010-main.jsp | 1 + .../WEB-INF/jsp/fims/crdn/crdn06010-main.jsp | 1 + .../WEB-INF/jsp/fims/crdn/crdn06020-main.jsp | 62 ++++++++++++++++++- .../WEB-INF/jsp/fims/crdn/crdn06030-main.jsp | 1 + .../WEB-INF/jsp/fims/crdn/crdn06040-main.jsp | 1 + .../WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp | 31 ++++++++++ .../WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp | 1 + 7 files changed, 96 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp index db7642a1..92a88b5f 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp @@ -126,6 +126,7 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; $P.crdnControl.tableRenderComplete = false; $P.crdnControl.urls.newInfoByFile = ""; diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp index 9b95ed50..dd3b7810 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp @@ -255,6 +255,7 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; $P.crdnControl.tableRenderComplete = false; /************************************************************************** diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp index c6c6b171..d1e66d7d 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp @@ -377,6 +377,7 @@ $(document).ready(function(){ }); $P.photoInspectionControl.defaultFetchSize = FETCH_XS; $P.photoInspectionControl.untilPageNum = 0; + $P.photoInspectionControl.beforeCurrent = null; $P.photoInspectionControl.tableRenderComplete = false; @@ -400,6 +401,7 @@ $(document).ready(function(){ ); $P.sameVehicleControl.defaultFetchSize = FETCH_XS; $P.sameVehicleControl.untilPageNum = 0; + $P.sameVehicleControl.main.beforeCurrent = null; $P.sameVehicleControl.main.tableRenderComplete = false; $P.sameVehicleControl.sub.tableRenderComplete = false; @@ -437,6 +439,30 @@ $(document).ready(function(){ return; } + if($P.photoInspectionControl.beforeCurrent != null){ + var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key; + var beforeCurrentIndex = $P.photoInspectionControl.beforeCurrent.index; + $P.photoInspectionControl.beforeCurrent = null; + + if(!$P.photoInspectionControl.dataset.empty){ + var info = $P.photoInspectionControl.dataset.getData(beforeCurrentKey); + + if(info != null){ + $P.photoInspectionControl.setCurrent(beforeCurrentKey); + return; + } + + if(beforeCurrentIndex > ($P.photoInspectionControl.dataset.length - 1)){ + info = $P.photoInspectionControl.dataset.getDataset()[$P.photoInspectionControl.dataset.length - 1]; + } else { + info = $P.photoInspectionControl.dataset.getDataset()[beforeCurrentIndex]; + } + + $P.photoInspectionControl.setCurrent(info["CRDN_ID"]); + return; + } + } + $P.photoInspectionControl.tableRenderComplete = false; if(!item){ $P.clickInspectionDataList("","photoInspection", true); @@ -465,6 +491,30 @@ $(document).ready(function(){ return; } + if($P.sameVehicleControl.main.beforeCurrent != null){ + var beforeCurrentKey = $P.sameVehicleControl.main.beforeCurrent.key; + var beforeCurrentIndex = $P.sameVehicleControl.main.beforeCurrent.index; + $P.sameVehicleControl.main.beforeCurrent = null; + + if(!$P.sameVehicleControl.main.dataset.empty){ + var info = $P.sameVehicleControl.main.dataset.getData(beforeCurrentKey); + + if(info != null){ + $P.sameVehicleControl.main.setCurrent(beforeCurrentKey); + return; + } + + if(beforeCurrentIndex > ($P.sameVehicleControl.main.dataset.length - 1)){ + info = $P.sameVehicleControl.main.dataset.getDataset()[$P.sameVehicleControl.main.dataset.length - 1]; + } else { + info = $P.sameVehicleControl.main.dataset.getDataset()[beforeCurrentIndex]; + } + + $P.sameVehicleControl.main.setCurrent(info["CRDN_ID_LIST"]); + return; + } + } + $P.sameVehicleControl.main.tableRenderComplete = false; if(!item){ $P.clickInspectionDataList("","sameVehicleInspectionMain", true); @@ -528,12 +578,20 @@ $(document).ready(function(){ case "photoInspection": $P.photoInspectionControl.untilPageNum = $P.photoInspectionControl.query.pageNum; $P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize * $P.photoInspectionControl.query.pageNum; - $P.photoInspectionControl.load(1); + $P.photoInspectionControl.beforeCurrent = { + key : $P.photoInspectionControl.getCurrent()["CRDN_ID"], + index : $P.photoInspectionControl.getCurrent()["ROW_NUM"] - 1 + }; + $P.photoInspectionControl.load(1); break; case "sameVehicleInspection": $P.sameVehicleControl.untilPageNum = $P.sameVehicleControl.main.query.pageNum; $P.sameVehicleControl.main.query.fetchSize = $P.sameVehicleControl.defaultFetchSize * $P.sameVehicleControl.main.query.pageNum; - $P.sameVehicleControl.main.load(1); + $P.sameVehicleControl.main.beforeCurrent = { + key : $P.sameVehicleControl.main.getCurrent()["CRDN_ID_LIST"], + index : $P.sameVehicleControl.main.getCurrent()["ROW_NUM"] - 1 + }; + $P.sameVehicleControl.main.load(1); break; default: break; } diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp index 7b20fc93..2dc633ce 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp @@ -151,6 +151,7 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; $P.crdnControl.tableRenderComplete = false; /************************************************************************** diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06040-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06040-main.jsp index 6ad4ad0d..a8ba49c1 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06040-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06040-main.jsp @@ -161,6 +161,7 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; $P.crdnControl.tableRenderComplete = false; /************************************************************************** diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp index 5927dae1..e9081733 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp @@ -82,6 +82,8 @@ No. + 단속키 등록구분 {ROW_NUM} + {CRDN_ID} {CRDN_REG_SE_CD} {CVLCPT_APLCNT_NM} {CVLCPT_PRCS_PIC_NM} @@ -190,6 +193,7 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; $P.crdnControl.tableRenderComplete = false; /************************************************************************** @@ -216,6 +220,29 @@ $(document).ready(function(){ return; } + if($P.crdnControl.beforeCurrent != null){ + var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; + var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; + $P.crdnControl.beforeCurrent = null; + + if(!$P.crdnControl.dataset.empty){ + var info = $P.crdnControl.dataset.getData(beforeCurrentKey); + + if(info != null){ + $P.crdnControl.setCurrent(beforeCurrentKey); + return; + } + + if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){ + info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1]; + } else { + info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex]; + } + + $P.crdnControl.setCurrent(info["CRDN_ID"]); + return; + } + } $P.crdnControl.tableRenderComplete = false; if(!item){ @@ -256,6 +283,10 @@ $(document).ready(function(){ $P.refreshCrdnList = () => { $P.crdnControl.untilPageNum = $P.crdnControl.query.pageNum; $P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize * $P.crdnControl.query.pageNum; + $P.crdnControl.beforeCurrent = { + key : $P.crdnControl.getCurrent()["CRDN_ID"], + index : $P.crdnControl.getCurrent()["ROW_NUM"] - 1 + }; $P.crdnControl.load(1); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp index 8a4b428f..8d51be5a 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01030-main.jsp @@ -188,6 +188,7 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; $P.crdnControl.tableRenderComplete = false; /**************************************************************************