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 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - -