|
|
@ -163,7 +163,7 @@
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
<tbody name="crdnTbody"></tbody>
|
|
|
|
<tbody name="crdnTbody"></tbody>
|
|
|
|
<template is="curly-brackets" name="crdnRow">
|
|
|
|
<template is="curly-brackets" name="crdnRow">
|
|
|
|
<tr data-key="CRDN_ID">
|
|
|
|
<tr data-index="DATA-INDEX">
|
|
|
|
<td onclick ondblclick class="text-end">ROW_NUM</td>
|
|
|
|
<td onclick ondblclick class="text-end">ROW_NUM</td>
|
|
|
|
<td onclick ondblclick class="text-center">CVLCPT_RCPT_NO</td>
|
|
|
|
<td onclick ondblclick class="text-center">CVLCPT_RCPT_NO</td>
|
|
|
|
<td onclick ondblclick class="text-center">CVLCPT_LIST_NO</td>
|
|
|
|
<td onclick ondblclick class="text-center">CVLCPT_LIST_NO</td>
|
|
|
@ -398,8 +398,8 @@ $(document).ready(function(){
|
|
|
|
var notFound = [$P.findn("crdnNotFound").innerHTML];
|
|
|
|
var notFound = [$P.findn("crdnNotFound").innerHTML];
|
|
|
|
var found = $P.findn("crdnRow").innerHTML;
|
|
|
|
var found = $P.findn("crdnRow").innerHTML;
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('{DATA-INDEX}');")
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('{CRDN_ID}');");
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
found : found,
|
|
|
|
found : found,
|
|
|
@ -421,23 +421,30 @@ $(document).ready(function(){
|
|
|
|
//보안모드
|
|
|
|
//보안모드
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
|
|
|
|
|
|
|
$P.holdList.forEach(function(item){
|
|
|
|
$P.holdList.forEach(function(h_item){
|
|
|
|
$P.$findn("crdnTbody").find("tr[data-key='"+item+"']").addClass("bg-dark");
|
|
|
|
|
|
|
|
|
|
|
|
let filtered = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == h_item);
|
|
|
|
|
|
|
|
if(filtered.length > 0){
|
|
|
|
|
|
|
|
$P.$findn("crdnTbody").find("tr[data-index='"+filtered[0].index+"']").addClass("bg-dark");
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.clickCrdnList = (dataKey) => {
|
|
|
|
$P.clickCrdnList = (dataIndex) => {
|
|
|
|
if(dataKey == ""){
|
|
|
|
if(dataIndex == ""){
|
|
|
|
$P.$findn("bottomCrdnPlc").val("");
|
|
|
|
$P.$findn("bottomCrdnPlc").val("");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.$findn("crdnTbody").setCurrentRow(dataKey);
|
|
|
|
$P.$findn("crdnTbody").setCurrentRow(dataIndex);
|
|
|
|
|
|
|
|
|
|
|
|
$P.$findn("bottomCrdnPlc").val(ctrl.dataset.getData(dataKey)["CRDN_PLC"]);
|
|
|
|
$P.$findn("bottomCrdnPlc").val(ctrl.dataset.getData(dataIndex)["CRDN_PLC"]);
|
|
|
|
|
|
|
|
|
|
|
|
if($P.holdList.includes(dataKey)){
|
|
|
|
|
|
|
|
|
|
|
|
let crdnId = ctrl.dataset.getData(dataIndex)["CRDN_ID"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.holdList.includes(crdnId)){
|
|
|
|
$P.$findn("btnOpenCvlcptOrgnl").hide();
|
|
|
|
$P.$findn("btnOpenCvlcptOrgnl").hide();
|
|
|
|
$P.$findn("btnDelete").hide();
|
|
|
|
$P.$findn("btnDelete").hide();
|
|
|
|
$P.$findn("btnDeleteSameRcptYmd").hide();
|
|
|
|
$P.$findn("btnDeleteSameRcptYmd").hide();
|
|
|
@ -447,7 +454,7 @@ $(document).ready(function(){
|
|
|
|
$P.$findn("btnDeleteSameRcptYmd").show();
|
|
|
|
$P.$findn("btnDeleteSameRcptYmd").show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Apply.toDataset.current(ctrl.dataset, dataKey);
|
|
|
|
Apply.toDataset.current(ctrl.dataset, dataIndex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.dblclickCrdnList = (dataKey) => {
|
|
|
|
$P.dblclickCrdnList = (dataKey) => {
|
|
|
@ -499,19 +506,31 @@ $(document).ready(function(){
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnHold = (argCrdnId) => {
|
|
|
|
$P.fnHold = () => {
|
|
|
|
var curKey;
|
|
|
|
var curKey = ctrl.dataset.getCurrent()["CRDN_ID"];
|
|
|
|
if(argCrdnId != null){
|
|
|
|
|
|
|
|
curKey = argCrdnId;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
curKey = ctrl.dataset.getCurrent()["CRDN_ID"];
|
|
|
|
|
|
|
|
}
|
|
|
|
if($P.holdList.includes(curKey)){
|
|
|
|
if($P.holdList.includes(curKey)){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$P.holdList.push(curKey);
|
|
|
|
$P.holdList.push(curKey);
|
|
|
|
$P.$findn("crdnTbody").find("tr[data-key='"+curKey+"']").addClass("bg-dark");
|
|
|
|
let dataIndex;
|
|
|
|
|
|
|
|
if(argCrdnId != null){
|
|
|
|
|
|
|
|
dataIndex = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == argCrdnId).index;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
dataIndex = ctrl.dataset.getCurrent("item").index;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$P.$findn("crdnTbody").find("tr[data-index='"+dataIndex+"']").addClass("bg-dark");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(dataIndex == ctrl.dataset.getCurrent("item").index){
|
|
|
|
$P.$findn("btnOpenCvlcptOrgnl").hide();
|
|
|
|
$P.$findn("btnOpenCvlcptOrgnl").hide();
|
|
|
|
$P.$findn("btnDelete").hide();
|
|
|
|
$P.$findn("btnDelete").hide();
|
|
|
|
$P.$findn("btnDeleteSameRcptYmd").hide();
|
|
|
|
$P.$findn("btnDeleteSameRcptYmd").hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnRemove = (rcptYmd) => {
|
|
|
|
$P.fnRemove = (rcptYmd) => {
|
|
|
|
|
|
|
|
|
|
|
@ -542,13 +561,13 @@ $(document).ready(function(){
|
|
|
|
ctrl.dataset.select(curKey,true);
|
|
|
|
ctrl.dataset.select(curKey,true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var selected = ctrl.dataset.getKeys("selected");
|
|
|
|
var selected = ctrl.dataset.getDataset("selected");
|
|
|
|
if (selected.length < 1) {
|
|
|
|
if (selected.length < 1) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var params = {
|
|
|
|
var params = {
|
|
|
|
"crdnIds" : selected.join(",")
|
|
|
|
"crdnIds" : selected.map(item => item.CRDN_ID).join(",")
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
ajax.post({
|
|
|
@ -629,51 +648,55 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.provide = {
|
|
|
|
$P.provide = {
|
|
|
|
"getCountStatus" : function(currentKey){
|
|
|
|
"getCountStatus" : function(currentCrdnId){
|
|
|
|
var ds = ctrl.dataset.getDataset();
|
|
|
|
var dsArray = ctrl.dataset.getDataset();
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
|
|
|
|
return (index+1) + " of " + ds.length;
|
|
|
|
return (arrayIndex+1) + " of " + dsArray.length;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"getNextKey" : function(currentKey){
|
|
|
|
"getNextKey" : function(currentCrdnId){
|
|
|
|
var ds = ctrl.dataset.getDataset();
|
|
|
|
var dsArray = ctrl.dataset.getDataset();
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
|
|
|
|
if(ds.length > index+1){
|
|
|
|
if(dsArray.length > arrayIndex+1){
|
|
|
|
if($P.holdList.includes(ds[index+1]["CRDN_ID"])){
|
|
|
|
if($P.holdList.includes(dsArray[arrayIndex+1]["CRDN_ID"])){
|
|
|
|
return $P.provide.getNextKey(ds[index+1]["CRDN_ID"]);
|
|
|
|
return $P.provide.getNextKey(dsArray[arrayIndex+1]["CRDN_ID"]);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return ds[index+1]["CRDN_ID"];
|
|
|
|
return dsArray[arrayIndex+1]["CRDN_ID"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return "";
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"getPrevKey" : function(currentKey){
|
|
|
|
"getPrevKey" : function(currentCrdnId){
|
|
|
|
var ds = ctrl.dataset.getDataset();
|
|
|
|
var dsArray = ctrl.dataset.getDataset();
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
|
|
|
|
if(index != 0 && ds.length > 1){
|
|
|
|
if(arrayIndex != 0 && dsArray.length > 1){
|
|
|
|
if($P.holdList.includes(ds[index-1]["CRDN_ID"])){
|
|
|
|
if($P.holdList.includes(dsArray[arrayIndex-1]["CRDN_ID"])){
|
|
|
|
return $P.provide.getPrevKey(ds[index-1]["CRDN_ID"]);
|
|
|
|
return $P.provide.getPrevKey(dsArray[arrayIndex-1]["CRDN_ID"]);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return ds[index-1]["CRDN_ID"];
|
|
|
|
return dsArray[arrayIndex-1]["CRDN_ID"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return "";
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"selectRow" : function(currentKey){
|
|
|
|
"selectRow" : function(currentCrdnId){
|
|
|
|
$P.clickCrdnList(currentKey);
|
|
|
|
let filtered = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == currentCrdnId);
|
|
|
|
|
|
|
|
if(filtered.length > 0){
|
|
|
|
|
|
|
|
$P.clickCrdnList(filtered[0].index);
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"holdRow" : function(currentKey){
|
|
|
|
"holdRow" : function(currentCrdnId){
|
|
|
|
$P.fnHold(currentKey);
|
|
|
|
$P.fnHold(currentCrdnId);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"refreshList" : function(){
|
|
|
|
"refreshList" : function(){
|
|
|
|
$P.refreshCrdnList();
|
|
|
|
$P.refreshCrdnList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"hasData" : function(key){
|
|
|
|
"hasData" : function(crdnId){
|
|
|
|
if(ctrl.dataset.getData(key) == null){
|
|
|
|
let filtered = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == crdnId);
|
|
|
|
return false;
|
|
|
|
if(filtered.length > 0){
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|