From 84b1a7ebeed35617a36ba83c35c6c4abc7e1e672 Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 9 Jul 2024 16:23:35 +0900 Subject: [PATCH] =?UTF-8?q?=ED=91=9C=EC=A7=80=EC=A0=95=EB=B3=B4=EB=AF=B8?= =?UTF-8?q?=ED=99=95=EC=9D=B8=EC=9E=90=EB=A3=8C=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EC=9E=AC=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/crdn/crdn02010-main.jsp | 4 +- .../WEB-INF/jsp/fims/crdn/crdn03010-main.jsp | 41 ++++++++----------- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp index cec22b4f..e92e5959 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp @@ -611,8 +611,8 @@ $(document).ready(function(){ $P.photoInspectionControl.dataset.onDatasetChange(resp, {reloaded : true}); if($P.photoInspectionControl.beforeCurrent != null){ - var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key; - var beforeCurrentIndex = $P.photoInspectionControl.beforeCurrent.index; + let beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key; + let beforeCurrentIndex = $P.photoInspectionControl.beforeCurrent.index; $P.photoInspectionControl.beforeCurrent = null; if(!$P.photoInspectionControl.dataset.empty){ diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp index 3784ea0c..baf519f8 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp @@ -155,7 +155,7 @@ $(document).ready(function(){ } }); $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; /************************************************************************** @@ -165,7 +165,7 @@ $(document).ready(function(){ var t = $P.getGridTemplate(); var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs); + $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs, option); Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); }; @@ -210,22 +210,19 @@ $(document).ready(function(){ } $P.refreshCrdnList = () => { - $P.crdnControl.untilPageNum = $P.crdnControl.query.pageNum; - $P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize * $P.crdnControl.query.pageNum; - - Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{ + + $P.crdnControl.beforeCurrent = { + key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"], + index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 + }; + + Apply.fromDatasetControl.reload($P.crdnControl).then((resp)=>{ Apply.toDataset.set($P.crdnControl.dataset, resp); $P.crdnControl.dataset.onDatasetChange(resp); - if($P.crdnControl.untilPageNum != 0){ - $P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize; - $P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum; - $P.crdnControl.untilPageNum = 0; - } - if($P.crdnControl.beforeCurrent != null){ - var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; - var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; + let beforeCurrentKey = $P.crdnControl.beforeCurrent.key; + let beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; $P.crdnControl.beforeCurrent = null; if(!$P.crdnControl.dataset.empty){ @@ -278,22 +275,18 @@ $(document).ready(function(){ }; } - $P.renderCrdnList = (total, listLength, trs) => { + $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0); - + var initScroll = ($P.crdnControl.query.pageNum < 2); + if(option != null && option.reloaded){ + initScroll = false; + } + $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); //보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - - - if($P.crdnControl.untilPageNum != 0){ - $P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize; - $P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum; - $P.crdnControl.untilPageNum = 0; - } } $P.clickCrdnList = (dataKey) => {