feat: 폐기신청서접수, 통보[결과] 처리
parent
7e5fde2f0c
commit
5e94a3ebb7
@ -0,0 +1,100 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="author" content="ZXing for JS">
|
||||
|
||||
<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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<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 src="https://code.jquery.com/jquery-3.7.1.min.js"
|
||||
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
|
||||
crossorigin="anonymous"></script>
|
||||
<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: 'http://localhost:9076/api/biz/nims/v1/saveDsuseMgtReceipt',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
console.log(res.data);
|
||||
if (!res.success) {
|
||||
alert(`${res.code}: ${res.message}`);
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
if (error.responseJSON && typeof error.responseJSON === 'object') {
|
||||
console.log(error.responseJSON);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,80 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="author" content="ZXing for JS">
|
||||
|
||||
<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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<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 src="https://code.jquery.com/jquery-3.7.1.min.js"
|
||||
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
|
||||
crossorigin="anonymous"></script>
|
||||
<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: 'http://localhost:9076/api/biz/nims/v1/saveDsuseMgtRslt',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
console.log(res.data);
|
||||
if (!res.success) {
|
||||
alert(`${res.code}: ${res.message}`);
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
if (error.responseJSON && typeof error.responseJSON === 'object') {
|
||||
console.log(error.responseJSON);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue