|
|
|
@ -406,17 +406,23 @@ $(document).ready(function(){
|
|
|
|
|
$P.photoInspectionControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
|
$P.photoInspectionControl.tableRenderComplete = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//동일차량검사 datasetControl 인스턴스
|
|
|
|
|
$P.sameVehicleControl = new InspectionControl({
|
|
|
|
|
$P.sameVehicleMainControl = new DatasetControl({
|
|
|
|
|
urls : { load : "", getInfo : "" },
|
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
|
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 : "" },
|
|
|
|
|
dataGetter : obj => obj["List"],
|
|
|
|
|
keymapper : info => info ? info.CRDN_ID : "",
|
|
|
|
@ -426,13 +432,7 @@ $(document).ready(function(){
|
|
|
|
|
CRDN_STTS_CD : FIM010,
|
|
|
|
|
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) => {
|
|
|
|
|
|
|
|
|
@ -446,126 +446,61 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on
|
|
|
|
|
* Dataset.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.photoInspectionControl.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
$P.renderInspectionDataList(obj["Total"], "photoInspection");
|
|
|
|
|
$P.photoInspectionControl.dataset.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
$("#photoInspectionPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list : $P.photoInspectionControl.dataset,
|
|
|
|
|
prefix : "photoInspectionPaging--${pageName}",
|
|
|
|
|
totalSize : obj["Total"]
|
|
|
|
|
});
|
|
|
|
|
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.photoInspectionControl.tableRenderComplete = true;
|
|
|
|
|
Apply.fromDataset.paging($P.photoInspectionControl.dataset, obj, "photoInspectionPaging--${pageName}");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.photoInspectionControl.onCurrentChange = (DI) => {
|
|
|
|
|
|
|
|
|
|
if(!$P.photoInspectionControl.tableRenderComplete){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($P.photoInspectionControl.beforeCurrent != null){
|
|
|
|
|
var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key;
|
|
|
|
|
var beforeCurrentIndex = $P.photoInspectionControl.beforeCurrent.index;
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
|
$P.photoInspectionControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
|
Apply.fromDataset.currentRow($P.photoInspectionControl.dataset, dataItem, $("#photoInspectionTbody--${pageName}")[0]);
|
|
|
|
|
|
|
|
|
|
var dataKey = "";
|
|
|
|
|
var curDataVhrno = "";
|
|
|
|
|
var nextDataKey = "";
|
|
|
|
|
var nextDataVhrno = "";
|
|
|
|
|
if(!$P.photoInspectionControl.dataset.empty){
|
|
|
|
|
var info = $P.photoInspectionControl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
dataKey = $P.photoInspectionControl.dataset.getKey(dataItem);
|
|
|
|
|
curDataVhrno = $P.photoInspectionControl.dataset.getData(dataKey)["VHRNO"];
|
|
|
|
|
var nextData = $P.photoInspectionControl.getNext(dataKey);
|
|
|
|
|
nextDataKey = nextData != null ? nextData.CRDN_ID : "";
|
|
|
|
|
nextDataVhrno = nextData != null ? nextData.VHRNO : "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$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);
|
|
|
|
|
$P.renderInspectionDataList(obj["Total"], $P.sameVehicleMainControl.dataset.length, trs, "sameVehicleInspectionMain");
|
|
|
|
|
|
|
|
|
|
$("#sameVehicleInspectionMainPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list : $P.sameVehicleControl.main.dataset,
|
|
|
|
|
prefix : "sameVehicleInspectionMainPaging--${pageName}",
|
|
|
|
|
totalSize : obj["Total"]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.tableRenderComplete = true;
|
|
|
|
|
Apply.fromDataset.paging($P.sameVehicleMainControl.dataset, obj, "sameVehicleInspectionMainPaging--${pageName}");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.main.onCurrentChange = (DI) => {
|
|
|
|
|
if(!$P.sameVehicleControl.main.tableRenderComplete){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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];
|
|
|
|
|
$P.sameVehicleMainControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
|
Apply.fromDataset.currentRow($P.sameVehicleMainControl.dataset, dataItem, $("#sameVehicleInspectionMainTbody--${pageName}")[0]);
|
|
|
|
|
if(dataItem){
|
|
|
|
|
$P.searchDetailInspectionDataList(dataItem.data["CRDN_ID_LIST"]);
|
|
|
|
|
} 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 {
|
|
|
|
|
$P.clickInspectionDataList($P.sameVehicleControl.main.getCurrent()["CRDN_ID_LIST"],"sameVehicleInspectionMain", true);
|
|
|
|
|
$("#sameVehicleInspectionSubTbody--${pageName}").html("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.sub.onDatasetChange = (obj) => {
|
|
|
|
|
$P.renderInspectionDataList(obj["Total"], "sameVehicleInspectionSub");
|
|
|
|
|
$P.sameVehicleControl.sub.tableRenderComplete = true;
|
|
|
|
|
$P.sameVehicleSubControl.dataset.onDatasetChange = (obj) => {
|
|
|
|
|
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.sameVehicleControl.sub.onCurrentChange = (DI) => {
|
|
|
|
|
if(!$P.sameVehicleControl.sub.tableRenderComplete){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleControl.sub.tableRenderComplete = false;
|
|
|
|
|
if(!DI){
|
|
|
|
|
$P.clickInspectionDataList("","sameVehicleInspectionSub", true);
|
|
|
|
|
} else {
|
|
|
|
|
$P.clickInspectionDataList($P.sameVehicleControl.sub.getCurrent()["CRDN_ID"],"sameVehicleInspectionSub", true);
|
|
|
|
|
}
|
|
|
|
|
$P.sameVehicleSubControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
|
Apply.fromDataset.currentRow($P.sameVehicleSubControl.dataset, dataItem, $("#sameVehicleInspectionSubTbody--${pageName}")[0]);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
@ -583,17 +518,17 @@ $(document).ready(function(){
|
|
|
|
|
$('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-7).date);
|
|
|
|
|
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date());
|
|
|
|
|
$P.photoInspectionControl.setData([]);
|
|
|
|
|
$P.sameVehicleControl.main.setData([]);
|
|
|
|
|
$P.sameVehicleMainControl.setData([]);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.fnResetAndChangeBiz = (taskSeCd) => {
|
|
|
|
|
$P.fnReset();
|
|
|
|
|
$P.photoInspectionControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
|
$P.photoInspectionControl.urls.getInfo = "";
|
|
|
|
|
$P.sameVehicleControl.main.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
|
$P.sameVehicleControl.main.urls.getInfo = "";
|
|
|
|
|
$P.sameVehicleControl.sub.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
|
$P.sameVehicleControl.sub.urls.getInfo = "";
|
|
|
|
|
$P.sameVehicleMainControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
|
$P.sameVehicleMainControl.urls.getInfo = "";
|
|
|
|
|
$P.sameVehicleSubControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do");
|
|
|
|
|
$P.sameVehicleSubControl.urls.getInfo = "";
|
|
|
|
|
|
|
|
|
|
var clsForTask = taskSeCd.toLowerCase();
|
|
|
|
|
//업무별 조회조건
|
|
|
|
@ -607,29 +542,17 @@ $(document).ready(function(){
|
|
|
|
|
$('#btnPhotoInspection--${pageName}').trigger("click");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.getParams = () => {
|
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
var data = formFields.get();
|
|
|
|
|
|
|
|
|
|
$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 = {
|
|
|
|
|
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;
|
|
|
|
|
if($P.currentDisplay == "photoInspection"){
|
|
|
|
|
data.fetchSize = $P.photoInspectionControl.defaultFetchSize;
|
|
|
|
|
} else if($P.currentDisplay == "sameVehicleInspection"){
|
|
|
|
|
data.fetchSize = $P.sameVehicleMainControl.defaultFetchSize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.searchInspectionList = () => {
|
|
|
|
@ -640,19 +563,20 @@ $(document).ready(function(){
|
|
|
|
|
$P.photoInspectionControl.load(1);
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
|
$P.sameVehicleControl.main.query = $P.getParams();
|
|
|
|
|
$P.sameVehicleControl.main.query.inspectionDataType = "sameVehicleMain";
|
|
|
|
|
$P.sameVehicleControl.main.load(1);
|
|
|
|
|
$P.sameVehicleMainControl.query = $P.getParams();
|
|
|
|
|
$P.sameVehicleMainControl.query.inspectionDataType = "sameVehicleMain";
|
|
|
|
|
$P.sameVehicleMainControl.load(1);
|
|
|
|
|
break;
|
|
|
|
|
default: break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.searchDetailInspectionDataList = (dataKey) => {
|
|
|
|
|
$P.sameVehicleControl.sub.query = {};
|
|
|
|
|
$P.sameVehicleControl.sub.query.inspectionDataType = "sameVehicleSub";
|
|
|
|
|
$P.sameVehicleControl.sub.query.crdnIDs = dataKey;
|
|
|
|
|
$P.sameVehicleControl.sub.query.taskSeCd = $P.sameVehicleControl.main.query.taskSeCd;
|
|
|
|
|
$P.sameVehicleControl.sub.load(0);
|
|
|
|
|
$P.sameVehicleSubControl.query = {};
|
|
|
|
|
$P.sameVehicleSubControl.query.inspectionDataType = "sameVehicleSub";
|
|
|
|
|
$P.sameVehicleSubControl.query.crdnIDs = dataKey;
|
|
|
|
|
$P.sameVehicleSubControl.query.taskSeCd = $P.sameVehicleMainControl.query.taskSeCd;
|
|
|
|
|
$P.sameVehicleSubControl.load(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollInspectionDataList = () => {
|
|
|
|
@ -661,91 +585,252 @@ $(document).ready(function(){
|
|
|
|
|
$P.photoInspectionControl.load($P.photoInspectionControl.query.pageNum + 1);
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
|
$P.sameVehicleControl.main.load($P.sameVehicleControl.main.query.pageNum + 1);
|
|
|
|
|
$P.sameVehicleMainControl.load($P.sameVehicleMainControl.query.pageNum + 1);
|
|
|
|
|
break;
|
|
|
|
|
default: break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$P.clickInspectionDataList = (dataKey, gridType, auto) => {
|
|
|
|
|
switch (gridType) {
|
|
|
|
|
|
|
|
|
|
$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 = {
|
|
|
|
|
key : $P.photoInspectionControl.getCurrent()["CRDN_ID"],
|
|
|
|
|
index : $P.photoInspectionControl.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
$("#curDataVhrno--${pageName}").html("");
|
|
|
|
|
$("#nextDataVhrno--${pageName}").html("");
|
|
|
|
|
$("#curDataFiles--${pageName}").html("");
|
|
|
|
|
$("#nextDataFiles--${pageName}").html("");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Apply.fromDatasetControl.load($P.photoInspectionControl, 1).then((resp)=>{
|
|
|
|
|
Apply.toDataset.set($P.photoInspectionControl.dataset, resp);
|
|
|
|
|
$P.photoInspectionControl.dataset.onDatasetChange(resp);
|
|
|
|
|
|
|
|
|
|
$("#photoInspectionTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
if($P.photoInspectionControl.untilPageNum != 0){
|
|
|
|
|
$P.photoInspectionControl.query.fetchSize = $P.photoInspectionControl.defaultFetchSize;
|
|
|
|
|
$P.photoInspectionControl.query.pageNum = $P.photoInspectionControl.untilPageNum;
|
|
|
|
|
$P.photoInspectionControl.untilPageNum = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 : "";
|
|
|
|
|
if($P.photoInspectionControl.beforeCurrent != null){
|
|
|
|
|
var beforeCurrentKey = $P.photoInspectionControl.beforeCurrent.key;
|
|
|
|
|
var beforeCurrentIndex = $P.photoInspectionControl.beforeCurrent.index;
|
|
|
|
|
$P.photoInspectionControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
$("#curDataVhrno--${pageName}").html(curDataVhrno);
|
|
|
|
|
$("#nextDataVhrno--${pageName}").html(nextDataVhrno);
|
|
|
|
|
if(!$P.photoInspectionControl.dataset.empty){
|
|
|
|
|
var info = $P.photoInspectionControl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url:"file/list.do",
|
|
|
|
|
data: {
|
|
|
|
|
infoType : "100",
|
|
|
|
|
infoKeys : [dataKey, nextDataKey],
|
|
|
|
|
fetchSize : 0
|
|
|
|
|
},
|
|
|
|
|
success : resp => {
|
|
|
|
|
if(info != null){
|
|
|
|
|
$P.photoInspectionControl.dataset.setCurrent(beforeCurrentKey, true);
|
|
|
|
|
|
|
|
|
|
var fileList = resp.fileList;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
var currentDataFileList = fileList.filter(x => x.INF_KEY == dataKey);
|
|
|
|
|
var nextDataFileList = fileList.filter(x => x.INF_KEY == nextDataKey);
|
|
|
|
|
if(beforeCurrentIndex > ($P.photoInspectionControl.dataset.length - 1)){
|
|
|
|
|
info = $P.photoInspectionControl.dataset.getDataset()[$P.photoInspectionControl.dataset.length - 1];
|
|
|
|
|
} else {
|
|
|
|
|
info = $P.photoInspectionControl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#curDataFiles--${pageName}").html("");
|
|
|
|
|
$("#nextDataFiles--${pageName}").html("");
|
|
|
|
|
$P.photoInspectionControl.dataset.setCurrent(info["CRDN_ID"], true);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
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.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;
|
|
|
|
|
|
|
|
|
|
if(!$P.sameVehicleMainControl.dataset.empty){
|
|
|
|
|
var info = $P.sameVehicleMainControl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
if(info != null){
|
|
|
|
|
$P.sameVehicleMainControl.dataset.setCurrent(beforeCurrentKey,true);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if(beforeCurrentIndex > ($P.sameVehicleMainControl.dataset.length - 1)){
|
|
|
|
|
info = $P.sameVehicleMainControl.dataset.getDataset()[$P.sameVehicleMainControl.dataset.length - 1];
|
|
|
|
|
} else {
|
|
|
|
|
info = $P.sameVehicleMainControl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.sameVehicleMainControl.dataset.setCurrent(info["CRDN_ID_LIST"],true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if(!auto){
|
|
|
|
|
$P.photoInspectionControl.setCurrent(dataKey);
|
|
|
|
|
break;
|
|
|
|
|
default: break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$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.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;
|
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
$P.sameVehicleControl.sub.setData([]);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$("#sameVehicleInspectionMainTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
|
|
|
|
|
Apply.toDataset.current($P.sameVehicleMainControl.dataset, dataKey);
|
|
|
|
|
|
|
|
|
|
$P.searchDetailInspectionDataList(dataKey);
|
|
|
|
|
if(!auto){
|
|
|
|
|
$P.sameVehicleControl.main.setCurrent(dataKey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspectionSub":
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$("#sameVehicleInspectionSubTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
if(!auto){
|
|
|
|
|
$P.sameVehicleControl.sub.setCurrent(dataKey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Apply.toDataset.current($P.sameVehicleSubControl.dataset, dataKey);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.dblclickInspectionDataList = (dataKey, gridType) => {
|
|
|
|
|
$P.dblclickInspectionDataList = (dataKey) => {
|
|
|
|
|
|
|
|
|
|
var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
|
|
|
|
|
|
|
|
|
@ -759,7 +844,7 @@ $(document).ready(function(){
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : dialogUrl,
|
|
|
|
|
data : params,
|
|
|
|
|
success : resp => {
|
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
dialog.open({
|
|
|
|
|
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) => {
|
|
|
|
|
var info = "";
|
|
|
|
|
|
|
|
|
|
if ($P.currentDisplay == "photoInspection") {
|
|
|
|
|
info = $P.photoInspectionControl.dataset.getCurrent("item");
|
|
|
|
|
} else if ($P.currentDisplay == "sameVehicleInspection") {
|
|
|
|
|
info = $P.sameVehicleControl.sub.dataset.getCurrent("item");
|
|
|
|
|
info = $P.sameVehicleSubControl.dataset.getCurrent("item");
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -798,7 +926,7 @@ $(document).ready(function(){
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url(taskSeCd + "/excl/excl01/020/info.do"),
|
|
|
|
|
data : params,
|
|
|
|
|
success : resp => {
|
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
if((typeof resp) != "string"){
|
|
|
|
|
dialog.alert({
|
|
|
|
@ -844,7 +972,7 @@ $(document).ready(function(){
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/PVS/crdn/crdn02/050/info.do"),
|
|
|
|
|
data : params,
|
|
|
|
|
success : resp => {
|
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
if((typeof resp) != "string"){
|
|
|
|
|
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
|
|
|
|
@ -974,48 +1027,7 @@ $(document).ready(function(){
|
|
|
|
|
});
|
|
|
|
|
$('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼
|
|
|
|
|
|
|
|
|
|
$('#btnExcel--${pageName}').on('click', function(){
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown());
|
|
|
|
|
|
|
|
|
|
$("#btnInstLevyExcl--${pageName}").on("click", () => $P.openLevyExclPop("1"));
|
|
|
|
|
|
|
|
|
|