|
|
|
@ -650,23 +650,6 @@ $(document).ready(function(){
|
|
|
|
|
$P.sameVehicleControl.sub.load(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollEnd = (obj) => {
|
|
|
|
|
if(obj.dataset.scrollStatus){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var el = $(obj);
|
|
|
|
|
if(el.scrollTop() == 0){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()){
|
|
|
|
|
obj.dataset.scrollStatus = "waiting";
|
|
|
|
|
$P.scrollInspectionDataList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollInspectionDataList = () => {
|
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
|
case "photoInspection":
|
|
|
|
@ -885,14 +868,12 @@ $(document).ready(function(){
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','photoInspection');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','photoInspection');");
|
|
|
|
|
|
|
|
|
|
var trs = empty ? notFound : dataList.inStrings(found, replacer);
|
|
|
|
|
$("#photoInspectionTbody--${pageName}").html(trs.join());
|
|
|
|
|
|
|
|
|
|
if(total == dataList.length){
|
|
|
|
|
$("#photoInspection-responsive--${pageName}").attr("data-scroll-status", "complete");
|
|
|
|
|
} else {
|
|
|
|
|
$("#photoInspection-responsive--${pageName}").removeAttr("data-scroll-status");
|
|
|
|
|
}
|
|
|
|
|
var noMore = (total == dataList.length);
|
|
|
|
|
var initScroll = ($P.photoInspectionControl.query.pageNum < 2) && ($P.photoInspectionControl.untilPageNum == 0);
|
|
|
|
|
|
|
|
|
|
$("#photoInspection-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.untilPageNum != 0){
|
|
|
|
|
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize;
|
|
|
|
@ -907,14 +888,13 @@ $(document).ready(function(){
|
|
|
|
|
var found = document.getElementById("sameVehicleInspectionMainRow--${pageName}").innerHTML;
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID_LIST") + "','sameVehicleInspectionMain');");
|
|
|
|
|
|
|
|
|
|
var trs = empty ? notFound : dataList.inStrings(found, replacer);
|
|
|
|
|
$("#sameVehicleInspectionMainTbody--${pageName}").html(trs.join());
|
|
|
|
|
var noMore = (total == dataList.length);
|
|
|
|
|
var initScroll = ($P.sameVehicleControl.main.query.pageNum < 2) && ($P.sameVehicleControl.untilPageNum == 0);
|
|
|
|
|
|
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
if(total == dataList.length){
|
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}").attr("data-scroll-status", "complete");
|
|
|
|
|
} else {
|
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}").removeAttr("data-scroll-status");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleControl.untilPageNum != 0){
|
|
|
|
|
$P.sameVehicleControl.main.query.fetchSize = $P.sameVehicleControl.defaultFetchSize;
|
|
|
|
@ -979,9 +959,10 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
$("#btnInstLevyExcl--${pageName}").on("click", () => $P.openLevyExclPop("1"));
|
|
|
|
|
|
|
|
|
|
//스크롤 이벤트 추가(동일차량검사)
|
|
|
|
|
$("#photoInspection-responsive--${pageName}").on("scrollend", function(){ $P.scrollEnd(this); });
|
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}").on("scrollend", function(){ $P.scrollEnd(this); });
|
|
|
|
|
//스크롤 테이블
|
|
|
|
|
fnMakeScrollableTable($("#photoInspection-responsive--${pageName}")[0], $P.scrollInspectionDataList);
|
|
|
|
|
fnMakeScrollableTable($("#sameVehicleInspectionMain-responsive--${pageName}")[0], $P.scrollInspectionDataList);
|
|
|
|
|
|
|
|
|
|
$("#photoInspection_Table_0--${pageName}").find("th").resizable({handles : "e"});
|
|
|
|
|
$("#sameVehicleInspectionMain_Table_0--${pageName}").find("th").resizable({handles : "e"});
|
|
|
|
|
$("#sameVehicleInspectionSub_Table_0--${pageName}").find("th").resizable({handles : "e"});
|
|
|
|
|