From dfd637270368cb3f1ee999fb0e432aff4b5a0ad1 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 21 Mar 2024 14:07:12 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=8B=9C=EC=86=A1=EB=8B=AC=20?= =?UTF-8?q?=ED=95=9C=EA=B8=80=ED=8C=8C=EC=9D=BC=20=EC=B6=9C=EB=A0=A5=20?= =?UTF-8?q?=EB=AC=B8=EC=84=9C=EB=B2=88=ED=98=B8=20=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=EC=B0=BD=EC=9D=B4=20=EB=8B=A4=EC=9D=B4=EC=96=BC=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=B0=BD=EC=9C=BC=EB=A1=9C=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=EB=90=98=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/sndb01240-main.jsp | 41 +++--- .../WEB-INF/jsp/fims/sndb/sndb01250-info.jsp | 42 +++--- .../resources/html/inputDocNoTtlDialog.html | 130 +++--------------- 3 files changed, 65 insertions(+), 148 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01240-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01240-main.jsp index d9535129..70e0d963 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01240-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01240-main.jsp @@ -558,7 +558,7 @@ } // 한글파일 출력 버튼 이벤트 - $P.fnHwpSvbtc = (title) => { + $P.fnHwpSvbtc = async(title) => { if ($P.control.dataset.empty) { dialog.alert({ content : "검색된 자료가 없습니다." @@ -574,24 +574,27 @@ let textDate = DateUtil.getDateDay(0).date + " ~ " + DateUtil.getDateDay(15).date + " (15일간)"; // 문서번호, 제목, 공고기한 입력 - let popupWidth = 720; - let popupHeight = 240; - let popupX = (window.screen.width / 2) - (popupWidth / 2); - let popupY = (window.screen.height / 2) - (popupHeight / 2); - - window.open( - encodeURI(wctx.url("/resources/html/inputDocNoTtlDialog.html" - + "?openerPageName=${pageName}" - + "&prefix=" + $P.control.prefix - + "&title=" + title - + "&callPurpose=" + "hwpSvbtc" - + "&docNo=" + docNo - + "&ttlNm=" + ttlNm - + "&textDate=" + textDate - )) - , "inputDelRsnDialog" - , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY - ); + var resp = await fetch(wctx.url("/resources/html/inputDocNoTtlDialog.html")); + var template = await resp.text(); + + dialog.open({ + id : "inputDocNoTtlDialog", + title: title, + size : "lg", + content: template, + init : () => { + $("#docNo").val(docNo); + $("#ttlNm").val(ttlNm); + $("#textDate").val(textDate); + }, + onOK : () => { + $P.callbackDocNoTtl({ + "docNo" : $("#docNo").val(), + "ttlNm" : $("#ttlNm").val(), + "textDate" : $("#textDate").val() + }); + } + }); } // 수정 버튼 이벤트 diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01250-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01250-info.jsp index 1904cfb8..485787ef 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01250-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01250-info.jsp @@ -408,31 +408,35 @@ } // 한글파일 출력 버튼 이벤트 - $P.fnHwpSvbtc = (title) => { + $P.fnHwpSvbtc = async(title) => { // 문서번호, 제목, 공고기한 입력 let docNo = $P.control.dataset.getValue("DOC_NO"); let ttlNm = $P.control.dataset.getValue("TASK_SE_NM") + " 과태료 처분에 대한 " + $P.control.dataset.getValue("TTL_NM"); let textDate = DateUtil.getDateDay(0).date + " ~ " + DateUtil.getDateDay(15).date + " (15일간)"; // 문서번호, 제목, 공고기한 입력 - let popupWidth = 640; - let popupHeight = 240; - let popupX = (window.screen.width / 2) - (popupWidth / 2); - let popupY = (window.screen.height / 2) - (popupHeight / 2); - - window.open( - encodeURI(wctx.url("/resources/html/inputDocNoTtlDialog.html" - + "?openerPageName=${pageName}" - + "&prefix=" + $P.control.prefix - + "&title=" + title - + "&callPurpose=" + "hwpSvbtc" - + "&docNo=" + docNo - + "&ttlNm=" + ttlNm - + "&textDate=" + textDate - )) - , "inputDelRsnDialog" - , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY - ); + var resp = await fetch(wctx.url("/resources/html/inputDocNoTtlDialog.html")); + var template = await resp.text(); + + dialog.open({ + id : "inputDocNoTtlDialog", + title: title, + size : "lg", + content: template, + init : () => { + $("#docNo").val(docNo); + $("#ttlNm").val(ttlNm); + $("#textDate").val(textDate); + }, + onOK : () => { + $P.callbackDocNoTtl({ + "docNo" : $("#docNo").val(), + "ttlNm" : $("#ttlNm").val(), + "textDate" : $("#textDate").val() + }); + } + }); + } // 삭제 버튼 이벤트 diff --git a/src/main/webapp/resources/html/inputDocNoTtlDialog.html b/src/main/webapp/resources/html/inputDocNoTtlDialog.html index 4a603d62..c4e0639b 100644 --- a/src/main/webapp/resources/html/inputDocNoTtlDialog.html +++ b/src/main/webapp/resources/html/inputDocNoTtlDialog.html @@ -1,113 +1,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - 공시송달 출력 입력 - - - -
-
-