|
|
|
@ -219,7 +219,7 @@
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody name="photoInspectionTbody"></tbody>
|
|
|
|
|
<template is="curly-brackets" name="photoInspectionRow">
|
|
|
|
|
<tr data-key="CRDN_ID">
|
|
|
|
|
<tr data-index="DATA-INDEX">
|
|
|
|
|
<td onclick ondblclick class="text-center">ROW_NUM</td>
|
|
|
|
|
<td onclick ondblclick class="text-center">CRDN_YMD_TM</td>
|
|
|
|
|
<td onclick ondblclick class="text-center">VHRNO</td>
|
|
|
|
@ -284,7 +284,7 @@
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody name="sameVehicleInspectionMainTbody"></tbody>
|
|
|
|
|
<template is="curly-brackets" name="sameVehicleInspectionMainRow">
|
|
|
|
|
<tr data-key="CRDN_ID_LIST">
|
|
|
|
|
<tr data-index="DATA-INDEX">
|
|
|
|
|
<td onclick class="text-center">VHRNO</td>
|
|
|
|
|
<td onclick class="text-center">CRDN_STDG_NM</td>
|
|
|
|
|
<td onclick class="text-center">CRDN_CNT</td>
|
|
|
|
@ -336,7 +336,7 @@
|
|
|
|
|
<tbody name="sameVehicleInspectionSubTbody">
|
|
|
|
|
</tbody>
|
|
|
|
|
<template is="curly-brackets" name="sameVehicleInspectionSubRow">
|
|
|
|
|
<tr data-key="CRDN_ID">
|
|
|
|
|
<tr data-index="DATA-INDEX">
|
|
|
|
|
<td onclick ondblclick class="text-center">CRDN_YMD_TM</td>
|
|
|
|
|
<td onclick ondblclick class="text-center">CRDN_INPT_SE_NM</td>
|
|
|
|
|
<td onclick ondblclick class="text-center">TEAM_NM</td>
|
|
|
|
@ -395,13 +395,13 @@ $(document).ready(function(){
|
|
|
|
|
ctrl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
|
|
|
|
|
ctrl.beforeCurrent = null;
|
|
|
|
|
ctrl.getNext = (key) => {
|
|
|
|
|
ctrl.getNext = (dataIndex) => {
|
|
|
|
|
var crdnId = ctrl.dataset.getData(dataIndex).CRDN_ID;
|
|
|
|
|
var dsArray = ctrl.dataset.getDataset();
|
|
|
|
|
|
|
|
|
|
var ds = ctrl.dataset.getDataset();
|
|
|
|
|
|
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == key);
|
|
|
|
|
if(ds.length > index+1){
|
|
|
|
|
return ds[index+1];
|
|
|
|
|
var index = dsArray.findIndex(item => item.CRDN_ID == crdnId);
|
|
|
|
|
if(dsArray.length > index+1){
|
|
|
|
|
return dsArray[index+1];
|
|
|
|
|
} else {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
@ -418,19 +418,21 @@ $(document).ready(function(){
|
|
|
|
|
ctrl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
|
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("photoInspectionTbody"));
|
|
|
|
|
|
|
|
|
|
var dataKey = "";
|
|
|
|
|
var dataIndex = "";
|
|
|
|
|
var curCrdnId = "";
|
|
|
|
|
var curDataVhrno = "";
|
|
|
|
|
var nextDataKey = "";
|
|
|
|
|
var nextCrdnId = "";
|
|
|
|
|
var nextDataVhrno = "";
|
|
|
|
|
if(!ctrl.dataset.empty){
|
|
|
|
|
dataKey = ctrl.dataset.getKey(dataItem);
|
|
|
|
|
curDataVhrno = ctrl.dataset.getData(dataKey)["VHRNO"];
|
|
|
|
|
var nextData = ctrl.getNext(dataKey);
|
|
|
|
|
nextDataKey = nextData != null ? nextData.CRDN_ID : "";
|
|
|
|
|
dataIndex = ctrl.dataset.getKey(dataItem);
|
|
|
|
|
curCrdnId = ctrl.dataset.getData(dataIndex).CRDN_ID;
|
|
|
|
|
curDataVhrno = ctrl.dataset.getData(dataIndex).VHRNO;
|
|
|
|
|
var nextData = ctrl.getNext(dataIndex);
|
|
|
|
|
nextCrdnId = nextData != null ? nextData.CRDN_ID : "";
|
|
|
|
|
nextDataVhrno = nextData != null ? nextData.VHRNO : "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.showPhoto(dataKey,nextDataKey,curDataVhrno,nextDataVhrno);
|
|
|
|
|
$P.showPhoto(curCrdnId,nextCrdnId,curDataVhrno,nextDataVhrno);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.pagingSupport0 = new FimsPagingSupport({
|
|
|
|
@ -570,74 +572,36 @@ $(document).ready(function(){
|
|
|
|
|
switch ($P.currentDisplay) {
|
|
|
|
|
case "photoInspection":
|
|
|
|
|
ctrl.beforeCurrent = {
|
|
|
|
|
key : ctrl.dataset.getCurrent()["CRDN_ID"],
|
|
|
|
|
index : ctrl.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
primaryKey : ctrl.dataset.getCurrent()["CRDN_ID"],
|
|
|
|
|
arrayIndex : ctrl.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Apply.fromDatasetControl.reload(ctrl).then((resp)=>{
|
|
|
|
|
Apply.toDataset.set(ctrl.dataset, resp);
|
|
|
|
|
ctrl.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
|
|
|
|
|
|
if(ctrl.beforeCurrent != null){
|
|
|
|
|
let beforeCurrentKey = ctrl.beforeCurrent.key;
|
|
|
|
|
let beforeCurrentIndex = ctrl.beforeCurrent.index;
|
|
|
|
|
ctrl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
if(!ctrl.dataset.empty){
|
|
|
|
|
var info = ctrl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
if(info != null){
|
|
|
|
|
ctrl.dataset.setCurrent(beforeCurrentKey, true);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
if(beforeCurrentIndex > (ctrl.dataset.length - 1)){
|
|
|
|
|
info = ctrl.dataset.getDataset()[ctrl.dataset.length - 1];
|
|
|
|
|
} else {
|
|
|
|
|
info = ctrl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctrl.dataset.setCurrent(info["CRDN_ID"], true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let todoCurrent = Apply.fromDataset.getTodoCurrent(ctrl.dataset, ctrl.beforeCurrent, "CRDN_ID");
|
|
|
|
|
ctrl.beforeCurrent = null;
|
|
|
|
|
if(todoCurrent != null){
|
|
|
|
|
ctrl.dataset.setCurrent(todoCurrent.index, true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspection":
|
|
|
|
|
alt.beforeCurrent = {
|
|
|
|
|
key : alt.dataset.getCurrent()["CRDN_ID_LIST"],
|
|
|
|
|
index : alt.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
primaryKey : alt.dataset.getCurrent()["CRDN_ID_LIST"],
|
|
|
|
|
arrayIndex : alt.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Apply.fromDatasetControl.reload(alt).then((resp)=>{
|
|
|
|
|
Apply.toDataset.set(alt.dataset, resp);
|
|
|
|
|
alt.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
|
|
|
|
|
|
if(alt.beforeCurrent != null){
|
|
|
|
|
var beforeCurrentKey = alt.beforeCurrent.key;
|
|
|
|
|
var beforeCurrentIndex = alt.beforeCurrent.index;
|
|
|
|
|
alt.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
if(!alt.dataset.empty){
|
|
|
|
|
var info = alt.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
if(info != null){
|
|
|
|
|
alt.dataset.setCurrent(beforeCurrentKey,true);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if(beforeCurrentIndex > (alt.dataset.length - 1)){
|
|
|
|
|
info = alt.dataset.getDataset()[alt.dataset.length - 1];
|
|
|
|
|
} else {
|
|
|
|
|
info = alt.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
alt.dataset.setCurrent(info["CRDN_ID_LIST"],true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let todoCurrent = Apply.fromDataset.getTodoCurrent(alt.dataset, alt.beforeCurrent, "CRDN_ID_LIST");
|
|
|
|
|
alt.beforeCurrent = null;
|
|
|
|
|
if(todoCurrent != null){
|
|
|
|
|
alt.dataset.setCurrent(todoCurrent.index, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@ -704,23 +668,23 @@ $(document).ready(function(){
|
|
|
|
|
notFound = [$P.findn("photoInspectionNotFound").innerHTML]
|
|
|
|
|
found = $P.findn("photoInspectionRow").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');");
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('{DATA-INDEX}','photoInspection');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('{CRDN_ID}','photoInspection');");
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
|
notFound = [$P.findn("sameVehicleInspectionMainNotFound").innerHTML];
|
|
|
|
|
found = $P.findn("sameVehicleInspectionMainRow").innerHTML;
|
|
|
|
|
replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID_LIST") + "','sameVehicleInspectionMain');");
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('{DATA-INDEX}','sameVehicleInspectionMain');");
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspectionSub":
|
|
|
|
|
notFound = [$P.findn("sameVehicleInspectionSubNotFound").innerHTML]
|
|
|
|
|
found = $P.findn("sameVehicleInspectionSubRow").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');");
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('{DATA-INDEX}','sameVehicleInspectionSub');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('{CRDN_ID}','sameVehicleInspectionSub');");
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -766,40 +730,42 @@ $(document).ready(function(){
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.clickInspectionDataList = (dataKey, gridType) => {
|
|
|
|
|
$P.clickInspectionDataList = (dataIndex, gridType) => {
|
|
|
|
|
|
|
|
|
|
switch (gridType) {
|
|
|
|
|
case "photoInspection":
|
|
|
|
|
|
|
|
|
|
if(dataKey != ""){
|
|
|
|
|
$P.$findn("photoInspectionTbody").setCurrentRow(dataKey);
|
|
|
|
|
Apply.toDataset.current(ctrl.dataset, dataKey);
|
|
|
|
|
if(dataIndex != ""){
|
|
|
|
|
$P.$findn("photoInspectionTbody").setCurrentRow(dataIndex);
|
|
|
|
|
Apply.toDataset.current(ctrl.dataset, dataIndex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var curDataVhrno = ctrl.dataset.getData(dataKey)["VHRNO"];
|
|
|
|
|
var nextData = ctrl.getNext(dataKey);
|
|
|
|
|
var nextDataKey = nextData != null ? nextData.CRDN_ID : "";
|
|
|
|
|
var curData = ctrl.dataset.getData(dataIndex);
|
|
|
|
|
var curCrdnId = curData.CRDN_ID;
|
|
|
|
|
var curDataVhrno = curData.VHRNO;
|
|
|
|
|
var nextData = ctrl.getNext(dataIndex);
|
|
|
|
|
var nextCrdnId = nextData != null ? nextData.CRDN_ID : "";
|
|
|
|
|
var nextDataVhrno = nextData != null ? nextData.VHRNO : "";
|
|
|
|
|
$P.showPhoto(dataKey,nextDataKey,curDataVhrno,nextDataVhrno);
|
|
|
|
|
$P.showPhoto(curCrdnId,nextCrdnId,curDataVhrno,nextDataVhrno);
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspectionMain":
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
if(dataIndex == ""){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$P.$findn("sameVehicleInspectionMainTbody").setCurrentRow(dataKey);
|
|
|
|
|
$P.$findn("sameVehicleInspectionMainTbody").setCurrentRow(dataIndex);
|
|
|
|
|
|
|
|
|
|
Apply.toDataset.current(alt.dataset, dataKey);
|
|
|
|
|
Apply.toDataset.current(alt.dataset, dataIndex);
|
|
|
|
|
|
|
|
|
|
$P.searchDetailInspectionDataList(dataKey);
|
|
|
|
|
var crdnIdList = alt.dataset.getData(dataIndex).CRDN_ID_LIST;
|
|
|
|
|
$P.searchDetailInspectionDataList(crdnIdList);
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleInspectionSub":
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
if(dataIndex == ""){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$P.$findn("sameVehicleInspectionSubTbody").setCurrentRow(dataKey);
|
|
|
|
|
$P.$findn("sameVehicleInspectionSubTbody").setCurrentRow(dataIndex);
|
|
|
|
|
|
|
|
|
|
Apply.toDataset.current(shift.dataset, dataKey);
|
|
|
|
|
Apply.toDataset.current(shift.dataset, dataIndex);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -836,9 +802,9 @@ $(document).ready(function(){
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.showPhoto = (dataKey, nextDataKey, curDataVhrno, nextDataVhrno) => {
|
|
|
|
|
$P.showPhoto = (crdnId, nextCrndId, curDataVhrno, nextDataVhrno) => {
|
|
|
|
|
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
if(crdnId == ""){
|
|
|
|
|
$P.$findn("curDataVhrno").html("");
|
|
|
|
|
$P.$findn("nextDataVhrno").html("");
|
|
|
|
|
$P.$findn("curDataFiles").html("");
|
|
|
|
@ -853,15 +819,15 @@ $(document).ready(function(){
|
|
|
|
|
url:"file/list.do",
|
|
|
|
|
data: {
|
|
|
|
|
infoType : "100",
|
|
|
|
|
infoKeys : [dataKey, nextDataKey],
|
|
|
|
|
infoKeys : [crdnId, nextCrndId],
|
|
|
|
|
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);
|
|
|
|
|
var currentDataFileList = fileList.filter(x => x.INF_KEY == crdnId);
|
|
|
|
|
var nextDataFileList = fileList.filter(x => x.INF_KEY == nextCrndId);
|
|
|
|
|
|
|
|
|
|
$P.$findn("curDataFiles").html("");
|
|
|
|
|
$P.$findn("nextDataFiles").html("");
|
|
|
|
@ -880,22 +846,22 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.openLevyExclPop = (levyExclSeCd) => {
|
|
|
|
|
var info = "";
|
|
|
|
|
var dataItem = "";
|
|
|
|
|
|
|
|
|
|
if ($P.currentDisplay == "photoInspection") {
|
|
|
|
|
info = ctrl.dataset.getCurrent("item");
|
|
|
|
|
dataItem = ctrl.dataset.getCurrent("item");
|
|
|
|
|
} else if ($P.currentDisplay == "sameVehicleInspection") {
|
|
|
|
|
info = shift.dataset.getCurrent("item");
|
|
|
|
|
dataItem = shift.dataset.getCurrent("item");
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (info == undefined || info == "") {
|
|
|
|
|
if (dataItem == undefined || dataItem == "") {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var params = {
|
|
|
|
|
"crdnId" : info.data.CRDN_ID,
|
|
|
|
|
"crdnId" : dataItem.data.CRDN_ID,
|
|
|
|
|
"levyExclSeCd" : levyExclSeCd,
|
|
|
|
|
"savedCallbackFuncName" : "pageObject['${pageName}']['popupSavedCallback']",
|
|
|
|
|
"callPurpose" : "create"
|
|
|
|
@ -943,14 +909,14 @@ $(document).ready(function(){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var info = ctrl.dataset.getCurrent("item");
|
|
|
|
|
var dataItem = ctrl.dataset.getCurrent("item");
|
|
|
|
|
|
|
|
|
|
if (info == undefined || info == "") {
|
|
|
|
|
if (dataItem == undefined || dataItem == "") {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var params = {
|
|
|
|
|
"crdnId" : info.data.CRDN_ID,
|
|
|
|
|
"crdnId" : dataItem.data.CRDN_ID,
|
|
|
|
|
"savedCallbackFuncName" : "pageObject['${pageName}']['popupSavedCallback']"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|