diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01080-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01080-info.jsp index 9bb0a79b..9ba3e594 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01080-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01080-info.jsp @@ -421,27 +421,37 @@ } // 우편통합발송 버튼 이벤트 - $P.fnCreateSndngLink = (title) => { + $P.fnCreateSndngLink = async(title) => { // validate 확인 if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; - let popupWidth = 480; - let popupHeight = 480; - - let popupX = (window.screen.width / 2) - (popupWidth / 2); - let popupY= (window.screen.height / 2) - (popupHeight / 2); - - window.open( - wctx.url("/resources/html/inputDateDialog.html" - + "?openerPageName=${pageName}" - + "&prefix=" + "sndngLink" - + "&callPurpose=" + "create" - + "&sndngYmd=" + $P.control.dataset.getValue("SNDNG_YMD") - + "&sndngEndYmd=" + $P.control.dataset.getValue("SNDNG_END_YMD") - ) - , "inputEPostDateDialog" - , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY - ); + var resp = await fetch(wctx.url("/resources/html/inputDateDialog.html")); + var template = await resp.text(); + + dialog.open({ + id : "inputEPostDateDialog", + title: title, + size : "md", + content: template, + init : () => { + $("#divPostSndng").show(); + initDatepicker("frmInputDate"); + $("#sndngYmd").datepicker("setDate", $P.control.dataset.getValue("SNDNG_YMD")); + $("#sndngEndYmd").datepicker("setDate", $P.control.dataset.getValue("SNDNG_END_YMD")); + }, + onOK : () => { + if (!inputDateComparison($("#sndngYmd").val(), $("#sndngEndYmd").val())) { + return; + } + + $P.callbackDate({ + "sndngYmd" : $("#sndngYmd").val(), + "sndngEndYmd" : $("#sndngEndYmd").val(), + "postSndngSeCd" : $("#frmInputDate").find("[name='postSndngSeCd']:checked").val() + }); + } + }); + } // 사전통지출력 버튼 이벤트 diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01210-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01210-main.jsp index b45ebc12..ca55d0ba 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01210-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01210-main.jsp @@ -491,30 +491,39 @@ } // 감경부과등록 버튼 이벤트 - fnCreateRductLevy${pageName} = () => { + fnCreateRductLevy${pageName} = async() => { // validate 확인 if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; - let callbackFuncName = "createRductLevy${pageName}"; let sndngYmd = DateUtil.getDateDay().date; let dudtYmd = DateUtil.getDateDay(20).date; - let popupWidth = 480; - let popupHeight = 480; - - let popupX = (window.screen.width / 2) - (popupWidth / 2); - let popupY= (window.screen.height / 2) - (popupHeight / 2); - - window.open( - wctx.url("/resources/html/inputDateDialog.html" - + "?callbackFuncName=" + callbackFuncName - + "&CALL_PURPOSE=" + "levy" - + "&SNDNG_YMD=" + sndngYmd - + "&DUDT_YMD=" + dudtYmd - ) - , "inputEPostDateDialog" - , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY - ); + var resp = await fetch(wctx.url("/resources/html/inputDateDialog.html")); + var template = await resp.text(); + + dialog.open({ + id : "inputRductLevyDateDialog", + title: "감경부과등록", + size : "md", + content: template, + init : () => { + $("#divPostSndng").hide(); + initDatepicker("frmInputDate"); + $("#sndngYmd").datepicker("setDate", sndngYmd); + $("#sndngEndYmd").datepicker("setDate", sndngEndYmd); + }, + onOK : () => { + if (!inputDateComparison($("#sndngYmd").val(), $("#sndngEndYmd").val())) { + return; + } + + $P.callbackDate({ + "sndngYmd" : $("#sndngYmd").val(), + "dudtYmd" : $("#sndngEndYmd").val() + }); + } + }); + } /************************************************************************** diff --git a/src/main/webapp/resources/html/inputDateDialog.html b/src/main/webapp/resources/html/inputDateDialog.html index 689f2640..ac7a0f60 100644 --- a/src/main/webapp/resources/html/inputDateDialog.html +++ b/src/main/webapp/resources/html/inputDateDialog.html @@ -1,177 +1,30 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - -