민원접수자료 조회 수정

main
이범준 1 year ago
parent e21607bddd
commit c67b8c22f5

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

Loading…
Cancel
Save