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 c7fd7f7d..dcf4dcf3 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 @@ -190,6 +190,7 @@ $(document).ready(function(){ }); $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; + $P.crdnControl.tableRenderComplete = false; /************************************************************************** * DatasetControl.on @@ -207,19 +208,20 @@ $(document).ready(function(){ func: "pageObject['${pageName}'].crdnControl.load({index})" }); + $P.crdnControl.tableRenderComplete = true; }; $P.crdnControl.onCurrentChange = (item) => { - if (!item) { - $("#bottomCrdnPlc--${pageName}").val(""); - return; - } - - var key = item.data.CRDN_ID; - $("#crdnTbody--${pageName}").setCurrentRow(key); - var cur = $P.crdnControl.getCurrent(); - $("#bottomCrdnPlc--${pageName}").val(cur["CRDN_PLC"]); + if($P.crdnControl.tableRenderComplete){ + $P.crdnControl.tableRenderComplete = false; + if(!item){ + $P.clickCrdnList(""); + } else { + $P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"]); + } + $("label[for='table-responsive--${pageName}']").trigger("refreshEnd"); + } } $P.crdnControl.onRemove = (selected, resp) => { @@ -287,8 +289,14 @@ $(document).ready(function(){ } $P.clickCrdnList = (dataKey) => { - $P.crdnControl.setCurrent(dataKey); + if(dataKey == ""){ + $("#bottomCrdnPlc--${pageName}").val(""); + return; + } + $("#crdnTbody--${pageName}").setCurrentRow(dataKey); + + $("#bottomCrdnPlc--${pageName}").val($P.crdnControl.dataset.getData(dataKey)["CRDN_PLC"]); if($P.holdList.includes(dataKey)){ $("#btnOpenCvlcptOrgnl--${pageName}").hide(); @@ -299,6 +307,8 @@ $(document).ready(function(){ $("#btnDelete--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show(); } + + $P.crdnControl.setCurrent(dataKey); } $P.dblclickCrdnList = (dataKey) => { @@ -373,7 +383,6 @@ $(document).ready(function(){ $("#crdnTbody--${pageName}").find("tr[data-key='"+item+"']").addClass("bg-dark"); }); - $("label[for='table-responsive--${pageName}']").trigger("refreshEnd"); } $P.getParams = () => {