From c46d88a37c61a661138d1df42d583a3cf26455c2 Mon Sep 17 00:00:00 2001 From: leebj Date: Mon, 24 Jun 2024 15:45:44 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A0=EC=A7=9C=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=EC=84=B8=ED=8C=85=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/adds/nims/dsuseMgtRslt-info.jsp | 10 +++++++--- .../resources/js/base/addsFormFields.js | 20 ++++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp index de1da81..7261731 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp @@ -455,8 +455,7 @@ searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); initDatepicker("frmEdit--${pageName}"); // 달력 초기화 - $("#hdrDe--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 - $("#dsuseDe--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 + } @@ -471,7 +470,12 @@ $P.initForm(); // 3. Dataset 설정 - $P.control.setData([${dsuseRsltInfo}]); + let dsuseRsltInfo = [${dsuseRsltInfo}]; + for(let r of dsuseRsltInfo){ + r.dsuseDe = r.dsuseDe ? r.dsuseDe.replace("-","").replace("-","") : ""; + r.hdrDe = r.hdrDe ? r.hdrDe.replace("-","").replace("-","") : ""; + } + $P.control.setData(dsuseRsltInfo); if($P.fileInfos.length > 0){ diff --git a/src/main/webapp/resources/js/base/addsFormFields.js b/src/main/webapp/resources/js/base/addsFormFields.js index f4b1292..f784988 100644 --- a/src/main/webapp/resources/js/base/addsFormFields.js +++ b/src/main/webapp/resources/js/base/addsFormFields.js @@ -36,6 +36,11 @@ class AddsFormFields extends FormFields { } } } else { + if(input.name == "dsuseDe"){ + console.log("최초밸류"); + console.log(value); + } + if(value == null){ value = ""; } @@ -43,17 +48,21 @@ class AddsFormFields extends FormFields { // dt - yyyy-mm-dd HH:mm:ss, day - yyyy-mm-dd, time - HH:mm:ss, number - #,### if(input.dataset.fmtType){ const fmtType = input.dataset.fmtType; - switch (fmtType) { + switch (fmtType) { case 'dt' : - value = datetimeFormat.format(value); + value = datetimeFormat.parse(value); + value = datetimeFormat.format(value); break; case 'day' : - value = dateFormat.format(value); + value = dateFormat.parse(value); + value = dateFormat.format(value); break; case 'time' : + value = timeFormat.parse(value); value = timeFormat.format(value); break; case 'number' : + value = numberFormat.parse(value); value = numberFormat.format(value); break; default: @@ -62,6 +71,11 @@ class AddsFormFields extends FormFields { } if(input.name){ if($(input).hasClass('form-date')){ + if(input.name == "dsuseDe"){ + console.log(input.name+"입력"); + console.log(value); + } + $(input).datepicker("setDate", value); } else { input.value = value;