From 050a446cbb0c83f16c4444dbd763d9586b82b7b4 Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 2 Feb 2024 14:16:13 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/fims/mngt/Dept.java | 5 - .../xit/fims/sprt/web/Sprt01Controller.java | 3 +- .../sql/mapper/fims/mngt/dept-mapper.xml | 5 - .../WEB-INF/jsp/fims/sprt/sprt01010-main.jsp | 1432 +++++++++-------- .../WEB-INF/jsp/fims/sprt/sprt01011-info.jsp | 4 +- .../WEB-INF/jsp/fims/sprt/sprt01012-info.jsp | 16 +- .../WEB-INF/jsp/fims/sprt/sprt01013-info.jsp | 10 +- 7 files changed, 734 insertions(+), 741 deletions(-) diff --git a/src/main/java/cokr/xit/fims/mngt/Dept.java b/src/main/java/cokr/xit/fims/mngt/Dept.java index 41048229..802b2075 100644 --- a/src/main/java/cokr/xit/fims/mngt/Dept.java +++ b/src/main/java/cokr/xit/fims/mngt/Dept.java @@ -76,11 +76,6 @@ public class Dept extends AbstractEntity { */ private String egpApvlNb; - /** - * E그린 ESB경로 - */ - private String egpEsbPath; - /** * E그린 우정정보센터 기관ID */ diff --git a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java index b2a05d2e..cd0b3fcc 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java @@ -114,7 +114,6 @@ public class Sprt01Controller extends ApplicationController { public ModelAndView integrationSearchMain(HttpServletRequest req) { ModelAndView mav = new ModelAndView("fims/sprt/sprt01010-main"); - mav.addObject("pageName", "sprt01010"); String institute = currentUser().getInstitute(); String account = currentUser().getAccount(); @@ -141,6 +140,8 @@ public class Sprt01Controller extends ApplicationController { addCodes(commonCodes, mav, "FIM003", "FIM010", "FIM026", "FIM054" ,"FIM004","FIM005","FIM006","FIM061","FIM064"); + mav.addObject("pageName", "sprt01010");// View(jsp)에서 사용할 id 뒤에 붙일 suffix + String fastBy = req.getParameter("fastBy"); String fastTerm = req.getParameter("fastTerm"); diff --git a/src/main/resources/sql/mapper/fims/mngt/dept-mapper.xml b/src/main/resources/sql/mapper/fims/mngt/dept-mapper.xml index f35493d4..300af171 100644 --- a/src/main/resources/sql/mapper/fims/mngt/dept-mapper.xml +++ b/src/main/resources/sql/mapper/fims/mngt/dept-mapper.xml @@ -21,7 +21,6 @@ - @@ -52,7 +51,6 @@ , D.EGP_CON_ORG , D.EGP_RCEPT_ID , D.EGP_APVL_NB - , D.EGP_ESB_PATH , D.EGP_POST_INST_ID , D.ENS_INTERFACE_ID , D.ENS_SOURCE_CD @@ -122,7 +120,6 @@ , EGP_CON_ORG , EGP_RCEPT_ID , EGP_APVL_NB - , EGP_ESB_PATH , EGP_POST_INST_ID , ENS_INTERFACE_ID , ENS_SOURCE_CD @@ -151,7 +148,6 @@ , #{dept.egpConOrg} , #{dept.egpRceptId} , #{dept.egpApvlNb} - , #{dept.egpEsbPath} , #{dept.egpPostInstId} , #{dept.ensInterfaceId} , #{dept.ensSourceCd} @@ -183,7 +179,6 @@ , EGP_CON_ORG = #{dept.egpConOrg} , EGP_RCEPT_ID = #{dept.egpRceptId} , EGP_APVL_NB = #{dept.egpApvlNb} - , EGP_ESB_PATH = #{dept.egpEsbPath} , EGP_POST_INST_ID = #{dept.egpPostInstId} , ENS_INTERFACE_ID = #{dept.ensInterfaceId} , ENS_SOURCE_CD = #{dept.ensSourceCd} diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp index e7e8195e..d374cde6 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp @@ -43,815 +43,817 @@ var FIM006 = new CommonCodes(${FIM006}, true); var FIM061 = new CommonCodes(${FIM061}, true); var FIM064 = new CommonCodes(${FIM064}, true); +/************************************************************************** + * DatasetControl + **************************************************************************/ +var integrationSearchControl = new IntegrationSearchControl({ + prefix : "integrationSearch", prefixName : "통합조회" + , infoSize : "lg" + , appendData : false + , keymapper : data => data ? data.CRDN_ID : "" + , dataGetter : obj => Array.isArray(obj) ? obj : [] + , urls : { + load : wctx.url("/sprt/sprt01/010/list.do") // 검색 + } + , formats : { + CRDN_YMD_TM : datetimeFormat + , REG_DT : datetimeFormat + , MDFCN_DT : datetimeFormat + + , CRDN_STTS_CHG_YMD : dateFormat + , CVLCPT_RCPT_YMD : dateFormat + , LEVY_EXCL_YMD : dateFormat + , ADVNTCE_DUDT_YMD : dateFormat + , DUDT_YMD : dateFormat + , DUDT_AFTR_YMD : dateFormat + , RCVMT_YMD : dateFormat + + , FFNLG_CRDN_AMT : numberFormat + , FFNLG_AMT : numberFormat + , MINUS_AMT : numberFormat + , ADTN_AMT : numberFormat + , ADVNTCE_AMT : numberFormat + , LEVY_AMT : numberFormat + , LEVY_PCPTAX : numberFormat + , LEVY_ADAMT : numberFormat + , RCVMT_AMT : numberFormat + , RCVMT_PCPTAX : numberFormat + , RCVMT_ADAMT : numberFormat + , SUM_AMT : numberFormat + , DUDT_AFTR_AMT : numberFormat + } +}); -pageObject["${pageName}"] = {}; - -$(document).ready(function() { - var $P = pageObject["${pageName}"]; - $P.integrationSearch = {}; - - /************************************************************************** - * DatasetControl - **************************************************************************/ - $P.integrationSearchControl = new IntegrationSearchControl({ - prefix : "integrationSearch", prefixName : "통합조회" - , infoSize : "lg" - , appendData : false - , keymapper : data => data ? data.CRDN_ID : "" - , dataGetter : obj => Array.isArray(obj) ? obj : [] - , urls : { - load : wctx.url("/sprt/sprt01/010/list.do") // 검색 - } - , formats : { - CRDN_YMD_TM : datetimeFormat - , REG_DT : datetimeFormat - , MDFCN_DT : datetimeFormat - - , CRDN_STTS_CHG_YMD : dateFormat - , CVLCPT_RCPT_YMD : dateFormat - , LEVY_EXCL_YMD : dateFormat - , ADVNTCE_DUDT_YMD : dateFormat - , DUDT_YMD : dateFormat - , DUDT_AFTR_YMD : dateFormat - , RCVMT_YMD : dateFormat - - , FFNLG_CRDN_AMT : numberFormat - , FFNLG_AMT : numberFormat - , MINUS_AMT : numberFormat - , ADTN_AMT : numberFormat - , ADVNTCE_AMT : numberFormat - , LEVY_AMT : numberFormat - , LEVY_PCPTAX : numberFormat - , LEVY_ADAMT : numberFormat - , RCVMT_AMT : numberFormat - , RCVMT_PCPTAX : numberFormat - , RCVMT_ADAMT : numberFormat - , SUM_AMT : numberFormat - , DUDT_AFTR_AMT : numberFormat - } - }); +/************************************************************************** + * DatasetControl 이벤트 + **************************************************************************/ +// Dataset 변경 이벤트 +integrationSearchControl.updataset.onDatasetChange = (obj) => { + var upActiveTab = $("#upGridTabs--${pageName}").find("button.active").text().trim(); + integrationSearch.renderList("up", upActiveTab); +}; + +integrationSearchControl.downdataset.onDatasetChange = (obj) => { + var downActiveTab = $("#downGridTabs--${pageName}").find("button.active").text().trim(); + integrationSearch.renderList("down", downActiveTab); +}; + +// 현재 선택 자료 변경 이벤트 +integrationSearchControl.updataset.onCurrentChange = (item) => { + if (!item) return; + var key = item.data.CRDN_ID; + $("#upTbody--${pageName}").setCurrentRow(key); +}; + +integrationSearchControl.downdataset.onCurrentChange = (item) => { + if (!item) return; + var key = item.data.CRDN_ID; + $("#downTbody--${pageName}").setCurrentRow(key); +}; + +// 선택(체크) 변경 이벤트 +integrationSearchControl.updataset.onSelectionChange = (selected) => { + var ds = integrationSearchControl.updataset; + var keys = selected.map(e => ds.getKey(e)); - /************************************************************************** - * DatasetControl 이벤트 - **************************************************************************/ - // Dataset 변경 이벤트 - $P.integrationSearchControl.updataset.onDatasetChange = (obj) => { - var upActiveTab = $("#upGridTabs--${pageName}").find("button.active").text().trim(); - $P.renderList("up", upActiveTab); - }; - - $P.integrationSearchControl.downdataset.onDatasetChange = (obj) => { - var downActiveTab = $("#downGridTabs--${pageName}").find("button.active").text().trim(); - $P.renderList("down", downActiveTab); - }; - - // 현재 선택 자료 변경 이벤트 - $P.integrationSearchControl.updataset.onCurrentChange = (item) => { - if (!item) return; - var key = item.data.CRDN_ID; - $("#upTbody--${pageName}").setCurrentRow(key); - }; - - $P.integrationSearchControl.downdataset.onCurrentChange = (item) => { - if (!item) return; - var key = item.data.CRDN_ID; - $("#downTbody--${pageName}").setCurrentRow(key); - }; - - // 선택(체크) 변경 이벤트 - $P.integrationSearchControl.updataset.onSelectionChange = (selected) => { - - var ds = $P.integrationSearchControl.updataset; - var keys = selected.map(e => ds.getKey(e)); - - $("#upTbody--${pageName}").find("input[type='checkbox']").each(function() { - var checkbox = $(this); - checkbox.prop("checked", keys.includes(checkbox.val())); - }); - - }; + $("#upTbody--${pageName}").find("input[type='checkbox']").each(function() { + var checkbox = $(this); + checkbox.prop("checked", keys.includes(checkbox.val())); + }); - $P.integrationSearchControl.downdataset.onSelectionChange = (selected) => { - - var ds = $P.integrationSearchControl.downdataset; - var keys = selected.map(e => ds.getKey(e)); - - $("#downTbody--${pageName}").find("input[type='checkbox']").each(function() { - var checkbox = $(this); - checkbox.prop("checked", keys.includes(checkbox.val())); - }); +}; - }; +integrationSearchControl.downdataset.onSelectionChange = (selected) => { + var ds = integrationSearchControl.downdataset; + var keys = selected.map(e => ds.getKey(e)); - $P.fastSearch = ${fastSearch}; - - $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { - animation: true, - autohide: true, - delay: 2000 + $("#downTbody--${pageName}").find("input[type='checkbox']").each(function() { + var checkbox = $(this); + checkbox.prop("checked", keys.includes(checkbox.val())); }); +}; - // 검색 조건 파라미터 가져오기 - $P.getParams = () => { - var formFields = new FimsFormFields("#frmSearch--${pageName}"); - var formData = formFields.get(); - return formData; - } +/************************************************************************** + * + **************************************************************************/ +var integrationSearch = {}; - // 초기화 - $P.fnResetAndChangeBiz = (taskSeCd) => { - - // 항목 초기화 - $("#ischVltnCd--${pageName}").empty(); +integrationSearch.fastSearch = ${fastSearch}; - $("#ischVltnCd--${pageName}").append(""); - - - // 업무에 따른 위반 내용 - var vltnIdCode = []; - if (taskSeCd == "PVS") { // 주정차 위반 - vltnIdCode = FIM004.list(); - } else if (taskSeCd == "BPV") { // 전용차로 위반 - vltnIdCode = FIM005.list(); - } else if (taskSeCd == "DPV") { // 장애인 전용 - vltnIdCode = FIM006.list(); - } else if (taskSeCd == "ECA") { // 전기차 주차 위반 - vltnIdCode = FIM061.list(); - } else if (taskSeCd == "TPV") { // 밤샘 주차 위반 - vltnIdCode = FIM064.list(); - } - - if(taskSeCd != ""){ - $(vltnIdCode).each(function(index, item) { - $("#ischVltnCd--${pageName}").append(""); - }) - } - - $P.fnReset(); - - } +integrationSearch.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { + animation: true, + autohide: true, + delay: 2000 +}); - $P.fnReset = () => { - - $P.integrationSearchControl.updataset.clear(); - $P.integrationSearchControl.downdataset.clear(); - + +// 검색 조건 파라미터 가져오기 +integrationSearch.getParams = () => { + var formFields = new FimsFormFields("#frmSearch--${pageName}"); + var formData = formFields.get(); + + return formData; +} + +// 초기화 +integrationSearch.fnResetAndChangeBiz = (taskSeCd) => { + + // 항목 초기화 + $("#ischVltnCd--${pageName}").empty(); + + $("#ischVltnCd--${pageName}").append(""); + + + // 업무에 따른 위반 내용 + var vltnIdCode = []; + if (taskSeCd == "PVS") { // 주정차 위반 + vltnIdCode = FIM004.list(); + } else if (taskSeCd == "BPV") { // 전용차로 위반 + vltnIdCode = FIM005.list(); + } else if (taskSeCd == "DPV") { // 장애인 전용 + vltnIdCode = FIM006.list(); + } else if (taskSeCd == "ECA") { // 전기차 주차 위반 + vltnIdCode = FIM061.list(); + } else if (taskSeCd == "TPV") { // 밤샘 주차 위반 + vltnIdCode = FIM064.list(); + } + + if(taskSeCd != ""){ + $(vltnIdCode).each(function(index, item) { + $("#ischVltnCd--${pageName}").append(""); + }) } + + integrationSearch.fnReset(); + +} - // 검색 - $P.fnSearchList = () => { - // 검색조건 - $P.integrationSearchControl.query = $P.getParams(); - - var query = $P.integrationSearchControl.query; - var minKeyword = false; - var keys = Object.keys(query); - for(var i=0; i < keys.length; i++){ - var key = keys[i]; - if(!key.startsWith("isch")){ - continue; - } - if(key.startsWith("ischOnlyData") || key.startsWith("ischExclData") - || key.endsWith("Similar")){ - continue; - } - - var value = query[key]; - if(value != null && value != ""){ - minKeyword = true; - break; - } +integrationSearch.fnReset = () => { + + integrationSearchControl.updataset.clear(); + integrationSearchControl.downdataset.clear(); + +} + +// 검색 +integrationSearch.fnSearchList = () => { + // 검색조건 + integrationSearchControl.query = integrationSearch.getParams(); + + var query = integrationSearchControl.query; + var minKeyword = false; + var keys = Object.keys(query); + for(var i=0; i < keys.length; i++){ + var key = keys[i]; + if(!key.startsWith("isch")){ + continue; } - - if(!minKeyword){ - dialog.alert("검색조건을 입력하세요."); - return; + if(key.startsWith("ischOnlyData") || key.startsWith("ischExclData") + || key.endsWith("Similar")){ + continue; } - $("#upGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active"); - $("#upGridTabs--${pageName}").find("button").eq(0).addClass("active"); - $("#downGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active"); - $("#downGridTabs--${pageName}").find("button").eq(0).addClass("active"); - $P.integrationSearchControl.updataset.clear(); - $P.integrationSearchControl.downdataset.clear(); - - $P.integrationSearchControl.load(); + var value = query[key]; + if(value != null && value != ""){ + minKeyword = true; + break; + } } + + if(!minKeyword){ + dialog.alert("검색조건을 입력하세요."); + return; + } + + $("#upGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active"); + $("#upGridTabs--${pageName}").find("button").eq(0).addClass("active"); + $("#downGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active"); + $("#downGridTabs--${pageName}").find("button").eq(0).addClass("active"); + integrationSearchControl.updataset.clear(); + integrationSearchControl.downdataset.clear(); + + integrationSearchControl.load(); +} - $P.renderList = (updown, tabGroup) => { +integrationSearch.renderList = (updown, tabGroup) => { + + var tbody = updown == "up" ? "upTbody--${pageName}" : "downTbody--${pageName}"; + var trs = ""; + var notFound = [document.getElementById("notFound--${pageName}").innerHTML]; + var found = document.getElementById("row--${pageName}").innerHTML; + var ds; + if(updown == "up"){ + ds = integrationSearchControl.updataset; + } else { + ds = integrationSearchControl.downdataset; + } + var replacer; + if(updown == "up"){ + replacer = (str, dataItem) => str + .replace(/{onclick}/gi, "integrationSearchControl.updataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');") + .replace(/{ondblclick}/gi, "integrationSearch.getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');") + } else { + replacer = (str, dataItem) => str + .replace(/{onclick}/gi, "integrationSearchControl.downdataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');") + .replace(/{ondblclick}/gi, "integrationSearch.getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');") + } + + + var empty = ds.empty; + if(empty){ + trs = notFound; + integrationSearch.setTotalData(updown, []); + } else if(tabGroup == "전체"){ + trs = ds.inStrings(found, replacer); + integrationSearch.setTotalData(updown, ds._items); + } else { - var tbody = updown == "up" ? "upTbody--${pageName}" : "downTbody--${pageName}"; - var trs = ""; - var notFound = [document.getElementById("notFound--${pageName}").innerHTML]; - var found = document.getElementById("row--${pageName}").innerHTML; - var ds; - if(updown == "up"){ - ds = $P.integrationSearchControl.updataset; - } else { - ds = $P.integrationSearchControl.downdataset; - } - var replacer; - if(updown == "up"){ - replacer = (str, dataItem) => str - .replace(/{onclick}/gi, "pageObject['${pageName}'].integrationSearchControl.updataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');") - .replace(/{ondblclick}/gi, "pageObject['${pageName}'].getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');") - } else { - replacer = (str, dataItem) => str - .replace(/{onclick}/gi, "pageObject['${pageName}'].integrationSearchControl.downdataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');") - .replace(/{ondblclick}/gi, "pageObject['${pageName}'].getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');") - } + var temp = ds._items; + var filtered = []; - var empty = ds.empty; - if(empty){ + filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup); + + integrationSearch.setTotalData(updown, filtered); + + if(filtered.lenth < 1){ trs = notFound; - $P.setTotalData(updown, []); - } else if(tabGroup == "전체"){ - trs = ds.inStrings(found, replacer); - $P.setTotalData(updown, ds._items); } else { + ds._items = filtered; - var temp = ds._items; - - var filtered = []; - - filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup); - - $P.setTotalData(updown, filtered); + trs = ds.inStrings(found, replacer); - if(filtered.lenth < 1){ - trs = notFound; - } else { - ds._items = filtered; - - trs = ds.inStrings(found, replacer); - - ds._items = temp; - } + ds._items = temp; } - - $("#"+tbody).html(trs.join()); - - //보안모드 - fn_securityModeToggle($("#securityMode--top").is(":checked")); } + + $("#"+tbody).html(trs.join()); + + //보안모드 + fn_securityModeToggle($("#securityMode--top").is(":checked")); +} - //합계 표시 - $P.setTotalData = (updown, list) => { +//합계 표시 +integrationSearch.setTotalData = (updown, list) => { + + if(updown == "up"){ - if(updown == "up"){ - - $("#minapCnt--${pageName}").set(list.length); - var minapAmt = list.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); - $("#minapAmt--${pageName}").set(minapAmt); - - var listForSgg = list.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); - $("#minapCntForSgg--${pageName}").set(listForSgg.length); - var minapAmtForSgg = listForSgg.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); - $("#minapAmtForSgg--${pageName}").set(minapAmtForSgg); - - } else { - - var sunapList = list.filter(item => item.data.TAB_GROUP == '수납'); - var sonList = list.filter(item => item.data.TAB_GROUP == '결손'); - - $("#sunapCnt--${pageName}").set(sunapList.length); - var sunapAmt = sunapList.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0); - $("#sunapAmt--${pageName}").set(sunapAmt); - - var sunapListForSgg = sunapList.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); - $("#sunapCntForSgg--${pageName}").set(sunapListForSgg.length); - var sunapAmtForSgg = sunapListForSgg.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0); - $("#sunapAmtForSgg--${pageName}").set(sunapAmtForSgg); - - var sonListForSgg = sonList.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); - $("#sonCntForSgg--${pageName}").set(sonListForSgg.length); - var sonAmtForSgg = sonListForSgg.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); - $("#sonAmtForSgg--${pageName}").set(sonAmtForSgg); - - } + $("#minapCnt--${pageName}").set(list.length); + var minapAmt = list.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); + $("#minapAmt--${pageName}").set(minapAmt); - }; - - - // 엑셀 - $P.fnExcel = (updown) => { - - var cellDefs; + var listForSgg = list.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); + $("#minapCntForSgg--${pageName}").set(listForSgg.length); + var minapAmtForSgg = listForSgg.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); + $("#minapAmtForSgg--${pageName}").set(minapAmtForSgg); - if(updown == "up"){ - if($P.integrationSearchControl.updataset.empty){ - alert("조회된 자료가 없습니다."); - return; - } - - cellDefs = getCellDefs($("#upTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)").not(":hidden"), - $($("#row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(".privacy-mask")); - - $P.integrationSearchControl.query.gridType = "up"; - } else { - if($P.integrationSearchControl.downdataset.empty){ - alert("조회된 자료가 없습니다."); - return; - } - - cellDefs = getCellDefs($("#downTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)").not(":hidden"), - $($("#row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(".privacy-mask")); - - $P.integrationSearchControl.query.gridType = "down"; - } - - $P.integrationSearchControl.query.cellDefs = cellDefs; + } else { - $P.integrationSearchControl.download(); + var sunapList = list.filter(item => item.data.TAB_GROUP == '수납'); + var sonList = list.filter(item => item.data.TAB_GROUP == '결손'); - } - - //납부자번호 복사 - $P.fnCopyPyrNo = (updown) => { - var cur; - if(updown == "up"){ - cur = $P.integrationSearchControl.updataset.getCurrent(); - } else { - cur = $P.integrationSearchControl.downdataset.getCurrent(); - } + $("#sunapCnt--${pageName}").set(sunapList.length); + var sunapAmt = sunapList.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0); + $("#sunapAmt--${pageName}").set(sunapAmt); - if(cur != null){ - navigator.clipboard.writeText(cur.RTPYR_NO); - $("#toastText--${pageName}").html("납부자번호가 복사되었습니다."); - $P.toast.show(); - } - } - - //특기사항관리 - $P.fnManageEtcCn = (updown) => { - var cur; - if(updown == "up"){ - cur = $P.integrationSearchControl.updataset.getCurrent(); - } else { - cur = $P.integrationSearchControl.downdataset.getCurrent(); - } + var sunapListForSgg = sunapList.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); + $("#sunapCntForSgg--${pageName}").set(sunapListForSgg.length); + var sunapAmtForSgg = sunapListForSgg.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0); + $("#sunapAmtForSgg--${pageName}").set(sunapAmtForSgg); - if(cur.length <= 0){ - dialog.alert("처리할 자료가 없습니다."); - return; - } + var sonListForSgg = sonList.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); + $("#sonCntForSgg--${pageName}").set(sonListForSgg.length); + var sonAmtForSgg = sonListForSgg.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); + $("#sonAmtForSgg--${pageName}").set(sonAmtForSgg); + } + +}; - //특기사항일괄입력 - $P.fnInputEtcCn = (updown) => { - var cur; - if(updown == "up"){ - cur = $P.integrationSearchControl.updataset; - - } else { - cur = $P.integrationSearchControl.downdataset; +// 엑셀 +integrationSearch.fnExcel = (updown) => { + + var cellDefs; + + if(updown == "up"){ + if(integrationSearchControl.updataset.empty){ + alert("조회된 자료가 없습니다."); + return; } - if(cur.length <= 0){ - dialog.alert("처리할 자료가 없습니다."); + cellDefs = getCellDefs($("#upTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)").not(":hidden"), + $($("#row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(".privacy-mask")); + + integrationSearchControl.query.gridType = "up"; + } else { + if(integrationSearchControl.downdataset.empty){ + alert("조회된 자료가 없습니다."); return; } - var list = cur.getDataset(); - var grouped = Object.groupBy(list, ({ CRDN_ID }) => CRDN_ID); - var crdnIds = Object.keys(grouped); + cellDefs = getCellDefs($("#downTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)").not(":hidden"), + $($("#row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(".privacy-mask")); - var url = wctx.url("/sprt/sprt01/100/info.do"); - - var dialogId = "inputEtcCnDialog"; - ajax.get({ - url : url - , data : { crdnIds : crdnIds.join(",") } - , success : resp => { - dialog.open({ - id : dialogId - , title : "특기사항입력-일괄" - , size : "xl" - , content : resp - , init : () => { - - $("#"+dialogId).find("input[name='dialogId']").val(dialogId); - var found = $("#"+dialogId).find("template")[0].innerHTML; - var trs = cur.inStrings(found, null); - $("#"+dialogId).find("tbody").html(trs.join()); - } - , onClose : () => { } - }); - } - }); + integrationSearchControl.query.gridType = "down"; + } + + integrationSearchControl.query.cellDefs = cellDefs; + + integrationSearchControl.download(); + +} + +//납부자번호 복사 +integrationSearch.fnCopyPyrNo = (updown) => { + var cur; + if(updown == "up"){ + cur = integrationSearchControl.updataset.getCurrent(); + } else { + cur = integrationSearchControl.downdataset.getCurrent(); + } + + if(cur != null){ + navigator.clipboard.writeText(cur.RTPYR_NO); + $("#toastText--${pageName}").html("납부자번호가 복사되었습니다."); + integrationSearch.toast.show(); + } +} + +//특기사항관리 +integrationSearch.fnManageEtcCn = (updown) => { + var cur; + if(updown == "up"){ + cur = integrationSearchControl.updataset.getCurrent(); + } else { + cur = integrationSearchControl.downdataset.getCurrent(); + } + + if(cur.length <= 0){ + dialog.alert("처리할 자료가 없습니다."); + return; + } +} + +//특기사항일괄입력 +integrationSearch.fnInputEtcCn = (updown) => { + var cur; + if(updown == "up"){ + cur = integrationSearchControl.updataset; + } else { + cur = integrationSearchControl.downdataset; + + } + + if(cur.length <= 0){ + dialog.alert("처리할 자료가 없습니다."); + return; } + + var list = cur.getDataset(); + var grouped = Object.groupBy(list, ({ CRDN_ID }) => CRDN_ID); + var crdnIds = Object.keys(grouped); + + var url = wctx.url("/sprt/sprt01/100/info.do"); + + var dialogId = "inputEtcCnDialog"; + ajax.get({ + url : url + , data : { crdnIds : crdnIds.join(",") } + , success : resp => { + dialog.open({ + id : dialogId + , title : "특기사항입력-일괄" + , size : "xl" + , content : resp + , init : () => { + + $("#"+dialogId).find("input[name='dialogId']").val(dialogId); + var found = $("#"+dialogId).find("template")[0].innerHTML; + var trs = cur.inStrings(found, null); + $("#"+dialogId).find("tbody").html(trs.join()); + } + , onClose : () => { } + }); + } + }); + +} - //단속내역서,단속확인서 - $P.fnPrintCrdn = () => { +//단속내역서,단속확인서 +integrationSearch.fnPrintCrdn = () => { - var upDataset = $P.integrationSearchControl.updataset; - var downDataset = $P.integrationSearchControl.downdataset; + var upDataset = integrationSearchControl.updataset; + var downDataset = integrationSearchControl.downdataset; - if((upDataset.length <= 0) && (downDataset.length <= 0)){ - dialog.alert("출력할 자료가 없습니다."); - return; - } - - var upArr = upDataset.getDataset(); - var downArr = downDataset.getDataset(); - var unionArray = [...upArr, ...downArr]; - - var crdnIds = Object.keys(Object.groupBy(unionArray, ({ CRDN_ID }) => CRDN_ID)); - - var url = wctx.url("/sprt/sprt01/110/info.do"); - - var dialogId = "printCrdnDialog"; - - ajax.get({ - url : url - , data : { crdnIds : crdnIds.join(",") } - , success : resp => { - dialog.open({ - id : dialogId - , title : "종합조회-단속내역" - , size : "xl" - , content : resp - , init : () => { - - $("#"+dialogId).find("input[name='dialogId']").val(dialogId); - var found = $("#"+dialogId).find("template")[0].innerHTML; - var trs1 = upDataset.inStrings(found, null); - var trs2 = downDataset.inStrings(found, null); - $("#"+dialogId).find("tbody").html(trs1.join()+trs2.join()); - } - , onClose : () => { } - }); - } - }); - + if((upDataset.length <= 0) && (downDataset.length <= 0)){ + dialog.alert("출력할 자료가 없습니다."); + return; } + + var upArr = upDataset.getDataset(); + var downArr = downDataset.getDataset(); + var unionArray = [...upArr, ...downArr]; + + var crdnIds = Object.keys(Object.groupBy(unionArray, ({ CRDN_ID }) => CRDN_ID)); + + var url = wctx.url("/sprt/sprt01/110/info.do"); + + var dialogId = "printCrdnDialog"; + + ajax.get({ + url : url + , data : { crdnIds : crdnIds.join(",") } + , success : resp => { + dialog.open({ + id : dialogId + , title : "종합조회-단속내역" + , size : "xl" + , content : resp + , init : () => { + + $("#"+dialogId).find("input[name='dialogId']").val(dialogId); + var found = $("#"+dialogId).find("template")[0].innerHTML; + var trs1 = upDataset.inStrings(found, null); + var trs2 = downDataset.inStrings(found, null); + $("#"+dialogId).find("tbody").html(trs1.join()+trs2.join()); + } + , onClose : () => { } + }); + } + }); + +} - //교부청구서,채권신고서 - $P.fnPrintBill = () => { +//교부청구서,채권신고서 +integrationSearch.fnPrintBill = () => { - var upDataset = $P.integrationSearchControl.updataset; + var upDataset = integrationSearchControl.updataset; - if(upDataset.length <= 0){ - dialog.alert("출력할 자료가 없습니다."); - return; - } - - var upArr = upDataset.getDataset(); - - var crdnIds = Object.keys(Object.groupBy(upArr, ({ CRDN_ID }) => CRDN_ID)); - - var url = wctx.url("/sprt/sprt01/120/info.do"); - - var dialogId = "printBillDialog"; - - ajax.get({ - url : url - , data : { crdnIds : crdnIds.join(",") } - , success : resp => { - dialog.open({ - id : dialogId - , title : "종합조회-교부청구서,채권신고서" - , size : "xl" - , content : resp - , init : () => { - - $("#"+dialogId).find("input[name='dialogId']").val(dialogId); - var found = $("#"+dialogId).find("template")[0].innerHTML; - var trs = upDataset.inStrings(found, null); - $("#"+dialogId).find("tbody").html(trs.join()); - - - var parentRes = new Object(); - var childReq = pageObject.childReq.pop(); - - for(var reqKey in childReq) { - if($P.provide[reqKey]){ - parentRes[reqKey] = $P.provide[reqKey]; - } else { - parentRes[reqKey] = function(){}; - } - } - - pageObject.parentRes.push(parentRes); - } - , onClose : () => { } - }); - } - }); - + if(upDataset.length <= 0){ + dialog.alert("출력할 자료가 없습니다."); + return; } + + var upArr = upDataset.getDataset(); + + var crdnIds = Object.keys(Object.groupBy(upArr, ({ CRDN_ID }) => CRDN_ID)); + + var url = wctx.url("/sprt/sprt01/120/info.do"); + + var dialogId = "printBillDialog"; + + ajax.get({ + url : url + , data : { crdnIds : crdnIds.join(",") } + , success : resp => { + dialog.open({ + id : dialogId + , title : "종합조회-교부청구서,채권신고서" + , size : "xl" + , content : resp + , init : () => { + + $("#"+dialogId).find("input[name='dialogId']").val(dialogId); + var found = $("#"+dialogId).find("template")[0].innerHTML; + var trs = upDataset.inStrings(found, null); + $("#"+dialogId).find("tbody").html(trs.join()); + + + var parentRes = new Object(); + var childReq = pageObject.childReq.pop(); + + for(var reqKey in childReq) { + if(integrationSearch.provide[reqKey]){ + parentRes[reqKey] = integrationSearch.provide[reqKey]; + } else { + parentRes[reqKey] = function(){}; + } + } + + pageObject.parentRes.push(parentRes); + } + , onClose : () => { } + }); + } + }); + +} - //납부확인서 - $P.fnPrintRcvmtConfirm = () => { - - var downDataset = $P.integrationSearchControl.downdataset; +//납부확인서 +integrationSearch.fnPrintRcvmtConfirm = () => { + + var downDataset = integrationSearchControl.downdataset; - if(downDataset.length <= 0){ - dialog.alert("출력할 자료가 없습니다."); - return; - } - - var downArr = downDataset.getDataset(); - - var crdnIds = Object.keys(Object.groupBy(downArr, ({ CRDN_ID }) => CRDN_ID)); - - var url = wctx.url("/sprt/sprt01/130/makeRcvmtConfirmFileFromHwpFormat.do"); - - ajax.post({ - url : url, - data : { - crdnIds : crdnIds.join(","), - globalVariable : {} - }, - success : resp => { - if(resp.filePath != null && resp.filePath != ""){ - var a = document.createElement("a"); - a.href = resp.filePath; - a.download = resp.fileName; - document.getElementById("tempArea--${pageName}").appendChild(a); - a.click(); - document.getElementById("tempArea--${pageName}").removeChild(a); - } - } - }); - + if(downDataset.length <= 0){ + dialog.alert("출력할 자료가 없습니다."); + return; } + + var downArr = downDataset.getDataset(); + + var crdnIds = Object.keys(Object.groupBy(downArr, ({ CRDN_ID }) => CRDN_ID)); + + var url = wctx.url("/sprt/sprt01/130/makeRcvmtConfirmFileFromHwpFormat.do"); + + ajax.post({ + url : url, + data : { + crdnIds : crdnIds.join(","), + globalVariable : {} + }, + success : resp => { + if(resp.filePath != null && resp.filePath != ""){ + var a = document.createElement("a"); + a.href = resp.filePath; + a.download = resp.fileName; + document.getElementById("tempArea--${pageName}").appendChild(a); + a.click(); + document.getElementById("tempArea--${pageName}").removeChild(a); + } + } + }); + +} - //사전통지서 - $P.fnPrintAdvntce = () => { +//사전통지서 +integrationSearch.fnPrintAdvntce = () => { - var upDataset = $P.integrationSearchControl.updataset; + var upDataset = integrationSearchControl.updataset; - if(upDataset.length <= 0){ - dialog.alert("출력할 자료가 없습니다."); - return; - } - - var upArr = upDataset.getDataset(); - - var crdnIds = Object.keys(Object.groupBy(upArr, ({ CRDN_ID }) => CRDN_ID)); - - var url = wctx.url("/sprt/sprt01/140/info.do"); - - var dialogId = "printAdvntceDialog"; - - ajax.get({ - url : url - , data : { crdnIds : crdnIds.join(",") } - , success : resp => { - dialog.open({ - id : dialogId - , title : "종합조회-사전통지서" - , size : "xl" - , content : resp - , init : () => { - - $("#"+dialogId).find("input[name='dialogId']").val(dialogId); - var found = $("#"+dialogId).find("template")[0].innerHTML; - var trs = upDataset.inStrings(found, null); - $("#"+dialogId).find("tbody").html(trs.join()); - - - var parentRes = new Object(); - var childReq = pageObject.childReq.pop(); - - for(var reqKey in childReq) { - if($P.provide[reqKey]){ - parentRes[reqKey] = $P.provide[reqKey]; - } else { - parentRes[reqKey] = function(){}; - } - } - - pageObject.parentRes.push(parentRes); - } - , onClose : () => { } - }); - } - }); - + if(upDataset.length <= 0){ + dialog.alert("출력할 자료가 없습니다."); + return; } + + var upArr = upDataset.getDataset(); + + var crdnIds = Object.keys(Object.groupBy(upArr, ({ CRDN_ID }) => CRDN_ID)); + + var url = wctx.url("/sprt/sprt01/140/info.do"); + + var dialogId = "printAdvntceDialog"; + + ajax.get({ + url : url + , data : { crdnIds : crdnIds.join(",") } + , success : resp => { + dialog.open({ + id : dialogId + , title : "종합조회-사전통지서" + , size : "xl" + , content : resp + , init : () => { + + $("#"+dialogId).find("input[name='dialogId']").val(dialogId); + var found = $("#"+dialogId).find("template")[0].innerHTML; + var trs = upDataset.inStrings(found, null); + $("#"+dialogId).find("tbody").html(trs.join()); + + + var parentRes = new Object(); + var childReq = pageObject.childReq.pop(); + + for(var reqKey in childReq) { + if(integrationSearch.provide[reqKey]){ + parentRes[reqKey] = integrationSearch.provide[reqKey]; + } else { + parentRes[reqKey] = function(){}; + } + } + + pageObject.parentRes.push(parentRes); + } + , onClose : () => { } + }); + } + }); + +} - //고지서 - $P.fnPrintNht = () => { +//고지서 +integrationSearch.fnPrintNht = () => { - var upDataset = $P.integrationSearchControl.updataset; + var upDataset = integrationSearchControl.updataset; - if(upDataset.length <= 0){ - dialog.alert("출력할 자료가 없습니다."); - return; - } - - var upArr = upDataset.getDataset(); - - var crdnIds = Object.keys(Object.groupBy(upArr, ({ CRDN_ID }) => CRDN_ID)); - - var url = wctx.url("/sprt/sprt01/150/info.do"); - - var dialogId = "printNhtDialog"; - - ajax.get({ - url : url - , data : { crdnIds : crdnIds.join(",") } - , success : resp => { - dialog.open({ - id : dialogId - , title : "종합조회-고지서" - , size : "xl" - , content : resp - , init : () => { - - $("#"+dialogId).find("input[name='dialogId']").val(dialogId); - var found = $("#"+dialogId).find("template")[0].innerHTML; - var trs = upDataset.inStrings(found, null); - $("#"+dialogId).find("tbody").html(trs.join()); - - - var parentRes = new Object(); - var childReq = pageObject.childReq.pop(); - - for(var reqKey in childReq) { - if($P.provide[reqKey]){ - parentRes[reqKey] = $P.provide[reqKey]; - } else { - parentRes[reqKey] = function(){}; - } - } - - pageObject.parentRes.push(parentRes); + if(upDataset.length <= 0){ + dialog.alert("출력할 자료가 없습니다."); + return; + } + + var upArr = upDataset.getDataset(); + + var crdnIds = Object.keys(Object.groupBy(upArr, ({ CRDN_ID }) => CRDN_ID)); + + var url = wctx.url("/sprt/sprt01/150/info.do"); + + var dialogId = "printNhtDialog"; + + ajax.get({ + url : url + , data : { crdnIds : crdnIds.join(",") } + , success : resp => { + dialog.open({ + id : dialogId + , title : "종합조회-고지서" + , size : "xl" + , content : resp + , init : () => { + + $("#"+dialogId).find("input[name='dialogId']").val(dialogId); + var found = $("#"+dialogId).find("template")[0].innerHTML; + var trs = upDataset.inStrings(found, null); + $("#"+dialogId).find("tbody").html(trs.join()); + + + var parentRes = new Object(); + var childReq = pageObject.childReq.pop(); + + for(var reqKey in childReq) { + if(integrationSearch.provide[reqKey]){ + parentRes[reqKey] = integrationSearch.provide[reqKey]; + } else { + parentRes[reqKey] = function(){}; + } } - , onClose : () => { } - }); - } - }); - + + pageObject.parentRes.push(parentRes); + } + , onClose : () => { } + }); + } + }); + +} + +//개별총정보 dialog +integrationSearch.getInfo = (taskSeCd, crdnId) => { + if (crdnId == undefined || crdnId == null || crdnId == "") { + return; } - //개별총정보 dialog - $P.getInfo = (taskSeCd, crdnId) => { - if (crdnId == undefined || crdnId == null || crdnId == "") { - return; + var params = { + callControlName : "integrationSearchControl" + , crdnId : crdnId + } + + var url = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do"); + + ajax.get({ + url : url + , data : params + , success : resp => { + dialog.open({ + id : "totalInfoMainDialog" + , title : "개별총정보" + , size : "xxl" + , content : resp + , init : () => { } + , onClose : () => { } + }); } + }); +} - var params = { - callControlName : "pageObject['${pageName}'].integrationSearchControl" - , crdnId : crdnId - } +integrationSearch.provide = { + "getInfo" : function(crdnId){ - var url = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do"); + var upDataset = integrationSearchControl.updataset; + var downDataset = integrationSearchControl.downdataset; - ajax.get({ - url : url - , data : params - , success : resp => { - dialog.open({ - id : "totalInfoMainDialog" - , title : "개별총정보" - , size : "xxl" - , content : resp - , init : () => { } - , onClose : () => { } - }); - } - }); - } - - $P.provide = { - "getInfo" : function(crdnId){ - - var upDataset = $P.integrationSearchControl.updataset; - var downDataset = $P.integrationSearchControl.downdataset; - - if(upDataset.length > 0){ - var info = upDataset.getData(crdnId); - if(info != null){ - return info; - } - } - - if(downDataset.length > 0){ - var info = downDataset.getData(crdnId); - if(info != null){ - return info; - } + if(upDataset.length > 0){ + var info = upDataset.getData(crdnId); + if(info != null){ + return info; } - - return null; - }, - "isAllSameTask" : function(crdnIdArr){ - - var upArr = $P.integrationSearchControl.updataset.getDataset(); - var downArr = $P.integrationSearchControl.downdataset.getDataset(); - var unionArr = [...upArr, ...downArr]; - - var filtered = unionArr.filter(item => crdnIdArr.includes(item.CRDN_ID)); - var taskSeCd = filtered[0].TASK_SE_CD; - var result = filtered.every(item => item.TASK_SE_CD == taskSeCd); - - return result; - } - }; - /************************************************************************** - * Event - **************************************************************************/ - //이벤트 - $P.setEvent = () => { - - $("#btnReset--${pageName}").on("click", function(){ $P.fnReset(); }); - $("#btnSearch--${pageName}").on("click", function(){ $P.fnSearchList(); }); - - $("#btnPrintCrdn--${pageName}").on("click", function(){ $P.fnPrintCrdn(); }); - $("#btnPrintBill--${pageName}").on("click", function(){ $P.fnPrintBill(); }); - - $("#btnUpExcel--${pageName}").on("click", function(){ $P.fnExcel("up"); }); - $("#btnDownExcel--${pageName}").on("click", function(){ $P.fnExcel("down"); }); - - $("#btnUpCopyPyrNo--${pageName}").on("click", function(){ $P.fnCopyPyrNo("up"); }); - $("#btnDownCopyPyrNo--${pageName}").on("click", function(){ $P.fnCopyPyrNo("down"); }); - - $("#btnUpManageEtcCn--${pageName}").on("click", function(){ $P.fnManageEtcCn("up"); }); - $("#btnDownManageEtcCn--${pageName}").on("click", function(){ $P.fnManageEtcCn("down"); }); - - $("#btnUpInputEtcCn--${pageName}").on("click", function(){ $P.fnInputEtcCn("up"); }); - $("#btnDownInputEtcCn--${pageName}").on("click", function(){ $P.fnInputEtcCn("down"); }); - - $("#btnDownPrintRcvmtConfirm--${pageName}").on("click", function(){ $P.fnPrintRcvmtConfirm(); }); + } - $("#btnUpPrintAdvntce--${pageName}").on("click", function(){ $P.fnPrintAdvntce(); }); - $("#btnPrintNht--${pageName}").on("click", function(){ $P.fnPrintNht(); }); + if(downDataset.length > 0){ + var info = downDataset.getData(crdnId); + if(info != null){ + return info; + } + } - //$("#btn").on("click", function(){ }); + return null; + }, + "isAllSameTask" : function(crdnIdArr){ + + var upArr = integrationSearchControl.updataset.getDataset(); + var downArr = integrationSearchControl.downdataset.getDataset(); + var unionArr = [...upArr, ...downArr]; + + var filtered = unionArr.filter(item => crdnIdArr.includes(item.CRDN_ID)); + var taskSeCd = filtered[0].TASK_SE_CD; + var result = filtered.every(item => item.TASK_SE_CD == taskSeCd); + + return result; + } +}; +/************************************************************************** + * Event + **************************************************************************/ +//이벤트 +integrationSearch.setEvent = () => { + + $("#btnReset--${pageName}").on("click", function(){ integrationSearch.fnReset(); }); + $("#btnSearch--${pageName}").on("click", function(){ integrationSearch.fnSearchList(); }); + + $("#btnPrintCrdn--${pageName}").on("click", function(){ integrationSearch.fnPrintCrdn(); }); + $("#btnPrintBill--${pageName}").on("click", function(){ integrationSearch.fnPrintBill(); }); + + $("#btnUpExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel("up"); }); + $("#btnDownExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel("down"); }); + + $("#btnUpCopyPyrNo--${pageName}").on("click", function(){ integrationSearch.fnCopyPyrNo("up"); }); + $("#btnDownCopyPyrNo--${pageName}").on("click", function(){ integrationSearch.fnCopyPyrNo("down"); }); + + $("#btnUpManageEtcCn--${pageName}").on("click", function(){ integrationSearch.fnManageEtcCn("up"); }); + $("#btnDownManageEtcCn--${pageName}").on("click", function(){ integrationSearch.fnManageEtcCn("down"); }); + + $("#btnUpInputEtcCn--${pageName}").on("click", function(){ integrationSearch.fnInputEtcCn("up"); }); + $("#btnDownInputEtcCn--${pageName}").on("click", function(){ integrationSearch.fnInputEtcCn("down"); }); + + $("#btnDownPrintRcvmtConfirm--${pageName}").on("click", function(){ integrationSearch.fnPrintRcvmtConfirm(); }); + + $("#btnUpPrintAdvntce--${pageName}").on("click", function(){ integrationSearch.fnPrintAdvntce(); }); + $("#btnPrintNht--${pageName}").on("click", function(){ integrationSearch.fnPrintNht(); }); + + //$("#btn").on("click", function(){ }); - - // 달력 초기화 - initDatepicker("frmSearch--${pageName}"); - initDetailSearchButton("frmSearch--${pageName}"); - - // form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용 - $("#frmSearch--${pageName}").find(".form-date").each(function() { - $(this).on("input", function() { - var value = this.value.replaceAll("-", ""); - - if (value.length > 7) { - this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6); - } else if(value.length > 5) { - this.value = value.substring(0, 4) + "-" + value.substring(4); - } - }); + + // 달력 초기화 + initDatepicker("frmSearch--${pageName}"); + initDetailSearchButton("frmSearch--${pageName}"); + + // form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용 + $("#frmSearch--${pageName}").find(".form-date").each(function() { + $(this).on("input", function() { + var value = this.value.replaceAll("-", ""); + + if (value.length > 7) { + this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6); + } else if(value.length > 5) { + this.value = value.substring(0, 4) + "-" + value.substring(4); + } }); - - $("#frmSearch--${pageName}").find(".form-time").each(function(){ - $(this).on("input",function(){ - var value = this.value.replaceAll(":",""); - - if(value.length > 5){ - this.value = value.substring(0,2)+":"+value.substring(2,4)+":"+value.substring(4); - } else if(value.length > 3){ - this.value = value.substring(0,2)+":"+value.substring(2); - } + }); + + $("#frmSearch--${pageName}").find(".form-time").each(function(){ + $(this).on("input",function(){ + var value = this.value.replaceAll(":",""); + + if(value.length > 5){ + this.value = value.substring(0,2)+":"+value.substring(2,4)+":"+value.substring(4); + } else if(value.length > 3){ + this.value = value.substring(0,2)+":"+value.substring(2); + } - }); }); - - // DataTables width 변경 조정 - $("#upTable--${pageName}").find("th").resizable( {handles : "e"} ); - $("#downTable--${pageName}").find("th").resizable( {handles : "e"} ); - } + }); + + // DataTables width 변경 조정 + $("#upTable--${pageName}").find("th").resizable( {handles : "e"} ); + $("#downTable--${pageName}").find("th").resizable( {handles : "e"} ); +} + +window.integrationSearchControl = integrationSearchControl; +window.integrationSearch = integrationSearch; + +/************************************************************************** + * script 진입 + **************************************************************************/ +$(document).ready(function() { - /************************************************************************** - * script 진입 - **************************************************************************/ $("#upTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML); $("#downTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML); // 이벤트 설정 - $P.setEvent(); + integrationSearch.setEvent(); // 보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - $P.fnResetAndChangeBiz(""); - - if($P.fastSearch != null){ - if($P.fastSearch.fastBy == "vhrno"){ - $("#ischVhrno--${pageName}").val($P.fastSearch.fastTerm); - } else if($P.fastSearch.fastBy == "rtpyrNm"){ - $("#ischRtpyrNm--${pageName}").val($P.fastSearch.fastTerm); - } else if($P.fastSearch.fastBy == "rtpyrNo"){ - $("#ischRtpyrNo--${pageName}").val($P.fastSearch.fastTerm); - } else if($P.fastSearch.fastBy == "cvlcptAplcntNm"){ - $("#ischCvlcptAplcntNm--${pageName}").val($P.fastSearch.fastTerm); + integrationSearch.fnResetAndChangeBiz(""); + + if(integrationSearch.fastSearch != null){ + if(integrationSearch.fastSearch.fastBy == "vhrno"){ + $("#ischVhrno--${pageName}").val(integrationSearch.fastSearch.fastTerm); + } else if(integrationSearch.fastSearch.fastBy == "rtpyrNm"){ + $("#ischRtpyrNm--${pageName}").val(integrationSearch.fastSearch.fastTerm); + } else if(integrationSearch.fastSearch.fastBy == "rtpyrNo"){ + $("#ischRtpyrNo--${pageName}").val(integrationSearch.fastSearch.fastTerm); + } else if(integrationSearch.fastSearch.fastBy == "cvlcptAplcntNm"){ + $("#ischCvlcptAplcntNm--${pageName}").val(integrationSearch.fastSearch.fastTerm); } else { return; } diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01011-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01011-info.jsp index 760a1e98..c2766656 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01011-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01011-info.jsp @@ -57,13 +57,13 @@ diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp index 66a3420d..f4d8302b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp @@ -71,49 +71,49 @@