From f3a2ec5da4ca65616466debd0c8c6a6b180d6734 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 6 Feb 2024 14:52:00 +0900 Subject: [PATCH] =?UTF-8?q?=ED=86=B5=ED=95=A9=EC=A1=B0=ED=9A=8C=20pageObje?= =?UTF-8?q?ct=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/sprt/web/Sprt01Controller.java | 3 +- .../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 +- 5 files changed, 731 insertions(+), 734 deletions(-) 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 2d840304..4a1e7f88 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java @@ -114,6 +114,7 @@ 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(); @@ -140,8 +141,6 @@ 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/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp index d374cde6..e7e8195e 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,817 +43,815 @@ 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 - } -}); - -/************************************************************************** - * 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)); - - $("#upTbody--${pageName}").find("input[type='checkbox']").each(function() { - var checkbox = $(this); - checkbox.prop("checked", keys.includes(checkbox.val())); - }); -}; +pageObject["${pageName}"] = {}; -integrationSearchControl.downdataset.onSelectionChange = (selected) => { +$(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 + } + }); - var ds = 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())); - }); - -}; - - -/************************************************************************** - * - **************************************************************************/ -var integrationSearch = {}; + /************************************************************************** + * 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())); + }); -integrationSearch.fastSearch = ${fastSearch}; + }; -integrationSearch.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { - animation: true, - autohide: true, - delay: 2000 -}); + $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())); + }); + }; + + + $P.fastSearch = ${fastSearch}; -// 검색 조건 파라미터 가져오기 -integrationSearch.getParams = () => { - var formFields = new FimsFormFields("#frmSearch--${pageName}"); - var formData = formFields.get(); + $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { + animation: true, + autohide: true, + delay: 2000 + }); - return formData; -} -// 초기화 -integrationSearch.fnResetAndChangeBiz = (taskSeCd) => { - - // 항목 초기화 - $("#ischVltnCd--${pageName}").empty(); + // 검색 조건 파라미터 가져오기 + $P.getParams = () => { + var formFields = new FimsFormFields("#frmSearch--${pageName}"); + var formData = formFields.get(); - $("#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(""); - }) + return formData; } - - integrationSearch.fnReset(); - -} -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(key.startsWith("ischOnlyData") || key.startsWith("ischExclData") - || key.endsWith("Similar")){ - continue; + // 초기화 + $P.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(); } - var value = query[key]; - if(value != null && value != ""){ - minKeyword = true; - break; + if(taskSeCd != ""){ + $(vltnIdCode).each(function(index, item) { + $("#ischVltnCd--${pageName}").append(""); + }) } + + $P.fnReset(); + } - - 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(); -} -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") + "');") + $P.fnReset = () => { + + $P.integrationSearchControl.updataset.clear(); + $P.integrationSearchControl.downdataset.clear(); + } - - - 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 { + + // 검색 + $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; + } + } + + if(!minKeyword){ + dialog.alert("검색조건을 입력하세요."); + return; + } - var temp = ds._items; + $("#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(); - var filtered = []; + $P.integrationSearchControl.load(); + } + + $P.renderList = (updown, tabGroup) => { - filtered = temp.filter(item => item.data.TAB_GROUP == 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 = $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") + "');") + } - integrationSearch.setTotalData(updown, filtered); - if(filtered.lenth < 1){ + var empty = ds.empty; + if(empty){ trs = notFound; + $P.setTotalData(updown, []); + } else if(tabGroup == "전체"){ + trs = ds.inStrings(found, replacer); + $P.setTotalData(updown, ds._items); } else { - ds._items = filtered; - trs = ds.inStrings(found, replacer); + var temp = ds._items; + + var filtered = []; - ds._items = temp; + filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup); + + $P.setTotalData(updown, filtered); + + if(filtered.lenth < 1){ + trs = notFound; + } else { + ds._items = filtered; + + trs = ds.inStrings(found, replacer); + + ds._items = temp; + } } + + $("#"+tbody).html(trs.join()); + + //보안모드 + fn_securityModeToggle($("#securityMode--top").is(":checked")); } - - $("#"+tbody).html(trs.join()); - - //보안모드 - fn_securityModeToggle($("#securityMode--top").is(":checked")); -} -//합계 표시 -integrationSearch.setTotalData = (updown, list) => { - - 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); + //합계 표시 + $P.setTotalData = (updown, list) => { - 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 { + 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); + + } - var sunapList = list.filter(item => item.data.TAB_GROUP == '수납'); - var sonList = list.filter(item => item.data.TAB_GROUP == '결손'); + }; + + + // 엑셀 + $P.fnExcel = (updown) => { + + var cellDefs; - $("#sunapCnt--${pageName}").set(sunapList.length); - var sunapAmt = sunapList.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0); - $("#sunapAmt--${pageName}").set(sunapAmt); + 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; - 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); + $P.integrationSearchControl.download(); - 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.fnCopyPyrNo = (updown) => { + var cur; + if(updown == "up"){ + cur = $P.integrationSearchControl.updataset.getCurrent(); + } else { + cur = $P.integrationSearchControl.downdataset.getCurrent(); + } + + 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(); + } + + if(cur.length <= 0){ + dialog.alert("처리할 자료가 없습니다."); + return; + } + } -// 엑셀 -integrationSearch.fnExcel = (updown) => { + //특기사항일괄입력 + $P.fnInputEtcCn = (updown) => { + var cur; + if(updown == "up"){ + cur = $P.integrationSearchControl.updataset; + + } else { + cur = $P.integrationSearchControl.downdataset; - var cellDefs; - - if(updown == "up"){ - if(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")); - - integrationSearchControl.query.gridType = "up"; - } else { - if(integrationSearchControl.downdataset.empty){ - alert("조회된 자료가 없습니다."); + if(cur.length <= 0){ + dialog.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")); + var list = cur.getDataset(); + var grouped = Object.groupBy(list, ({ CRDN_ID }) => CRDN_ID); + var crdnIds = Object.keys(grouped); - 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; + 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 : () => { } + }); + } + }); - } 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 : () => { } - }); - } - }); - -} -//단속내역서,단속확인서 -integrationSearch.fnPrintCrdn = () => { + //단속내역서,단속확인서 + $P.fnPrintCrdn = () => { - var upDataset = integrationSearchControl.updataset; - var downDataset = integrationSearchControl.downdataset; + var upDataset = $P.integrationSearchControl.updataset; + var downDataset = $P.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 : () => { } + }); + } + }); + + } -//교부청구서,채권신고서 -integrationSearch.fnPrintBill = () => { + //교부청구서,채권신고서 + $P.fnPrintBill = () => { - var upDataset = integrationSearchControl.updataset; + var upDataset = $P.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(integrationSearch.provide[reqKey]){ - parentRes[reqKey] = integrationSearch.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($P.provide[reqKey]){ + parentRes[reqKey] = $P.provide[reqKey]; + } else { + parentRes[reqKey] = function(){}; + } + } + + pageObject.parentRes.push(parentRes); + } + , onClose : () => { } + }); + } + }); + + } -//납부확인서 -integrationSearch.fnPrintRcvmtConfirm = () => { - - var downDataset = integrationSearchControl.downdataset; + //납부확인서 + $P.fnPrintRcvmtConfirm = () => { + + var downDataset = $P.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); + } + } + }); + + } -//사전통지서 -integrationSearch.fnPrintAdvntce = () => { + //사전통지서 + $P.fnPrintAdvntce = () => { - var upDataset = integrationSearchControl.updataset; + var upDataset = $P.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(integrationSearch.provide[reqKey]){ - parentRes[reqKey] = integrationSearch.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($P.provide[reqKey]){ + parentRes[reqKey] = $P.provide[reqKey]; + } else { + parentRes[reqKey] = function(){}; + } + } + + pageObject.parentRes.push(parentRes); + } + , onClose : () => { } + }); + } + }); + + } -//고지서 -integrationSearch.fnPrintNht = () => { + //고지서 + $P.fnPrintNht = () => { - var upDataset = integrationSearchControl.updataset; + var upDataset = $P.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(integrationSearch.provide[reqKey]){ - parentRes[reqKey] = integrationSearch.provide[reqKey]; - } else { - parentRes[reqKey] = function(){}; - } - } - - pageObject.parentRes.push(parentRes); - } - , onClose : () => { } - }); + if(upDataset.length <= 0){ + dialog.alert("출력할 자료가 없습니다."); + return; } - }); - -} - -//개별총정보 dialog -integrationSearch.getInfo = (taskSeCd, crdnId) => { - if (crdnId == undefined || crdnId == null || crdnId == "") { - 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); + } + , onClose : () => { } + }); + } + }); + } - 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 : () => { } - }); + //개별총정보 dialog + $P.getInfo = (taskSeCd, crdnId) => { + if (crdnId == undefined || crdnId == null || crdnId == "") { + return; } - }); -} -integrationSearch.provide = { - "getInfo" : function(crdnId){ - - var upDataset = integrationSearchControl.updataset; - var downDataset = integrationSearchControl.downdataset; - - if(upDataset.length > 0){ - var info = upDataset.getData(crdnId); - if(info != null){ - return info; - } + var params = { + callControlName : "pageObject['${pageName}'].integrationSearchControl" + , crdnId : crdnId } - if(downDataset.length > 0){ - var info = downDataset.getData(crdnId); - if(info != null){ - return info; - } - } + var url = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do"); - 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); + ajax.get({ + url : url + , data : params + , success : resp => { + dialog.open({ + id : "totalInfoMainDialog" + , title : "개별총정보" + , size : "xxl" + , content : resp + , init : () => { } + , onClose : () => { } + }); } }); - }); - - $("#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); + } + + $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; + } + } + + 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(); }); + + //$("#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); + } + }); }); - }); - - // DataTables width 변경 조정 - $("#upTable--${pageName}").find("th").resizable( {handles : "e"} ); - $("#downTable--${pageName}").find("th").resizable( {handles : "e"} ); -} - -window.integrationSearchControl = integrationSearchControl; -window.integrationSearch = integrationSearch; + + $("#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); + } -/************************************************************************** - * script 진입 - **************************************************************************/ -$(document).ready(function() { + }); + }); + + // DataTables width 변경 조정 + $("#upTable--${pageName}").find("th").resizable( {handles : "e"} ); + $("#downTable--${pageName}").find("th").resizable( {handles : "e"} ); + } + /************************************************************************** + * script 진입 + **************************************************************************/ $("#upTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML); $("#downTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML); // 이벤트 설정 - integrationSearch.setEvent(); + $P.setEvent(); // 보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - 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); + $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); } 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 c2766656..760a1e98 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 f4d8302b..66a3420d 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 @@