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 05aea6f..e9755f5 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 @@ -56,15 +56,13 @@
-
- - +
+ +
-
+
- -<%--
--%> -<%--
--%> +
@@ -112,10 +110,10 @@ - 제품코드 - 제품명 - 폐기수량 - 폐기 제품 사진 + 제품코드 + 제품명 + 폐기수량 + 폐기 제품 사진 유효기간 제조번호 일련번호 diff --git a/src/main/webapp/resources/js/adds/cmmn/adds-componentization.js b/src/main/webapp/resources/js/adds/cmmn/adds-componentization.js index 61e11b7..a39f902 100644 --- a/src/main/webapp/resources/js/adds/cmmn/adds-componentization.js +++ b/src/main/webapp/resources/js/adds/cmmn/adds-componentization.js @@ -1,62 +1,62 @@ /************************************************************************** -* 그리드 내부 이미지 첨부 -**************************************************************************/ -function fnMakeGridImageViewer(tdEl, fileInputElName, fileInfo){ - - let fileInputEl = document.createElement("input"); - fileInputEl.name = fileInputElName; - fileInputEl.type = "file"; - fileInputEl.setAttribute("hidden","hidden"); - fileInputEl.setAttribute("accept","image/*") - tdEl.appendChild(fileInputEl); - - if(fileInfo != null){ - fileInputEl.dataset.url = fileInfo.URL; - fileInputEl.dataset.fileNm = fileInfo.FILE_NM; - fileInputEl.dataset.mimeType = fileInfo.MIME_TYPE; - fileInputEl.dataset.fileId = fileInfo.FILE_ID; - } - - let uploadButtonEl = document.createElement("button"); - uploadButtonEl.type = "button"; - uploadButtonEl.classList.add("btn","btn-primary","w-px-50", "mx-1"); - uploadButtonEl.textContent = "등록"; - tdEl.appendChild(uploadButtonEl); - - let viewButtonEl = document.createElement("button"); - viewButtonEl.type = "button"; - viewButtonEl.classList.add("btn","btn-primary","w-px-50", "mx-1"); - viewButtonEl.setAttribute("hidden","hidden"); - viewButtonEl.textContent = "보기"; - tdEl.appendChild(viewButtonEl); - - $(fileInputEl).on("change", function(){ - if(this.files != null && this.files.length > 0){ - $(uploadButtonEl).text("수정"); - $(viewButtonEl).removeAttr("hidden"); - } else if(this.dataset.url != null){ - $(uploadButtonEl).text("수정"); - $(viewButtonEl).removeAttr("hidden"); - } else { - $(uploadButtonEl).text("등록"); - $(viewButtonEl).attr("hidden","hidden"); - } - }); - - $(uploadButtonEl).on("click", function(){ - $(fileInputEl).click(); - }); - - $(viewButtonEl).on("click", function(){ - - let viewUrl = ""; - if(fileInputEl.files.length != 0){ - viewUrl = (window.URL || window.webkitURL).createObjectURL(fileInputEl.files[0]); - } else { - viewUrl = fileInputEl.dataset.url; - } - window.open(viewUrl, "이미지", "width=500, height=500"); - }); - - $(fileInputEl).trigger("change"); -} \ No newline at end of file + * 그리드 내부 이미지 첨부 + **************************************************************************/ +function fnMakeGridImageViewer(tdEl, fileInputElName, fileInfo) { + + let fileInputEl = document.createElement("input"); + fileInputEl.name = fileInputElName; + fileInputEl.type = "file"; + fileInputEl.setAttribute("hidden", "hidden"); + fileInputEl.setAttribute("accept", "image/*") + tdEl.appendChild(fileInputEl); + + if (fileInfo != null) { + fileInputEl.dataset.url = fileInfo.URL; + fileInputEl.dataset.fileNm = fileInfo.FILE_NM; + fileInputEl.dataset.mimeType = fileInfo.MIME_TYPE; + fileInputEl.dataset.fileId = fileInfo.FILE_ID; + } + + let uploadButtonEl = document.createElement("button"); + uploadButtonEl.type = "button"; + uploadButtonEl.classList.add("btn", "btn-primary", "w-px-50", "mx-1"); + uploadButtonEl.textContent = "등록"; + tdEl.appendChild(uploadButtonEl); + + let viewButtonEl = document.createElement("button"); + viewButtonEl.type = "button"; + viewButtonEl.classList.add("btn", "btn-primary", "w-px-50", "mx-1"); + viewButtonEl.setAttribute("hidden", "hidden"); + viewButtonEl.textContent = "보기"; + tdEl.appendChild(viewButtonEl); + + $(fileInputEl).on("change", function () { + if (this.files != null && this.files.length > 0) { + $(uploadButtonEl).text("변경"); + $(viewButtonEl).removeAttr("hidden"); + } else if (this.dataset.url != null) { + $(uploadButtonEl).text("변경"); + $(viewButtonEl).removeAttr("hidden"); + } else { + $(uploadButtonEl).text("등록"); + $(viewButtonEl).attr("hidden", "hidden"); + } + }); + + $(uploadButtonEl).on("click", function () { + $(fileInputEl).click(); + }); + + $(viewButtonEl).on("click", function () { + + let viewUrl = ""; + if (fileInputEl.files.length != 0) { + viewUrl = (window.URL || window.webkitURL).createObjectURL(fileInputEl.files[0]); + } else { + viewUrl = fileInputEl.dataset.url; + } + window.open(viewUrl, "이미지", "width=500, height=500"); + }); + + $(fileInputEl).trigger("change"); +}