From d4bdaf242f00ac8a55bdf3746ae47886deb77cd2 Mon Sep 17 00:00:00 2001 From: jjh Date: Tue, 24 Sep 2024 17:59:47 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=84=EB=8C=80=EC=B0=A8=EA=B3=84=EC=95=BD?= =?UTF-8?q?=20=EC=8A=B9=EC=9D=B8=20=EC=9A=94=EC=B2=AD=20=EC=B7=A8=EC=86=8C?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/rent/rent02010-main.jsp | 60 +++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/rent/rent02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/rent/rent02010-main.jsp index ed153f1c..0db5f46b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/rent/rent02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/rent/rent02010-main.jsp @@ -100,9 +100,12 @@ - + @@ -353,6 +356,29 @@ }); } + // 임대계약서 승인 요청 취소 + $P.removeAprvDmnd = (params) => { + if (!params) return; + + ajax.get({ + url: wctx.url("${prefixUrl}" + "/010/removeAprv.do") + , data: params || {} + , success: (resp) => { + let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, "승인 요청 취소"); + + // 메시지 출력 + dialog.alert({ + content: showMessage + , init: () => { AppSupport.setDialogZindex(); } + , onOK: () => { } + , onClose: () => { + if (resp.saved) { ctrl.reload({ all: true }); } + } + }); + } + }); + } + // 버튼 설정 $P.setButton = (tabName) => { // tab @@ -529,9 +555,8 @@ }); } - // 임대계약서 승인 요청 - $P.fnLsctAprvDmnd = () => { + $P.fnCreateAprvDmnd = () => { let selected = $P.ctrl.getDataset("selected"); // 선택 자료 if (selected.length < 1) { @@ -556,6 +581,32 @@ }); } + // 임대계약서 승인 요청 취소 + $P.fnCreateAprvDmnd = () => { + let selected = $P.ctrl.getDataset("selected"); // 선택 자료 + + if (selected.length < 1) { + dialog.alert({ + content: "선택하신 " + $P.ctrl.prefixName + " 정보가 없습니다." + , init: () => { AppSupport.setDialogZindex(); } + , onOK: () => { } + }); + return; + } + + dialog.alert({ + content: "선택한 " + selected.length + "건의 " + $P.ctrl.prefixName + " 정보를 승인 요청을 취소하시겠습니까?" + , onOK: () => { + let params = { + callPurpose: "remove" + , lsctIds: selected.map(info => info.LSCT_ID).join(",") + } + + $P.ctrl.removeAprvDmnd(params); + } + }); + } + /************************************************************************** * 초기 설정 **************************************************************************/ @@ -569,7 +620,8 @@ // 업무 버튼 이벤트 $P.$findn("btnCreate").on("click", () => { $P.fnCreate(); }); // 등록 $P.$findn("btnRemove").on("click", () => { $P.fnRemove(); }); // 삭제 - $P.$findn("btnLsctAprvDmnd").on("click", () => { $P.fnLsctAprvDmnd(); }); // 승인 요청 + $P.$findn("btnCreateAprvDmnd").on("click", () => { $P.fnCreateAprvDmnd(); }); // 승인 요청 + $P.$findn("btnRemoveAprvDmnd").on("click", () => { $P.fnRemoveAprvDmnd(); }); // 승인 요청 취소 // DataTables width 변경 조정