From e0d601a32b67d9b5cd6b946ca4cebf907ef1c295 Mon Sep 17 00:00:00 2001 From: jjh Date: Wed, 26 Jun 2024 13:28:58 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=20=EA=B2=80=EC=83=89?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=20jsp=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/crdn/CrdnQuery.java | 20 ++ .../xit/fims/cvlc/web/Cvlc03Controller.java | 3 + .../mapper/fims/cvlc/crdnCvlcpt-mapper.xml | 54 ++-- .../WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp | 251 +++++++++--------- .../WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp | 158 ++++++----- .../WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp | 139 +++++----- .../WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp | 136 +++++----- .../WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp | 200 +++++++------- .../WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp | 89 +++---- 9 files changed, 553 insertions(+), 497 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java index e5cbd2ab..d57e6780 100644 --- a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java +++ b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java @@ -36,6 +36,8 @@ public class CrdnQuery extends CmmnQuery { private String aplcnYmd; private String schCvlcptRcptYmdFrom; private String schCvlcptRcptYmdTo; + private String schCvlcptPrcsPrnmntDtFrom; + private String schCvlcptPrcsPrnmntDtTo; private String schRductYmdFrom; private String schRductYmdTo; private String crdnYmd; @@ -198,6 +200,24 @@ public class CrdnQuery extends CmmnQuery { return self(); } + public String getSchCvlcptPrcsPrnmntDtFrom() { + return ifEmpty(schCvlcptPrcsPrnmntDtFrom, () -> null); + } + + public T setSchCvlcptPrcsPrnmntDtFrom(String schCvlcptPrcsPrnmntDtFrom) { + this.schCvlcptPrcsPrnmntDtFrom = schCvlcptPrcsPrnmntDtFrom; + return self(); + } + + public String getSchCvlcptPrcsPrnmntDtTo() { + return ifEmpty(schCvlcptPrcsPrnmntDtTo, () -> null); + } + + public T setSchCvlcptPrcsPrnmntDtTo(String schCvlcptPrcsPrnmntDtTo) { + this.schCvlcptPrcsPrnmntDtTo = schCvlcptPrcsPrnmntDtTo; + return self(); + } + public String getSchRductYmdFrom() { return ifEmpty(schRductYmdFrom, () -> null); } diff --git a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc03Controller.java b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc03Controller.java index 0e82e34a..7dd7d438 100644 --- a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc03Controller.java +++ b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc03Controller.java @@ -26,6 +26,7 @@ import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.cvlc.service.CrdnCvlcptService; import cokr.xit.fims.task.Task; +import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.data.DataObject; /**민원관리 서비스 웹 컨트롤러.
@@ -70,6 +71,8 @@ public class Cvlc03Controller extends ApplicationController { mav.addObject("FIM054List", commonCodes.get("FIM054")); mav.addObject("TaskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054"))); addCodes(commonCodes, mav, "FIM022", "FIM026"); + + mav.addObject("currentUserName", UserInfo.current().getName()); return mav; } diff --git a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml index b8688faf..ea12c5ad 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml @@ -174,14 +174,18 @@ WHERE C.DEL_YN = 'N' AND CC.CVLCPT_PRCS_PIC_NM = #{cvlcptPrcsPicNm} - - - AND SUBSTR(C.REG_DT,1,8) = ]]> #{schDateFrom} - AND SUBSTR(C.REG_DT,1,8) #{schDateTo} + + AND CC.CVLCPT_PRCS_PRNMNT_DT = ]]> #{schCvlcptPrcsPrnmntDtFrom} + AND CC.CVLCPT_PRCS_PRNMNT_DT #{schCvlcptPrcsPrnmntDtTo} + + + + AND SUBSTR(C.REG_DT,1,8) = ]]> #{schRegDateFrom} + AND SUBSTR(C.REG_DT,1,8) #{schRegDateTo} - - AND SUBSTR(C.MDFCN_DT,1,8) = ]]> #{schDateFrom} - AND SUBSTR(C.MDFCN_DT,1,8) #{schDateTo} + + AND SUBSTR(C.MDFCN_DT,1,8) = ]]> #{schRegDateFrom} + AND SUBSTR(C.MDFCN_DT,1,8) #{schRegDateTo} @@ -255,14 +259,18 @@ SELECT C.CRDN_ID AND CC.CVLCPT_PRCS_PIC_NM = #{cvlcptPrcsPicNm} - - - AND SUBSTR(C.REG_DT,1,8) = ]]> #{schDateFrom} - AND SUBSTR(C.REG_DT,1,8) #{schDateTo} + + AND CC.CVLCPT_PRCS_PRNMNT_DT = ]]> #{schCvlcptPrcsPrnmntDtFrom} + AND CC.CVLCPT_PRCS_PRNMNT_DT #{schCvlcptPrcsPrnmntDtTo} + + + + AND SUBSTR(C.REG_DT,1,8) = ]]> #{schRegDateFrom} + AND SUBSTR(C.REG_DT,1,8) #{schRegDateTo} - - AND SUBSTR(C.MDFCN_DT,1,8) = ]]> #{schDateFrom} - AND SUBSTR(C.MDFCN_DT,1,8) #{schDateTo} + + AND SUBSTR(C.MDFCN_DT,1,8) = ]]> #{schRegDateFrom} + AND SUBSTR(C.MDFCN_DT,1,8) #{schRegDateTo} @@ -450,14 +458,18 @@ SELECT C.CRDN_ID AND CC.CVLCPT_RCPT_YMD #{schCvlcptRcptYmdTo} AND CC.CVLCPT_PRCS_CD = #{cvlcptPrcsCd} - - - AND SUBSTR(C.REG_DT,1,8) = ]]> #{schDateFrom} - AND SUBSTR(C.REG_DT,1,8) #{schDateTo} + + AND CC.CVLCPT_PRCS_PRNMNT_DT = ]]> #{schCvlcptPrcsPrnmntDtFrom} + AND CC.CVLCPT_PRCS_PRNMNT_DT #{schCvlcptPrcsPrnmntDtTo} + + + + AND SUBSTR(C.REG_DT,1,8) = ]]> #{schRegDateFrom} + AND SUBSTR(C.REG_DT,1,8) #{schRegDateTo} - - AND SUBSTR(C.MDFCN_DT,1,8) = ]]> #{schDateFrom} - AND SUBSTR(C.MDFCN_DT,1,8) #{schDateTo} + + AND SUBSTR(C.MDFCN_DT,1,8) = ]]> #{schRegDateFrom} + AND SUBSTR(C.MDFCN_DT,1,8) #{schRegDateTo} 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 b056b0b4..ed10ec0d 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 @@ -22,8 +22,8 @@
@@ -99,13 +110,13 @@
-
- @@ -202,7 +213,7 @@
- +
@@ -221,23 +232,23 @@ $(document).ready(function(){ var $P = pageObject["${pageName}"]; $P.holdList = []; - + $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { animation: true, autohide: true, delay: 2000 }); - + /************************************************************************** * DatasetControl **************************************************************************/ $P.crdnControl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, - keymapper : info => info ? info.CRDN_ID : "", - urls : { - load : "", - getInfo : "", - remove : "" + keymapper : info => info ? info.CRDN_ID : "", + urls : { + load : "", + getInfo : "", + remove : "" }, formats : { CRDN_REG_SE_CD : FIM026, @@ -249,12 +260,12 @@ $(document).ready(function(){ $P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.untilPageNum = 0; $P.crdnControl.beforeCurrent = null; - + /************************************************************************** * Dataset.on **************************************************************************/ $P.crdnControl.dataset.onDatasetChange = (obj) => { - + var t = $P.getGridTemplate(); var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs); @@ -266,14 +277,14 @@ $(document).ready(function(){ Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); if(!dataItem){ $("#bottomCrdnPlc--${pageName}").val(""); - + $("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnDelete--${pageName}").hide(); $("#btnDeleteSameRcptYmd--${pageName}").hide(); } else { - + $("#bottomCrdnPlc--${pageName}").val(dataItem.data["CRDN_PLC"]); - + if($P.holdList.includes(dataItem.data["CRDN_ID"])){ $("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnDelete--${pageName}").hide(); @@ -294,18 +305,19 @@ $(document).ready(function(){ $("#btnOpenCvlcptOrgnl--${pageName}").show(); $("#btnDelete--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show(); - + var searchForm = $("#frmSearch--${pageName}"); searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false); searchForm.find("input[type='checkbox']").prop("checked", false); searchForm.find("input[type='text']").val(""); searchForm.find("input[type='hidden']").val(""); searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); }); - + $("#byOutput--${pageName}").val("동적 검색"); + $("#schRgtrNm--${pageName}").prop("readonly", true); // 사용자 이름 $('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', TODAY()); - + $P.crdnControl.dataset.setData([]); } @@ -315,7 +327,7 @@ $(document).ready(function(){ $P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/020/info.do"); $P.crdnControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do"); } - + $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); @@ -323,13 +335,13 @@ $(document).ready(function(){ return data; } - + $P.searchCrdnList = () => { $P.holdList = []; - + $("#btnDelete--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show(); - + $P.crdnControl.query = $P.getParams(); $P.crdnControl.load(1); } @@ -345,98 +357,98 @@ $(document).ready(function(){ key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"], index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 }; - + Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{ Apply.toDataset.set($P.crdnControl.dataset, resp); $P.crdnControl.dataset.onDatasetChange(resp); - + if($P.crdnControl.untilPageNum != 0){ $P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize; $P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum; $P.crdnControl.untilPageNum = 0; } - + if($P.crdnControl.beforeCurrent != null){ var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; $P.crdnControl.beforeCurrent = null; - + if(!$P.crdnControl.dataset.empty){ var info = $P.crdnControl.dataset.getData(beforeCurrentKey); - + if(info != null){ $P.crdnControl.dataset.setCurrent(beforeCurrentKey,true); } else { - + if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){ info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1]; } else { info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex]; } - + $P.crdnControl.dataset.setCurrent(info["CRDN_ID"],true); } } } - + $("label[for='table-responsive--${pageName}']").trigger("refreshEnd"); }); - + } - + $P.fnExcelDown = () => { if($P.crdnControl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } - - var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"), + + var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"), $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); $P.crdnControl.query.cellDefs = cellDefs; - + $P.crdnControl.download(); } - + $P.getGridTemplate = () => { var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML]; var found = document.getElementById("crdnRow--${pageName}").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") + "');"); - + return { found : found, notFound : notFound, replacer : replacer }; } - + $P.renderCrdnList = (total, listLength, trs) => { var noMore = (total == listLength); var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0); - + $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); //보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - + $P.holdList.forEach(function(item){ - $("#crdnTbody--${pageName}").find("tr[data-key='"+item+"']").addClass("bg-dark"); + $("#crdnTbody--${pageName}").find("tr[data-key='"+item+"']").addClass("bg-dark"); }); - + } - + $P.clickCrdnList = (dataKey) => { if(dataKey == ""){ $("#bottomCrdnPlc--${pageName}").val(""); return; } - + $("#crdnTbody--${pageName}").setCurrentRow(dataKey); $("#bottomCrdnPlc--${pageName}").val($P.crdnControl.dataset.getData(dataKey)["CRDN_PLC"]); - + if($P.holdList.includes(dataKey)){ $("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnDelete--${pageName}").hide(); @@ -446,25 +458,25 @@ $(document).ready(function(){ $("#btnDelete--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show(); } - + Apply.toDataset.current($P.crdnControl.dataset, dataKey); } $P.dblclickCrdnList = (dataKey) => { - + if($P.holdList.includes(dataKey)){ return; } - + var dialogId = "cvlcptInitialDataEditDialog--${pageName}"; - + ajax.get({ url : $P.crdnControl.urls.getInfo, - data : { - "crdnId" : dataKey, - "openerPageName" : "${pageName}" + data : { + "crdnId" : dataKey, + "openerPageName" : "${pageName}" }, - success : (resp) => { + success : (resp) => { dialog.open({ id : dialogId, title : "민원접수 초기자료 편집", @@ -473,7 +485,7 @@ $(document).ready(function(){ init : () => { var parentRes = new Object(); var childReq = pageObject.childReq.pop(); - + for(var reqKey in childReq) { if($P.provide[reqKey]){ parentRes[reqKey] = $P.provide[reqKey]; @@ -481,9 +493,9 @@ $(document).ready(function(){ parentRes[reqKey] = function(){}; } } - + pageObject.parentRes.push(parentRes); - + $("#"+dialogId).find("label[class='parentGrid']").attr("for","table-responsive--${pageName}"); } }); @@ -491,7 +503,7 @@ $(document).ready(function(){ }); } - + $P.fnHold = () => { var curKey = $P.crdnControl.dataset.getCurrent()["CRDN_ID"]; if($P.holdList.includes(curKey)){ @@ -499,19 +511,19 @@ $(document).ready(function(){ } $P.holdList.push(curKey); $("#crdnTbody--${pageName}").find("tr[data-key='"+curKey+"']").addClass("bg-dark"); - + $("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnDelete--${pageName}").hide(); $("#btnDeleteSameRcptYmd--${pageName}").hide(); } - + $P.fnRemove = (rcptYmd) => { if(rcptYmd != null){ var ds = $P.crdnControl.dataset.getDataset(); var crdnIds = []; - + var filtered = ds.filter(function(item){ if(item['CVLCPT_RCPT_YMD'] == rcptYmd && !$P.holdList.includes(item['CRDN_ID'])){ return true; @@ -522,18 +534,18 @@ $(document).ready(function(){ for(var i=0; i < filtered.length; i++){ crdnIds.push(filtered[i].CRDN_ID); } - + $P.crdnControl.dataset.select(crdnIds,true); } else { var cur = $P.crdnControl.dataset.getCurrent(); if(cur == null){ return; } - + var curKey = cur["CRDN_ID"]; $P.crdnControl.dataset.select(curKey,true); } - + var selected = $P.crdnControl.dataset.getKeys("selected"); if (selected.length < 1) { return; @@ -551,14 +563,14 @@ $(document).ready(function(){ } }); } - + $P.removeCallback = (resp) => { if (resp.saved){ $P.toast.show(); sleep(1000).then(() => $P.refreshCrdnList()); } }; - + $P.fnRemoveSameRcptYmd = () => { var cur = $P.crdnControl.dataset.getCurrent(); if(cur == null){ @@ -568,28 +580,28 @@ $(document).ready(function(){ var curRcptYmd = cur["CVLCPT_RCPT_YMD"]; dialog.alert({ content : "접수일 : "+dateFormat.format(curRcptYmd)+"
모든 자료를 제거하시겠습니까?", - init : function() { - focusOK(); + init : function() { + focusOK(); }, onOK : () => { $P.fnRemove(curRcptYmd); } }); } - + $P.fnOpenCvlcptOrgnl = () => { var cur = $P.crdnControl.dataset.getCurrent(); if(cur == null){ return; } - + var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); - + var dialogId = "cvlcptOrgnlDialog--${pageName}"; ajax.get({ url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"), data : { crdnId : cur["CRDN_ID"] }, - success : (resp) => { + success : (resp) => { dialog.open({ id : dialogId, title : "민원내역 원본", @@ -598,7 +610,7 @@ $(document).ready(function(){ init : () => { var parentRes = new Object(); var childReq = pageObject.childReq.pop(); - + for(var reqKey in childReq) { if($P.provide[reqKey]){ parentRes[reqKey] = $P.provide[reqKey]; @@ -606,21 +618,21 @@ $(document).ready(function(){ parentRes[reqKey] = function(){}; } } - + pageObject.parentRes.push(parentRes); } }); } }); } - + $P.provide = { "getCountStatus" : function(currentKey){ var ds = $P.crdnControl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); return (index+1) + " of " + ds.length; }, - "getNextKey" : function(currentKey){ + "getNextKey" : function(currentKey){ var ds = $P.crdnControl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(ds.length > index+1){ @@ -633,7 +645,7 @@ $(document).ready(function(){ return ""; } }, - "getPrevKey" : function(currentKey){ + "getPrevKey" : function(currentKey){ var ds = $P.crdnControl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(index != 0 && ds.length > 1){ @@ -646,16 +658,16 @@ $(document).ready(function(){ return ""; } }, - "selectRow" : function(currentKey){ + "selectRow" : function(currentKey){ $P.clickCrdnList(currentKey); }, - "holdRow" : function(currentKey){ + "holdRow" : function(currentKey){ $P.fnHold(currentKey); }, "refreshList" : function(){ $P.refreshCrdnList(); }, - "hasData" : function(key){ + "hasData" : function(key){ if($P.crdnControl.dataset.getData(key) == null){ return false; } else { @@ -663,8 +675,7 @@ $(document).ready(function(){ } }, }; - - + /************************************************************************** * element.on **************************************************************************/ @@ -673,30 +684,30 @@ $(document).ready(function(){ // 동적검색에서 엔터(Enter) 키를 누르면 검색한다. $("#term--${pageName}").onEnterPress($P.searchCrdnList); $('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown()); - + $("#btnHold--${pageName}").on("click", () => $P.fnHold()); $("#btnDelete--${pageName}").on("click", () => $P.fnRemove()); $("#btnDeleteSameRcptYmd--${pageName}").on("click", () => $P.fnRemoveSameRcptYmd()); $("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl()); - + fnMakeResizableTable($("#table-responsive--${pageName}")[0]); fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList); - + /************************************************************************** * 초기화 **************************************************************************/ //달력 초기화 initDatepicker("frmSearch--${pageName}"); initDetailSearchButton("frmSearch--${pageName}"); - + var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $P.fnResetAndChangeBiz(defaultBizValue); //보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - + $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $(this).prop("disabled", "true"); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp index 4fd6be52..63212fdf 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp @@ -25,8 +25,8 @@
@@ -108,7 +120,7 @@
-
@@ -209,11 +221,11 @@
- + - +
@@ -239,10 +251,10 @@ $(document).ready(function(){ $P.crdnControl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", - urls : { - load : "", - getInfo : "", - update : "" + urls : { + load : "", + getInfo : "", + update : "" }, formats : { CRDN_REG_SE_CD : FIM026, @@ -264,7 +276,7 @@ $(document).ready(function(){ var t = $P.getGridTemplate(); var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs); - + Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); }; @@ -318,7 +330,7 @@ $(document).ready(function(){ return data; } - + $P.searchCrdnList = () => { $P.crdnControl.query = $P.getParams(); $P.crdnControl.load(1); @@ -337,26 +349,26 @@ $(document).ready(function(){ }; $P.crdnControl.load(1); } - + $P.fnExcelDown = (forApproval) => { - + if($P.crdnControl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } - - var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)").not(":eq(0)"), + + var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)").not(":eq(0)"), $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(":eq(0)")); $P.crdnControl.query.cellDefs = cellDefs; - + if(forApproval){ $P.crdnControl.query.includePhoto = "Y"; } else { $P.crdnControl.query.includePhoto = "N"; } - + $P.crdnControl.download(); - + $P.crdnControl.query.includePhoto = null; }; @@ -367,19 +379,19 @@ $(document).ready(function(){ 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") + "');"); - + return { found : found, notFound : notFound, replacer : replacer }; } - + $P.renderCrdnList = (total, listLength, trs) => { - + var noMore = (total == listLength); var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0); - + $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); //보안모드 @@ -405,7 +417,7 @@ $(document).ready(function(){ }); } - + $P.checkCrdnList = (element, bool) => { GRID.checkbox.sync(element, bool); @@ -413,10 +425,10 @@ $(document).ready(function(){ $("#btnExecuteAnswer--${pageName}").prop("disabled", !atLeastOne); $("#btnAnswerComplete--${pageName}").prop("disabled", !atLeastOne); $("#btnExecuteDisabledTagInfoInquire--${pageName}").prop("disabled", !atLeastOne); - + Apply.toDataset.selection($P.crdnControl.dataset, element, bool); } - + $P.clickCrdnList = (dataKey) => { if(dataKey == ""){ return; @@ -527,10 +539,10 @@ $(document).ready(function(){ var count = $P.crdnControl.dataset.getKeys("selected").length; dialog.alert({ - content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?", - init : function() { - focusOK(); - }, + content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?", + init : function() { + focusOK(); + }, onOK : () => { $P.save('answerExecute'); } @@ -543,8 +555,8 @@ $(document).ready(function(){ dialog.alert({ content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?", - init : function() { - focusOK(); + init : function() { + focusOK(); }, onOK : () => { $P.save('answerComplete'); @@ -565,8 +577,8 @@ $(document).ready(function(){ if(resp.saved){ dialog.alert({ content : "처리되었습니다.", - init : function() { - focusClose(); + init : function() { + focusClose(); } }); $P.refreshCrdnList(); @@ -574,7 +586,7 @@ $(document).ready(function(){ } }); } - + //표지정보 조회 $P.fnExecuteDisabledTagInfoInquire = () => { @@ -591,8 +603,8 @@ $(document).ready(function(){ if(keys.length == 0){ dialog.alert({ content : "표지조회는 부과대상자료만 가능합니다.
선택된 자료 중에 부과대상자료가 없습니다.", - init : function() { - focusClose(); + init : function() { + focusClose(); } }); return; @@ -605,9 +617,9 @@ $(document).ready(function(){ dialog.alert({ content : message, - init : function() { + init : function() { setDialogZindex(); - focusOK(); + focusOK(); }, onOK : () => { ajax.get({ @@ -620,10 +632,10 @@ $(document).ready(function(){ content : "표지정보조회가 실행되었습니다.", init : function() { setDialogZindex(); - focusClose(); + focusClose(); } }); - + $P.refreshCrdnList(); } @@ -673,29 +685,29 @@ $(document).ready(function(){ $("#term--${pageName}").onEnterPress($P.searchCrdnList); $('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown(false)); $('#btnExcelForApproval--${pageName}').on('click', () => $P.fnExcelDown(true)); - + $("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl()); $("#btnOpenAnswerPreview--${pageName}").on("click", () => $P.fnOpenAnswerPreview()); $("#btnExecuteAnswer--${pageName}").on("click", () => $P.fnExecuteAnswer()); $("#btnAnswerComplete--${pageName}").on("click", () => $P.fnAnswerComplete()); - + fnMakeResizableTable($("#table-responsive--${pageName}")[0]); fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList); - + /************************************************************************** * 초기화 **************************************************************************/ //달력 초기화 initDatepicker("frmSearch--${pageName}"); initDetailSearchButton("frmSearch--${pageName}"); - + var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $P.fnResetAndChangeBiz(defaultBizValue); //보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - + $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $(this).prop("disabled", "true"); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp index 56d49a41..e6a8c775 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp @@ -4,7 +4,7 @@
- +
~ -
- - +
-
- - +
+ + + + + ~ + + + +
+
+ + - + + - - -
+ + +
@@ -99,7 +110,7 @@
-
@@ -192,13 +203,13 @@
- - + + - +
@@ -230,10 +241,10 @@ $(document).ready(function(){ $P.crdnControl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", - urls : { - load : "", - getInfo : "", - remove : "" + urls : { + load : "", + getInfo : "", + remove : "" }, formats : { CRDN_REG_SE_CD : FIM026, @@ -255,7 +266,7 @@ $(document).ready(function(){ var t = $P.getGridTemplate(); var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs); - + Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); }; @@ -297,7 +308,7 @@ $(document).ready(function(){ return data; } - + $P.searchCrdnList = () => { $P.crdnControl.query = $P.getParams(); @@ -315,17 +326,17 @@ $(document).ready(function(){ key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"], index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 }; - + Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{ Apply.toDataset.set($P.crdnControl.dataset, resp); $P.crdnControl.dataset.onDatasetChange(resp); - + if($P.crdnControl.untilPageNum != 0){ $P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize; $P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum; $P.crdnControl.untilPageNum = 0; } - + if($P.crdnControl.beforeCurrent != null){ var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; @@ -347,44 +358,44 @@ $(document).ready(function(){ } } } - + $("label[for='table-responsive--${pageName}']").trigger("refreshEnd"); }); } - + $P.fnExcelDown = () => { if($P.crdnControl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } - var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"), + var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"), $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); $P.crdnControl.query.cellDefs = cellDefs; - + $P.crdnControl.download(); } - + $P.getGridTemplate = () => { var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML]; var found = document.getElementById("crdnRow--${pageName}").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") + "');"); - - + + return { found : found, notFound : notFound, replacer : replacer }; } - + $P.renderCrdnList = (total, listLength, trs) => { var noMore = (total == listLength); var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0); - + $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); //보안모드 @@ -398,7 +409,7 @@ $(document).ready(function(){ } $("#crdnTbody--${pageName}").setCurrentRow(dataKey); - + Apply.toDataset.current($P.crdnControl.dataset, dataKey); } @@ -422,7 +433,7 @@ $(document).ready(function(){ } }); } - + $P.fnRemove = () => { var cur = $P.crdnControl.dataset.getCurrent(); @@ -457,7 +468,7 @@ $(document).ready(function(){ sleep(1000).then(() => $P.refreshCrdnList()); } } - + $P.fnOpenCvlcptOrgnl = () => { var cur = $P.crdnControl.dataset.getCurrent(); if(cur == null){ @@ -545,24 +556,24 @@ $(document).ready(function(){ $('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown()); $("#btnDelete--${pageName}").on("click", () => $P.fnRemove()); $("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl()); - + fnMakeResizableTable($("#table-responsive--${pageName}")[0]); fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList); - + /************************************************************************** * 초기화 **************************************************************************/ //달력 초기화 initDatepicker("frmSearch--${pageName}"); initDetailSearchButton("frmSearch--${pageName}"); - + var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $P.fnResetAndChangeBiz(defaultBizValue); //보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - + $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $(this).prop("disabled", "true"); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp index 22a05073..4be1be92 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp @@ -4,7 +4,7 @@
- +
~ - @@ -53,17 +53,17 @@
-
- - -
@@ -117,13 +117,9 @@
- -
- -
@@ -134,7 +130,7 @@
-
@@ -169,23 +165,23 @@ pageObject["${pageName}"] = {}; $(document).ready(function(){ var $P = pageObject["${pageName}"]; - + $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { animation: true, autohide: true, delay: 2000 }); - + /************************************************************************** * DatasetControl **************************************************************************/ $P.dmndControl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, - keymapper : info => info ? info.INDIV_ID : "", - urls : { - load : "", - create : "", - remove : "" + keymapper : info => info ? info.INDIV_ID : "", + urls : { + load : "", + create : "", + remove : "" }, formats : { DMND_YMD : dateFormat, @@ -196,7 +192,7 @@ $(document).ready(function(){ $P.dmndControl.defaultFetchSize = FETCH_XS; $P.dmndControl.untilPageNum = 0; $P.dmndControl.beforeCurrent = null; - + /************************************************************************** * Dataset.on **************************************************************************/ @@ -211,12 +207,12 @@ $(document).ready(function(){ $P.dmndControl.dataset.onCurrentChange = (dataItem) => { Apply.fromDataset.currentRow($P.dmndControl.dataset, dataItem, $("#dmndTbody--${pageName}")[0]); } - + /************************************************************************** * pageObject.function **************************************************************************/ $P.fnReset = () => { - + $('#schDmndYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schDmndYmdTo--${pageName}').datepicker('setDate', TODAY()); $P.dmndControl.dataset.setData([]); @@ -228,7 +224,7 @@ $(document).ready(function(){ $P.dmndControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do"); $P.dmndControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do"); } - + $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); @@ -236,7 +232,7 @@ $(document).ready(function(){ return data; } - + $P.searchDmndList = () => { $P.dmndControl.query = $P.getParams(); $P.dmndControl.load(1); @@ -249,47 +245,47 @@ $(document).ready(function(){ $P.refreshDmndList = () => { $P.dmndControl.untilPageNum = $P.dmndControl.query.pageNum; $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize * $P.dmndControl.query.pageNum; - + if(!$P.dmndControl.dataset.empty){ $P.dmndControl.beforeCurrent = { key : $P.dmndControl.dataset.getCurrent()["INDIV_ID"], index : $P.dmndControl.dataset.getCurrent()["ROW_NUM"] - 1 }; } - + Apply.fromDatasetControl.load($P.dmndControl, 1).then((resp)=>{ Apply.toDataset.set($P.dmndControl.dataset, resp); $P.dmndControl.dataset.onDatasetChange(resp); - + if($P.dmndControl.untilPageNum != 0){ $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize; $P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum; $P.dmndControl.untilPageNum = 0; } - + if($P.dmndControl.beforeCurrent != null){ var beforeCurrentKey = $P.dmndControl.beforeCurrent.key; var beforeCurrentIndex = $P.dmndControl.beforeCurrent.index; $P.dmndControl.beforeCurrent = null; - + if(!$P.dmndControl.dataset.empty){ var info = $P.dmndControl.dataset.getData(beforeCurrentKey); - + if(info != null){ $P.dmndControl.dataset.setCurrent(beforeCurrentKey,true); } else { - + if(beforeCurrentIndex > ($P.dmndControl.dataset.length - 1)){ info = $P.dmndControl.dataset.getDataset()[$P.dmndControl.dataset.length - 1]; } else { info = $P.dmndControl.dataset.getDataset()[beforeCurrentIndex]; } - + $P.dmndControl.dataset.setCurrent(info["INDIV_ID"],true); } } } - + }); } @@ -298,60 +294,60 @@ $(document).ready(function(){ var found = document.getElementById("dmndRow--${pageName}").innerHTML; var replacer = (str, dataItem) => str .replace(/{onclick}/gi, "pageObject['${pageName}'].clickDmndList('" + dataItem.getValue("INDIV_ID") + "');"); - + return { found : found, notFound : notFound, replacer : replacer }; } - + $P.renderDmndList = (total, listLength, trs) => { var noMore = (total == listLength); var initScroll = ($P.dmndControl.query.pageNum < 2) && ($P.dmndControl.untilPageNum == 0); - + $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); - + if($P.dmndControl.untilPageNum != 0){ $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize; $P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum; $P.dmndControl.untilPageNum = 0; - } + } } $P.clickDmndList = (dataKey) => { if(dataKey == ""){ return; } - + $("#dmndTbody--${pageName}").setCurrentRow(dataKey); Apply.toDataset.current($P.dmndControl.dataset, dataKey); } - + $P.fnRemove = (allCompleteDataIds) => { - - if(allCompleteDataIds != null){ + + if(allCompleteDataIds != null){ $P.dmndControl.dataset.select(allCompleteDataIds,true); } else { var cur = $P.dmndControl.dataset.getCurrent(); if(cur == null){ return; } - + var curKey = cur["INDIV_ID"]; $P.dmndControl.dataset.select(curKey,true); } - + var selected = $P.dmndControl.dataset.getKeys("selected"); if (selected.length < 1) { return; } - + var params = { "indivIds" : selected.join(",") }; - + ajax.post({ url : $P.dmndControl.urls.remove, data : params, @@ -359,9 +355,9 @@ $(document).ready(function(){ $P.removeCallback(selected, resp); } }); - + } - + $P.removeCallback = (selected, resp) => { if (resp.saved){ $("#toastText--${pageName}").html("삭제 되었습니다."); @@ -369,13 +365,13 @@ $(document).ready(function(){ sleep(1000).then(() => $P.refreshDmndList()); } } - + $P.fnRemoveAllCompleteData = () => { var cur = $P.dmndControl.dataset.getCurrent(); if(cur == null){ return; } - + var ds = $P.dmndControl.dataset.getDataset(); var indivIds = ds.filter(function(item){ @@ -387,25 +383,25 @@ $(document).ready(function(){ if(indivIds.length == 0){ dialog.alert({ content : "요청 완료자료가 없습니다.", - init : function() { - focusClose(); + init : function() { + focusClose(); } }); return; } - + dialog.alert({ content : "완료된 자료를 모두 삭제하시겠습니까?", - init : function() { - focusOK(); + init : function() { + focusOK(); }, onOK : () => { $P.fnRemove(indivIds); } }); - + } - + //요청 등록 팝업 호출 $P.fnOpenDmndPop = () => { dialog.open({ @@ -421,25 +417,25 @@ $(document).ready(function(){ onClose : () => {} }); } - + //요청 등록 $P.fnCreateDmnd = () => { - + if(!customValidate($("#frmEdit--${pageName} input"))) return; - + var info = (new FimsFormFields("#frmEdit--${pageName}")).get(); info.taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); - + ajax.get({ url : $P.dmndControl.urls.create, data : info, success : (resp) => { if(resp.saved){ dialog.close("seallDmndDialog--${pageName}"); - + $("#toastText--${pageName}").html("등록 되었습니다."); $P.toast.show(); - + if(!$P.dmndControl.dataset.empty){ sleep(1000).then(() => $P.refreshDmndList()); } @@ -447,7 +443,7 @@ $(document).ready(function(){ } }); } - + /************************************************************************** * element.on **************************************************************************/ @@ -456,10 +452,10 @@ $(document).ready(function(){ $("#btnOpenDmndPop--${pageName}").on("click", () => $P.fnOpenDmndPop()); $("#btnDelete--${pageName}").on("click", () => $P.fnRemove(null)); $("#btnDeleteAllCompleteData--${pageName}").on("click", () => $P.fnRemoveAllCompleteData()); - + fnMakeResizableTable($("#table-responsive--${pageName}")[0]); fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDmndList); - + /************************************************************************** * 초기화 **************************************************************************/ @@ -469,7 +465,7 @@ $(document).ready(function(){ var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $P.fnResetAndChangeBiz(defaultBizValue); - + $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $(this).prop("disabled", "true"); }); 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 b48c7508..15eba89d 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 @@ -9,7 +9,7 @@
- +
@@ -136,7 +136,7 @@ @@ -167,7 +167,7 @@ @@ -200,7 +200,7 @@ @@ -224,7 +224,7 @@ 답변내용
- @@ -233,14 +233,14 @@
-
- -
@@ -252,7 +252,6 @@
-
@@ -260,12 +259,12 @@
[매크로 문자 삽입] - - - -
@@ -278,12 +277,9 @@
- - -
@@ -313,13 +309,13 @@ pageObject["${pageName}"] = {}; $(document).ready(function(){ var $P = pageObject["${pageName}"]; - + $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { animation: true, autohide: true, delay: 2000 }); - + /************************************************************************** * DatasetControl **************************************************************************/ @@ -335,7 +331,7 @@ $(document).ready(function(){ dataGetter : obj => obj["nonlevyCaseList"], urls : {}, formats : {}, keymapper : info => info ? info.LEVY_EXCL_RSN_CD : "" }); - + /************************************************************************** * pageObject.function **************************************************************************/ @@ -344,23 +340,23 @@ $(document).ready(function(){ $P.ansBodyControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/info.do"); $P.ansBodyControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/save.do"); $P.ansBodyControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/remove.do"); - + $P.fnReset(); } - + $P.fnReset = () => { $('#btnAnsBasicTab--${pageName}').trigger("click"); $P.ansBodyControl.levy.setData([]); $P.ansBodyControl.warning.setData([]); $P.ansBodyControl.nonlevy.setData([]); - + $P.renderAnsBodyList(0,'levy'); $P.renderAnsBodyList(0,'warning'); $P.renderAnsBodyList(0,'nonlevy'); - + $("#frmEditAnsBasic--${pageName}").find("input, textarea").val(""); $("#frmEditAnsBody--${pageName}").find("input, textarea").val(""); - + $P.searchWordsStng(); } @@ -369,7 +365,7 @@ $(document).ready(function(){ var data = formFields.get(); return data; } - + $P.searchWordsStng = () => { var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); @@ -380,15 +376,15 @@ $(document).ready(function(){ $("#headerCn--${pageName}").val(resp.headerCn); $("#footerCn--${pageName}").val(resp.footerCn); - + $P.ansBodyControl.levy.setData(resp.levyCaseList); $P.ansBodyControl.warning.setData(resp.warningCaseList); $P.ansBodyControl.nonlevy.setData(resp.nonlevyCaseList); - + $P.renderAnsBodyList(resp.levyCaseList.length,'levy'); $P.renderAnsBodyList(resp.warningCaseList.length,'warning'); $P.renderAnsBodyList(resp.nonlevyCaseList.length,'nonlevy'); - + if(resp.levyCaseList.length > 0){ var current = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"]; $P.clickAnsBodyList(current,'levy'); @@ -404,9 +400,9 @@ $(document).ready(function(){ } }); } - + $P.renderAnsBodyList = (total, renderDataType) => { - + var notFoundId = ""; var foundId = ""; var tbodyId = ""; @@ -425,17 +421,17 @@ $(document).ready(function(){ } else { return; } - + var ansBodyDS = $P.ansBodyControl[renderDataType].dataset; var empty = ansBodyDS.empty; var notFound = [document.getElementById(notFoundId).innerHTML]; var found = document.getElementById(foundId).innerHTML; - + 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(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('" + dataItem.getValue("VLTN_CASE_ID") + "','levy');"); } else if(renderDataType == "warning"){ replacer = (str, dataItem) => str .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "','warning');") @@ -449,11 +445,11 @@ $(document).ready(function(){ var trs = empty ? notFound : ansBodyDS.inStrings(found, replacer); $("#"+tbodyId).html(trs.join()); } - + $P.radioClickAnsBodyList = (dataKey, gridType) => { - + $P.ansBodyControl[gridType].setCurrent(dataKey); - + var tbodyId = ""; if(gridType == "levy"){ tbodyId = "vltnTbody--${pageName}"; @@ -474,7 +470,7 @@ $(document).ready(function(){ $P.changeAnsBodyText(); } } - + $P.clickAnsBodyList = (dataKey, gridType) => { var radioName = ""; if(gridType == "levy"){ @@ -486,9 +482,9 @@ $(document).ready(function(){ } else { return; } - + $("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").prop("checked",true); - + if(gridType == "levy" && $P.currentDisplay == "levyAnsBody"){ $("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus(); } else if(gridType == "warning" && $P.currentDisplay == "warningAnsBody"){ @@ -496,15 +492,15 @@ $(document).ready(function(){ } else if(gridType == "nonlevy" && $P.currentDisplay == "nonlevyAnsBody"){ $("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus(); } - + $P.radioClickAnsBodyList(dataKey, gridType); } - + $P.changeAnsBodyText = () => { var curData = null; var rnsRsnCd = ""; var dstrbncYn = ""; - + if($P.currentDisplay == "levyAnsBody"){ curData = $P.ansBodyControl.levy.getCurrent(); } else if($P.currentDisplay == "warningAnsBody"){ @@ -512,7 +508,7 @@ $(document).ready(function(){ } else if($P.currentDisplay == "nonlevyAnsBody"){ curData = $P.ansBodyControl.nonlevy.getCurrent(); } - + if(curData == null){ $("#ansRsnCd--${pageName}").val(""); $("#dstrbncYn--${pageName}").val(""); @@ -520,7 +516,7 @@ $(document).ready(function(){ $("#prcsRsltCn--${pageName}").val(""); return; } - + if($P.currentDisplay == "levyAnsBody"){ if(curData["VLTN_CASE_ID"].endsWith("D")){ rnsRsnCd = "3" + curData["VLTN_CASE_ID"].substring(0,2); @@ -533,7 +529,7 @@ $(document).ready(function(){ rnsRsnCd = curData["LEVY_EXCL_RSN_CD"] } else if($P.currentDisplay == "nonlevyAnsBody"){ rnsRsnCd = curData["LEVY_EXCL_RSN_CD"] - + if(curData["ANS_WORDS_ID"] == null){ $("#btnRemove--${pageName}").prop("disabled",true); } else { @@ -546,30 +542,30 @@ $(document).ready(function(){ $("#ansWordsId--${pageName}").val(curData["ANS_WORDS_ID"]); $("#prcsRsltCn--${pageName}").val(curData["PRCS_RSLT_CN"]); } - + $P.refreshAnsWordsInfo = () => { var cursor1 = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"]; var cursor2 = $P.ansBodyControl.warning.getCurrent()["LEVY_EXCL_RSN_CD"]; var cursor3 = $P.ansBodyControl.nonlevy.getCurrent()["LEVY_EXCL_RSN_CD"]; - + var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); ajax.get({ url : $P.ansBodyControl.urls.load, data : {"taskSeCd" : taskSeCd}, success : (resp) => { - + $("#headerCn--${pageName}").val(resp.headerCn); $("#footerCn--${pageName}").val(resp.footerCn); - + $P.ansBodyControl.levy.setData(resp.levyCaseList); $P.ansBodyControl.warning.setData(resp.warningCaseList); $P.ansBodyControl.nonlevy.setData(resp.nonlevyCaseList); - + $P.renderAnsBodyList(resp.levyCaseList.length,'levy'); $P.renderAnsBodyList(resp.warningCaseList.length,'warning'); $P.renderAnsBodyList(resp.nonlevyCaseList.length,'nonlevy'); - + if(resp.levyCaseList.length > 0){ $P.ansBodyControl.levy.setCurrent(cursor1); var current = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"]; @@ -591,19 +587,19 @@ $(document).ready(function(){ //적용 $P.fnSave = (isBasicWords) => { - + var formId = ""; var confirmMessage = ""; - - if(isBasicWords){ + + if(isBasicWords){ confirmMessage = "머리말/꼬리말 내용을 저장하시겠습니까?"; formId = "frmEditAnsBasic--${pageName}"; } else { confirmMessage = "본문내용을 저장하시겠습니까?" formId = "frmEditAnsBody--${pageName}"; } - - + + if(!customValidate($("#"+formId).find("input, select, textarea"))) return; var info = (new FimsFormFields("#"+formId)).get(); if(isBasicWords){ @@ -617,13 +613,13 @@ $(document).ready(function(){ content : confirmMessage, init : function() { focusOK(); }, onOK: () => { - + ajax.get({ url : $P.ansBodyControl.urls.update, data : info, success : (resp) => { if(resp.saved){ - $P.toast.show(); + $P.toast.show(); sleep(1000).then(() => $P.refreshAnsWordsInfo()); } } @@ -631,13 +627,13 @@ $(document).ready(function(){ } }); } - + //답변대상 제외 $P.fnRemove = () => { - + if(!customValidate($("#frmEditAnsBody--${pageName}").find("input, select, textarea"))) return; var info = (new FimsFormFields("#frmEditAnsBody--${pageName}")).get(); - + dialog.alert({ content : "해당 미부과사유를 답변대상에서 제외하시겠습니까?", init : function() { focusOK(); }, @@ -655,10 +651,10 @@ $(document).ready(function(){ } }); } - + //미리보기 팝업 호출 $P.fnOpenPreviewPop = () => { - + var result = fnMacroWordsReplace( $("#headerCn--${pageName}").val(), $("#footerCn--${pageName}").val(), @@ -666,7 +662,7 @@ $(document).ready(function(){ "${currentUserTelno}", "${currentUserName}" ); - + dialog.open({ id : "previewDialog--${pageName}", title : "답변 내용 미리보기", @@ -682,23 +678,23 @@ $(document).ready(function(){ } /************************************************************************** - * element.on + * element.on **************************************************************************/ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); - + //탭 버튼 $('#btnAnsBasicTab--${pageName}').on('click', (event) => { - + $("#wrapper--${pageName}").find(".area-answerbasic").show(); $("#wrapper--${pageName}").find(".area-answerbody").hide(); - + $P.currentDisplay = "ansBasic"; - + $("#macroTarget--${pageName}").attr("for",""); }); - + $('#btnLevyAnsBodyTab--${pageName}').on('click', (event) => { - + $("#wrapper--${pageName}").find(".area-answerbasic").hide(); $("#wrapper--${pageName}").find(".area-answerbody").each(function(){ if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-levy")){ @@ -707,17 +703,17 @@ $(document).ready(function(){ $(this).hide(); } }); - + $P.currentDisplay = "levyAnsBody"; - + $("#wrapper--${pageName}").find(":radio[name='levyRadio']:checked").focus(); - + $P.changeAnsBodyText(); - + $("#macroTarget--${pageName}").attr("for",""); }); $('#btnWarningAnsBodyTab--${pageName}').on('click', (event) => { - + $("#wrapper--${pageName}").find(".area-answerbasic").hide(); $("#wrapper--${pageName}").find(".area-answerbody").each(function(){ if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-warning")){ @@ -726,17 +722,17 @@ $(document).ready(function(){ $(this).hide(); } }); - + $P.currentDisplay = "warningAnsBody"; - + $("#wrapper--${pageName}").find(":radio[name='warningRadio']:checked").focus(); - + $P.changeAnsBodyText(); - + $("#macroTarget--${pageName}").attr("for",""); }); $('#btnNonlevyAnsBodyTab--${pageName}').on('click', (event) => { - + $("#wrapper--${pageName}").find(".area-answerbasic").hide(); $("#wrapper--${pageName}").find(".area-answerbody").each(function(){ if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-nonlevy")){ @@ -745,26 +741,26 @@ $(document).ready(function(){ $(this).hide(); } }); - + $P.currentDisplay = "nonlevyAnsBody"; - + $("#wrapper--${pageName}").find(":radio[name='nonlevyRadio']:checked").focus(); - + $P.changeAnsBodyText(); - + $("#macroTarget--${pageName}").attr("for",""); }); - + //업무처리 버튼 - $("#btnSaveAnsBasic--${pageName}").on("click", () => $P.fnSave(true)); + $("#btnSaveAnsBasic--${pageName}").on("click", () => $P.fnSave(true)); $("#btnSaveAnsBody--${pageName}").on("click", () => $P.fnSave(false)); $("#btnRemove--${pageName}").on("click", () => $P.fnRemove()); $("#btnOpenPreviewPop--${pageName}").on("click", () => $P.fnOpenPreviewPop()); - + $("#headerCn--${pageName},#footerCn--${pageName},#prcsRsltCn--${pageName}").on("focus", (event) => { $("#macroTarget--${pageName}").attr("for", event.target.id); }); - + $("#btnInsertMacro1--${pageName}").on("click", () => { var macroTarget = $("#macroTarget--${pageName}").attr("for"); if(macroTarget == ""){ return; } @@ -786,7 +782,7 @@ $(document).ready(function(){ var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $P.fnResetAndChangeBiz(defaultBizValue); - + $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $(this).prop("disabled", "true"); }); 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 9ab3382c..d47463f0 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 @@ -9,7 +9,7 @@ - -
@@ -132,23 +127,23 @@ pageObject["${pageName}"] = {}; $(document).ready(function(){ var $P = pageObject["${pageName}"]; - + $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { animation: true, autohide: true, delay: 2000 }); - + /************************************************************************** * DatasetControl **************************************************************************/ $P.warningWordsControl = new DatasetControl({ - dataGetter : obj => obj["List"], + dataGetter : obj => obj["List"], keymapper : info => info ? info.LEVY_EXCL_RSN_CD : "", - urls : {}, + urls : {}, formats : {} }); - + /************************************************************************** * pageObject.function **************************************************************************/ @@ -156,12 +151,12 @@ $(document).ready(function(){ $P.warningWordsControl.urls = {}; $P.warningWordsControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/list.do"); $P.warningWordsControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/save.do"); - + $P.fnReset(); } - + $P.fnReset = () => { - + $P.warningWordsControl.dataset.setData([]); $P.renderWarningWordsList(0); $("#frmEditWarningWords--${pageName}").find("input, textarea").val(""); @@ -174,7 +169,7 @@ $(document).ready(function(){ var data = formFields.get(); return data; } - + $P.searchWordsStng = () => { var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); @@ -194,14 +189,14 @@ $(document).ready(function(){ } }); } - + $P.renderWarningWordsList = (total) => { var warningWordsDS = $P.warningWordsControl.dataset; var empty = warningWordsDS.empty; var notFound = [document.getElementById("warningWordsNotFound--${pageName}").innerHTML]; var found = document.getElementById("warningWordsRow--${pageName}").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") + "');"); @@ -209,29 +204,29 @@ $(document).ready(function(){ var trs = empty ? notFound : warningWordsDS.inStrings(found, replacer); $("#warningWordsTbody--${pageName}").html(trs.join()); } - + $P.radioClickWarningWordsList = (dataKey, gridType) => { - + $P.warningWordsControl.dataset.setCurrent(dataKey); $("#warningWordsTbody--${pageName}").setCurrentRow(dataKey); $P.changeTextarea(); } - + $P.clickWarningWordsList = (dataKey, gridType) => { - + $("#wrapper--${pageName}").find(":radio[name='gridRadio'][value='"+dataKey+"']").prop("checked",true); $("#wrapper--${pageName}").find(":radio[name='gridRadio'][value='"+dataKey+"']").focus(); - - + + $P.radioClickWarningWordsList(dataKey, gridType); } - + $P.changeTextarea = () => { - + var curData = $P.warningWordsControl.dataset.getCurrent(); - + if(curData == null){ $("#ansRsnCd--${pageName}").val(""); $("#ansWordsId--${pageName}").val(""); @@ -239,15 +234,15 @@ $(document).ready(function(){ $("#mailCn--${pageName}").val(""); return; } - + $("#ansRsnCd--${pageName}").val(curData["LEVY_EXCL_RSN_CD"]); $("#ansWordsId--${pageName}").val(curData["ANS_WORDS_ID"]); $("#mailTtlNm--${pageName}").val(curData["MAIL_TTL_NM"]); $("#mailCn--${pageName}").val(curData["MAIL_CN"]); } - + $P.refreshWarningWordsInfo = () => { - + var cursor = $P.warningWordsControl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"]; var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); @@ -256,7 +251,7 @@ $(document).ready(function(){ url : $P.warningWordsControl.urls.load, data : {"taskSeCd" : taskSeCd}, success : (resp) => { - + $P.warningWordsControl.dataset.setData(resp.List); $P.renderWarningWordsList(resp.List.length); if(resp.List.length > 0){ @@ -271,26 +266,26 @@ $(document).ready(function(){ //적용 $P.fnSave = () => { - + if(!customValidate($("#frmEditWarningWords--${pageName}").find("input, select, textarea"))) return; - + var info = (new FimsFormFields("#frmEditWarningWords--${pageName}")).get(); info.taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); dialog.alert({ content : "저장하시겠습니까?", - init : function() { - focusOK(); + init : function() { + focusOK(); }, onOK: () => { - + ajax.get({ url : $P.warningWordsControl.urls.update, data : info, success : (resp) => { if(resp.saved){ - $P.toast.show(); + $P.toast.show(); sleep(1000).then(() => $P.refreshWarningWordsInfo()); } } @@ -300,12 +295,12 @@ $(document).ready(function(){ } /************************************************************************** - * element.on + * element.on **************************************************************************/ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); - + //업무처리 버튼 - $("#btnSave--${pageName}").on("click", () => $P.fnSave()); + $("#btnSave--${pageName}").on("click", () => $P.fnSave()); /************************************************************************** * 초기화 @@ -313,7 +308,7 @@ $(document).ready(function(){ var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $P.fnResetAndChangeBiz(defaultBizValue); - + $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $(this).prop("disabled", "true"); });