From 5e35864e8fc73b9c6baa3f12d6dd2b75227253ce Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Wed, 31 Jul 2024 10:13:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=8B=A0=EC=B2=AD=EC=84=9C=EC=A0=91?= =?UTF-8?q?=EC=88=98=20=EC=A0=9C=ED=92=88=EB=AA=A9=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80=EB=A1=9C=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EB=B6=84=EB=A6=AC=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/adds/nims/dsuseMgtReceipt-edit.jsp | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-edit.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-edit.jsp index aea29fe..b825d98 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-edit.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-edit.jsp @@ -497,26 +497,36 @@ } let isContinue = true; - dsProd.forEach(function (item) { - if(isNaN(item.dsuseQy)){ + for(let idx=0; idx < dsProd.length; idx++) { + let item = dsProd[idx]; + if(trim(item.dsuseQy).length === 0) { dialog.alert({ - content: "폐기 수량은 숫자만 입력 가능합니다", + content: "폐기 수량은 필수 입니다 [" + (idx+1) + " 번째]", onOK: () => {} }); isContinue = false; - return false; + break; } - if(!isContinue) return false; + + if(isNaN(item.dsuseQy)) { + dialog.alert({ + content: "폐기 수량은 숫자만 입력 가능합니다 [" + (idx+1) + " 번째]", + onOK: () => {} + }); + isContinue = false; + break; + } + let dt = item.prdValidDe?.replaceAll('-', ''); if(isNaN(dt) || dt.length > 8) { dialog.alert({ - content: "유효 기간 형식이 부정확 합니다
(예:2024-01-01, 20240101)", + content: "유효 기간 형식이 부정확 합니다 [" + (idx+1) + " 번째]
(예:2024-01-01, 20240101)", onOK: () => {} }); isContinue = false; - return false; + break; } - }); + } if(!isContinue) return false; let fileCount = 0;