From 259366567c75495ca75a8a97a4bdeb8f8a549cdc Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 25 Sep 2023 16:43:02 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A9=EB=B6=80=EC=9E=90=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=BD=9C=EB=B0=B1=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/crdn/crdn05030-info.jsp | 46 +++++++++++++-- .../WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp | 56 +++++++++++++++---- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp index 569e957a..f4c02b3e 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp @@ -125,7 +125,7 @@ -
+
@@ -140,9 +140,6 @@
-
- -
@@ -464,12 +461,51 @@ $(document).ready(function(){ title : dialogTitle, content : resp, size : "lg", - onClose : () => { } // callback + onClose : () => { $P.refreshPayer(); } // callback }); } }); } + $P.refreshPayer = () => { + + var params = { + callPurpose : "refresh", + crdnId : "", + sggCd : $("#sggCd--${pageName}").val(), + taskSeCd : $("#taskSeCd--${pageName}").val(), + delYn : "N" + }; + + ajax.get({ + url : wctx.url("/"+params.taskSeCd + "/sprt/sprt02/020/info.do"), + headers: { Accept: "application/json; charset=utf-8" }, + data : params || {}, + success : resp => { + + if (resp.crdnPayer) { + var payer = resp.crdnPayer; + $("#rtpyrId--${pageName}").val(payer.RTPYR_ID).change(); + $("#rtpyrNm--${pageName}").val(payer.RTPYR_NM).change(); + $("#rtpyrSeCd--${pageName}").val(payer.RTPYR_SE_CD).change(); + $("#rtpyrNo--${pageName}").val(payer.RTPYR_NO).change(); + $("#zip--${pageName}").val(payer.ZIP).change(); + $("#addr--${pageName}").val(payer.ADDR).change(); + $("#dtlAddr--${pageName}").val(payer.DTL_ADDR).change(); + } else { + $("#rtpyrId--${pageName}").val("").change(); + $("#rtpyrNm--${pageName}").val("").change(); + $("#rtpyrSeCd--${pageName}").val("").change(); + $("#rtpyrNo--${pageName}").val("").change(); + $("#zip--${pageName}").val("").change(); + $("#addr--${pageName}").val("").change(); + $("#dtlAddr--${pageName}").val("").change(); + } + } + }); + + } + /************************************************************************** * 초기화(업무별 입력항목) **************************************************************************/ diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp index d4aa32dd..a4239296 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp @@ -161,6 +161,11 @@
+
+ + +
-
- - -
-
- -
@@ -807,7 +804,7 @@ $(document).ready(function(){ $P.fnPopPayer = () => { var callPurpose = ""; var dialogTitle = ""; - if($("#rtpyrId--${pageName}").val() == "" || $("#rtpyrId--${pageName}").val() == null){ + if($("#rtpyrId--${pageName}").val() == null || $("#rtpyrId--${pageName}").val() == ""){ callPurpose = "create"; dialogTitle = "납부자 등록"; } else { @@ -835,13 +832,52 @@ $(document).ready(function(){ title : dialogTitle, content : resp, size : "lg", - onClose : () => { } // callback + onClose : () => { $P.refreshPayer(); } // callback }); } }); } + $P.refreshPayer = () => { + + var params = { + callPurpose : "refresh", + crdnId : $("#crdnId--${pageName}").val(), + sggCd : $("#sggCd--${pageName}").val(), + taskSeCd : $("#taskSeCd--${pageName}").val(), + delYn : "N" + }; + + ajax.get({ + url : wctx.url("/"+params.taskSeCd + "/sprt/sprt02/020/info.do"), + headers: { Accept: "application/json; charset=utf-8" }, + data : params || {}, + success : resp => { + + if (resp.crdnPayer) { + var payer = resp.crdnPayer; + $("#rtpyrId--${pageName}").val(payer.RTPYR_ID).change(); + $("#rtpyrNm--${pageName}").val(payer.RTPYR_NM).change(); + $("#rtpyrSeCd--${pageName}").val(payer.RTPYR_SE_CD).change(); + $("#rtpyrNo--${pageName}").val(payer.RTPYR_NO).change(); + $("#zip--${pageName}").val(payer.ZIP).change(); + $("#addr--${pageName}").val(payer.ADDR).change(); + $("#dtlAddr--${pageName}").val(payer.DTL_ADDR).change(); + } else { + $("#rtpyrId--${pageName}").val("").change(); + $("#rtpyrNm--${pageName}").val("").change(); + $("#rtpyrSeCd--${pageName}").val("").change(); + $("#rtpyrNo--${pageName}").val("").change(); + $("#zip--${pageName}").val("").change(); + $("#addr--${pageName}").val("").change(); + $("#dtlAddr--${pageName}").val("").change(); + } + } + }); + + } + /************************************************************************** * 초기화(업무별 입력항목) **************************************************************************/