|
|
|
@ -411,7 +411,6 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$P.photoInspectionControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -428,7 +427,6 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$P.sameVehicleMainControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.sameVehicleMainControl.untilPageNum = 0;
|
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleSubControl = new DatasetControl({
|
|
|
|
@ -463,7 +461,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
var t = $P.getGridTemplate("photoInspection");
|
|
|
|
|
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}");
|
|
|
|
|
};
|
|
|
|
@ -490,7 +488,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
var t = $P.getGridTemplate("sameVehicleInspectionMain");
|
|
|
|
|
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}");
|
|
|
|
|
};
|
|
|
|
@ -507,7 +505,7 @@ $(document).ready(function(){
|
|
|
|
|
$P.sameVehicleSubControl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
|
var t = $P.getGridTemplate("sameVehicleInspectionSub");
|
|
|
|
|
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) => {
|
|
|
|
@ -603,22 +601,14 @@ $(document).ready(function(){
|
|
|
|
|
$P.refreshInspectionList = () => {
|
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
|
case "photoInspection":
|
|
|
|
|
$P.photoInspectionControl.untilPageNum = $P.photoInspectionControl.query.pageNum;
|
|
|
|
|
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize * $P.photoInspectionControl.query.pageNum;
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = {
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = {
|
|
|
|
|
key : $P.photoInspectionControl.dataset.getCurrent()["CRDN_ID"],
|
|
|
|
|
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);
|
|
|
|
|
$P.photoInspectionControl.dataset.onDatasetChange(resp);
|
|
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.untilPageNum != 0){
|
|
|
|
|
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize;
|
|
|
|
|
$P.photoInspectionControl.query.pageNum = $P.photoInspectionControl.untilPageNum;
|
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
|
}
|
|
|
|
|
$P.photoInspectionControl.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.beforeCurrent != null){
|
|
|
|
|
var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key;
|
|
|
|
@ -647,22 +637,14 @@ $(document).ready(function(){
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
|
$P.sameVehicleMainControl.untilPageNum = $P.sameVehicleMainControl.query.pageNum;
|
|
|
|
|
$P.sameVehicleMainControl.query.fetchSize = $P.sameVehicleMainControl.defaultFetchSize * $P.sameVehicleMainControl.query.pageNum;
|
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = {
|
|
|
|
|
key : $P.sameVehicleMainControl.dataset.getCurrent()["CRDN_ID_LIST"],
|
|
|
|
|
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);
|
|
|
|
|
$P.sameVehicleMainControl.dataset.onDatasetChange(resp);
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleMainControl.untilPageNum != 0){
|
|
|
|
|
$P.sameVehicleMainControl.query.fetchSize = $P.sameVehicleMainControl.defaultFetchSize;
|
|
|
|
|
$P.sameVehicleMainControl.query.pageNum = $P.sameVehicleMainControl.untilPageNum;
|
|
|
|
|
$P.sameVehicleMainControl.untilPageNum = 0;
|
|
|
|
|
}
|
|
|
|
|
$P.sameVehicleMainControl.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleMainControl.beforeCurrent != null){
|
|
|
|
|
var beforeCurrentKey = $P.sameVehicleMainControl.beforeCurrent.key;
|
|
|
|
@ -782,20 +764,25 @@ $(document).ready(function(){
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.renderInspectionDataList = (total, listLength, trs, renderDataType) => {
|
|
|
|
|
$P.renderInspectionDataList = (total, listLength, trs, renderDataType, option) => {
|
|
|
|
|
|
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
|
|
|
|
|
|
switch (renderDataType) {
|
|
|
|
|
case "photoInspection":
|
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
|
var initScroll = ($P.photoInspectionControl.query.pageNum < 2) && ($P.photoInspectionControl.untilPageNum == 0);
|
|
|
|
|
var initScroll = ($P.photoInspectionControl.query.pageNum < 2);
|
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
|
initScroll = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#photoInspection-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
|
|
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
|
var initScroll = ($P.sameVehicleMainControl.query.pageNum < 2) && ($P.sameVehicleMainControl.untilPageNum == 0);
|
|
|
|
|
var initScroll = ($P.sameVehicleMainControl.query.pageNum < 2);
|
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
|
initScroll = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
|
|
|
|
|
|