From 64d42806d60894e383432388d9c05ed9f2b98281 Mon Sep 17 00:00:00 2001 From: jjh Date: Thu, 20 Jul 2023 16:56:48 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A8=EC=86=8D=20=EC=9E=90=EB=A3=8C=20?= =?UTF-8?q?=EA=B2=80=EC=82=AC=20=EB=A9=94=EB=89=B4=EC=97=90=20=EB=B9=84?= =?UTF-8?q?=EB=B6=80=EA=B3=BC=EB=93=B1=EB=A1=9D=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/crdn/crdn06020-main.jsp | 94 ++++++++++++------- .../WEB-INF/jsp/fims/excl/excl01010-main.jsp | 9 +- 2 files changed, 69 insertions(+), 34 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp index 5d3d1df9..949d8c41 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp @@ -138,19 +138,20 @@
-
-
- 비부과 등록 + +<%-- 비부과 등록 --%> @@ -220,14 +221,14 @@ 선택자료
- +
비교자료(선택자료의 다음 자료가 보여집니다.)
- +
@@ -335,7 +336,7 @@ pageObject["${pageName}"] = {}; $(document).ready(function(){ var $P = pageObject["${pageName}"]; - + /************************************************************************** * DatasetControl **************************************************************************/ @@ -370,9 +371,9 @@ $(document).ready(function(){ ); $P.photoInspectionControl.getNext = (key) => { - + var ds = $P.photoInspectionControl.dataset.getDataset(); - + var index = ds.findIndex(item => item.CRDN_ID == key); if(ds.length > index+1){ return ds[index+1]; @@ -385,7 +386,7 @@ $(document).ready(function(){ **************************************************************************/ $P.photoInspectionControl.onDatasetChange = (obj) => { var prefix = obj.infoPrefix; - + $P.renderInspectionDataList(obj[prefix+"Total"], "photoInspection"); var prefix = obj.infoPrefix; @@ -400,7 +401,7 @@ $(document).ready(function(){ $P.sameVehicleControl.main.onDatasetChange = (obj) => { var prefix = obj.infoPrefix; - + $P.renderInspectionDataList(obj[prefix+"Total"], "sameVehicleInspectionMain"); $("#sameVehicleInspectionMainPaging--${pageName}").setPagingInfo({ @@ -415,9 +416,9 @@ $(document).ready(function(){ $P.sameVehicleControl.sub.onDatasetChange = (obj) => { var prefix = obj.infoPrefix; - + $P.renderInspectionDataList(obj[prefix+"Total"], "sameVehicleInspectionSub"); - + }; /************************************************************************** @@ -454,7 +455,7 @@ $(document).ready(function(){ this.innerHTML = ""; } }); - + //업무별 버튼 var buttonContent = document.getElementById("taskButton--${pageName}").content var buttons = $(buttonContent).find("."+clsForTask); @@ -493,9 +494,9 @@ $(document).ready(function(){ $P.scrollEnd = (obj) => { if(obj.dataset.scrollStatus){ - return; + return; } - + var el = $(obj); if(el.scrollTop() == 0){ return; @@ -523,16 +524,16 @@ $(document).ready(function(){ case "photoInspection": $P.photoInspectionControl.setCurrent(dataKey); $("#photoInspectionTbody--${pageName}").setCurrentRow(dataKey); - + var curDataVhrno = $P.photoInspectionControl.getCurrent(dataKey)["VHRNO"]; - + var nextData = $P.photoInspectionControl.getNext(dataKey); var nextDataKey = nextData != null ? nextData.CRDN_ID : ""; var nextDataVhrno = nextData != null ? nextData.VHRNO : ""; - + $("#curDataVhrno--${pageName}").html(curDataVhrno); $("#nextDataVhrno--${pageName}").html(nextDataVhrno); - + ajax.get({ url:"file/list.do", data: { @@ -541,17 +542,17 @@ $(document).ready(function(){ 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); - + $("#curDataFiles--${pageName}").html(""); $("#nextDataFiles--${pageName}").html(""); - - - + + + currentDataFileList.forEach(function(item, index, array){ var output = fnMakeImgTag(item.URL, item.FILE_NM); $("#curDataFiles--${pageName}").append(output); @@ -560,8 +561,8 @@ $(document).ready(function(){ var output = fnMakeImgTag(item.URL, item.FILE_NM); $("#nextDataFiles--${pageName}").append(output); }); - - + + } }); break; @@ -587,12 +588,39 @@ $(document).ready(function(){ } } - $P.openLevyExclPop = () => { + $P.openLevyExclPop = (levyExclSeCd) => { + let info = $P.photoInspectionControl.dataset.getCurrent("item"); + + // info 가 없다면.. return + if (info == undefined || info == "") { + return; + } + let params = { + crdnId : info.data.CRDN_ID + , levyExclSeCd : levyExclSeCd + }; + + ajax.get({ + url : wctx.url("/excl/excl01/020/info.do") + , data : params || {} + , success : resp => { + resp = resp.replace(/infoPrefix/g, this.prefix) + .replace(/prefixName/g, this.prefixName) + dialog.open({ + id : "levyExcldialog" + , title : "부과제외 정보" + , content : resp + , size : "lg" + , init : () => $P.photoInspectionControl.setInfo(info) + , onClose : () => { $P.photoInspectionControl.load(1); } // callback + }); + } + }); }; $P.renderInspectionDataList = (total, renderDataType) => { - + switch (renderDataType) { case "photoInspection": var dataList = $P.photoInspectionControl.dataset; @@ -604,7 +632,7 @@ $(document).ready(function(){ .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','photoInspection');"); var trs = empty ? notFound : dataList.inStrings(found, replacer); $("#photoInspectionTbody--${pageName}").html(trs.join()); - + if(total == dataList.length){ $("#photoInspection-responsive--${pageName}").attr("data-scroll-status", "complete"); } else { @@ -620,7 +648,7 @@ $(document).ready(function(){ .replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID_LIST") + "','sameVehicleInspectionMain');"); var trs = empty ? notFound : dataList.inStrings(found, replacer); $("#sameVehicleInspectionMainTbody--${pageName}").html(trs.join()); - + if(total == dataList.length){ $("#sameVehicleInspectionMain-responsive--${pageName}").attr("data-scroll-status", "complete"); } else { @@ -677,12 +705,12 @@ $(document).ready(function(){ }); $('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼 - $("#btnInstLevyExcl--${pageName}").on("click", () => $P.openLevyExclPop()); + $("#btnInstLevyExcl--${pageName}").on("click", () => $P.openLevyExclPop("1")); //스크롤 이벤트 추가(동일차량검사) $("#photoInspection-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); $("#sameVehicleInspectionMain-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); - + /************************************************************************** * 초기화 **************************************************************************/ diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp index b74033fa..18bd2e5d 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp @@ -493,8 +493,15 @@ // 수정 function fnModify${pageName}() { + let levyExclId = excl01010Control.dataset.getValue("LEVY_EXCL_ID"); + + // 부과 제외 ID 가 없다면.. return + if (levyExclId == undefined || levyExclId == "") { + return; + } + let params = { - levyExclId : excl01010Control.dataset.getValue("LEVY_EXCL_ID") + levyExclId : levyExclId }; ${pageName}Control.getInfo(params);