feat: 샘플 화면 반영
parent
1ebcc15252
commit
e604765c7b
@ -0,0 +1,90 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||
|
||||
|
||||
|
||||
<title>폐기 신청서 접수</title>
|
||||
|
||||
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
||||
href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
||||
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
||||
href="https://unpkg.com/normalize.css@8.0.0/normalize.css">
|
||||
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
||||
href="https://unpkg.com/milligram@1.3.0/dist/milligram.min.css">
|
||||
<script src="<c:url value="/resources/3rd-party/sneat/libs/jquery/jquery.js"/>"></script>
|
||||
|
||||
<script src="<c:url value="/resources/js/base/base.js?${ver}"/>"></script>
|
||||
<main 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>
|
||||
|
||||
</main>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.querySelector("#btnSave").addEventListener("click", function () {
|
||||
|
||||
let dsuseMgt =
|
||||
{
|
||||
userId: "api-user",
|
||||
prgrsSttsCd: "01",
|
||||
bsshCd: "H00008333",
|
||||
rndDtlRptCnt: 2,
|
||||
dsusePrvCd: "04"
|
||||
};
|
||||
|
||||
let dsuseMgtDtls = [
|
||||
{
|
||||
prductCd: "8806717024900",
|
||||
prductNm: "베리콜시럽",
|
||||
minDistbQy: 1,
|
||||
pceQy: 1,
|
||||
mnfNo: "A1111",
|
||||
prdValidDe: "20300303",
|
||||
mnfSeq: "A11111111",
|
||||
dsuseQy: 10
|
||||
},
|
||||
{
|
||||
prductCd: "8806718050823",
|
||||
prductNm: "아쿠아폴주20밀리리터(프로포폴) (20㎖)",
|
||||
minDistbQy: 1,
|
||||
pceQy: 5,
|
||||
mnfNo: "A1111",
|
||||
prdValidDe: "20300303",
|
||||
mnfSeq: "A11111111",
|
||||
dsuseQy: 30
|
||||
}
|
||||
];
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append("dsuseMgtJsonStr", JSON.stringify(dsuseMgt));
|
||||
formData.append("dsuseMgtDtlsJsonStr", JSON.stringify(dsuseMgtDtls));
|
||||
|
||||
$("input[type=file]").each(function (i) {
|
||||
formData.append("dsusePrdImgFiles", $('input[type=file]')[i].files[0]);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '<c:url value="${apiHost}/api/biz/nims/v1/saveDsuseMgtReceipt" />',
|
||||
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);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
@ -0,0 +1,70 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||
|
||||
|
||||
|
||||
<title>폐기 신청서 접수</title>
|
||||
|
||||
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
||||
href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
||||
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
||||
href="https://unpkg.com/normalize.css@8.0.0/normalize.css">
|
||||
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
||||
href="https://unpkg.com/milligram@1.3.0/dist/milligram.min.css">
|
||||
<script src="<c:url value="/resources/3rd-party/sneat/libs/jquery/jquery.js"/>"></script>
|
||||
|
||||
<script src="<c:url value="/resources/js/base/base.js?${ver}"/>"></script>
|
||||
<main 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>
|
||||
|
||||
</main>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.querySelector("#btnSave").addEventListener("click", function () {
|
||||
|
||||
let dsuseMgtRslt =
|
||||
{
|
||||
dscdmngId: "2024050001",
|
||||
userId: "api-user",
|
||||
prgrsSttsCd: "06",
|
||||
hdrDe: "20240506",
|
||||
rptDe: "20240506",
|
||||
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);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue