From 9919bfa05ef1068f0f29d65b23e3ffd396ea5922 Mon Sep 17 00:00:00 2001 From: leebj Date: Fri, 14 Jun 2024 15:18:33 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C(=ED=8F=90=EA=B8=B0=EC=83=81=ED=92=88=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80)=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp | 11 +++++++++-- .../WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp index f847558..ce7f08b 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp @@ -294,15 +294,22 @@ rndDtlRptCnt: datasetListPrd.length, userId: "${currentUser.account}" } + + + var fileArr = []; + $("input[type='file'][name='dsusePrdImgFiles']").each(function (i) { + fileArr.push(this.files[0]); + }); + let saveData = { dsuseMgtJsonStr: JSON.stringify(saveBsshData), dsuseMgtDtlsJsonStr: JSON.stringify(datasetListPrd), // 폐기상품이미지목록 - dsusePrdImgFiles: [] + dsusePrdImgFiles: fileArr } let create = (jsonBssh.dscdmngId == ""); - ajax.post({ + upload({ url: '' , data: saveData || {} , success: resp => { 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 84d608b..b8af1d9 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 @@ -332,7 +332,7 @@ var template = document.getElementById("imgCheckboxTemplate--${pageName}").innerHTML; - template = template.replace(/{name}/gi, "dsusePrdImgFilesSlector"); + template = template.replace(/{name}/gi, "dsuseDsuseImgFilesSelector"); template = template.replace(/{value}/gi, item.id); template = template.replace(/{src}/gi, item.url); @@ -377,7 +377,7 @@ //이미지 삭제 버튼 $("#btnImageDel--${pageName}").on("click", function() { - var checkeds = $("#dragAndDrop--${pageName}").find(":checkbox[name='dsusePrdImgFilesSlector']:checked"); + var checkeds = $("#dragAndDrop--${pageName}").find(":checkbox[name='dsuseDsuseImgFilesSelector']:checked"); if(checkeds.length > 0){ var keys = []; checkeds.each(function(){