diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp
index b97e7a24..751d5c16 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp
@@ -86,7 +86,7 @@
-
+
ROW_NUM |
TASK_SE_NM |
DEPT_NM |
@@ -202,8 +202,8 @@ $(document).ready(function(){
var notFound = [$P.findn("layoutNotFound").innerHTML];
var found = $P.findn("layoutRow").innerHTML;
var replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickLayoutList('" + dataItem.getValue("FILE_LAYOUT_ID") + "');")
- .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickLayoutList('" + dataItem.getValue("FILE_LAYOUT_ID") + "');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickLayoutList('{DATA-INDEX}');")
+ .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickLayoutList('{FILE_LAYOUT_ID}');");
return {
found : found,
@@ -225,14 +225,14 @@ $(document).ready(function(){
fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
}
- $P.clickLayoutList = (dataKey) => {
- if(dataKey == ""){
+ $P.clickLayoutList = (dataIndex) => {
+ if(dataIndex == ""){
return;
}
- $P.$findn("layoutTbody").setCurrentRow(dataKey);
+ $P.$findn("layoutTbody").setCurrentRow(dataIndex);
- Apply.toDataset.current(ctrl.dataset, dataKey);
+ Apply.toDataset.current(ctrl.dataset, dataIndex);
}
$P.dblclickLayoutList = (dataKey) => {
diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp
index d70bfe8d..dc6ee855 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp
@@ -219,7 +219,7 @@
-
+
ROW_NUM |
CRDN_YMD_TM |
VHRNO |
@@ -284,7 +284,7 @@
-
+
VHRNO |
CRDN_STDG_NM |
CRDN_CNT |
@@ -336,7 +336,7 @@
-
+
CRDN_YMD_TM |
CRDN_INPT_SE_NM |
TEAM_NM |
@@ -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']"
};
diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp
index 776242f5..bf961412 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp
@@ -84,7 +84,7 @@
-
+
ROW_NUM |
CRDN_INPT_SE_NM |
CRDN_YMD_TM |
@@ -196,35 +196,18 @@ $(document).ready(function(){
$P.refreshCrdnList = () => {
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_LIST");
+ ctrl.beforeCurrent = null;
+ if(todoCurrent != null){
+ ctrl.dataset.setCurrent(todoCurrent.index, true);
}
});
@@ -249,8 +232,8 @@ $(document).ready(function(){
var notFound = [$P.findn("crdnNotFound").innerHTML];
var found = $P.findn("crdnRow").innerHTML;
var replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
- .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('{DATA-INDEX}');")
+ .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('{CRDN_ID}');");
return {
found : found,
@@ -273,13 +256,13 @@ $(document).ready(function(){
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
- $P.clickCrdnList = (dataKey) => {
- if(dataKey == ""){
+ $P.clickCrdnList = (dataIndex) => {
+ if(dataIndex == ""){
return;
}
- $P.$findn("crdnTbody").setCurrentRow(dataKey);
- Apply.toDataset.current(ctrl.dataset, dataKey);
+ $P.$findn("crdnTbody").setCurrentRow(dataIndex);
+ Apply.toDataset.current(ctrl.dataset, dataIndex);
}
diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp
index 9708a38e..5badee24 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp
@@ -71,7 +71,7 @@
-
+
ROW_NUM |
CRDN_REG_SE_NM |
CRDN_INPT_SE_NM |
@@ -124,7 +124,6 @@ $(document).ready(function(){
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
- ctrl.beforeCurrent = null;
ctrl.urls.newInfoByFile = "";
ctrl.urls.newInfoByHand = "";
@@ -200,7 +199,7 @@ $(document).ready(function(){
var notFound = [$P.findn("crdnNotFound").innerHTML];
var found = $P.findn("crdnRow").innerHTML;
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, "");
return {
@@ -225,14 +224,14 @@ $(document).ready(function(){
}
- $P.clickCrdnList = (dataKey) => {
- if(dataKey == ""){
+ $P.clickCrdnList = (dataIndex) => {
+ if(dataIndex == ""){
return;
}
- $P.$findn("crdnTbody").setCurrentRow(dataKey);
+ $P.$findn("crdnTbody").setCurrentRow(dataIndex);
- Apply.toDataset.current(ctrl.dataset, dataKey);
+ Apply.toDataset.current(ctrl.dataset, dataIndex);
}
$P.newInfo = (type) => {
diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp
index f97ad449..c8a52989 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp
@@ -216,10 +216,10 @@
|
-
+
ROW_NUM |
-
|
CRDN_INPT_SE_NM |
@@ -308,7 +308,6 @@ $(document).ready(function(){
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
- ctrl.beforeCurrent = null;
ctrl.dataset.onDatasetChange = (obj, option) => {
@@ -446,8 +445,8 @@ $(document).ready(function(){
var found = foundTr.outerHTML;
var replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
- .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('{DATA-INDEX}');")
+ .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('{CRDN_ID}');");
return {
found : found,
@@ -470,13 +469,13 @@ $(document).ready(function(){
}
- $P.clickCrdnList = (dataKey) => {
- if(dataKey == ""){
+ $P.clickCrdnList = (dataIndex) => {
+ if(dataIndex == ""){
return;
}
- $P.$findn("crdnTbody").setCurrentRow(dataKey);
- Apply.toDataset.current(ctrl.dataset, dataKey);
+ $P.$findn("crdnTbody").setCurrentRow(dataIndex);
+ Apply.toDataset.current(ctrl.dataset, dataIndex);
}
$P.dblclickCrdnList = (dataKey) => {
@@ -510,7 +509,8 @@ $(document).ready(function(){
var datas = ctrl.dataset.getDataset("selected");
var taskSeCd = datas[0].TASK_SE_CD;
- var keys = ctrl.dataset.getKeys("selected");
+ var keys = datas.map(item => item.CRDN_ID);
+
var url = "";
if(taskSeCd == "PVS"){
url = "/"+taskSeCd+"/nxrp/nxrp01/010/createIndivB01.do";
diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp
index 80165e84..29457427 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp
@@ -66,7 +66,7 @@
-
+
TEAM_NM |
CRDN_SE_NM |
TEAMER_1 |
@@ -202,7 +202,7 @@
-
+
TEAM_NM |
CRDN_SE_NM |
TEAMER_1 |
@@ -361,7 +361,7 @@ $(document).ready(function(){
notFound = [$P.findn("useTeamNotFound").innerHTML];
found = $P.findn("useTeamRow").innerHTML;
replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickUseTeamList('" + dataItem.getValue("TEAM_ID") + "');")
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickUseTeamList('{DATA-INDEX}');")
.replace(/{ondblclick}/gi, "");
} else {
notFound = [$P.findn("delTeamNotFound").innerHTML];
@@ -386,8 +386,8 @@ $(document).ready(function(){
$P.$findn("delTeamTbody").html(trs);
}
- $P.clickUseTeamList = (dataKey) => {
- ctrl.dataset.setCurrent(dataKey);
+ $P.clickUseTeamList = (dataIndex) => {
+ ctrl.dataset.setCurrent(dataIndex);
}
$P.fnSave = () => {
diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp
index 8600432a..f1f8f33c 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp
@@ -81,7 +81,7 @@
-
+
ROW_NUM |
VHRNO |
EXMPTN_RSN |
@@ -138,8 +138,6 @@ $(document).ready(function(){
var ctrl = newCrdn08010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
- ctrl.beforeCurrent = null;
-
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();
@@ -210,8 +208,8 @@ $(document).ready(function(){
var notFound = [$P.findn("exmptnVhclNotFound").innerHTML];
var found = $P.findn("exmptnVhclRow").innerHTML;
var replacer = (str, dataItem) => str
- .replace(/{onclick}/gi, "pageObject['${pageName}'].clickExmptnVhclList('" + dataItem.getValue("EXMPTN_VHCL_ID") + "');")
- .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickExmptnVhclList('" + dataItem.getValue("EXMPTN_VHCL_ID") + "');");
+ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickExmptnVhclList('{DATA-INDEX}');")
+ .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickExmptnVhclList('{EXMPTN_VHCL_ID}');");
return {
found : found,
@@ -234,30 +232,32 @@ $(document).ready(function(){
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
- $P.clickExmptnVhclList = (dataKey) => {
- if(dataKey == ""){
+ $P.clickExmptnVhclList = (dataIndex) => {
+ if(dataIndex == ""){
$P.$findn("btnOpenDelRsn").prop("disabled", true);
$P.$findn("btnHistory").prop("disabled", true);
return;
}
- if(ctrl.dataset.getData(dataKey)["DEL_YN"] == "N"){
+ if(ctrl.dataset.getData(dataIndex)["DEL_YN"] == "N"){
$P.$findn("btnOpenDelRsn").prop("disabled", false);
} else {
$P.$findn("btnOpenDelRsn").prop("disabled", true);
}
$P.$findn("btnHistory").prop("disabled", false);
- $P.$findn("exmptnVhclTbody").setCurrentRow(dataKey);
+ $P.$findn("exmptnVhclTbody").setCurrentRow(dataIndex);
- Apply.toDataset.current(ctrl.dataset, dataKey);
+ Apply.toDataset.current(ctrl.dataset, dataIndex);
}
$P.dblclickExmptnVhclList = (dataKey) => {
if(dataKey == ""){
return;
}
- var data = ctrl.dataset.getData(dataKey);
+
+ let dataItem = ctrl.dataset.getDataset("item").filter(item => item.data.EXMPTN_VHCL_ID == dataKey)[0];
+ var data = dataItem.data;
if(data.DEL_YN == "Y"){
dialog.alert({
content : "삭제된 자료입니다.",
diff --git a/src/main/webapp/resources/js/fims/cmmn/fims-base.js b/src/main/webapp/resources/js/fims/cmmn/fims-base.js
index 39d67719..d6a2e9c3 100644
--- a/src/main/webapp/resources/js/fims/cmmn/fims-base.js
+++ b/src/main/webapp/resources/js/fims/cmmn/fims-base.js
@@ -309,6 +309,31 @@ const Apply = {
var empty = dataset.empty;
var trs = empty ? notFound : dataset.inStrings(found, replacer);
return trs.join();
+ },
+ getTodoCurrent : function(dataset, beforeCurrent, columnName){
+
+ let di = null;
+ if(beforeCurrent == null){
+ return null;
+ }
+ if(dataset.empty){
+ return null;
+ }
+
+ let filtered = dataset.getDataset("item").filter(item => item.data[columnName] == beforeCurrent.primaryKey);
+ if(filtered.length > 0){
+ di = filtered[0];
+ return di;
+ }
+
+ let otherInfo;
+ if(beforeCurrent.arrayIndex > (dataset.length - 1)){
+ di = dataset.getDataset("item")[dataset.length - 1];
+ } else {
+ di = dataset.getDataset("item")[beforeCurrent.arrayIndex];
+ }
+
+ return di;
}
},
toDataset : {
@@ -334,8 +359,9 @@ const Apply = {
set : function(dataset, resp){
dataset._byKeys = {};
dataset._current = null;
-
- var data = dataset._getDataItems(resp = resp || {});
+ resp = resp || {};
+ var data = dataset._getDataItems(resp,{});
+
dataset._items = data.items;
dataset._byKeys = data.byKeys;
},
@@ -345,7 +371,8 @@ const Apply = {
return;
}
var state = dataset.state;
- var data = dataset._getDataItems(resp = resp || {});
+ resp = resp || {};
+ var data = dataset._getDataItems(resp,{});
dataset._items = this._items.concat(data.items);
dataset._byKeys = {
...this._byKeys,
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn01010.js b/src/main/webapp/resources/js/fims/crdn/crdn01010.js
index c807bc6b..a6534a0b 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn01010.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn01010.js
@@ -1,8 +1,9 @@
function newCrdn01010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
- dataGetter : obj => obj["List"], appendData:true,
- keymapper : info => info ? info.FILE_LAYOUT_ID : "",
- urls : {
+ dataGetter : obj => obj["List"],
+ appendData:true,
+ keys : ["FILE_LAYOUT_ID"],
+ urls : {
load : "",
getInfo : ""
},
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn02010.js b/src/main/webapp/resources/js/fims/crdn/crdn02010.js
index b155a27c..b1b191e2 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn02010.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn02010.js
@@ -1,7 +1,8 @@
function newCrdn02010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
- dataGetter : obj => obj["List"], appendData:true,
- keymapper : info => info ? info.CRDN_ID : "",
+ dataGetter : obj => obj["List"],
+ appendData:true,
+ keys: ["CRDN_ID"],
urls : {
load : ""
},
@@ -16,8 +17,9 @@ function newCrdn02010Control(page, doctx = ""){
function newCrdn02010Alt(page, doctx = ""){
page.alt = new DatasetControl({
- dataGetter : obj => obj["List"], appendData:true,
- keymapper : info => info ? info.CRDN_ID_LIST : "",
+ dataGetter : obj => obj["List"],
+ appendData:true,
+ keys : ["CRDN_ID_LIST"],
urls : {
load : ""
},
@@ -32,7 +34,7 @@ function newCrdn02010Alt(page, doctx = ""){
function newCrdn02010Shift(page, doctx = ""){
page.shift = new DatasetControl({
dataGetter : obj => obj["List"],
- keymapper : info => info ? info.CRDN_ID : "",
+ keys: ["CRDN_ID"],
urls : {
load : ""
},
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn03010.js b/src/main/webapp/resources/js/fims/crdn/crdn03010.js
index e1a55136..581ef650 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn03010.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn03010.js
@@ -1,12 +1,13 @@
function newCrdn03010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
- dataGetter : obj => obj["List"], appendData:true,
- keymapper : info => info ? info.CRDN_ID : "",
+ dataGetter : obj => obj["List"],
+ appendData:true,
+ keys : ["CRDN_ID"],
urls : {
- load : wctx.url("/DPV/crdn/crdn03/030/list.do"),
- getInfo : wctx.url("/DPV/sprt/sprt02/010/main.do"),
- update: wctx.url("/DPV/crdn/crdn03/030/update.do")
- },
+ load : wctx.url("/DPV/crdn/crdn03/030/list.do"),
+ getInfo : wctx.url("/DPV/sprt/sprt02/010/main.do"),
+ update: wctx.url("/DPV/crdn/crdn03/030/update.do")
+ },
formats: {
CRDN_YMD_TM : datetimeFormat,
FFNLG_CRDN_AMT : numberFormat,
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn05010.js b/src/main/webapp/resources/js/fims/crdn/crdn05010.js
index 0a7dbc3c..3e851115 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn05010.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn05010.js
@@ -1,7 +1,8 @@
function newCrdn05010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
- dataGetter : obj => obj["List"], appendData:true,
- keymapper : info => info ? info.CRDN_ID : "",
+ dataGetter : obj => obj["List"],
+ appendData:true,
+ keys : ["CRDN_ID"],
urls : {
load : ""
},
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn06010.js b/src/main/webapp/resources/js/fims/crdn/crdn06010.js
index 3d44b1c7..0181e75d 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn06010.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn06010.js
@@ -1,11 +1,12 @@
function newCrdn06010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
- dataGetter : obj => obj["List"], appendData:true,
- keymapper : info => info ? info.CRDN_ID : "",
- urls : {
- load : "",
- getInfo : ""
- },
+ dataGetter : obj => obj["List"],
+ appendData:true,
+ keys : ["CRDN_ID"],
+ urls : {
+ load : "",
+ getInfo : ""
+ },
formats: {
CRDN_YMD_TM : datetimeFormat,
REG_DT : datetimeFormat,
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn07010.js b/src/main/webapp/resources/js/fims/crdn/crdn07010.js
index 00852a44..de2f8cb1 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn07010.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn07010.js
@@ -1,12 +1,13 @@
function newCrdn07010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
- dataGetter : obj => obj["List"], appendData:false,
- keymapper : info => info ? info.TEAM_ID : "",
- urls : {
- load : "",
- remove : "",
- save : ""
- },
+ dataGetter : obj => obj["List"],
+ appendData:false,
+ keys : ["TEAM_ID"],
+ urls : {
+ load : "",
+ remove : "",
+ save : ""
+ },
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
@@ -18,8 +19,9 @@ function newCrdn07010Control(page, doctx = ""){
function newCrdn07010Alt(page, doctx = ""){
page.alt = new DatasetControl({
- dataGetter : obj => obj["List"], appendData: false,
- keymapper : info => info ? info.TEAM_ID : "",
+ dataGetter : obj => obj["List"],
+ appendData: false,
+ keys : ["TEAM_ID"],
urls : { },
formats: {
REG_DT : datetimeFormat,
diff --git a/src/main/webapp/resources/js/fims/crdn/crdn08010.js b/src/main/webapp/resources/js/fims/crdn/crdn08010.js
index ef913e95..a09d9783 100644
--- a/src/main/webapp/resources/js/fims/crdn/crdn08010.js
+++ b/src/main/webapp/resources/js/fims/crdn/crdn08010.js
@@ -1,13 +1,14 @@
function newCrdn08010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
- dataGetter : obj => obj["List"], appendData:true,
- keymapper : info => info ? info.EXMPTN_VHCL_ID : "",
- urls : {
- load : wctx.url("/BPV/crdn/crdn08/010/list.do"),
- remove : wctx.url("/BPV/crdn/crdn08/010/remove.do"),
- newInfo : wctx.url("/BPV/crdn/crdn08/020/info.do"),
- getInfo : wctx.url("/BPV/crdn/crdn08/020/info.do")
- },
+ dataGetter : obj => obj["List"],
+ appendData:true,
+ keys : ["EXMPTN_VHCL_ID"],
+ urls : {
+ load : wctx.url("/BPV/crdn/crdn08/010/list.do"),
+ remove : wctx.url("/BPV/crdn/crdn08/010/remove.do"),
+ newInfo : wctx.url("/BPV/crdn/crdn08/020/info.do"),
+ getInfo : wctx.url("/BPV/crdn/crdn08/020/info.do")
+ },
formats: {
EXMPTN_BGNG_YMD : dateFormat,
EXMPTN_END_YMD : dateFormat,