diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp
index 3aab0199..2b693add 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp
@@ -97,7 +97,7 @@
-
+
TEMP_GROUP_ID |
FILE_NAME |
@@ -187,9 +187,9 @@ $(document).ready(function(){
$P.$findn("imageArea").html("");
if(dataItem && dataItem.data){
- var dataKey = dataItem.data.FILE_NAME;
-
- $P.$findn("table-responsive").find("tbody").setCurrentRow(dataKey);
+ var dataIndex = dataItem.index;
+
+ $P.$findn("table-responsive").find("tbody").setCurrentRow(dataIndex);
if(dataItem.data.FILE_GROUP_TYPE == "BIN"){
var srcArr = [];
@@ -200,6 +200,7 @@ $(document).ready(function(){
$P.renderImage(srcArr);
} else {
+ var dataKey = dataItem.data.FILE_NAME;
if(!dataKey.endsWith(".txt") && !dataKey.endsWith(".TXT")){
var src = dataItem.data.FILE_PATH;
$P.renderImage(src);
@@ -303,7 +304,7 @@ $(document).ready(function(){
var notFound = [$P.$findn("table-responsive").find("template.notFound")[0].innerHTML];
var found = $P.$findn("table-responsive").find("template.found")[0].innerHTML;
var replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickParsedInfoList('" + dataItem.getValue("FILE_NAME") + "');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickParsedInfoList('{DATA-INDEX}');");
return {
found : found,
@@ -354,12 +355,12 @@ $(document).ready(function(){
}
- $P.clickParsedInfoList = (dataKey) => {
- if(dataKey == ""){
+ $P.clickParsedInfoList = (dataIndex) => {
+ if(dataIndex == ""){
return;
}
- ctrl.dataset.setCurrent(dataKey);
+ ctrl.dataset.setCurrent(dataIndex);
};
$P.createCrdn = () => {
@@ -393,13 +394,13 @@ $(document).ready(function(){
data : formData,
success : (resp) => {
- var removedFileName = $P.tempGroup[firstGroupKey].map(item => item.FILE_NAME);
+ let removedFileNameArr = $P.tempGroup[firstGroupKey].map(item => item.FILE_NAME);
delete $P.tempGroup[firstGroupKey];
if(resp.saved){
- $P.removeCallback(removedFileName);
+ $P.removeCallback(removedFileNameArr);
if(resp.alertMessage){
alert(resp.alertMessage);
@@ -430,31 +431,30 @@ $(document).ready(function(){
},
success : (resp) => {
if(resp.saved){
- $P.removeCallback(fileName);
+ $P.removeCallback([fileName]);
}
}
});
}
- $P.removeCallback = (removedFileName) => {
- ctrl.dataset.remove(removedFileName);
- $P.removeTableRow(removedFileName);
+ $P.removeCallback = (removedFileNameArr) => {
+ let removedDataIndexArr = [];
+ for(var i = 0; i < removedFileNameArr.length; i++){
+ let dii = ctrl.dataset.getDataset("item").filter(item=>item.data.FILE_NAME == removedFileNameArr[i])[0].index;
+ removedDataIndexArr.push(dii);
+ }
+
+ ctrl.dataset.remove(removedDataIndexArr);
+ $P.removeTableRow(removedDataIndexArr);
}
- $P.removeTableRow = (removedFileName) => {
+ $P.removeTableRow = (removedDataIndexArr) => {
var fileListTable = $P.$findn("table-responsive").find("table")[0];
- var targetArr = [];
- if(Array.isArray(removedFileName)){
- targetArr = removedFileName;
- } else {
- targetArr = [removedFileName];
- }
-
- for(var i = 0; i < targetArr.length; i++){
- var target = targetArr[i];
- var tr = $(fileListTable).find("tbody").find("tr[data-key='"+target+"']");
+ for(var i = 0; i < removedDataIndexArr.length; i++){
+ var target = removedDataIndexArr[i];
+ var tr = $(fileListTable).find("tbody").find("tr[data-index='"+target+"']");
var trIndex = $(fileListTable).find("tbody tr").index(tr);
fileListTable.deleteRow(trIndex+1);
}
diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08030-info.jsp
index d96fb12f..7dda678d 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08030-info.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08030-info.jsp
@@ -30,7 +30,7 @@
-
+
HSTRY_SN |
VHRNO |
EXMPTN_RSN |
diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp
index e87494d1..d20a2289 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp
@@ -125,9 +125,9 @@
-
+
-
|
VLTN_CASE_NM |
@@ -155,9 +155,9 @@
-
+
-
|
LEVY_EXCL_RSN_NM |
@@ -186,9 +186,9 @@
-
+
-
|
LEVY_EXCL_RSN_NM |
@@ -372,16 +372,16 @@ $(document).ready(function(){
$P.renderAnsBodyList(resp.nonlevyCaseList.length,'nonlevy');
if(resp.levyCaseList.length > 0){
- var current = ctrl.levy.getCurrent()["VLTN_CASE_ID"];
- $P.clickAnsBodyList(current,'levy');
+ var current = ctrl.levy.getCurrent("item");
+ $P.clickAnsBodyList(current.index,'levy');
}
if(resp.warningCaseList.length > 0){
- var current = ctrl.warning.getCurrent()["LEVY_EXCL_RSN_CD"];
- $P.clickAnsBodyList(current,'warning');
+ var current = ctrl.warning.getCurrent("item");
+ $P.clickAnsBodyList(current.index,'warning');
}
if(resp.nonlevyCaseList.length > 0){
- var current = ctrl.nonlevy.getCurrent()["LEVY_EXCL_RSN_CD"];
- $P.clickAnsBodyList(current,'nonlevy');
+ var current = ctrl.nonlevy.getCurrent("item");
+ $P.clickAnsBodyList(current.index,'nonlevy');
}
}
});
@@ -416,25 +416,25 @@ $(document).ready(function(){
var replacer = () => {};
if(renderDataType == "levy"){
replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('" + dataItem.getValue("VLTN_CASE_ID") + "','levy');")
- .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('" + dataItem.getValue("VLTN_CASE_ID") + "','levy');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('{DATA-INDEX}','levy');")
+ .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('{DATA-INDEX}','levy');");
} else if(renderDataType == "warning"){
replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "','warning');")
- .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "','warning');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('{DATA-INDEX}','warning');")
+ .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('{DATA-INDEX}','warning');");
} else if(renderDataType == "nonlevy"){
replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "','nonlevy');")
- .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "','nonlevy');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('{DATA-INDEX}','nonlevy');")
+ .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('{DATA-INDEX}','nonlevy');");
}
var trs = empty ? notFound : ansBodyDS.inStrings(found, replacer);
$P.$findn(tbodyName).html(trs.join());
}
- $P.radioClickAnsBodyList = (dataKey, gridType) => {
+ $P.radioClickAnsBodyList = (dataIndex, gridType) => {
- ctrl[gridType].setCurrent(dataKey);
+ ctrl[gridType].setCurrent(dataIndex);
var tbodyName = "";
if(gridType == "levy"){
@@ -446,7 +446,7 @@ $(document).ready(function(){
} else {
return;
}
- $P.$findn(tbodyName).setCurrentRow(dataKey);
+ $P.$findn(tbodyName).setCurrentRow(dataIndex);
if(gridType == "levy" && $P.currentDisplay == "levyAnsBody"){
$P.changeAnsBodyText();
@@ -457,7 +457,7 @@ $(document).ready(function(){
}
}
- $P.clickAnsBodyList = (dataKey, gridType) => {
+ $P.clickAnsBodyList = (dataIndex, gridType) => {
var radioName = "";
if(gridType == "levy"){
radioName = "levyRadio";
@@ -469,17 +469,17 @@ $(document).ready(function(){
return;
}
- $P.$findn("wrapper").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").prop("checked",true);
+ $P.$findn("wrapper").find(":radio[name='"+radioName+"'][value='"+dataIndex+"']").prop("checked",true);
if(gridType == "levy" && $P.currentDisplay == "levyAnsBody"){
- $P.$findn("wrapper").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus();
+ $P.$findn("wrapper").find(":radio[name='"+radioName+"'][value='"+dataIndex+"']").focus();
} else if(gridType == "warning" && $P.currentDisplay == "warningAnsBody"){
- $P.$findn("wrapper").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus();
+ $P.$findn("wrapper").find(":radio[name='"+radioName+"'][value='"+dataIndex+"']").focus();
} else if(gridType == "nonlevy" && $P.currentDisplay == "nonlevyAnsBody"){
- $P.$findn("wrapper").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus();
+ $P.$findn("wrapper").find(":radio[name='"+radioName+"'][value='"+dataIndex+"']").focus();
}
- $P.radioClickAnsBodyList(dataKey, gridType);
+ $P.radioClickAnsBodyList(dataIndex, gridType);
}
$P.changeAnsBodyText = () => {
@@ -530,9 +530,9 @@ $(document).ready(function(){
}
$P.refreshAnsWordsInfo = () => {
- var cursor1 = ctrl.levy.getCurrent()["VLTN_CASE_ID"];
- var cursor2 = ctrl.warning.getCurrent()["LEVY_EXCL_RSN_CD"];
- var cursor3 = ctrl.nonlevy.getCurrent()["LEVY_EXCL_RSN_CD"];
+ var cursor1 = ctrl.levy.getCurrent("item").index;
+ var cursor2 = ctrl.warning.getCurrent("item").index;
+ var cursor3 = ctrl.nonlevy.getCurrent("item").index;
var taskSeCd = $P.$findn("frmSearch").find("input[name='taskSeCd']:checked").val();
@@ -554,18 +554,18 @@ $(document).ready(function(){
if(resp.levyCaseList.length > 0){
ctrl.levy.setCurrent(cursor1);
- var current = ctrl.levy.getCurrent()["VLTN_CASE_ID"];
- $P.clickAnsBodyList(current,'levy');
+ var current = ctrl.levy.getCurrent("item");
+ $P.clickAnsBodyList(current.index,'levy');
}
if(resp.warningCaseList.length > 0){
ctrl.warning.setCurrent(cursor2);
- var current = ctrl.warning.getCurrent()["LEVY_EXCL_RSN_CD"];
- $P.clickAnsBodyList(current,'warning');
+ var current = ctrl.warning.getCurrent("item");
+ $P.clickAnsBodyList(current.index,'warning');
}
if(resp.nonlevyCaseList.length > 0){
ctrl.nonlevy.setCurrent(cursor3);
- var current = ctrl.nonlevy.getCurrent()["LEVY_EXCL_RSN_CD"];
- $P.clickAnsBodyList(current,'nonlevy');
+ var current = ctrl.nonlevy.getCurrent("item");
+ $P.clickAnsBodyList(current.index,'nonlevy');
}
}
});
diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp
index 9f7c098a..d9a341bc 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp
@@ -48,9 +48,9 @@
-
+
-
|
LEVY_EXCL_RSN_NM |
@@ -179,8 +179,8 @@ $(document).ready(function(){
$P.renderWarningWordsList(resp.List.length);
if(resp.List.length > 0){
- var current = ctrl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"];
- $P.clickWarningWordsList(current);
+ var current = ctrl.dataset.getCurrent("item");
+ $P.clickWarningWordsList(current.index);
}
}
});
@@ -194,29 +194,29 @@ $(document).ready(function(){
var found = $P.findn("warningWordsRow").innerHTML;
var replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickWarningWordsList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "');")
- .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickWarningWordsList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickWarningWordsList('{DATA-INDEX}');")
+ .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickWarningWordsList('{DATA-INDEX}');");
var trs = empty ? notFound : warningWordsDS.inStrings(found, replacer);
$P.$findn("warningWordsTbody").html(trs.join());
}
- $P.radioClickWarningWordsList = (dataKey, gridType) => {
+ $P.radioClickWarningWordsList = (dataIndex, gridType) => {
- ctrl.dataset.setCurrent(dataKey);
+ ctrl.dataset.setCurrent(dataIndex);
- $P.$findn("warningWordsTbody").setCurrentRow(dataKey);
+ $P.$findn("warningWordsTbody").setCurrentRow(dataIndex);
$P.changeTextarea();
}
- $P.clickWarningWordsList = (dataKey, gridType) => {
+ $P.clickWarningWordsList = (dataIndex, gridType) => {
- $P.$findn("wrapper").find(":radio[name='gridRadio'][value='"+dataKey+"']").prop("checked",true);
- $P.$findn("wrapper").find(":radio[name='gridRadio'][value='"+dataKey+"']").focus();
+ $P.$findn("wrapper").find(":radio[name='gridRadio'][value='"+dataIndex+"']").prop("checked",true);
+ $P.$findn("wrapper").find(":radio[name='gridRadio'][value='"+dataIndex+"']").focus();
- $P.radioClickWarningWordsList(dataKey, gridType);
+ $P.radioClickWarningWordsList(dataIndex, gridType);
}
$P.changeTextarea = () => {
@@ -252,8 +252,8 @@ $(document).ready(function(){
$P.renderWarningWordsList(resp.List.length);
if(resp.List.length > 0){
ctrl.dataset.setCurrent(cursor);
- var current = ctrl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"];
- $P.clickWarningWordsList(current,'warning');
+ var current = ctrl.dataset.getCurrent("item");
+ $P.clickWarningWordsList(current.index,'warning');
}
}
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn05020.js b/src/main/webapp/resources/js/fims/crdn/crdn05020.js
index 64cf9084..89bba22d 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn05020.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn05020.js
@@ -1,7 +1,7 @@
function newCrdn05020Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"],
- keymapper : info => info ? info.FILE_NAME : "",
+ keys : ["FILE_NAME"],
urls : { },
formats: {
CRDN_YMD : dateFormat,
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn08030.js b/src/main/webapp/resources/js/fims/crdn/crdn08030.js
index 3e3d104a..d673819f 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn08030.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn08030.js
@@ -1,7 +1,8 @@
function newCrdn08030Control(page, doctx = ""){
page.ctrl = new DatasetControl({
- dataGetter : obj => obj, appendData:false,
- keymapper : info => info ? info.HSTRY_SN : "",
+ dataGetter : obj => obj,
+ appendData:false,
+ keys : ["HSTRY_SN"],
urls : { },
formats: {
EXMPTN_BGNG_YMD : dateFormat,
diff --git a/src/main/webapp/resources/js/fims/cvlc/cvlc05010.js b/src/main/webapp/resources/js/fims/cvlc/cvlc05010.js
index f8998d71..a2078fe3 100644
--- a/src/main/webapp/resources/js/fims/cvlc/cvlc05010.js
+++ b/src/main/webapp/resources/js/fims/cvlc/cvlc05010.js
@@ -1,16 +1,22 @@
function newCvlc05010Control(page, doctx = ""){
page.ctrl = new AnswerBodyControl({
- dataGetter : obj => obj["levyCaseList"], urls : {}, formats : {},
- keymapper : info => info ? info.VLTN_CASE_ID : ""
+ dataGetter : obj => obj["levyCaseList"],
+ urls : {},
+ formats : {},
+ keys : ["VLTN_CASE_ID"]
},
{
- dataGetter : obj => obj["warningCaseList"], urls : {}, formats : {},
- keymapper : info => info ? info.LEVY_EXCL_RSN_CD : ""
+ dataGetter : obj => obj["warningCaseList"],
+ urls : {},
+ formats : {},
+ keys : ["LEVY_EXCL_RSN_CD"]
},
{
- dataGetter : obj => obj["nonlevyCaseList"], urls : {}, formats : {},
- keymapper : info => info ? info.LEVY_EXCL_RSN_CD : ""
+ dataGetter : obj => obj["nonlevyCaseList"],
+ urls : {},
+ formats : {},
+ keys : ["LEVY_EXCL_RSN_CD"]
});
return page.ctrl;
}
diff --git a/src/main/webapp/resources/js/fims/cvlc/cvlc06010.js b/src/main/webapp/resources/js/fims/cvlc/cvlc06010.js
index 6ddf00d6..69e70447 100644
--- a/src/main/webapp/resources/js/fims/cvlc/cvlc06010.js
+++ b/src/main/webapp/resources/js/fims/cvlc/cvlc06010.js
@@ -1,7 +1,7 @@
function newCvlc06010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"],
- keymapper : info => info ? info.LEVY_EXCL_RSN_CD : "",
+ keys : ["LEVY_EXCL_RSN_CD"],
urls : {},
formats : {}
});