|
|
@ -406,17 +406,23 @@ $(document).ready(function(){
|
|
|
|
$P.photoInspectionControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.photoInspectionControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
$P.photoInspectionControl.tableRenderComplete = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//동일차량검사 datasetControl 인스턴스
|
|
|
|
//동일차량검사 datasetControl 인스턴스
|
|
|
|
$P.sameVehicleControl = new InspectionControl({
|
|
|
|
$P.sameVehicleMainControl = new DatasetControl({
|
|
|
|
urls : { load : "", getInfo : "" },
|
|
|
|
urls : { load : "", getInfo : "" },
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
keymapper : info => info ? info.CRDN_ID_LIST : "",
|
|
|
|
keymapper : info => info ? info.CRDN_ID_LIST : "",
|
|
|
|
formats: { CRDN_CNT : numberFormat, FFNLG_CRDN_AMT : numberFormat }
|
|
|
|
formats: {
|
|
|
|
},
|
|
|
|
CRDN_CNT : numberFormat,
|
|
|
|
{
|
|
|
|
FFNLG_CRDN_AMT : numberFormat
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleSubControl = new DatasetControl({
|
|
|
|
urls : { load : "", getInfo : "" },
|
|
|
|
urls : { load : "", getInfo : "" },
|
|
|
|
dataGetter : obj => obj["List"],
|
|
|
|
dataGetter : obj => obj["List"],
|
|
|
|
keymapper : info => info ? info.CRDN_ID : "",
|
|
|
|
keymapper : info => info ? info.CRDN_ID : "",
|
|
|
@ -426,14 +432,8 @@ $(document).ready(function(){
|
|
|
|
CRDN_STTS_CD : FIM010,
|
|
|
|
CRDN_STTS_CD : FIM010,
|
|
|
|
FFNLG_CRDN_AMT : numberFormat
|
|
|
|
FFNLG_CRDN_AMT : numberFormat
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
);
|
|
|
|
|
|
|
|
$P.sameVehicleControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.beforeCurrent = null;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.tableRenderComplete = false;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.sub.tableRenderComplete = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.photoInspectionControl.getNext = (key) => {
|
|
|
|
$P.photoInspectionControl.getNext = (key) => {
|
|
|
|
|
|
|
|
|
|
|
|
var ds = $P.photoInspectionControl.dataset.getDataset();
|
|
|
|
var ds = $P.photoInspectionControl.dataset.getDataset();
|
|
|
@ -446,126 +446,61 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* DatasetControl.on
|
|
|
|
* Dataset.on
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$P.photoInspectionControl.onDatasetChange = (obj) => {
|
|
|
|
$P.photoInspectionControl.dataset.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
|
|
$P.renderInspectionDataList(obj["Total"], "photoInspection");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#photoInspectionPaging--${pageName}").setPagingInfo({
|
|
|
|
var t = $P.getGridTemplate("photoInspection");
|
|
|
|
list : $P.photoInspectionControl.dataset,
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.photoInspectionControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
prefix : "photoInspectionPaging--${pageName}",
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.photoInspectionControl.dataset.length, trs, "photoInspection");
|
|
|
|
totalSize : obj["Total"]
|
|
|
|
|
|
|
|
});
|
|
|
|
Apply.fromDataset.paging($P.photoInspectionControl.dataset, obj, "photoInspectionPaging--${pageName}");
|
|
|
|
|
|
|
|
|
|
|
|
$P.photoInspectionControl.tableRenderComplete = true;
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.photoInspectionControl.onCurrentChange = (DI) => {
|
|
|
|
$P.photoInspectionControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
|
|
|
|
Apply.fromDataset.currentRow($P.photoInspectionControl.dataset, dataItem, $("#photoInspectionTbody--${pageName}")[0]);
|
|
|
|
if(!$P.photoInspectionControl.tableRenderComplete){
|
|
|
|
|
|
|
|
return;
|
|
|
|
var dataKey = "";
|
|
|
|
}
|
|
|
|
var curDataVhrno = "";
|
|
|
|
|
|
|
|
var nextDataKey = "";
|
|
|
|
if($P.photoInspectionControl.beforeCurrent != null){
|
|
|
|
var nextDataVhrno = "";
|
|
|
|
var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key;
|
|
|
|
if(!$P.photoInspectionControl.dataset.empty){
|
|
|
|
var beforeCurrentIndex = $P.photoInspectionControl.beforeCurrent.index;
|
|
|
|
dataKey = $P.photoInspectionControl.dataset.getKey(dataItem);
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
curDataVhrno = $P.photoInspectionControl.dataset.getData(dataKey)["VHRNO"];
|
|
|
|
|
|
|
|
var nextData = $P.photoInspectionControl.getNext(dataKey);
|
|
|
|
if(!$P.photoInspectionControl.dataset.empty){
|
|
|
|
nextDataKey = nextData != null ? nextData.CRDN_ID : "";
|
|
|
|
var info = $P.photoInspectionControl.dataset.getData(beforeCurrentKey);
|
|
|
|
nextDataVhrno = nextData != null ? nextData.VHRNO : "";
|
|
|
|
|
|
|
|
|
|
|
|
if(info != null){
|
|
|
|
|
|
|
|
$P.photoInspectionControl.dataset.setCurrent(beforeCurrentKey, true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(beforeCurrentIndex > ($P.photoInspectionControl.dataset.length - 1)){
|
|
|
|
|
|
|
|
info = $P.photoInspectionControl.dataset.getDataset()[$P.photoInspectionControl.dataset.length - 1];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
info = $P.photoInspectionControl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.photoInspectionControl.dataset.setCurrent(info["CRDN_ID"], true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.photoInspectionControl.tableRenderComplete = false;
|
|
|
|
|
|
|
|
if(!DI){
|
|
|
|
|
|
|
|
$P.clickInspectionDataList("","photoInspection", true);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$P.clickInspectionDataList($P.photoInspectionControl.getCurrent()["CRDN_ID"],"photoInspection", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.showPhoto(dataKey,nextDataKey,curDataVhrno,nextDataVhrno);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.onDatasetChange = (obj) => {
|
|
|
|
$P.sameVehicleMainControl.dataset.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
|
|
$P.renderInspectionDataList(obj["Total"], "sameVehicleInspectionMain");
|
|
|
|
var t = $P.getGridTemplate("sameVehicleInspectionMain");
|
|
|
|
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.sameVehicleMainControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
$("#sameVehicleInspectionMainPaging--${pageName}").setPagingInfo({
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.sameVehicleMainControl.dataset.length, trs, "sameVehicleInspectionMain");
|
|
|
|
list : $P.sameVehicleControl.main.dataset,
|
|
|
|
|
|
|
|
prefix : "sameVehicleInspectionMainPaging--${pageName}",
|
|
|
|
Apply.fromDataset.paging($P.sameVehicleMainControl.dataset, obj, "sameVehicleInspectionMainPaging--${pageName}");
|
|
|
|
totalSize : obj["Total"]
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.tableRenderComplete = true;
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.onCurrentChange = (DI) => {
|
|
|
|
$P.sameVehicleMainControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
if(!$P.sameVehicleControl.main.tableRenderComplete){
|
|
|
|
Apply.fromDataset.currentRow($P.sameVehicleMainControl.dataset, dataItem, $("#sameVehicleInspectionMainTbody--${pageName}")[0]);
|
|
|
|
return;
|
|
|
|
if(dataItem){
|
|
|
|
}
|
|
|
|
$P.searchDetailInspectionDataList(dataItem.data["CRDN_ID_LIST"]);
|
|
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleControl.main.beforeCurrent != null){
|
|
|
|
|
|
|
|
var beforeCurrentKey = $P.sameVehicleControl.main.beforeCurrent.key;
|
|
|
|
|
|
|
|
var beforeCurrentIndex = $P.sameVehicleControl.main.beforeCurrent.index;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!$P.sameVehicleControl.main.dataset.empty){
|
|
|
|
|
|
|
|
var info = $P.sameVehicleControl.main.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(info != null){
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.dataset.setCurrent(beforeCurrentKey,true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(beforeCurrentIndex > ($P.sameVehicleControl.main.dataset.length - 1)){
|
|
|
|
|
|
|
|
info = $P.sameVehicleControl.main.dataset.getDataset()[$P.sameVehicleControl.main.dataset.length - 1];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
info = $P.sameVehicleControl.main.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.dataset.setCurrent(info["CRDN_ID_LIST"],true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.tableRenderComplete = false;
|
|
|
|
|
|
|
|
if(!DI){
|
|
|
|
|
|
|
|
$P.clickInspectionDataList("","sameVehicleInspectionMain", true);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$P.clickInspectionDataList($P.sameVehicleControl.main.getCurrent()["CRDN_ID_LIST"],"sameVehicleInspectionMain", true);
|
|
|
|
$("#sameVehicleInspectionSubTbody--${pageName}").html("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.sub.onDatasetChange = (obj) => {
|
|
|
|
$P.sameVehicleSubControl.dataset.onDatasetChange = (obj) => {
|
|
|
|
$P.renderInspectionDataList(obj["Total"], "sameVehicleInspectionSub");
|
|
|
|
var t = $P.getGridTemplate("sameVehicleInspectionSub");
|
|
|
|
$P.sameVehicleControl.sub.tableRenderComplete = true;
|
|
|
|
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.sameVehicleControl.sub.onCurrentChange = (DI) => {
|
|
|
|
$P.sameVehicleSubControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
if(!$P.sameVehicleControl.sub.tableRenderComplete){
|
|
|
|
Apply.fromDataset.currentRow($P.sameVehicleSubControl.dataset, dataItem, $("#sameVehicleInspectionSubTbody--${pageName}")[0]);
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.sub.tableRenderComplete = false;
|
|
|
|
|
|
|
|
if(!DI){
|
|
|
|
|
|
|
|
$P.clickInspectionDataList("","sameVehicleInspectionSub", true);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$P.clickInspectionDataList($P.sameVehicleControl.sub.getCurrent()["CRDN_ID"],"sameVehicleInspectionSub", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
@ -583,17 +518,17 @@ $(document).ready(function(){
|
|
|
|
$('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-7).date);
|
|
|
|
$('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-7).date);
|
|
|
|
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date());
|
|
|
|
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date());
|
|
|
|
$P.photoInspectionControl.setData([]);
|
|
|
|
$P.photoInspectionControl.setData([]);
|
|
|
|
$P.sameVehicleControl.main.setData([]);
|
|
|
|
$P.sameVehicleMainControl.setData([]);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnResetAndChangeBiz = (taskSeCd) => {
|
|
|
|
$P.fnResetAndChangeBiz = (taskSeCd) => {
|
|
|
|
$P.fnReset();
|
|
|
|
$P.fnReset();
|
|
|
|
$P.photoInspectionControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
$P.photoInspectionControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
$P.photoInspectionControl.urls.getInfo = "";
|
|
|
|
$P.photoInspectionControl.urls.getInfo = "";
|
|
|
|
$P.sameVehicleControl.main.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
$P.sameVehicleMainControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
$P.sameVehicleControl.main.urls.getInfo = "";
|
|
|
|
$P.sameVehicleMainControl.urls.getInfo = "";
|
|
|
|
$P.sameVehicleControl.sub.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
$P.sameVehicleSubControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
$P.sameVehicleControl.sub.urls.getInfo = "";
|
|
|
|
$P.sameVehicleSubControl.urls.getInfo = "";
|
|
|
|
|
|
|
|
|
|
|
|
var clsForTask = taskSeCd.toLowerCase();
|
|
|
|
var clsForTask = taskSeCd.toLowerCase();
|
|
|
|
//업무별 조회조건
|
|
|
|
//업무별 조회조건
|
|
|
@ -607,31 +542,19 @@ $(document).ready(function(){
|
|
|
|
$('#btnPhotoInspection--${pageName}').trigger("click");
|
|
|
|
$('#btnPhotoInspection--${pageName}').trigger("click");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.getParams = () => {
|
|
|
|
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
|
|
|
var data = formFields.get();
|
|
|
|
|
|
|
|
|
|
|
|
$P.refreshInspectionList = () => {
|
|
|
|
if($P.currentDisplay == "photoInspection"){
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
data.fetchSize = $P.photoInspectionControl.defaultFetchSize;
|
|
|
|
case "photoInspection":
|
|
|
|
} else if($P.currentDisplay == "sameVehicleInspection"){
|
|
|
|
$P.photoInspectionControl.untilPageNum = $P.photoInspectionControl.query.pageNum;
|
|
|
|
data.fetchSize = $P.sameVehicleMainControl.defaultFetchSize;
|
|
|
|
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize * $P.photoInspectionControl.query.pageNum;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = {
|
|
|
|
|
|
|
|
key : $P.photoInspectionControl.getCurrent()["CRDN_ID"],
|
|
|
|
|
|
|
|
index : $P.photoInspectionControl.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$P.photoInspectionControl.load(1);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
|
|
|
|
$P.sameVehicleControl.untilPageNum = $P.sameVehicleControl.main.query.pageNum;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.query.fetchSize = $P.sameVehicleControl.defaultFetchSize * $P.sameVehicleControl.main.query.pageNum;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.beforeCurrent = {
|
|
|
|
|
|
|
|
key : $P.sameVehicleControl.main.getCurrent()["CRDN_ID_LIST"],
|
|
|
|
|
|
|
|
index : $P.sameVehicleControl.main.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.load(1);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.searchInspectionList = () => {
|
|
|
|
$P.searchInspectionList = () => {
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
case "photoInspection":
|
|
|
|
case "photoInspection":
|
|
|
@ -640,19 +563,20 @@ $(document).ready(function(){
|
|
|
|
$P.photoInspectionControl.load(1);
|
|
|
|
$P.photoInspectionControl.load(1);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
$P.sameVehicleControl.main.query = $P.getParams();
|
|
|
|
$P.sameVehicleMainControl.query = $P.getParams();
|
|
|
|
$P.sameVehicleControl.main.query.inspectionDataType = "sameVehicleMain";
|
|
|
|
$P.sameVehicleMainControl.query.inspectionDataType = "sameVehicleMain";
|
|
|
|
$P.sameVehicleControl.main.load(1);
|
|
|
|
$P.sameVehicleMainControl.load(1);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.searchDetailInspectionDataList = (dataKey) => {
|
|
|
|
$P.searchDetailInspectionDataList = (dataKey) => {
|
|
|
|
$P.sameVehicleControl.sub.query = {};
|
|
|
|
$P.sameVehicleSubControl.query = {};
|
|
|
|
$P.sameVehicleControl.sub.query.inspectionDataType = "sameVehicleSub";
|
|
|
|
$P.sameVehicleSubControl.query.inspectionDataType = "sameVehicleSub";
|
|
|
|
$P.sameVehicleControl.sub.query.crdnIDs = dataKey;
|
|
|
|
$P.sameVehicleSubControl.query.crdnIDs = dataKey;
|
|
|
|
$P.sameVehicleControl.sub.query.taskSeCd = $P.sameVehicleControl.main.query.taskSeCd;
|
|
|
|
$P.sameVehicleSubControl.query.taskSeCd = $P.sameVehicleMainControl.query.taskSeCd;
|
|
|
|
$P.sameVehicleControl.sub.load(0);
|
|
|
|
$P.sameVehicleSubControl.load(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.scrollInspectionDataList = () => {
|
|
|
|
$P.scrollInspectionDataList = () => {
|
|
|
@ -661,91 +585,252 @@ $(document).ready(function(){
|
|
|
|
$P.photoInspectionControl.load($P.photoInspectionControl.query.pageNum + 1);
|
|
|
|
$P.photoInspectionControl.load($P.photoInspectionControl.query.pageNum + 1);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
$P.sameVehicleControl.main.load($P.sameVehicleControl.main.query.pageNum + 1);
|
|
|
|
$P.sameVehicleMainControl.load($P.sameVehicleMainControl.query.pageNum + 1);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: break;
|
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$P.clickInspectionDataList = (dataKey, gridType, auto) => {
|
|
|
|
|
|
|
|
switch (gridType) {
|
|
|
|
$P.refreshInspectionList = () => {
|
|
|
|
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
case "photoInspection":
|
|
|
|
case "photoInspection":
|
|
|
|
|
|
|
|
$P.photoInspectionControl.untilPageNum = $P.photoInspectionControl.query.pageNum;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize * $P.photoInspectionControl.query.pageNum;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = {
|
|
|
|
|
|
|
|
key : $P.photoInspectionControl.getCurrent()["CRDN_ID"],
|
|
|
|
|
|
|
|
index : $P.photoInspectionControl.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDatasetControl.load($P.photoInspectionControl, 1).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;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.beforeCurrent != null){
|
|
|
|
|
|
|
|
var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key;
|
|
|
|
|
|
|
|
var beforeCurrentIndex = $P.photoInspectionControl.beforeCurrent.index;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!$P.photoInspectionControl.dataset.empty){
|
|
|
|
|
|
|
|
var info = $P.photoInspectionControl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
if(info != null){
|
|
|
|
$("#curDataVhrno--${pageName}").html("");
|
|
|
|
$P.photoInspectionControl.dataset.setCurrent(beforeCurrentKey, true);
|
|
|
|
$("#nextDataVhrno--${pageName}").html("");
|
|
|
|
|
|
|
|
$("#curDataFiles--${pageName}").html("");
|
|
|
|
|
|
|
|
$("#nextDataFiles--${pageName}").html("");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#photoInspectionTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
var curDataVhrno = $P.photoInspectionControl.dataset.getData(dataKey)["VHRNO"];
|
|
|
|
if(beforeCurrentIndex > ($P.photoInspectionControl.dataset.length - 1)){
|
|
|
|
var nextData = $P.photoInspectionControl.getNext(dataKey);
|
|
|
|
info = $P.photoInspectionControl.dataset.getDataset()[$P.photoInspectionControl.dataset.length - 1];
|
|
|
|
var nextDataKey = nextData != null ? nextData.CRDN_ID : "";
|
|
|
|
} else {
|
|
|
|
var nextDataVhrno = nextData != null ? nextData.VHRNO : "";
|
|
|
|
info = $P.photoInspectionControl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
|
|
|
}
|
|
|
|
$("#curDataVhrno--${pageName}").html(curDataVhrno);
|
|
|
|
|
|
|
|
$("#nextDataVhrno--${pageName}").html(nextDataVhrno);
|
|
|
|
$P.photoInspectionControl.dataset.setCurrent(info["CRDN_ID"], true);
|
|
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
}
|
|
|
|
url:"file/list.do",
|
|
|
|
}
|
|
|
|
data: {
|
|
|
|
}
|
|
|
|
infoType : "100",
|
|
|
|
});
|
|
|
|
infoKeys : [dataKey, nextDataKey],
|
|
|
|
break;
|
|
|
|
fetchSize : 0
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
},
|
|
|
|
$P.sameVehicleMainControl.untilPageNum = $P.sameVehicleMainControl.query.pageNum;
|
|
|
|
success : resp => {
|
|
|
|
$P.sameVehicleMainControl.query.fetchSize = $P.sameVehicleMainControl.defaultFetchSize * $P.sameVehicleMainControl.query.pageNum;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = {
|
|
|
|
|
|
|
|
key : $P.sameVehicleMainControl.getCurrent()["CRDN_ID_LIST"],
|
|
|
|
|
|
|
|
index : $P.sameVehicleMainControl.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDatasetControl.load($P.sameVehicleMainControl, 1).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;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleMainControl.beforeCurrent != null){
|
|
|
|
|
|
|
|
var beforeCurrentKey = $P.sameVehicleMainControl.beforeCurrent.key;
|
|
|
|
|
|
|
|
var beforeCurrentIndex = $P.sameVehicleMainControl.beforeCurrent.index;
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
var fileList = resp.fileList;
|
|
|
|
if(!$P.sameVehicleMainControl.dataset.empty){
|
|
|
|
|
|
|
|
var info = $P.sameVehicleMainControl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
|
|
var currentDataFileList = fileList.filter(x => x.INF_KEY == dataKey);
|
|
|
|
if(info != null){
|
|
|
|
var nextDataFileList = fileList.filter(x => x.INF_KEY == nextDataKey);
|
|
|
|
$P.sameVehicleMainControl.dataset.setCurrent(beforeCurrentKey,true);
|
|
|
|
|
|
|
|
|
|
|
|
$("#curDataFiles--${pageName}").html("");
|
|
|
|
} else {
|
|
|
|
$("#nextDataFiles--${pageName}").html("");
|
|
|
|
if(beforeCurrentIndex > ($P.sameVehicleMainControl.dataset.length - 1)){
|
|
|
|
|
|
|
|
info = $P.sameVehicleMainControl.dataset.getDataset()[$P.sameVehicleMainControl.dataset.length - 1];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
info = $P.sameVehicleMainControl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
currentDataFileList.forEach(function(item, index, array){
|
|
|
|
$P.sameVehicleMainControl.dataset.setCurrent(info["CRDN_ID_LIST"],true);
|
|
|
|
var output = fnMakeImgTagForInspection(item.URL, item.FILE_NM,"cur"+item.FILE_ID+'${pageName}',item.MOSAIC);
|
|
|
|
}
|
|
|
|
$("#curDataFiles--${pageName}").append(output);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
nextDataFileList.forEach(function(item, index, array){
|
|
|
|
|
|
|
|
var output = fnMakeImgTagForInspection(item.URL, item.FILE_NM,"next"+item.FILE_ID+'${pageName}',item.MOSAIC);
|
|
|
|
|
|
|
|
$("#nextDataFiles--${pageName}").append(output);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnExcelDown = () => {
|
|
|
|
|
|
|
|
if($P.currentDisplay == "photoInspection"){
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.dataset.empty){
|
|
|
|
|
|
|
|
alert("조회된 자료가 없습니다.");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(!auto){
|
|
|
|
var cellDefs = getCellDefs($("#photoInspection_Table_0--${pageName} thead th").not(".dummy-th").not(":eq(0)"),
|
|
|
|
$P.photoInspectionControl.setCurrent(dataKey);
|
|
|
|
$($("#photoInspectionRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
|
|
|
|
}
|
|
|
|
$P.photoInspectionControl.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.photoInspectionControl.download();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleMainControl.dataset.empty){
|
|
|
|
|
|
|
|
alert("조회된 자료가 없습니다.");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(confirm("단속건수 엑셀저장은 확인버튼, 상세내역 엑셀저장시 취소버튼을 누르세요.")){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var cellDefs = getCellDefs($("#sameVehicleInspectionMain_Table_0--${pageName} thead th").not(".dummy-th"),
|
|
|
|
|
|
|
|
$($("#sameVehicleInspectionMainRow--${pageName}")[0].content).find("td").not(".dummy-td"));
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.download();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var cellDefs = getCellDefs($("#sameVehicleInspectionSub_Table_0--${pageName} thead th").not(".dummy-th").not(":hidden"),
|
|
|
|
|
|
|
|
$($("#sameVehicleInspectionSubRow--${pageName}")[0].content).find("td").not(".dummy-td").not(".privacy-mask"));
|
|
|
|
|
|
|
|
$P.sameVehicleSubControl.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleSubControl.download();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.getGridTemplate = (gridType) => {
|
|
|
|
|
|
|
|
var notFound;
|
|
|
|
|
|
|
|
var found;
|
|
|
|
|
|
|
|
var replacer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (gridType) {
|
|
|
|
|
|
|
|
case "photoInspection":
|
|
|
|
|
|
|
|
notFound = [document.getElementById("photoInspectionNotFound--${pageName}").innerHTML]
|
|
|
|
|
|
|
|
found = document.getElementById("photoInspectionRow--${pageName}").innerHTML;
|
|
|
|
|
|
|
|
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');");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
|
|
|
|
notFound = [document.getElementById("sameVehicleInspectionMainNotFound--${pageName}").innerHTML];
|
|
|
|
|
|
|
|
found = document.getElementById("sameVehicleInspectionMainRow--${pageName}").innerHTML;
|
|
|
|
|
|
|
|
replacer = (str, dataItem) => str
|
|
|
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID_LIST") + "','sameVehicleInspectionMain');");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "sameVehicleInspectionSub":
|
|
|
|
|
|
|
|
notFound = [document.getElementById("sameVehicleInspectionSubNotFound--${pageName}").innerHTML]
|
|
|
|
|
|
|
|
found = document.getElementById("sameVehicleInspectionSubRow--${pageName}").innerHTML;
|
|
|
|
|
|
|
|
replacer = (str, dataItem) => str
|
|
|
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','sameVehicleInspectionSub');")
|
|
|
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','sameVehicleInspectionSub');");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
found : found,
|
|
|
|
|
|
|
|
notFound : notFound,
|
|
|
|
|
|
|
|
replacer : replacer
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.renderInspectionDataList = (total, listLength, trs, renderDataType) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (renderDataType) {
|
|
|
|
|
|
|
|
case "photoInspection":
|
|
|
|
|
|
|
|
var noMore = (total == listLength);
|
|
|
|
|
|
|
|
var initScroll = ($P.photoInspectionControl.query.pageNum < 2) && ($P.photoInspectionControl.untilPageNum == 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#photoInspection-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noMore = (total == listLength);
|
|
|
|
|
|
|
|
var initScroll = ($P.sameVehicleMainControl.query.pageNum < 2) && ($P.sameVehicleMainControl.untilPageNum == 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "sameVehicleInspectionSub":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#sameVehicleInspectionSubTbody--${pageName}").html(trs);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//보안모드
|
|
|
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.clickInspectionDataList = (dataKey, gridType) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (gridType) {
|
|
|
|
|
|
|
|
case "photoInspection":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(dataKey != ""){
|
|
|
|
|
|
|
|
$("#photoInspectionTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
|
|
|
Apply.toDataset.current($P.photoInspectionControl.dataset, dataKey);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var curDataVhrno = $P.photoInspectionControl.dataset.getData(dataKey)["VHRNO"];
|
|
|
|
|
|
|
|
var nextData = $P.photoInspectionControl.getNext(dataKey);
|
|
|
|
|
|
|
|
var nextDataKey = nextData != null ? nextData.CRDN_ID : "";
|
|
|
|
|
|
|
|
var nextDataVhrno = nextData != null ? nextData.VHRNO : "";
|
|
|
|
|
|
|
|
$P.showPhoto(dataKey,nextDataKey,curDataVhrno,nextDataVhrno);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
if(dataKey == ""){
|
|
|
|
if(dataKey == ""){
|
|
|
|
$P.sameVehicleControl.sub.setData([]);
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("#sameVehicleInspectionMainTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
$("#sameVehicleInspectionMainTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Apply.toDataset.current($P.sameVehicleMainControl.dataset, dataKey);
|
|
|
|
|
|
|
|
|
|
|
|
$P.searchDetailInspectionDataList(dataKey);
|
|
|
|
$P.searchDetailInspectionDataList(dataKey);
|
|
|
|
if(!auto){
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.setCurrent(dataKey);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "sameVehicleInspectionSub":
|
|
|
|
case "sameVehicleInspectionSub":
|
|
|
|
if(dataKey == ""){
|
|
|
|
if(dataKey == ""){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("#sameVehicleInspectionSubTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
$("#sameVehicleInspectionSubTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
if(!auto){
|
|
|
|
|
|
|
|
$P.sameVehicleControl.sub.setCurrent(dataKey);
|
|
|
|
Apply.toDataset.current($P.sameVehicleSubControl.dataset, dataKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.dblclickInspectionDataList = (dataKey, gridType) => {
|
|
|
|
$P.dblclickInspectionDataList = (dataKey) => {
|
|
|
|
|
|
|
|
|
|
|
|
var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
|
|
|
|
var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
|
|
|
|
|
|
|
|
|
|
|
@ -759,7 +844,7 @@ $(document).ready(function(){
|
|
|
|
ajax.get({
|
|
|
|
ajax.get({
|
|
|
|
url : dialogUrl,
|
|
|
|
url : dialogUrl,
|
|
|
|
data : params,
|
|
|
|
data : params,
|
|
|
|
success : resp => {
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
|
|
dialog.open({
|
|
|
|
dialog.open({
|
|
|
|
id : "totalInfoMainDialog",
|
|
|
|
id : "totalInfoMainDialog",
|
|
|
@ -771,13 +856,56 @@ $(document).ready(function(){
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.showPhoto = (dataKey, nextDataKey, curDataVhrno, nextDataVhrno) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
|
|
|
$("#curDataVhrno--${pageName}").html("");
|
|
|
|
|
|
|
|
$("#nextDataVhrno--${pageName}").html("");
|
|
|
|
|
|
|
|
$("#curDataFiles--${pageName}").html("");
|
|
|
|
|
|
|
|
$("#nextDataFiles--${pageName}").html("");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#curDataVhrno--${pageName}").html(curDataVhrno);
|
|
|
|
|
|
|
|
$("#nextDataVhrno--${pageName}").html(nextDataVhrno);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
|
|
|
url:"file/list.do",
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
infoType : "100",
|
|
|
|
|
|
|
|
infoKeys : [dataKey, nextDataKey],
|
|
|
|
|
|
|
|
fetchSize : 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fileList = resp.fileList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var currentDataFileList = fileList.filter(x => x.INF_KEY == dataKey);
|
|
|
|
|
|
|
|
var nextDataFileList = fileList.filter(x => x.INF_KEY == nextDataKey);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#curDataFiles--${pageName}").html("");
|
|
|
|
|
|
|
|
$("#nextDataFiles--${pageName}").html("");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
currentDataFileList.forEach(function(item, index, array){
|
|
|
|
|
|
|
|
var output = fnMakeImgTagForInspection(item.URL, item.FILE_NM,"cur"+item.FILE_ID+'${pageName}',item.MOSAIC);
|
|
|
|
|
|
|
|
$("#curDataFiles--${pageName}").append(output);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
nextDataFileList.forEach(function(item, index, array){
|
|
|
|
|
|
|
|
var output = fnMakeImgTagForInspection(item.URL, item.FILE_NM,"next"+item.FILE_ID+'${pageName}',item.MOSAIC);
|
|
|
|
|
|
|
|
$("#nextDataFiles--${pageName}").append(output);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.openLevyExclPop = (levyExclSeCd) => {
|
|
|
|
$P.openLevyExclPop = (levyExclSeCd) => {
|
|
|
|
var info = "";
|
|
|
|
var info = "";
|
|
|
|
|
|
|
|
|
|
|
|
if ($P.currentDisplay == "photoInspection") {
|
|
|
|
if ($P.currentDisplay == "photoInspection") {
|
|
|
|
info = $P.photoInspectionControl.dataset.getCurrent("item");
|
|
|
|
info = $P.photoInspectionControl.dataset.getCurrent("item");
|
|
|
|
} else if ($P.currentDisplay == "sameVehicleInspection") {
|
|
|
|
} else if ($P.currentDisplay == "sameVehicleInspection") {
|
|
|
|
info = $P.sameVehicleControl.sub.dataset.getCurrent("item");
|
|
|
|
info = $P.sameVehicleSubControl.dataset.getCurrent("item");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -798,7 +926,7 @@ $(document).ready(function(){
|
|
|
|
ajax.get({
|
|
|
|
ajax.get({
|
|
|
|
url : wctx.url(taskSeCd + "/excl/excl01/020/info.do"),
|
|
|
|
url : wctx.url(taskSeCd + "/excl/excl01/020/info.do"),
|
|
|
|
data : params,
|
|
|
|
data : params,
|
|
|
|
success : resp => {
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
|
|
if((typeof resp) != "string"){
|
|
|
|
if((typeof resp) != "string"){
|
|
|
|
dialog.alert({
|
|
|
|
dialog.alert({
|
|
|
@ -844,7 +972,7 @@ $(document).ready(function(){
|
|
|
|
ajax.get({
|
|
|
|
ajax.get({
|
|
|
|
url : wctx.url("/PVS/crdn/crdn02/050/info.do"),
|
|
|
|
url : wctx.url("/PVS/crdn/crdn02/050/info.do"),
|
|
|
|
data : params,
|
|
|
|
data : params,
|
|
|
|
success : resp => {
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
|
|
if((typeof resp) != "string"){
|
|
|
|
if((typeof resp) != "string"){
|
|
|
|
dialog.alert({
|
|
|
|
dialog.alert({
|
|
|
@ -874,81 +1002,6 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.renderInspectionDataList = (total, renderDataType) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (renderDataType) {
|
|
|
|
|
|
|
|
case "photoInspection":
|
|
|
|
|
|
|
|
var DS = $P.photoInspectionControl.dataset;
|
|
|
|
|
|
|
|
var empty = DS.empty;
|
|
|
|
|
|
|
|
var notFound = [document.getElementById("photoInspectionNotFound--${pageName}").innerHTML]
|
|
|
|
|
|
|
|
var found = document.getElementById("photoInspectionRow--${pageName}").innerHTML;
|
|
|
|
|
|
|
|
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 : DS.inStrings(found, replacer);
|
|
|
|
|
|
|
|
var noMore = (total == DS.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;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.query.pageNum = $P.photoInspectionControl.untilPageNum;
|
|
|
|
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
|
|
|
|
var DS = $P.sameVehicleControl.main.dataset;
|
|
|
|
|
|
|
|
var empty = DS.empty;
|
|
|
|
|
|
|
|
var notFound = [document.getElementById("sameVehicleInspectionMainNotFound--${pageName}").innerHTML];
|
|
|
|
|
|
|
|
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 : DS.inStrings(found, replacer);
|
|
|
|
|
|
|
|
var noMore = (total == DS.length);
|
|
|
|
|
|
|
|
var initScroll = ($P.sameVehicleControl.main.query.pageNum < 2) && ($P.sameVehicleControl.untilPageNum == 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#sameVehicleInspectionMain-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleControl.untilPageNum != 0){
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.query.fetchSize = $P.sameVehicleControl.defaultFetchSize;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.query.pageNum = $P.sameVehicleControl.untilPageNum;
|
|
|
|
|
|
|
|
$P.sameVehicleControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "sameVehicleInspectionSub":
|
|
|
|
|
|
|
|
var DS = $P.sameVehicleControl.sub.dataset;
|
|
|
|
|
|
|
|
var empty = DS.empty;
|
|
|
|
|
|
|
|
var notFound = [document.getElementById("sameVehicleInspectionSubNotFound--${pageName}").innerHTML]
|
|
|
|
|
|
|
|
var found = document.getElementById("sameVehicleInspectionSubRow--${pageName}").innerHTML;
|
|
|
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','sameVehicleInspectionSub');")
|
|
|
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','sameVehicleInspectionSub');");
|
|
|
|
|
|
|
|
var trs = empty ? notFound : DS.inStrings(found, replacer);
|
|
|
|
|
|
|
|
$("#sameVehicleInspectionSubTbody--${pageName}").html(trs.join());
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//보안모드
|
|
|
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.getParams = () => {
|
|
|
|
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
|
|
|
var data = formFields.get();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.currentDisplay == "photoInspection"){
|
|
|
|
|
|
|
|
data.fetchSize = $P.photoInspectionControl.defaultFetchSize;
|
|
|
|
|
|
|
|
} else if($P.currentDisplay == "sameVehicleInspection"){
|
|
|
|
|
|
|
|
data.fetchSize = $P.sameVehicleControl.defaultFetchSize;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* element.on
|
|
|
|
* element.on
|
|
|
@ -974,48 +1027,7 @@ $(document).ready(function(){
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼
|
|
|
|
$('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼
|
|
|
|
|
|
|
|
|
|
|
|
$('#btnExcel--${pageName}').on('click', function(){
|
|
|
|
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown());
|
|
|
|
|
|
|
|
|
|
|
|
if($P.currentDisplay == "photoInspection"){
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.dataset.empty){
|
|
|
|
|
|
|
|
alert("조회된 자료가 없습니다.");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var cellDefs = getCellDefs($("#photoInspection_Table_0--${pageName} thead th").not(".dummy-th").not(":eq(0)"),
|
|
|
|
|
|
|
|
$($("#photoInspectionRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
|
|
|
|
|
|
|
|
$P.photoInspectionControl.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.photoInspectionControl.download();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.sameVehicleControl.main.dataset.empty){
|
|
|
|
|
|
|
|
alert("조회된 자료가 없습니다.");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(confirm("단속건수 엑셀저장은 확인버튼, 상세내역 엑셀저장시 취소버튼을 누르세요.")){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var cellDefs = getCellDefs($("#sameVehicleInspectionMain_Table_0--${pageName} thead th").not(".dummy-th"),
|
|
|
|
|
|
|
|
$($("#sameVehicleInspectionMainRow--${pageName}")[0].content).find("td").not(".dummy-td"));
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.download();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var cellDefs = getCellDefs($("#sameVehicleInspectionSub_Table_0--${pageName} thead th").not(".dummy-th").not(":hidden"),
|
|
|
|
|
|
|
|
$($("#sameVehicleInspectionSubRow--${pageName}")[0].content).find("td").not(".dummy-td").not(".privacy-mask"));
|
|
|
|
|
|
|
|
$P.sameVehicleControl.sub.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.sub.download();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnInstLevyExcl--${pageName}").on("click", () => $P.openLevyExclPop("1"));
|
|
|
|
$("#btnInstLevyExcl--${pageName}").on("click", () => $P.openLevyExclPop("1"));
|
|
|
|
|
|
|
|
|
|
|
|