From 927343864fee7c5a8be77e09dd16d1ea0dacf51a Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 9 Jul 2024 17:33:49 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=20=EC=9E=AC=EC=A1=B0?= =?UTF-8?q?=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/crdn03010-main.jsp | 2 +- .../WEB-INF/jsp/fims/crdn/crdn08010-main.jsp | 22 +++++-------- .../WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp | 26 +++++++--------- .../WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp | 27 ++++++---------- .../WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp | 26 +++++++--------- .../WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp | 31 ++++++------------- 6 files changed, 51 insertions(+), 83 deletions(-) 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 baf519f8..802ff704 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 @@ -218,7 +218,7 @@ $(document).ready(function(){ Apply.fromDatasetControl.reload($P.crdnControl).then((resp)=>{ Apply.toDataset.set($P.crdnControl.dataset, resp); - $P.crdnControl.dataset.onDatasetChange(resp); + $P.crdnControl.dataset.onDatasetChange(resp, {reloaded : true}); if($P.crdnControl.beforeCurrent != null){ let beforeCurrentKey = $P.crdnControl.beforeCurrent.key; diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp index f52e2fa0..81ad0e60 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp @@ -173,7 +173,6 @@ $(document).ready(function(){ } }); $P.exmptnVhclControl.defaultFetchSize = FETCH_XS; - $P.exmptnVhclControl.untilPageNum = 0; $P.exmptnVhclControl.beforeCurrent = null; /************************************************************************** @@ -182,7 +181,7 @@ $(document).ready(function(){ $P.exmptnVhclControl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); var trs = Apply.fromDataset.getTbody($P.exmptnVhclControl.dataset, t.found, t.notFound, t.replacer); - $P.renderExmptnVhclList(obj["Total"], $P.exmptnVhclControl.dataset.length, trs); + $P.renderExmptnVhclList(obj["Total"], $P.exmptnVhclControl.dataset.length, trs, option); Apply.fromDataset.paging($P.exmptnVhclControl.dataset, obj, "exmptnVhclPaging--${pageName}"); }; @@ -223,9 +222,7 @@ $(document).ready(function(){ if($P.exmptnVhclControl.query.pageNum == null){ $P.exmptnVhclControl.query.pageNum = 1; } - $P.exmptnVhclControl.untilPageNum = $P.exmptnVhclControl.query.pageNum; - $P.exmptnVhclControl.query.fetchSize = $P.exmptnVhclControl.defaultFetchSize * $P.exmptnVhclControl.query.pageNum; - $P.exmptnVhclControl.load(1); + $P.exmptnVhclControl.reload({all : true}); } $P.fnExcelDown = () => { @@ -255,21 +252,18 @@ $(document).ready(function(){ }; } - $P.renderExmptnVhclList = (total, listLength, trs) => { + $P.renderExmptnVhclList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.exmptnVhclControl.query.pageNum < 2) && ($P.exmptnVhclControl.untilPageNum == 0); - + var initScroll = ($P.exmptnVhclControl.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.exmptnVhclControl.untilPageNum != 0){ - $P.exmptnVhclControl.query.fetchSize = $P.exmptnVhclControl.defaultFetchSize; - $P.exmptnVhclControl.query.pageNum = $P.exmptnVhclControl.untilPageNum; - $P.exmptnVhclControl.untilPageNum = 0; - } } $P.clickExmptnVhclList = (dataKey) => { 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 8843c036..1690bab6 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 @@ -258,7 +258,7 @@ $(document).ready(function(){ } }); $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; /************************************************************************** @@ -268,7 +268,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}"); }; @@ -351,22 +351,15 @@ $(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.dataset.getCurrent()["CRDN_ID"], index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 }; - Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{ + 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; - } + $P.crdnControl.dataset.onDatasetChange(resp, {reloaded : true}); if($P.crdnControl.beforeCurrent != null){ var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; @@ -423,11 +416,14 @@ $(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); //보안모드 diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp index 80cd8b93..67f433f9 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp @@ -265,7 +265,7 @@ $(document).ready(function(){ } }); $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; /************************************************************************** @@ -275,7 +275,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}"); }; @@ -341,13 +341,8 @@ $(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.dataset.getCurrent()["CRDN_ID"], - index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 - }; - $P.crdnControl.load(1); + + $P.crdnControl.reload({all : true}); } $P.fnExcelDown = (forApproval) => { @@ -387,21 +382,19 @@ $(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; - } $("#crdnTbody--${pageName}").find("tr[data-key]").each(function(item){ var crdnId = this.dataset.key; diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp index ce0af5c7..71e02da7 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp @@ -254,7 +254,7 @@ $(document).ready(function(){ } }); $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.untilPageNum = 0; + $P.crdnControl.beforeCurrent = null; @@ -265,7 +265,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}"); }; @@ -320,22 +320,15 @@ $(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.dataset.getCurrent()["CRDN_ID"], index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 }; - Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{ + 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; - } + $P.crdnControl.dataset.onDatasetChange(resp, {reloaded, true}); if($P.crdnControl.beforeCurrent != null){ var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; @@ -391,11 +384,14 @@ $(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); //보안모드 diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp index 8f307c17..5050b9d5 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp @@ -190,7 +190,7 @@ $(document).ready(function(){ } }); $P.dmndControl.defaultFetchSize = FETCH_XS; - $P.dmndControl.untilPageNum = 0; + $P.dmndControl.beforeCurrent = null; /************************************************************************** @@ -199,7 +199,7 @@ $(document).ready(function(){ $P.dmndControl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); var trs = Apply.fromDataset.getTbody($P.dmndControl.dataset, t.found, t.notFound, t.replacer); - $P.renderDmndList(obj["Total"], $P.dmndControl.dataset.length, trs); + $P.renderDmndList(obj["Total"], $P.dmndControl.dataset.length, trs, option); Apply.fromDataset.paging($P.dmndControl.dataset, obj, "dmndPaging--${pageName}"); }; @@ -243,8 +243,6 @@ $(document).ready(function(){ } $P.refreshDmndList = () => { - $P.dmndControl.untilPageNum = $P.dmndControl.query.pageNum; - $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize * $P.dmndControl.query.pageNum; if(!$P.dmndControl.dataset.empty){ $P.dmndControl.beforeCurrent = { @@ -253,15 +251,9 @@ $(document).ready(function(){ }; } - Apply.fromDatasetControl.load($P.dmndControl, 1).then((resp)=>{ + Apply.fromDatasetControl.reload($P.dmndControl).then((resp)=>{ Apply.toDataset.set($P.dmndControl.dataset, resp); - $P.dmndControl.dataset.onDatasetChange(resp); - - if($P.dmndControl.untilPageNum != 0){ - $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize; - $P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum; - $P.dmndControl.untilPageNum = 0; - } + $P.dmndControl.dataset.onDatasetChange(resp, {reloaded : true}); if($P.dmndControl.beforeCurrent != null){ var beforeCurrentKey = $P.dmndControl.beforeCurrent.key; @@ -302,18 +294,15 @@ $(document).ready(function(){ }; } - $P.renderDmndList = (total, listLength, trs) => { + $P.renderDmndList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.dmndControl.query.pageNum < 2) && ($P.dmndControl.untilPageNum == 0); - - $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); - - if($P.dmndControl.untilPageNum != 0){ - $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize; - $P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum; - $P.dmndControl.untilPageNum = 0; + var initScroll = ($P.dmndControl.query.pageNum < 2); + if(option != null && option.reloaded){ + initScroll = false; } + + $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); } $P.clickDmndList = (dataKey) => {