From 4c6adeaaea4275651b9008a6f90839110366ef9f Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 26 May 2023 19:05:22 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=8B=A8=EC=86=8D=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EC=83=98=ED=94=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/rt/rt-reglt-and-erpp-mysql-mapper.xml | 2 +- .../biz/cmm/cmmFimsCrackdownEditPopup.jsp | 14 +++++--- .../js/fims/framework/cmm/cmmUtil.js | 36 +++++++++++++++++++ 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/main/resources/sql/mapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml b/src/main/resources/sql/mapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml index 6a4b11ed..3bb06920 100644 --- a/src/main/resources/sql/mapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml +++ b/src/main/resources/sql/mapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml @@ -133,7 +133,7 @@ , #{sysSeCd} , #{crdnSeCd} , #{crdnInptSeCd} - , #{crdnYmd} + , REPLACE(#{crdnYmd},'-','') , #{crdnPlc} , #{vltnNmtm} , #{minusAmt} diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmFimsCrackdownEditPopup.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmFimsCrackdownEditPopup.jsp index 890430a6..a2f1f348 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmFimsCrackdownEditPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmFimsCrackdownEditPopup.jsp @@ -79,7 +79,9 @@ Date Author Description 위반일 - + @@ -284,7 +286,9 @@ Date Author Description var fnCallbackZipSearch = (obj) => fnPopupBiz.setZipSearch(obj, document.querySelector('#frm')); var imageEditorPopup = (flag, params) => fnPopupBiz.pagePopup(flag, params); var callbackReloadImage = () => fnPopupBiz.downloadImg(); - var callbackEnlightErpp = (data) => fnPopupBiz.callbackEnlightErpp(data) + var callbackEnlightErpp = (data) => fnPopupBiz.callbackEnlightErpp(data); + + let formFields = new FimsFormFields("#frm"); let orgData; let callPopup; let isCtzn = false; @@ -608,7 +612,7 @@ Date Author Description cmmBizAjax('add', { url: fimsApiUrl.ADD_RT_REGLT - , data: $("#frmSearch").serialize() + , data: formFields.get() }) } ,modify: () => { @@ -616,14 +620,14 @@ Date Author Description cmmBizAjax('modify', { url: fimsApiUrl.MODIFY_RT_REGLT - ,data: $("#frmSearch").serialize() + ,data: $("#frm").serialize() }); } ,remove: () => { $("input[name=useYn]").val('N'); cmmBizAjax('remove', { url: fimsApiUrl.REMOVE_RT_REGLT - ,data: $("#frmSearch").serialize() + ,data: $("#frm").serialize() }); } diff --git a/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js b/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js index abda863c..0e2f4b68 100644 --- a/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js +++ b/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js @@ -487,6 +487,42 @@ class FimsFormFields extends FormFields { } + + get() { + let obj = {}; + document.querySelectorAll(this.children).forEach(input => { + let property = input.name || input.id; + let value = input.value; + if ("radio" == input.type) { + if (input.checked) + obj[property] = value; + } else { + if(input.dataset.fmtType){ + const fmtType = input.dataset.fmtType; + switch (fmtType) { + case 'dt' : + value = value.replaceAll("-","").replaceAll(":","").replaceAll(" ",""); + break; + case 'day' : + value = value.replaceAll("-",""); + break; + case 'time' : + value = value.replaceAll(":",""); + break; + case 'number' : + value = value.replaceAll(",",""); + break; + default: + break; + + } + } + obj[property] = value; + } + + }); + return obj; + } } /**