단속자료검사 조회 수정

main
이범준 1 year ago
parent c67b8c22f5
commit 64197905d2

@ -377,6 +377,8 @@ $(document).ready(function(){
}); });
$P.photoInspectionControl.defaultFetchSize = FETCH_XS; $P.photoInspectionControl.defaultFetchSize = FETCH_XS;
$P.photoInspectionControl.untilPageNum = 0; $P.photoInspectionControl.untilPageNum = 0;
$P.photoInspectionControl.tableRenderComplete = false;
//동일차량검사 datasetControl 인스턴스 //동일차량검사 datasetControl 인스턴스
$P.sameVehicleControl = new InspectionControl({ $P.sameVehicleControl = new InspectionControl({
@ -398,6 +400,8 @@ $(document).ready(function(){
); );
$P.sameVehicleControl.defaultFetchSize = FETCH_XS; $P.sameVehicleControl.defaultFetchSize = FETCH_XS;
$P.sameVehicleControl.untilPageNum = 0; $P.sameVehicleControl.untilPageNum = 0;
$P.sameVehicleControl.main.tableRenderComplete = false;
$P.sameVehicleControl.sub.tableRenderComplete = false;
$P.photoInspectionControl.getNext = (key) => { $P.photoInspectionControl.getNext = (key) => {
@ -424,8 +428,20 @@ $(document).ready(function(){
func: "pageObject['${pageName}'].photoInspectionControl.load({index})" func: "pageObject['${pageName}'].photoInspectionControl.load({index})"
}); });
$P.photoInspectionControl.tableRenderComplete = true;
}; };
$P.photoInspectionControl.onCurrentChange = (item) => {
if($P.photoInspectionControl.tableRenderComplete){
$P.photoInspectionControl.tableRenderComplete = false;
if(!item){
$P.clickInspectionDataList("","photoInspection");
} else {
$P.clickInspectionDataList($P.photoInspectionControl.getCurrent()["CRDN_ID"],"photoInspection");
}
}
}
$P.sameVehicleControl.main.onDatasetChange = (obj) => { $P.sameVehicleControl.main.onDatasetChange = (obj) => {
$P.renderInspectionDataList(obj["Total"], "sameVehicleInspectionMain"); $P.renderInspectionDataList(obj["Total"], "sameVehicleInspectionMain");
@ -437,11 +453,35 @@ $(document).ready(function(){
func: "pageObject['${pageName}'].sameVehicleControl.main.load({index})" func: "pageObject['${pageName}'].sameVehicleControl.main.load({index})"
}); });
$P.sameVehicleControl.main.tableRenderComplete = true;
}; };
$P.sameVehicleControl.main.onCurrentChange = (item) => {
if($P.sameVehicleControl.main.tableRenderComplete){
$P.sameVehicleControl.main.tableRenderComplete = false;
if(!item){
$P.clickInspectionDataList("","sameVehicleInspectionMain");
} else {
$P.clickInspectionDataList($P.sameVehicleControl.main.getCurrent()["CRDN_ID_LIST"],"sameVehicleInspectionMain");
}
}
}
$P.sameVehicleControl.sub.onDatasetChange = (obj) => { $P.sameVehicleControl.sub.onDatasetChange = (obj) => {
$P.renderInspectionDataList(obj["Total"], "sameVehicleInspectionSub"); $P.renderInspectionDataList(obj["Total"], "sameVehicleInspectionSub");
$P.sameVehicleControl.sub.tableRenderComplete = true;
};
$P.sameVehicleControl.sub.onCurrentChange = (item) => {
if($P.sameVehicleControl.sub.tableRenderComplete){
$P.sameVehicleControl.sub.tableRenderComplete = false;
if(!item){
$P.clickInspectionDataList("","sameVehicleInspectionSub");
} else {
$P.clickInspectionDataList($P.sameVehicleControl.sub.getCurrent()["CRDN_ID"],"sameVehicleInspectionSub");
}
}
}; };
/************************************************************************** /**************************************************************************
@ -452,7 +492,6 @@ $(document).ready(function(){
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date()); $('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date());
$P.photoInspectionControl.setData([]); $P.photoInspectionControl.setData([]);
$P.sameVehicleControl.main.setData([]); $P.sameVehicleControl.main.setData([]);
$P.sameVehicleControl.sub.setData([]);
}; };
$P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnResetAndChangeBiz = (taskSeCd) => {
@ -506,8 +545,8 @@ $(document).ready(function(){
default: break; default: break;
} }
} }
$P.searchDetailInspectionDataList = () => { $P.searchDetailInspectionDataList = (dataKey) => {
$P.sameVehicleControl.sub.query = { "crdnIDs" : $P.sameVehicleControl.main.getCurrent()["CRDN_ID_LIST"].split(",") }; $P.sameVehicleControl.sub.query = { "crdnIDs" : dataKey.split(",") };
$P.sameVehicleControl.sub.query.taskSeCd = $P.sameVehicleControl.main.query.taskSeCd; $P.sameVehicleControl.sub.query.taskSeCd = $P.sameVehicleControl.main.query.taskSeCd;
$P.sameVehicleControl.sub.load(0); $P.sameVehicleControl.sub.load(0);
} }
@ -542,11 +581,18 @@ $(document).ready(function(){
$P.clickInspectionDataList = (dataKey, gridType) => { $P.clickInspectionDataList = (dataKey, gridType) => {
switch (gridType) { switch (gridType) {
case "photoInspection": case "photoInspection":
$P.photoInspectionControl.setCurrent(dataKey);
$("#photoInspectionTbody--${pageName}").setCurrentRow(dataKey);
var curDataVhrno = $P.photoInspectionControl.getCurrent(dataKey)["VHRNO"]; if(dataKey == ""){
$("#curDataVhrno--${pageName}").html("");
$("#nextDataVhrno--${pageName}").html("");
$("#curDataFiles--${pageName}").html("");
$("#nextDataFiles--${pageName}").html("");
return;
}
$("#photoInspectionTbody--${pageName}").setCurrentRow(dataKey);
var curDataVhrno = $P.photoInspectionControl.dataset.getData(dataKey)["VHRNO"];
var nextData = $P.photoInspectionControl.getNext(dataKey); var nextData = $P.photoInspectionControl.getNext(dataKey);
var nextDataKey = nextData != null ? nextData.CRDN_ID : ""; var nextDataKey = nextData != null ? nextData.CRDN_ID : "";
var nextDataVhrno = nextData != null ? nextData.VHRNO : ""; var nextDataVhrno = nextData != null ? nextData.VHRNO : "";
@ -582,15 +628,24 @@ $(document).ready(function(){
} }
}); });
$P.photoInspectionControl.setCurrent(dataKey);
break; break;
case "sameVehicleInspectionMain": case "sameVehicleInspectionMain":
$P.sameVehicleControl.main.setCurrent(dataKey); if(dataKey == ""){
$P.sameVehicleControl.sub.setData([]);
return;
}
$("#sameVehicleInspectionMainTbody--${pageName}").setCurrentRow(dataKey); $("#sameVehicleInspectionMainTbody--${pageName}").setCurrentRow(dataKey);
$P.searchDetailInspectionDataList(); $P.searchDetailInspectionDataList(dataKey);
$P.sameVehicleControl.main.setCurrent(dataKey);
break; break;
case "sameVehicleInspectionSub": case "sameVehicleInspectionSub":
$P.sameVehicleControl.sub.setCurrent(dataKey); if(dataKey == ""){
return;
}
$("#sameVehicleInspectionSubTbody--${pageName}").setCurrentRow(dataKey); $("#sameVehicleInspectionSubTbody--${pageName}").setCurrentRow(dataKey);
$P.sameVehicleControl.sub.setCurrent(dataKey);
break; break;
} }
} }

Loading…
Cancel
Save