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 64aa7808..1c087bf1 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,8 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.tableRenderComplete = false; + $P.crdnControl.urls.newInfoByFile = ""; $P.crdnControl.urls.newInfoByHand = ""; @@ -173,14 +175,22 @@ $(document).ready(function(){ fetchSize: obj["Fetch"], func: "pageObject['${pageName}'].crdnControl.load({index})" }); - + + $P.crdnControl.tableRenderComplete = true; + }; $P.crdnControl.onCurrentChange = (item) => { - if (!item) return; - - var key = item.data.CRDN_ID; - $("#crdnTbody--${pageName}").setCurrentRow(key); + + if($P.crdnControl.tableRenderComplete){ + $P.crdnControl.tableRenderComplete = false; + if(!item){ + $P.clickCrdnList("", true); + } else { + $P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"], true); + } + } + } /************************************************************************** @@ -241,9 +251,15 @@ $(document).ready(function(){ $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } - $P.clickCrdnList = (dataKey) => { - $P.crdnControl.setCurrent(dataKey); + $P.clickCrdnList = (dataKey, auto) => { + if(dataKey == ""){ + return; + } $("#crdnTbody--${pageName}").setCurrentRow(dataKey); + + if(!auto) { + $P.crdnControl.setCurrent(dataKey); + } } $P.renderCrdnList = (total) => { 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 006d1d60..339c0b52 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,11 +255,12 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.tableRenderComplete = false; /************************************************************************** * DatasetControl.on **************************************************************************/ - $P.crdnControl.onDatasetChange = obj => { + $P.crdnControl.onDatasetChange = (obj) => { $P.renderCrdnList(obj["Total"]); @@ -272,13 +273,20 @@ $(document).ready(function(){ func: "pageObject['${pageName}'].crdnControl.load({index})" }); + $P.crdnControl.tableRenderComplete = true; }; $P.crdnControl.onCurrentChange = (item) => { - if (!item) return; - - var key = item.data.CRDN_ID; - $("#crdnTbody--${pageName}").setCurrentRow(key); + + if($P.crdnControl.tableRenderComplete){ + $P.crdnControl.tableRenderComplete = false; + if(!item){ + $P.clickCrdnList("", true); + } else { + $P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"], true); + } + } + } /************************************************************************** @@ -341,9 +349,16 @@ $(document).ready(function(){ $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } - $P.clickCrdnList = (dataKey) => { - $P.crdnControl.setCurrent(dataKey); + $P.clickCrdnList = (dataKey, auto) => { + if(dataKey == ""){ + return; + } + $("#crdnTbody--${pageName}").setCurrentRow(dataKey); + + if(!auto){ + $P.crdnControl.setCurrent(dataKey); + } } $P.dblclickCrdnList = (dataKey) => { 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 6b2a1782..61c43411 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 @@ -435,9 +435,9 @@ $(document).ready(function(){ if($P.photoInspectionControl.tableRenderComplete){ $P.photoInspectionControl.tableRenderComplete = false; if(!item){ - $P.clickInspectionDataList("","photoInspection"); + $P.clickInspectionDataList("","photoInspection", true); } else { - $P.clickInspectionDataList($P.photoInspectionControl.getCurrent()["CRDN_ID"],"photoInspection"); + $P.clickInspectionDataList($P.photoInspectionControl.getCurrent()["CRDN_ID"],"photoInspection", true); } } } @@ -461,9 +461,9 @@ $(document).ready(function(){ if($P.sameVehicleControl.main.tableRenderComplete){ $P.sameVehicleControl.main.tableRenderComplete = false; if(!item){ - $P.clickInspectionDataList("","sameVehicleInspectionMain"); + $P.clickInspectionDataList("","sameVehicleInspectionMain", true); } else { - $P.clickInspectionDataList($P.sameVehicleControl.main.getCurrent()["CRDN_ID_LIST"],"sameVehicleInspectionMain"); + $P.clickInspectionDataList($P.sameVehicleControl.main.getCurrent()["CRDN_ID_LIST"],"sameVehicleInspectionMain", true); } } } @@ -477,9 +477,9 @@ $(document).ready(function(){ if($P.sameVehicleControl.sub.tableRenderComplete){ $P.sameVehicleControl.sub.tableRenderComplete = false; if(!item){ - $P.clickInspectionDataList("","sameVehicleInspectionSub"); + $P.clickInspectionDataList("","sameVehicleInspectionSub", true); } else { - $P.clickInspectionDataList($P.sameVehicleControl.sub.getCurrent()["CRDN_ID"],"sameVehicleInspectionSub"); + $P.clickInspectionDataList($P.sameVehicleControl.sub.getCurrent()["CRDN_ID"],"sameVehicleInspectionSub", true); } } }; @@ -578,7 +578,7 @@ $(document).ready(function(){ default: break; } } - $P.clickInspectionDataList = (dataKey, gridType) => { + $P.clickInspectionDataList = (dataKey, gridType, auto) => { switch (gridType) { case "photoInspection": @@ -629,7 +629,10 @@ $(document).ready(function(){ } }); - $P.photoInspectionControl.setCurrent(dataKey); + if(!auto){ + $P.photoInspectionControl.setCurrent(dataKey); + } + break; case "sameVehicleInspectionMain": if(dataKey == ""){ @@ -638,14 +641,18 @@ $(document).ready(function(){ } $("#sameVehicleInspectionMainTbody--${pageName}").setCurrentRow(dataKey); $P.searchDetailInspectionDataList(dataKey); - $P.sameVehicleControl.main.setCurrent(dataKey); + if(!auto){ + $P.sameVehicleControl.main.setCurrent(dataKey); + } break; case "sameVehicleInspectionSub": if(dataKey == ""){ return; } $("#sameVehicleInspectionSubTbody--${pageName}").setCurrentRow(dataKey); - $P.sameVehicleControl.sub.setCurrent(dataKey); + if(!auto){ + $P.sameVehicleControl.sub.setCurrent(dataKey); + } 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 6efabd70..4a022e91 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,11 +151,12 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.tableRenderComplete = false; /************************************************************************** * DatasetControl.on **************************************************************************/ - $P.crdnControl.onDatasetChange = obj => { + $P.crdnControl.onDatasetChange = (obj) => { $P.renderCrdnList(obj["Total"]); @@ -167,13 +168,21 @@ $(document).ready(function(){ fetchSize: obj["Fetch"], func: "pageObject['${pageName}'].crdnControl.load({index})" }); + + $P.crdnControl.tableRenderComplete = true; }; $P.crdnControl.onCurrentChange = (item) => { - if (!item) return; - var key = item.data.CRDN_ID; - $("#crdnTbody--${pageName}").setCurrentRow(key); + if($P.crdnControl.tableRenderComplete){ + $P.crdnControl.tableRenderComplete = false; + if(!item){ + $P.clickCrdnList("", true); + } else { + $P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"], true); + } + } + }; /************************************************************************** @@ -210,16 +219,22 @@ $(document).ready(function(){ $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } - $P.clickCrdnList = (dataKey) => { - $P.crdnControl.setCurrent(dataKey); + $P.clickCrdnList = (dataKey, auto) => { + if(dataKey == ""){ + return; + } + $("#crdnTbody--${pageName}").setCurrentRow(dataKey); + + if(!auto){ + $P.crdnControl.setCurrent(dataKey); + } } $P.dblclickCrdnList = (dataKey) => { $P.crdnControl.getInfo(dataKey); } - $P.renderCrdnList = (total) => { var crdnList = $P.crdnControl.dataset; 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 82699047..060ca3d4 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.tableRenderComplete = false; /************************************************************************** * DatasetControl.on @@ -177,14 +178,21 @@ $(document).ready(function(){ fetchSize: obj["Fetch"], func: "pageObject['${pageName}'].crdnControl.load({index})" }); - + + $P.crdnControl.tableRenderComplete = true; }; $P.crdnControl.onCurrentChange = (item) => { - if (!item) return; + + if($P.crdnControl.tableRenderComplete){ + $P.crdnControl.tableRenderComplete = false; + if(!item){ + $P.clickCrdnList("", true); + } else { + $P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"], true); + } + } - var key = item.data.CRDN_ID; - $("#crdnTbody--${pageName}").setCurrentRow(key); } /************************************************************************** @@ -233,9 +241,16 @@ $(document).ready(function(){ $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } - $P.clickCrdnList = (dataKey) => { - $P.crdnControl.setCurrent(dataKey); + $P.clickCrdnList = (dataKey, auto) => { + if(dataKey == ""){ + return; + } + $("#crdnTbody--${pageName}").setCurrentRow(dataKey); + + if(!auto){ + $P.crdnControl.setCurrent(dataKey); + } } $P.dblclickCrdnList = (dataKey) => { diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06050-info.jsp index 616f926c..e7eee577 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06050-info.jsp @@ -53,7 +53,7 @@ $(document).ready(function(){ dataGetter : obj => obj.crdnInfo, formats: {} }); - + $P.crdnControl.save = (info) => { if (!info) return; 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 dcf4dcf3..d0b40b6d 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 @@ -216,9 +216,9 @@ $(document).ready(function(){ if($P.crdnControl.tableRenderComplete){ $P.crdnControl.tableRenderComplete = false; if(!item){ - $P.clickCrdnList(""); + $P.clickCrdnList("", true); } else { - $P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"]); + $P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"], true); } $("label[for='table-responsive--${pageName}']").trigger("refreshEnd"); } @@ -288,7 +288,7 @@ $(document).ready(function(){ $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } - $P.clickCrdnList = (dataKey) => { + $P.clickCrdnList = (dataKey, auto) => { if(dataKey == ""){ $("#bottomCrdnPlc--${pageName}").val(""); return; @@ -308,7 +308,9 @@ $(document).ready(function(){ $("#btnDeleteSameRcptYmd--${pageName}").show(); } - $P.crdnControl.setCurrent(dataKey); + if(!auto){ + $P.crdnControl.setCurrent(dataKey); + } } $P.dblclickCrdnList = (dataKey) => { 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 e3667b5b..60dc268e 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.tableRenderComplete = false; /************************************************************************** * DatasetControl.on @@ -204,14 +205,19 @@ $(document).ready(function(){ fetchSize: obj["Fetch"], func: "pageObject['${pageName}'].crdnControl.load({index})" }); - + + $P.crdnControl.tableRenderComplete = true; }; $P.crdnControl.onCurrentChange = (item) => { - if (!item) return; - - var key = item.data.CRDN_ID; - $("#crdnTbody--${pageName}").setCurrentRow(key); + if($P.crdnControl.tableRenderComplete){ + $P.crdnControl.tableRenderComplete = false; + if(!item){ + $P.clickCrdnList("", true); + } else { + $P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"], true); + } + } } /************************************************************************** @@ -260,9 +266,15 @@ $(document).ready(function(){ $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } - $P.clickCrdnList = (dataKey) => { - $P.crdnControl.setCurrent(dataKey); + $P.clickCrdnList = (dataKey, auto) => { + if(dataKey == ""){ + return; + } $("#crdnTbody--${pageName}").setCurrentRow(dataKey); + + if(!auto){ + $P.crdnControl.setCurrent(dataKey); + } } $P.dblclickCrdnList = (dataKey) => {