From 6bdb41447ae30e77cbc513daa65127a5366606e3 Mon Sep 17 00:00:00 2001 From: leebj Date: Fri, 23 Aug 2024 10:52:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/crdn/crdn01010-main.jsp | 62 ++- .../WEB-INF/jsp/fims/crdn/crdn01020-info.jsp | 37 +- .../WEB-INF/jsp/fims/crdn/crdn02010-main.jsp | 237 +++++---- .../WEB-INF/jsp/fims/crdn/crdn02050-info.jsp | 37 +- .../WEB-INF/jsp/fims/crdn/crdn03010-main.jsp | 103 ++-- .../WEB-INF/jsp/fims/crdn/crdn05010-main.jsp | 72 ++- .../WEB-INF/jsp/fims/crdn/crdn05020-info.jsp | 80 ++- .../WEB-INF/jsp/fims/crdn/crdn05030-info.jsp | 31 +- .../WEB-INF/jsp/fims/crdn/crdn06010-main.jsp | 96 ++-- .../WEB-INF/jsp/fims/crdn/crdn06020-info.jsp | 463 +++++++++--------- .../WEB-INF/jsp/fims/crdn/crdn06030-info.jsp | 212 ++++---- .../WEB-INF/jsp/fims/crdn/crdn07010-main.jsp | 108 ++-- .../WEB-INF/jsp/fims/crdn/crdn08010-main.jsp | 88 ++-- .../WEB-INF/jsp/fims/crdn/crdn08020-info.jsp | 28 +- .../WEB-INF/jsp/fims/crdn/crdn08030-info.jsp | 22 +- .../WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp | 133 +++-- .../WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp | 41 +- .../WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp | 32 +- .../WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp | 109 ++--- .../WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp | 35 +- .../WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp | 124 +++-- .../WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp | 121 +++-- .../WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp | 93 ++-- .../WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp | 54 +- .../WEB-INF/jsp/fims/sprt/sprt01010-main.jsp | 113 +++-- 25 files changed, 1239 insertions(+), 1292 deletions(-) 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 16683bf1..32d199e3 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 @@ -132,9 +132,9 @@ $(document).ready(function(){ var $P = pageObject["${pageName}"]; /************************************************************************** - * DatasetControl - **************************************************************************/ - $P.ctrl = new DatasetControl({ + * DatasetControl, DatasetSupport, FormFields + **************************************************************************/ + var ctrl = $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.FILE_LAYOUT_ID : "", urls : { @@ -146,29 +146,27 @@ $(document).ready(function(){ MDFCN_DT : datetimeFormat } }); - $P.ctrl.defaultFetchSize = FETCH_XS; - $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; - /************************************************************************** - * Dataset.on - **************************************************************************/ - $P.ctrl.dataset.onDatasetChange = (obj, option) => { + ctrl.defaultFetchSize = FETCH_XS; + ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; + + ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); - $P.renderLayoutList(obj["Total"], $P.ctrl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderLayoutList(obj["Total"], ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.ctrl.dataset, obj, $P.findn("layoutPaging"), $P.findn("layoutPagingInfo")); + Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("layoutPaging"), $P.findn("layoutPagingInfo")); }; - $P.ctrl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $P.findn("layoutTbody")); + ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("layoutTbody")); } /************************************************************************** - * pageObject.function - **************************************************************************/ + * pageObject.function + **************************************************************************/ $P.fnResetAndChangeBiz = (taskSeCd) => { - $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn01/010/list.do"); - $P.ctrl.urls.getInfo = wctx.url("/"+taskSeCd+"/crdn/crdn01/020/info.do"); + ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn01/010/list.do"); + ctrl.urls.getInfo = wctx.url("/"+taskSeCd+"/crdn/crdn01/020/info.do"); $P.fnReset(); } @@ -180,32 +178,32 @@ $(document).ready(function(){ searchForm.find("input[type='hidden']").val(""); searchForm.find("input[type='text']").val(""); - $P.ctrl.dataset.setData([]); + ctrl.dataset.setData([]); } $P.getParams = () => { var formFields = new FimsFormFields($P.selectorn("frmSearch")); var data = formFields.get(); - data.fetchSize = $P.ctrl.defaultFetchSize; + data.fetchSize = ctrl.defaultFetchSize; return data; } $P.searchLayoutList = () => { - $P.ctrl.query = $P.getParams(); - $P.ctrl.load(1); + ctrl.query = $P.getParams(); + ctrl.load(1); } $P.scrollLayoutList = () => { - $P.ctrl.load($P.ctrl.query.pageNum + 1); + ctrl.load(ctrl.query.pageNum + 1); } $P.refreshLayoutList = () => { - if($P.ctrl.query.pageNum == null){ + if(ctrl.query.pageNum == null){ return; } - $P.ctrl.reload({all : true}); + ctrl.reload({all : true}); } $P.getGridTemplate = () => { @@ -225,7 +223,7 @@ $(document).ready(function(){ $P.renderLayoutList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.ctrl.query.pageNum < 2); + var initScroll = (ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -242,7 +240,7 @@ $(document).ready(function(){ $P.$findn("layoutTbody").setCurrentRow(dataKey); - Apply.toDataset.current($P.ctrl.dataset, dataKey); + Apply.toDataset.current(ctrl.dataset, dataKey); } $P.dblclickLayoutList = (dataKey) => { @@ -260,7 +258,7 @@ $(document).ready(function(){ } ajax.get({ - url : $P.ctrl.urls.getInfo, + url : ctrl.urls.getInfo, data : params, success : (resp) => { @@ -305,16 +303,16 @@ $(document).ready(function(){ }; /************************************************************************** - * element.on - **************************************************************************/ + * element.on + **************************************************************************/ $P.$findn("btnReset").on('click', () => $P.fnReset()); $P.$findn("btnSearch").on('click', () => $P.searchLayoutList()); $P.$findn("btnAdd").on('click', () => $P.createLayout()); /************************************************************************** - * 초기화 - **************************************************************************/ + * 초기화 + **************************************************************************/ Componentization.fnMakeResizableTable($P.findn("table-responsive")); Componentization.fnMakeScrollableTable($P.findn("table-responsive"), $P.scrollLayoutList); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp index 1acef668..f22fbcc6 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp @@ -264,11 +264,11 @@ $(document).ready(function(){ } /************************************************************************** - * DatasetControl, Dataset, FormFields - **************************************************************************/ + * DatasetControl, DatasetSupport, FormFields + **************************************************************************/ $P.formFields = new FimsFormFields($P.selectorn("frmEdit")); - $P.ctrl = new DatasetControl({ + var ctrl = $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData : true, keymapper : info => info ? info.FILE_LAYOUT_ID : "", urls : { @@ -280,30 +280,27 @@ $(document).ready(function(){ } }); - - /************************************************************************** - * Dataset.on - **************************************************************************/ - $P.ctrl.dataset.onCurrentChange = (dataItem) => { + + ctrl.dataset.onCurrentChange = (dataItem) => { if(!dataItem){ return; } - $P.formFields.set($P.ctrl, dataItem); + $P.formFields.set(ctrl, dataItem); } /************************************************************************** - * pageObject.function - **************************************************************************/ + * pageObject.function + **************************************************************************/ $P.fnSave = () => { if(!AppSupport.customValidate($P.$findn("frmEdit").find("input,select,textarea"))) return; var info = $P.formFields.get(); - var create = $P.ctrl.dataset.empty; + var create = ctrl.dataset.empty; ajax.post({ - url : create ? $P.ctrl.urls.create : $P.ctrl.urls.update, + url : create ? ctrl.urls.create : ctrl.urls.update, data : info, success : (resp) => { if(resp.saved){ @@ -326,7 +323,7 @@ $(document).ready(function(){ var info = $P.formFields.get(); ajax.post({ - url : $P.ctrl.urls.remove, + url : ctrl.urls.remove, data : { fileLayoutId : info.fileLayoutId }, @@ -348,19 +345,19 @@ $(document).ready(function(){ } /************************************************************************** - * element.on - **************************************************************************/ + * element.on + **************************************************************************/ $P.$findn("btnSave").on('click', () => $P.fnSave()); $P.$findn("btnDelete").on('click', () => $P.fnRemove()); /************************************************************************** - * 초기화 - **************************************************************************/ + * 초기화 + **************************************************************************/ var layoutInfo = ${layoutInfo}; if(layoutInfo != null){ - $P.ctrl.dataset.setData([layoutInfo]); + ctrl.dataset.setData([layoutInfo]); } else { - $P.ctrl.dataset.setData([]); + ctrl.dataset.setData([]); $P.$findn("sggCd").val(MY_INFO.info.sggCd); $P.$findn("instCd").val(MY_INFO.info.instCd); 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 1904f189..1a304672 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 @@ -393,16 +393,16 @@ $(document).ready(function(){ var $P = pageObject["${pageName}"]; /************************************************************************** - * DatasetControl - **************************************************************************/ + * DatasetControl, DatasetSupport, FormFields + **************************************************************************/ //단속사진검사 datasetControl 인스턴스 - $P.ctrl = newCrdn02010Control(); - $P.ctrl.defaultFetchSize = FETCH_XS; - $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; - $P.ctrl.beforeCurrent = null; - $P.ctrl.getNext = (key) => { + var ctrl = $P.ctrl = newCrdn02010Control(); + ctrl.defaultFetchSize = FETCH_XS; + ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; + ctrl.beforeCurrent = null; + ctrl.getNext = (key) => { - var ds = $P.ctrl.dataset.getDataset(); + var ds = ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == key); if(ds.length > index+1){ @@ -411,80 +411,77 @@ $(document).ready(function(){ return null; } } - - //동일차량검사 datasetControl 인스턴스 - $P.alt = newCrdn02010Alt(); - $P.alt.defaultFetchSize = FETCH_XS; - $P.alt.query = { pageNum : 1, fetchSize : $P.alt.defaultFetchSize }; - $P.alt.beforeCurrent = null; - - $P.shift = new newCrdn02010Shift(); - - /************************************************************************** - * Dataset.on - **************************************************************************/ - $P.ctrl.dataset.onDatasetChange = (obj, option) => { + ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate("photoInspection"); - var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); - $P.renderInspectionDataList(obj["Total"], $P.ctrl.dataset.length, trs, "photoInspection", option); + var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderInspectionDataList(obj["Total"], ctrl.dataset.length, trs, "photoInspection", option); - Apply.fromDataset.paging($P.ctrl.dataset, obj, + Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("photoInspectionPaging"), $P.findn("photoInspectionPagingInfo") ); }; - $P.ctrl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $P.findn("photoInspectionTbody")); + ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("photoInspectionTbody")); var dataKey = ""; var curDataVhrno = ""; var nextDataKey = ""; var nextDataVhrno = ""; - if(!$P.ctrl.dataset.empty){ - dataKey = $P.ctrl.dataset.getKey(dataItem); - curDataVhrno = $P.ctrl.dataset.getData(dataKey)["VHRNO"]; - var nextData = $P.ctrl.getNext(dataKey); + 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 : ""; nextDataVhrno = nextData != null ? nextData.VHRNO : ""; } $P.showPhoto(dataKey,nextDataKey,curDataVhrno,nextDataVhrno); } + + //동일차량검사 datasetControl 인스턴스 + var alt = $P.alt = newCrdn02010Alt(); + alt.defaultFetchSize = FETCH_XS; + alt.query = { pageNum : 1, fetchSize : alt.defaultFetchSize }; + alt.beforeCurrent = null; - $P.alt.dataset.onDatasetChange = (obj, option) => { + alt.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate("sameVehicleInspectionMain"); - var trs = Apply.fromDataset.getTbody($P.alt.dataset, t.found, t.notFound, t.replacer); - $P.renderInspectionDataList(obj["Total"], $P.alt.dataset.length, trs, "sameVehicleInspectionMain", option); + var trs = Apply.fromDataset.getTbody(alt.dataset, t.found, t.notFound, t.replacer); + $P.renderInspectionDataList(obj["Total"], alt.dataset.length, trs, "sameVehicleInspectionMain", option); - Apply.fromDataset.paging($P.alt.dataset, obj, + Apply.fromDataset.paging(alt.dataset, obj, $P.findn("sameVehicleInspectionMainPaging"), $P.findn("sameVehicleInspectionMainPagingInfo") ); }; - $P.alt.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.alt.dataset, dataItem, $P.findn("sameVehicleInspectionMainTbody")); + alt.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow(alt.dataset, dataItem, $P.findn("sameVehicleInspectionMainTbody")); if(dataItem){ $P.searchDetailInspectionDataList(dataItem.data["CRDN_ID_LIST"]); } else { $P.$findn("sameVehicleInspectionSubTbody").html(""); } } - - $P.shift.dataset.onDatasetChange = (obj, option) => { + + var shift = $P.shift = new newCrdn02010Shift(); + + shift.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate("sameVehicleInspectionSub"); - var trs = Apply.fromDataset.getTbody($P.shift.dataset, t.found, t.notFound, t.replacer); - $P.renderInspectionDataList(obj["Total"], $P.shift.dataset.length, trs, "sameVehicleInspectionSub", option); + var trs = Apply.fromDataset.getTbody(shift.dataset, t.found, t.notFound, t.replacer); + $P.renderInspectionDataList(obj["Total"], shift.dataset.length, trs, "sameVehicleInspectionSub", option); }; - $P.shift.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.shift.dataset, dataItem, $P.findn("sameVehicleInspectionSubTbody")); + shift.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow(shift.dataset, dataItem, $P.findn("sameVehicleInspectionSubTbody")); }; + /************************************************************************** - * pageObject.function - **************************************************************************/ + * pageObject.function + **************************************************************************/ $P.fnReset = () => { var searchForm = $P.$findn("frmSearch"); searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false); @@ -497,15 +494,15 @@ $(document).ready(function(){ $P.$findn("schRgtrNm").prop("readonly", true); // 사용자 이름 $P.$findn("schCrdnYmdFrom").datepicker('setDate', DateSupport.getAddDay(-7)); $P.$findn("schCrdnYmdTo").datepicker('setDate', TODAY()); - $P.ctrl.dataset.setData([]); - $P.alt.dataset.setData([]); + ctrl.dataset.setData([]); + alt.dataset.setData([]); }; $P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnReset(); - $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do"); - $P.alt.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do"); - $P.shift.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do"); + ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do"); + alt.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do"); + shift.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn02/020/list.do"); var clsForTask = taskSeCd.toLowerCase(); //업무별 조회조건 @@ -524,9 +521,9 @@ $(document).ready(function(){ var data = formFields.get(); if($P.currentDisplay == "photoInspection"){ - data.fetchSize = $P.ctrl.defaultFetchSize; + data.fetchSize = ctrl.defaultFetchSize; } else if($P.currentDisplay == "sameVehicleInspection"){ - data.fetchSize = $P.alt.defaultFetchSize; + data.fetchSize = alt.defaultFetchSize; } return data; @@ -535,34 +532,34 @@ $(document).ready(function(){ $P.searchInspectionList = () => { switch ($P.currentDisplay) { case "photoInspection": - $P.ctrl.query = $P.getParams(); - $P.ctrl.query.inspectionDataType = "photo"; - $P.ctrl.load(1); + ctrl.query = $P.getParams(); + ctrl.query.inspectionDataType = "photo"; + ctrl.load(1); break; case "sameVehicleInspection": - $P.alt.query = $P.getParams(); - $P.alt.query.inspectionDataType = "sameVehicleMain"; - $P.alt.load(1); + alt.query = $P.getParams(); + alt.query.inspectionDataType = "sameVehicleMain"; + alt.load(1); break; default: break; } } $P.searchDetailInspectionDataList = (dataKey) => { - $P.shift.query = {}; - $P.shift.query.inspectionDataType = "sameVehicleSub"; - $P.shift.query.crdnIds = dataKey; - $P.shift.query.taskSeCd = $P.alt.query.taskSeCd; - $P.shift.load(0); + shift.query = {}; + shift.query.inspectionDataType = "sameVehicleSub"; + shift.query.crdnIds = dataKey; + shift.query.taskSeCd = alt.query.taskSeCd; + shift.load(0); } $P.scrollInspectionDataList = () => { switch ($P.currentDisplay) { case "photoInspection": - $P.ctrl.load($P.ctrl.query.pageNum + 1); + ctrl.load(ctrl.query.pageNum + 1); break; case "sameVehicleInspection": - $P.alt.load($P.alt.query.pageNum + 1); + alt.load(alt.query.pageNum + 1); break; default: break; } @@ -571,35 +568,35 @@ $(document).ready(function(){ $P.refreshInspectionList = () => { switch ($P.currentDisplay) { case "photoInspection": - $P.ctrl.beforeCurrent = { - key : $P.ctrl.dataset.getCurrent()["CRDN_ID"], - index : $P.ctrl.dataset.getCurrent()["ROW_NUM"] - 1 + ctrl.beforeCurrent = { + key : ctrl.dataset.getCurrent()["CRDN_ID"], + index : ctrl.dataset.getCurrent()["ROW_NUM"] - 1 }; - Apply.fromDatasetControl.reload($P.ctrl).then((resp)=>{ - Apply.toDataset.set($P.ctrl.dataset, resp); - $P.ctrl.dataset.onDatasetChange(resp, {reloaded : true}); + Apply.fromDatasetControl.reload(ctrl).then((resp)=>{ + Apply.toDataset.set(ctrl.dataset, resp); + ctrl.dataset.onDatasetChange(resp, {reloaded : true}); - if($P.ctrl.beforeCurrent != null){ - let beforeCurrentKey = $P.ctrl.beforeCurrent.key; - let beforeCurrentIndex = $P.ctrl.beforeCurrent.index; - $P.ctrl.beforeCurrent = null; + if(ctrl.beforeCurrent != null){ + let beforeCurrentKey = ctrl.beforeCurrent.key; + let beforeCurrentIndex = ctrl.beforeCurrent.index; + ctrl.beforeCurrent = null; - if(!$P.ctrl.dataset.empty){ - var info = $P.ctrl.dataset.getData(beforeCurrentKey); + if(!ctrl.dataset.empty){ + var info = ctrl.dataset.getData(beforeCurrentKey); if(info != null){ - $P.ctrl.dataset.setCurrent(beforeCurrentKey, true); + ctrl.dataset.setCurrent(beforeCurrentKey, true); } else { - if(beforeCurrentIndex > ($P.ctrl.dataset.length - 1)){ - info = $P.ctrl.dataset.getDataset()[$P.ctrl.dataset.length - 1]; + if(beforeCurrentIndex > (ctrl.dataset.length - 1)){ + info = ctrl.dataset.getDataset()[ctrl.dataset.length - 1]; } else { - info = $P.ctrl.dataset.getDataset()[beforeCurrentIndex]; + info = ctrl.dataset.getDataset()[beforeCurrentIndex]; } - $P.ctrl.dataset.setCurrent(info["CRDN_ID"], true); + ctrl.dataset.setCurrent(info["CRDN_ID"], true); } } @@ -607,34 +604,34 @@ $(document).ready(function(){ }); break; case "sameVehicleInspection": - $P.alt.beforeCurrent = { - key : $P.alt.dataset.getCurrent()["CRDN_ID_LIST"], - index : $P.alt.dataset.getCurrent()["ROW_NUM"] - 1 + alt.beforeCurrent = { + key : alt.dataset.getCurrent()["CRDN_ID_LIST"], + index : alt.dataset.getCurrent()["ROW_NUM"] - 1 }; - Apply.fromDatasetControl.reload($P.alt).then((resp)=>{ - Apply.toDataset.set($P.alt.dataset, resp); - $P.alt.dataset.onDatasetChange(resp, {reloaded : true}); + Apply.fromDatasetControl.reload(alt).then((resp)=>{ + Apply.toDataset.set(alt.dataset, resp); + alt.dataset.onDatasetChange(resp, {reloaded : true}); - if($P.alt.beforeCurrent != null){ - var beforeCurrentKey = $P.alt.beforeCurrent.key; - var beforeCurrentIndex = $P.alt.beforeCurrent.index; - $P.alt.beforeCurrent = null; + if(alt.beforeCurrent != null){ + var beforeCurrentKey = alt.beforeCurrent.key; + var beforeCurrentIndex = alt.beforeCurrent.index; + alt.beforeCurrent = null; - if(!$P.alt.dataset.empty){ - var info = $P.alt.dataset.getData(beforeCurrentKey); + if(!alt.dataset.empty){ + var info = alt.dataset.getData(beforeCurrentKey); if(info != null){ - $P.alt.dataset.setCurrent(beforeCurrentKey,true); + alt.dataset.setCurrent(beforeCurrentKey,true); } else { - if(beforeCurrentIndex > ($P.alt.dataset.length - 1)){ - info = $P.alt.dataset.getDataset()[$P.alt.dataset.length - 1]; + if(beforeCurrentIndex > (alt.dataset.length - 1)){ + info = alt.dataset.getDataset()[alt.dataset.length - 1]; } else { - info = $P.alt.dataset.getDataset()[beforeCurrentIndex]; + info = alt.dataset.getDataset()[beforeCurrentIndex]; } - $P.alt.dataset.setCurrent(info["CRDN_ID_LIST"],true); + alt.dataset.setCurrent(info["CRDN_ID_LIST"],true); } } @@ -649,7 +646,7 @@ $(document).ready(function(){ $P.fnExcelDown = async() => { if($P.currentDisplay == "photoInspection"){ - if($P.ctrl.dataset.empty){ + if(ctrl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } @@ -658,13 +655,13 @@ $(document).ready(function(){ $P.$findn("photoInspection_Table_0").find("thead th").not(".dummy-th").not(":eq(0)"), $($P.findn("photoInspectionRow").content).find("td").not(".dummy-td").not(":eq(0)") ); - $P.ctrl.query.cellDefs = cellDefs; + ctrl.query.cellDefs = cellDefs; - $P.ctrl.download(); + ctrl.download(); } else { - if($P.alt.dataset.empty){ + if(alt.dataset.empty){ alert("조회된 자료가 없습니다."); return; } @@ -678,9 +675,9 @@ $(document).ready(function(){ $P.$findn("sameVehicleInspectionMain_Table_0").find("thead th").not(".dummy-th"), $($P.findn("sameVehicleInspectionMainRow").content).find("td").not(".dummy-td") ); - $P.alt.query.cellDefs = cellDefs; + alt.query.cellDefs = cellDefs; - $P.alt.download(); + alt.download(); } else if(excelTarget == "sub"){ var cellDefs = AppSupport.getCellDefs( @@ -688,9 +685,9 @@ $(document).ready(function(){ $($P.findn("sameVehicleInspectionSubRow").content).find("td").not(".dummy-td"), FimsSupport.getCellDefsForPrivacyCell ); - $P.shift.query.cellDefs = cellDefs; + shift.query.cellDefs = cellDefs; - $P.shift.download(); + shift.download(); } } @@ -740,7 +737,7 @@ $(document).ready(function(){ switch (renderDataType) { case "photoInspection": - var initScroll = ($P.ctrl.query.pageNum < 2); + var initScroll = (ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -749,7 +746,7 @@ $(document).ready(function(){ break; case "sameVehicleInspectionMain": - var initScroll = ($P.alt.query.pageNum < 2); + var initScroll = (alt.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -775,11 +772,11 @@ $(document).ready(function(){ if(dataKey != ""){ $P.$findn("photoInspectionTbody").setCurrentRow(dataKey); - Apply.toDataset.current($P.ctrl.dataset, dataKey); + Apply.toDataset.current(ctrl.dataset, dataKey); } - var curDataVhrno = $P.ctrl.dataset.getData(dataKey)["VHRNO"]; - var nextData = $P.ctrl.getNext(dataKey); + var curDataVhrno = ctrl.dataset.getData(dataKey)["VHRNO"]; + var nextData = ctrl.getNext(dataKey); var nextDataKey = nextData != null ? nextData.CRDN_ID : ""; var nextDataVhrno = nextData != null ? nextData.VHRNO : ""; $P.showPhoto(dataKey,nextDataKey,curDataVhrno,nextDataVhrno); @@ -790,7 +787,7 @@ $(document).ready(function(){ } $P.$findn("sameVehicleInspectionMainTbody").setCurrentRow(dataKey); - Apply.toDataset.current($P.alt.dataset, dataKey); + Apply.toDataset.current(alt.dataset, dataKey); $P.searchDetailInspectionDataList(dataKey); @@ -801,7 +798,7 @@ $(document).ready(function(){ } $P.$findn("sameVehicleInspectionSubTbody").setCurrentRow(dataKey); - Apply.toDataset.current($P.shift.dataset, dataKey); + Apply.toDataset.current(shift.dataset, dataKey); break; } } @@ -885,9 +882,9 @@ $(document).ready(function(){ var info = ""; if ($P.currentDisplay == "photoInspection") { - info = $P.ctrl.dataset.getCurrent("item"); + info = ctrl.dataset.getCurrent("item"); } else if ($P.currentDisplay == "sameVehicleInspection") { - info = $P.shift.dataset.getCurrent("item"); + info = shift.dataset.getCurrent("item"); } else { return; } @@ -945,7 +942,7 @@ $(document).ready(function(){ return; } - var info = $P.ctrl.dataset.getCurrent("item"); + var info = ctrl.dataset.getCurrent("item"); if (info == undefined || info == "") { return; @@ -1036,8 +1033,8 @@ $(document).ready(function(){ } /************************************************************************** - * element.on - **************************************************************************/ + * element.on + **************************************************************************/ $P.$findn("btnReset").on('click', () => $P.fnReset()); //초기화버튼 $P.$findn("btnPhotoInspection").on('click', () => { @@ -1074,8 +1071,8 @@ $(document).ready(function(){ Componentization.fnMakeScrollableTable($P.findn("sameVehicleInspectionMain-responsive"), $P.scrollInspectionDataList); /************************************************************************** - * 초기화 - **************************************************************************/ + * 초기화 + **************************************************************************/ AppSupport.initDatepicker($P.findn("frmSearch")); //달력 초기화 AppSupport.initDetailSearchButton($P.findn("frmSearch")); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp index b103fc70..57f7482b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp @@ -45,12 +45,13 @@ pageObject["${pageName}"] = newDoctxFinder("${pageName}"); $(document).ready(function(){ var $P = pageObject["${pageName}"]; + /************************************************************************** - * DatasetControl, Dataset, FormFields - **************************************************************************/ + * DatasetControl, DatasetSupport, FormFields + **************************************************************************/ $P.formFields = new FimsFormFields($P.selectorn("frmEdit")); - $P.ctrl = new DatasetControl({ + var ctrl = $P.ctrl = new DatasetControl({ dataGetter : obj => obj.crdnInfo, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -59,19 +60,13 @@ $(document).ready(function(){ formats: {} }); - - - /************************************************************************** - * Dataset.on - **************************************************************************/ - $P.ctrl.dataset.onCurrentChange = (dataItem) => { - $P.formFields.set($P.ctrl,dataItem); + ctrl.dataset.onCurrentChange = (dataItem) => { + $P.formFields.set(ctrl,dataItem); } - /************************************************************************** - * pageObject.function - **************************************************************************/ + * pageObject.function + **************************************************************************/ $P.fnSave = async() => { var alertMessage = ""; @@ -110,7 +105,7 @@ $(document).ready(function(){ } ajax.post({ - url : $P.ctrl.urls.update, + url : ctrl.urls.update, data : info, success : (resp) => { $P.saveCallback(resp); @@ -138,7 +133,7 @@ $(document).ready(function(){ info.chgAmtSe = "0"; ajax.post({ - url : $P.ctrl.urls.update, + url : ctrl.urls.update, data : info, success : (resp) => { $P.saveCallback(resp); @@ -163,16 +158,18 @@ $(document).ready(function(){ } } }; + /************************************************************************** - * element.on - **************************************************************************/ + * element.on + **************************************************************************/ $P.$findn("btnSave").on("click", () => $P.fnSave() ); $P.$findn("btnRestore").on("click", () => $P.fnRestore() ); + /************************************************************************** - * 초기화 - **************************************************************************/ + * 초기화 + **************************************************************************/ var crdnInfo = ${crdnInfo}; - $P.ctrl.dataset.setData([crdnInfo]); + ctrl.dataset.setData([crdnInfo]); }); 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 5b177415..8a134971 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 @@ -134,9 +134,9 @@ $(document).ready(function(){ var $P = pageObject["${pageName}"]; /************************************************************************** - * DatasetControl - **************************************************************************/ - $P.ctrl = new DatasetControl({ + * DatasetControl, DatasetSupport, FormFields + **************************************************************************/ + var ctrl= $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -150,29 +150,26 @@ $(document).ready(function(){ BLNC : numberFormat } }); - $P.ctrl.defaultFetchSize = FETCH_XS; - $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; - $P.ctrl.beforeCurrent = null; + ctrl.defaultFetchSize = FETCH_XS; + ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; + ctrl.beforeCurrent = null; - /************************************************************************** - * Dataset.on - **************************************************************************/ - $P.ctrl.dataset.onDatasetChange = (obj, option) => { + ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderCrdnList(obj["Total"], ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo")); + Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo")); }; - $P.ctrl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $P.findn("crdnTbody")); + ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("crdnTbody")); }; - + /************************************************************************** - * pageObject.function - **************************************************************************/ + * pageObject.function + **************************************************************************/ $P.fnReset = () => { var searchForm = $P.$findn("frmSearch"); searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false); @@ -184,57 +181,57 @@ $(document).ready(function(){ $P.$findn("byOutput").val("동적 검색"); $P.$findn("schCrdnYmdFrom").datepicker('setDate', DateSupport.getAddDay(-5475)); $P.$findn("schCrdnYmdTo").datepicker('setDate', TODAY()); - $P.ctrl.dataset.setData([]); + ctrl.dataset.setData([]); } $P.getParams = () => { var formFields = new FimsFormFields($P.selectorn("frmSearch")); var data = formFields.get(); data.taskSeCd = "DPV"; - data.fetchSize = $P.ctrl.defaultFetchSize; + data.fetchSize = ctrl.defaultFetchSize; return data; } $P.searchCrdnList = () => { - $P.ctrl.query = $P.getParams(); - $P.ctrl.load(1); + ctrl.query = $P.getParams(); + ctrl.load(1); } $P.scrollCrdnList = () => { - $P.ctrl.load($P.ctrl.query.pageNum + 1); + ctrl.load(ctrl.query.pageNum + 1); } $P.refreshCrdnList = () => { - $P.ctrl.beforeCurrent = { - key : $P.ctrl.dataset.getCurrent()["CRDN_ID"], - index : $P.ctrl.dataset.getCurrent()["ROW_NUM"] - 1 + ctrl.beforeCurrent = { + key : ctrl.dataset.getCurrent()["CRDN_ID"], + index : ctrl.dataset.getCurrent()["ROW_NUM"] - 1 }; - Apply.fromDatasetControl.reload($P.ctrl).then((resp)=>{ - Apply.toDataset.set($P.ctrl.dataset, resp); - $P.ctrl.dataset.onDatasetChange(resp, {reloaded : true}); + Apply.fromDatasetControl.reload(ctrl).then((resp)=>{ + Apply.toDataset.set(ctrl.dataset, resp); + ctrl.dataset.onDatasetChange(resp, {reloaded : true}); - if($P.ctrl.beforeCurrent != null){ - let beforeCurrentKey = $P.ctrl.beforeCurrent.key; - let beforeCurrentIndex = $P.ctrl.beforeCurrent.index; - $P.ctrl.beforeCurrent = null; + if(ctrl.beforeCurrent != null){ + let beforeCurrentKey = ctrl.beforeCurrent.key; + let beforeCurrentIndex = ctrl.beforeCurrent.index; + ctrl.beforeCurrent = null; - if(!$P.ctrl.dataset.empty){ - var info = $P.ctrl.dataset.getData(beforeCurrentKey); + if(!ctrl.dataset.empty){ + var info = ctrl.dataset.getData(beforeCurrentKey); if(info != null){ - $P.ctrl.dataset.setCurrent(beforeCurrentKey,true); + ctrl.dataset.setCurrent(beforeCurrentKey,true); } else { - if(beforeCurrentIndex > ($P.ctrl.dataset.length - 1)){ - info = $P.ctrl.dataset.getDataset()[$P.ctrl.dataset.length - 1]; + if(beforeCurrentIndex > (ctrl.dataset.length - 1)){ + info = ctrl.dataset.getDataset()[ctrl.dataset.length - 1]; } else { - info = $P.ctrl.dataset.getDataset()[beforeCurrentIndex]; + info = ctrl.dataset.getDataset()[beforeCurrentIndex]; } - $P.ctrl.dataset.setCurrent(info["CRDN_ID"],true); + ctrl.dataset.setCurrent(info["CRDN_ID"],true); } } } @@ -244,16 +241,16 @@ $(document).ready(function(){ $P.fnExcelDown = () => { - if($P.ctrl.dataset.empty){ + if(ctrl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } var cellDefs = AppSupport.getCellDefs($P.$findn("crdnTheadTr").find("th").not(".dummy-th").not(":eq(0)"), $($P.findn("crdnRow").content).find("td").not(".dummy-td").not(":eq(0)")); - $P.ctrl.query.cellDefs = cellDefs; + ctrl.query.cellDefs = cellDefs; - $P.ctrl.download(); + ctrl.download(); } $P.getGridTemplate = () => { @@ -274,7 +271,7 @@ $(document).ready(function(){ $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.ctrl.query.pageNum < 2); + var initScroll = (ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -291,7 +288,7 @@ $(document).ready(function(){ } $P.$findn("crdnTbody").setCurrentRow(dataKey); - Apply.toDataset.current($P.ctrl.dataset, dataKey); + Apply.toDataset.current(ctrl.dataset, dataKey); } @@ -302,7 +299,7 @@ $(document).ready(function(){ } ajax.get({ - url : $P.ctrl.urls.getInfo, + url : ctrl.urls.getInfo, data : params, success : (resp) => { @@ -324,7 +321,7 @@ $(document).ready(function(){ } $P.save = () => { - if(!$P.ctrl.dataset.getCurrent()) { + if(!ctrl.dataset.getCurrent()) { dialog.alert({ content : "선택된 자료가 없습니다.", init : function(){ @@ -340,9 +337,9 @@ $(document).ready(function(){ AppSupport.focusOK(); }, onOK : () => { - var info = { 'crdnId' : $P.ctrl.dataset.getCurrent()["CRDN_ID"] }; + var info = { 'crdnId' : ctrl.dataset.getCurrent()["CRDN_ID"] }; ajax.post({ - url : $P.ctrl.urls.update, + url : ctrl.urls.update, data : info, success : (resp) => { $P.saveCallback(resp); @@ -364,8 +361,8 @@ $(document).ready(function(){ } /************************************************************************** - * element.on - **************************************************************************/ + * element.on + **************************************************************************/ $P.$findn("btnReset").on('click', () => $P.fnReset()); $P.$findn("btnSearch").on('click', () => $P.searchCrdnList()); // 동적검색에서 엔터(Enter) 키를 누르면 검색한다. @@ -378,8 +375,8 @@ $(document).ready(function(){ $P.$findn("btnUpdateToConfirmData").on('click', () => $P.save()); /************************************************************************** - * 초기화 - **************************************************************************/ + * 초기화 + **************************************************************************/ //달력 초기화 AppSupport.initDatepicker($P.findn("frmSearch")); 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 8620eb7c..be9e02cb 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 @@ -119,9 +119,9 @@ $(document).ready(function(){ var $P = pageObject["${pageName}"]; /************************************************************************** - * DatasetControl - **************************************************************************/ - $P.ctrl = new DatasetControl({ + * DatasetControl, DatasetSupport, FormFields + **************************************************************************/ + var ctrl = $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -131,42 +131,40 @@ $(document).ready(function(){ CRDN_YMD_TM : datetimeFormat } }); - $P.ctrl.defaultFetchSize = FETCH_XS; - $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; - $P.ctrl.beforeCurrent = null; + + ctrl.defaultFetchSize = FETCH_XS; + ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; + ctrl.beforeCurrent = null; - $P.ctrl.urls.newInfoByFile = ""; - $P.ctrl.urls.newInfoByHand = ""; + ctrl.urls.newInfoByFile = ""; + ctrl.urls.newInfoByHand = ""; - /************************************************************************** - * Dataset.on - **************************************************************************/ - $P.ctrl.dataset.onDatasetChange = (obj, option) => { + ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderCrdnList(obj["Total"], ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo")); + Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo")); }; - $P.ctrl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $P.findn("crdnTbody")); + ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("crdnTbody")); } - + /************************************************************************** - * pageObject.function - **************************************************************************/ + * pageObject.function + **************************************************************************/ $P.fnReset = () => { $P.$findn("regDt").datepicker('setDate', TODAY()); - $P.ctrl.dataset.setData([]); + ctrl.dataset.setData([]); } $P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnReset(); - $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn05/010/list.do"); - $P.ctrl.urls.newInfoByFile = wctx.url("/"+taskSeCd+"/crdn/crdn05/020/info.do"); - $P.ctrl.urls.newInfoByHand = wctx.url("/"+taskSeCd+"/crdn/crdn05/030/info.do"); + ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn05/010/list.do"); + ctrl.urls.newInfoByFile = wctx.url("/"+taskSeCd+"/crdn/crdn05/020/info.do"); + ctrl.urls.newInfoByHand = wctx.url("/"+taskSeCd+"/crdn/crdn05/030/info.do"); switch(taskSeCd){ case "PVS" : @@ -186,21 +184,21 @@ $(document).ready(function(){ $P.getParams = () => { var formFields = new FimsFormFields($P.selectorn("frmSearch")); var data = formFields.get(); - data.fetchSize = $P.ctrl.defaultFetchSize; + data.fetchSize = ctrl.defaultFetchSize; return data; } $P.searchCrdnList = () => { - $P.ctrl.query = $P.getParams(); - $P.ctrl.load(1); + ctrl.query = $P.getParams(); + ctrl.load(1); } $P.scrollCrdnList = () => { - $P.ctrl.load($P.ctrl.query.pageNum + 1); + ctrl.load(ctrl.query.pageNum + 1); } $P.refreshCrdnList = () => { - $P.ctrl.reload({all : true}); + ctrl.reload({all : true}); } @@ -221,7 +219,7 @@ $(document).ready(function(){ $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.ctrl.query.pageNum < 2); + var initScroll = (ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -240,13 +238,13 @@ $(document).ready(function(){ $P.$findn("crdnTbody").setCurrentRow(dataKey); - Apply.toDataset.current($P.ctrl.dataset, dataKey); + Apply.toDataset.current(ctrl.dataset, dataKey); } $P.newInfo = (type) => { var url = ""; - if(type == "file") url = $P.ctrl.urls.newInfoByFile; - if(type == "hand") url = $P.ctrl.urls.newInfoByHand; + if(type == "file") url = ctrl.urls.newInfoByFile; + if(type == "hand") url = ctrl.urls.newInfoByHand; let dialogName = ""; if(type == "file") dialogName = "fileDialog"; @@ -277,8 +275,8 @@ $(document).ready(function(){ }; /************************************************************************** - * element.on - **************************************************************************/ + * element.on + **************************************************************************/ $P.$findn("btnReset").on('click', () => $P.fnReset()); $P.$findn("btnSearch").on("click", () => $P.searchCrdnList()); $P.$findn("btnInsertByFile").on('click', () => { $P.newInfo("file"); }); @@ -288,8 +286,8 @@ $(document).ready(function(){ Componentization.fnMakeScrollableTable($P.findn("table-responsive"), $P.scrollCrdnList); /************************************************************************** - * 초기화 - **************************************************************************/ + * 초기화 + **************************************************************************/ AppSupport.initDatepicker($P.findn("frmSearch")); //달력 초기화 var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); 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 e2cc1acd..9ebf60e7 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 @@ -173,9 +173,9 @@ $(document).ready(function(){ $P.tempGroup = {}; /************************************************************************** - * DatasetControl - **************************************************************************/ - $P.ctrl = new DatasetControl({ + * DatasetControl, DatasetSupport, FormFields + **************************************************************************/ + var ctrl = $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], keymapper : info => info ? info.FILE_NAME : "", urls : { }, @@ -187,19 +187,16 @@ $(document).ready(function(){ } }); - /************************************************************************** - * Dataset.on - **************************************************************************/ - $P.ctrl.dataset.onDatasetChange = (obj, option) => { + ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); - $P.renderParsedInfoList(obj["Total"], $P.ctrl.dataset.length, trs); + var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderParsedInfoList(obj["Total"], ctrl.dataset.length, trs); - Apply.fromDataset.paging($P.ctrl.dataset, obj, $P.findn("parsedInfoPaging"), $P.findn("parsedInfoPagingInfo")); + Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("parsedInfoPaging"), $P.findn("parsedInfoPagingInfo")); }; - $P.ctrl.dataset.onCurrentChange = (dataItem) => { + ctrl.dataset.onCurrentChange = (dataItem) => { $P.$findn("imageArea").html(""); if(dataItem && dataItem.data){ @@ -224,10 +221,10 @@ $(document).ready(function(){ } }; - + /************************************************************************** - * pageObject.function - **************************************************************************/ + * pageObject.function + **************************************************************************/ //ftp체크 $P.checkFTP = () => { @@ -254,8 +251,8 @@ $(document).ready(function(){ } - //로컬파일업로드 - $P.uploadLocalFile = () => { + //로컬파일업로드 + $P.uploadLocalFile = () => { if($P.$findn("uploadFiles").val() == ""){ dialog.alert({ @@ -292,12 +289,12 @@ $(document).ready(function(){ } }); - } + } //서버에 등록된 파일 조회 - $P.searchFileList = () => { + $P.searchFileList = () => { - $P.ctrl.dataset.setData([]); + ctrl.dataset.setData([]); ajax.post({ url : wctx.url("/${taskSeCd}/crdn/crdn05/020/list.do"), @@ -305,16 +302,16 @@ $(document).ready(function(){ taskSeCd : $P.$findn("taskSeCd").val() }, success : (resp) => { - $P.ctrl.dataset.setData(resp); + ctrl.dataset.setData(resp); } }); - } + } - $P.getGridTemplate = () => { - 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") + "');"); + $P.getGridTemplate = () => { + 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") + "');"); return { found : found, @@ -322,10 +319,11 @@ $(document).ready(function(){ replacer : replacer }; } - //테이블 렌더링 - $P.renderParsedInfoList = (total, listLength, trs) => { + + //테이블 렌더링 + $P.renderParsedInfoList = (total, listLength, trs) => { - $P.$findn("table-responsive").find("tbody").html(trs); + $P.$findn("table-responsive").find("tbody").html(trs); if(listLength != 0){ FimsSupport.fnDownsizeCheck($P.$findn("table-responsive").find("table")[0]); @@ -334,9 +332,9 @@ $(document).ready(function(){ } //사진 표시 - $P.renderImage = (src) => { + $P.renderImage = (src) => { - if(Array.isArray(src)){ + if(Array.isArray(src)){ var div = document.createElement("div"); div.style["margin-top"] = "20px"; div.style["margin-bottom"] = "20px"; @@ -354,22 +352,22 @@ $(document).ready(function(){ div.appendChild(span); } $P.$findn("imageArea").append(div); - } else { + } else { var img = document.createElement("img"); img.style["object-fit"] = "contain"; img.src = src; $P.$findn("imageArea").append(img); - } + } - } + } $P.clickParsedInfoList = (dataKey) => { if(dataKey == ""){ return; } - $P.ctrl.dataset.setCurrent(dataKey); + ctrl.dataset.setCurrent(dataKey); }; $P.createCrdn = () => { @@ -425,7 +423,7 @@ $(document).ready(function(){ }; $P.deleteFile = () => { - var current = $P.ctrl.dataset.getCurrent(); + var current = ctrl.dataset.getCurrent(); if(current == null) return; var fileName = current.FILE_NAME; @@ -447,7 +445,7 @@ $(document).ready(function(){ } $P.removeCallback = (removedFileName) => { - $P.ctrl.dataset.remove(removedFileName); + ctrl.dataset.remove(removedFileName); $P.removeTableRow(removedFileName); } @@ -472,14 +470,14 @@ $(document).ready(function(){ } /************************************************************************** - * element.on - **************************************************************************/ + * element.on + **************************************************************************/ $P.$findn("btnSearch").on("click", function(){ $P.checkFTP(); }); $P.$findn("btnFileUpload").on("click", function(){ $P.uploadLocalFile(); }); $P.$findn("btnInsertCrdn").on("click", function(){ - $P.tempGroup = Object.groupBy($P.ctrl.dataset.getDataset(), ({ TEMP_GROUP_ID }) => "temp"+TEMP_GROUP_ID); + $P.tempGroup = Object.groupBy(ctrl.dataset.getDataset(), ({ TEMP_GROUP_ID }) => "temp"+TEMP_GROUP_ID); if($.isEmptyObject($P.tempGroup)){ alert("처리할 자료가 없습니다."); @@ -504,7 +502,7 @@ $(document).ready(function(){ } }); - $P.ctrl.dataset.setData([]); + ctrl.dataset.setData([]); }); \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp index 71deea18..3b55d19a 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp @@ -366,7 +366,7 @@ * Global Variable **************************************************************************/ - pageObject["${pageName}"] = newDoctxFinder("${pageName}"); +pageObject["${pageName}"] = newDoctxFinder("${pageName}"); $(document).ready(function(){ @@ -376,13 +376,13 @@ $(document).ready(function(){ $P.localUploadArr = []; /************************************************************************** - * DatasetControl, Dataset, FormFields - **************************************************************************/ + * DatasetControl, DatasetSupport, FormFields + **************************************************************************/ $P.formFields = new FimsFormFields($P.selectorn("frmEdit")); $P.uploadSet = uploadSupport($P.selectorn("inputUploadSet")); - $P.ctrl = new DatasetControl({ + var ctrl = $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData : true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -393,9 +393,6 @@ $(document).ready(function(){ } }); - /************************************************************************** - * Dataset.on - **************************************************************************/ $P.uploadSet.onDatasetChange = () => { var files = $P.uploadSet.getDataset(); files.forEach(item => $P.localUploadArr.push(item)); @@ -405,8 +402,8 @@ $(document).ready(function(){ $P.uploadSet.onRemove = () => { }; /************************************************************************** - * pageObject.function - **************************************************************************/ + * pageObject.function + **************************************************************************/ $P.fnMakeImgForNewFile = (fileArr) => { var tagsText = ""; @@ -479,7 +476,7 @@ $(document).ready(function(){ } ajax.post({ - url : $P.ctrl.urls.create, + url : ctrl.urls.create, data : formData, contentType : false, processData : false, success : (resp) => { $P.saveCallback(resp); @@ -519,15 +516,15 @@ $(document).ready(function(){ } /************************************************************************** - * 초기화(업무별 입력항목) - **************************************************************************/ + * 초기화(업무별 입력항목) + **************************************************************************/ var clsForTask = $P.$findn("taskSeCd").val().toLowerCase(); //업무별 입력 항목 FimsSupport.renderForTask($P.findn("frmEdit"), clsForTask); /************************************************************************** - * element.on - **************************************************************************/ + * element.on + **************************************************************************/ $P.$findn("btnInst").on('click', () => $P.fnSave()); @@ -704,8 +701,8 @@ $(document).ready(function(){ }); /************************************************************************** - * 초기화 - **************************************************************************/ + * 초기화 + **************************************************************************/ AppSupport.initDatepicker($P.findn("frmEdit")); //달력 초기화 $P.$findn("frmEdit").find(".form-date").each(function(){ @@ -736,7 +733,7 @@ $(document).ready(function(){ //보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - $P.ctrl.dataset.append({}); + ctrl.dataset.append({}); }); \ No newline at end of file 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 11da0afb..8d420ab1 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 @@ -279,8 +279,11 @@
+ + + diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-info.jsp index aa31f692..40c4748a 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-info.jsp @@ -57,128 +57,126 @@ 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 a2641ae7..16a803a1 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 @@ -241,10 +241,10 @@ \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp index 767cc3e7..e5896d57 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp @@ -223,8 +223,8 @@