From c92c08c87a74d7640b5d5bbc7649518f1f29e88e Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 21 Mar 2024 14:48:05 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=9C=EC=86=A1=EC=9D=BC=EC=9E=90,=EB=82=A9?= =?UTF-8?q?=EA=B8=B0=EC=9D=BC=EC=9E=90=20=EC=9E=85=EB=A0=A5=20=EC=B0=BD?= =?UTF-8?q?=EC=9D=B4=20=EB=8B=A4=EC=9D=B4=EC=96=BC=EB=A1=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=B0=BD=EC=9C=BC=EB=A1=9C=20=ED=91=9C=EC=8B=9C=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=ED=95=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/sndb/sndb01080-info.jsp | 46 ++-- .../WEB-INF/jsp/fims/sndb/sndb01210-main.jsp | 45 ++-- .../resources/html/inputDateDialog.html | 199 +++--------------- .../webapp/resources/js/base/base-fims.js | 2 +- .../js/fims/framework/cmm/cmmnDateUtil.js | 38 ++++ 5 files changed, 120 insertions(+), 210 deletions(-) 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 일자선택 - - - -
-
-