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