|
|
@ -411,7 +411,6 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$P.photoInspectionControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.photoInspectionControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -428,7 +427,6 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$P.sameVehicleMainControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.sameVehicleMainControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.sameVehicleMainControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = null;
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleSubControl = new DatasetControl({
|
|
|
|
$P.sameVehicleSubControl = new DatasetControl({
|
|
|
@ -463,7 +461,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
var t = $P.getGridTemplate("photoInspection");
|
|
|
|
var t = $P.getGridTemplate("photoInspection");
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.photoInspectionControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.photoInspectionControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.photoInspectionControl.dataset.length, trs, "photoInspection");
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.photoInspectionControl.dataset.length, trs, "photoInspection", option);
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDataset.paging($P.photoInspectionControl.dataset, obj, "photoInspectionPaging--${pageName}");
|
|
|
|
Apply.fromDataset.paging($P.photoInspectionControl.dataset, obj, "photoInspectionPaging--${pageName}");
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -490,7 +488,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
var t = $P.getGridTemplate("sameVehicleInspectionMain");
|
|
|
|
var t = $P.getGridTemplate("sameVehicleInspectionMain");
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.sameVehicleMainControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.sameVehicleMainControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.sameVehicleMainControl.dataset.length, trs, "sameVehicleInspectionMain");
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.sameVehicleMainControl.dataset.length, trs, "sameVehicleInspectionMain", option);
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDataset.paging($P.sameVehicleMainControl.dataset, obj, "sameVehicleInspectionMainPaging--${pageName}");
|
|
|
|
Apply.fromDataset.paging($P.sameVehicleMainControl.dataset, obj, "sameVehicleInspectionMainPaging--${pageName}");
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -507,7 +505,7 @@ $(document).ready(function(){
|
|
|
|
$P.sameVehicleSubControl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
$P.sameVehicleSubControl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
var t = $P.getGridTemplate("sameVehicleInspectionSub");
|
|
|
|
var t = $P.getGridTemplate("sameVehicleInspectionSub");
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.sameVehicleSubControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.sameVehicleSubControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.sameVehicleSubControl.dataset.length, trs, "sameVehicleInspectionSub");
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.sameVehicleSubControl.dataset.length, trs, "sameVehicleInspectionSub", option);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleSubControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
$P.sameVehicleSubControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
@ -603,22 +601,14 @@ $(document).ready(function(){
|
|
|
|
$P.refreshInspectionList = () => {
|
|
|
|
$P.refreshInspectionList = () => {
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
case "photoInspection":
|
|
|
|
case "photoInspection":
|
|
|
|
$P.photoInspectionControl.untilPageNum = $P.photoInspectionControl.query.pageNum;
|
|
|
|
$P.photoInspectionControl.beforeCurrent = {
|
|
|
|
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize * $P.photoInspectionControl.query.pageNum;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = {
|
|
|
|
|
|
|
|
key : $P.photoInspectionControl.dataset.getCurrent()["CRDN_ID"],
|
|
|
|
key : $P.photoInspectionControl.dataset.getCurrent()["CRDN_ID"],
|
|
|
|
index : $P.photoInspectionControl.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
index : $P.photoInspectionControl.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDatasetControl.load($P.photoInspectionControl, 1).then((resp)=>{
|
|
|
|
Apply.fromDatasetControl.reload($P.photoInspectionControl).then((resp)=>{
|
|
|
|
Apply.toDataset.set($P.photoInspectionControl.dataset, resp);
|
|
|
|
Apply.toDataset.set($P.photoInspectionControl.dataset, resp);
|
|
|
|
$P.photoInspectionControl.dataset.onDatasetChange(resp);
|
|
|
|
$P.photoInspectionControl.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.untilPageNum != 0){
|
|
|
|
|
|
|
|
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.query.pageNum = $P.photoInspectionControl.untilPageNum;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.beforeCurrent != null){
|
|
|
|
if($P.photoInspectionControl.beforeCurrent != null){
|
|
|
|
var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key;
|
|
|
|
var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key;
|
|
|
@ -647,22 +637,14 @@ $(document).ready(function(){
|
|
|
|
});
|
|
|
|
});
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
$P.sameVehicleMainControl.untilPageNum = $P.sameVehicleMainControl.query.pageNum;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.query.fetchSize = $P.sameVehicleMainControl.defaultFetchSize * $P.sameVehicleMainControl.query.pageNum;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = {
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = {
|
|
|
|
key : $P.sameVehicleMainControl.dataset.getCurrent()["CRDN_ID_LIST"],
|
|
|
|
key : $P.sameVehicleMainControl.dataset.getCurrent()["CRDN_ID_LIST"],
|
|
|
|
index : $P.sameVehicleMainControl.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
index : $P.sameVehicleMainControl.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDatasetControl.load($P.sameVehicleMainControl, 1).then((resp)=>{
|
|
|
|
Apply.fromDatasetControl.reload($P.sameVehicleMainControl).then((resp)=>{
|
|
|
|
Apply.toDataset.set($P.sameVehicleMainControl.dataset, resp);
|
|
|
|
Apply.toDataset.set($P.sameVehicleMainControl.dataset, resp);
|
|
|
|
$P.sameVehicleMainControl.dataset.onDatasetChange(resp);
|
|
|
|
$P.sameVehicleMainControl.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleMainControl.untilPageNum != 0){
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.query.fetchSize = $P.sameVehicleMainControl.defaultFetchSize;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.query.pageNum = $P.sameVehicleMainControl.untilPageNum;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleMainControl.beforeCurrent != null){
|
|
|
|
if($P.sameVehicleMainControl.beforeCurrent != null){
|
|
|
|
var beforeCurrentKey = $P.sameVehicleMainControl.beforeCurrent.key;
|
|
|
|
var beforeCurrentKey = $P.sameVehicleMainControl.beforeCurrent.key;
|
|
|
@ -782,21 +764,26 @@ $(document).ready(function(){
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.renderInspectionDataList = (total, listLength, trs, renderDataType) => {
|
|
|
|
$P.renderInspectionDataList = (total, listLength, trs, renderDataType, option) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
|
|
|
|
|
|
|
|
switch (renderDataType) {
|
|
|
|
switch (renderDataType) {
|
|
|
|
case "photoInspection":
|
|
|
|
case "photoInspection":
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
var initScroll = ($P.photoInspectionControl.query.pageNum < 2);
|
|
|
|
var initScroll = ($P.photoInspectionControl.query.pageNum < 2) && ($P.photoInspectionControl.untilPageNum == 0);
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
|
|
|
|
initScroll = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$("#photoInspection-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
$("#photoInspection-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
|
|
|
|
var initScroll = ($P.sameVehicleMainControl.query.pageNum < 2);
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
var initScroll = ($P.sameVehicleMainControl.query.pageNum < 2) && ($P.sameVehicleMainControl.untilPageNum == 0);
|
|
|
|
initScroll = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|