Leeyh1121 4 months ago
commit 441a938327

@ -1,57 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">폐기 통보[결과] 처리</c:set>
<div class="wrapper" style="padding-top:2em">
<input type="file" id="img1" name="img" accept="image/*"><br>
<input type="file" id="img2" name="img" accept="image/*"><br>
<button id="btnSave">save</button>
</div>
<script type="text/javascript">
document.querySelector("#btnSave").addEventListener("click", function () {
let dsuseMgtRslt =
{
"dscdmngId": "2024060001",
"userId": "suji",
"prgrsSttsCd": "06",
"hdrDe": "20240105",
"dsuseSeCd": "1",
"dsuseMthCd": "3",
"dsuseLoc": "보건소 소각장",
"dsuseDe": "20240506"
};
let formData = new FormData();
formData.append("dsuseMgtRsltJsonStr", JSON.stringify(dsuseMgtRslt));
$("input[type=file]").each(function (i) {
formData.append("dsuseDsuseImgFiles", $('input[type=file]')[i].files[0]);
});
$.ajax({
url: '<c:url value="${apiHost}/api/biz/nims/v1/saveDsuseMgtRslt" />',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (res) {
console.log(res);
if (!res.success) {
alert(res.code + ':' + res.message);
return false;
}
console.log(res.data);
},
error: function (error) {
console.log(error);
if (error.responseJSON && typeof error.responseJSON === 'object') {
console.log(error.responseJSON);
}
}
});
}, {passive: true});
</script>

@ -15,18 +15,10 @@
<input type="text" class="form-control w-px-100" id="productNm--${pageName}" name="schProductNm" >
<input type="text" class="form-control w-px-120" id="productCd--${pageName}" name="schProductCd" >
</div>
<%-- <div class="d-flex flex-row justify-content-between p-2">--%>
<%-- <div>--%>
<%-- <div class="input-group" id="DataTables_Table_0_length">--%>
<%-- </div>--%>
<%-- </div>--%>
<div class="col-md-4">
<button type="button" class="btn btn-search w-px-50" id="btnSearch--${pageName}" title="검색">검색</button>&nbsp;
<button type="button" class="btn btn-primary w-px-80" id="btnSearch2--${pageName}" title="검색">NIMS 검색</button>
</div>
<%-- </div>--%>
</div>
</div>
</form>

Loading…
Cancel
Save