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 20eb5b8f..403d98f8 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java @@ -42,7 +42,8 @@ public class Sprt01Controller extends ApplicationController { inputEtcCnMain = "/100/info.do", inputEtcCn = "/100/update.do", - printCrdnMain = "/110/info.do" + printCrdnMain = "/110/info.do", + printBillMain = "/120/info.do" ; } @@ -277,4 +278,16 @@ public class Sprt01Controller extends ApplicationController { return mav; } + + /**교부청구서,채권신고서 출력 화면을 연다. + * + * @return /fims/sprt/sprt01120 + */ + public ModelAndView printBillMain(String... crdnIds) { + ModelAndView mav = new ModelAndView("fims/sprt/sprt01120-info"); + + mav.addObject("crdnIds", toJson(crdnIds)); + + return mav; + } } diff --git a/src/main/java/cokr/xit/fims/task/web/CmnController.java b/src/main/java/cokr/xit/fims/task/web/CmnController.java index 8e8c9c03..365218f8 100644 --- a/src/main/java/cokr/xit/fims/task/web/CmnController.java +++ b/src/main/java/cokr/xit/fims/task/web/CmnController.java @@ -366,6 +366,11 @@ public class CmnController { return super.printCrdnMain(crdnIds); } + @Override + @RequestMapping(name="교부청구서,채권신고서 출력 화면", value=METHOD_URL.printBillMain) + public ModelAndView printBillMain(String... crdnIds) { + return super.printBillMain(crdnIds); + } } @Controller 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 b1a75695..e3550731 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 @@ -323,8 +323,9 @@ integrationSearch.fnManageEtcCn = (updown) => { cur = integrationSearchControl.downdataset.getCurrent(); } - if(cur != null){ - + if(cur.length <= 0){ + dialog.alert("처리할 자료가 없습니다."); + return; } } @@ -340,6 +341,7 @@ integrationSearch.fnInputEtcCn = (updown) => { } if(cur.length <= 0){ + dialog.alert("처리할 자료가 없습니다."); return; } @@ -381,6 +383,7 @@ integrationSearch.fnPrintCrdn = () => { var downDataset = integrationSearchControl.downdataset; if((upDataset.length <= 0) && (downDataset.length <= 0)){ + dialog.alert("출력할 자료가 없습니다."); return; } @@ -418,6 +421,62 @@ integrationSearch.fnPrintCrdn = () => { } + +//교부청구서,채권신고서 +integrationSearch.fnPrintBill = () => { + + 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(integrationSearch.provide[reqKey]){ + parentRes[reqKey] = integrationSearch.provide[reqKey]; + } else { + parentRes[reqKey] = function(){}; + } + } + + pageObject.parentRes.push(parentRes); + } + , onClose : () => { } + }); + } + }); + +} + //개별총정보 dialog integrationSearch.getInfo = (taskSeCd, crdnId) => { if (crdnId == undefined || crdnId == null || crdnId == "") { @@ -446,10 +505,33 @@ integrationSearch.getInfo = (taskSeCd, crdnId) => { } }); } + +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; + } + } + + if(downDataset.length > 0){ + var info = downDataset.getData(crdnId); + if(info != null){ + return info; + } + } + + return null; + } +}; /************************************************************************** * Event **************************************************************************/ - //이벤트 integrationSearch.setEvent = () => { @@ -457,6 +539,7 @@ integrationSearch.setEvent = () => { $("#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"); }); 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 b649f983..da403187 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 @@ -23,8 +23,8 @@ title="고지서" onclick=""> 고지서 -