From 0e87cffff230165a15c5b58942af4e5a2b7d8c24 Mon Sep 17 00:00:00 2001 From: Leeyh1121 <130335980+Leeyh1121@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:18:21 +0900 Subject: [PATCH] =?UTF-8?q?fit=20:=20=EB=A7=B5=ED=95=91=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/adds/nims/dsuseMgtMapping-info.jsp | 48 +++++++++++++------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-info.jsp index 57911ca..188e795 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-info.jsp @@ -333,8 +333,8 @@ $P.mappingControl.query = { dscdmngId: $P.formFields.get().dscdmngId, - userId: "suji" - //userId: "${currentUser.account}" + //userId: "suji" + userId: "${currentUser.account}" }; $P.mappingControl.load(1); } @@ -374,7 +374,7 @@ $("#tbody--${pageName}MappingDtl").setCurrentRow(key); } - +/* // 저장 callback $P.control.onSave = (resp) => { @@ -391,18 +391,36 @@ if (resp.saved) { dialog.close($P.control.prefix + "Dialog--${openerPageName}"); } - } - + } */ // 저장 - $P.control.save = (info) => { - if (!info) return; - - let create = (info.mngId == ""); - + $P.control.save = () => { +// debugger; ajax.post({ - url: !create ? $P.control.urls.update : $P.control.urls.create - , data: info || {} - , success: resp => $P.control.onSave(resp) + url: '' + , data: JSON.stringify({ + dscdmngId: $P.formFields.get().dscdmngId, + prgrsSttsCd: "21", + usrRptIdNo: $P.mappingControl.dataset.getCurrent().usrRptIdNo, + orgUsrRptIdNo: $P.mappingControl.dataset.getCurrent().orgUsrRptIdNo, + rptTyCd: $P.mappingControl.dataset.getCurrent().rptTyCd, + stts: $P.mappingControl.dataset.getCurrent().status, + userId: "${currentUser.account}" +// rgtr: "${currentUser.account}", + }) + , contentType : "application/json; charset=utf-8" + , success: resp => { + if(!resp.success){ + dialog.alert({ + content: resp.message + }); + return; + } + + //$P.control.onSave(resp) + dialog.alert("저장됐습니다."); + dialog.close("dsuseMgtMappingDialog"); + //this._load(); + } }); } @@ -469,13 +487,13 @@ // 저장 $P.fnSave = () => { // validate 확인 - if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; + //if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; dialog.alert({ content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?" , init: () => { setDialogZindex(); } , onOK: () => { - $P.control.save($P.bsshFormFields.get()); // formFields + $P.control.save(); // formFields } }); }