|
|
|
@ -36,13 +36,17 @@
|
|
|
|
|
<input type="text" class="form-control w-60" id="bizrno--${pageName}" name="bizrno" data-map="bizrno" readonly>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-8">
|
|
|
|
|
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기사유</label>
|
|
|
|
|
<select class="form-select" id="schVltnCd--${pageName}" name="schVltnCd"><option value="">사고마약류(파손)</option><option value="01">사고마약류(변질,부패)</option><option value="02">유효기한 또는 사용기한 경과</option><option value="03">재고관리 또는 보관을 하기에 곤란한 사유(유효기한 임박)</option>
|
|
|
|
|
<option value="04">재고관리 또는 보관을 하기에 곤란한 사유(사용중단)</option>
|
|
|
|
|
<option value="05">재고관리 또는 보관을 하기에 곤란한 사유(폐업)</option>
|
|
|
|
|
<option value="06">재고관리 또는 보관을 하기에 곤란한 사유(환자반납)</option>
|
|
|
|
|
<option value="07">기타(사고마약류(도난,분실,재해) 발생보고 완료건)</option>
|
|
|
|
|
<option value="08">기타(제조공정 중 폐기물)</option></select>
|
|
|
|
|
<label for="dsusePrvCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기사유</label>
|
|
|
|
|
<select class="form-select" id="dsusePrvCd--${pageName}" name="dsusePrvCd">
|
|
|
|
|
<option value="01">사고마약류(파손)</option>
|
|
|
|
|
<option value="02">사고마약류(변질,부패)</option>
|
|
|
|
|
<option value="03">유효기한/사용기한 경과</option>
|
|
|
|
|
<option value="04">유효기한 임박</option>
|
|
|
|
|
<option value="05">사용중단</option>
|
|
|
|
|
<option value="07">폐업</option>
|
|
|
|
|
<option value="08">환자반납</option>
|
|
|
|
|
<option value="09">기타</option>
|
|
|
|
|
<option value="12">제조공정 중 폐기물</option></select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row my-1 mx-1 g-1 border-card rounded"></div>
|
|
|
|
@ -105,15 +109,15 @@
|
|
|
|
|
data-by="by--productList" data-by-output="byOutput--productList" data-main-option="mainOption--productList" data-sub-option="subOption--productList">
|
|
|
|
|
<th class="sorting" style="width: 146.156px;">제품코드</th>
|
|
|
|
|
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 300.719px;">제품명</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">폐기 수량</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">유효기간</th>
|
|
|
|
|
<th class="sorting" style="width: 160.141px;">제조 번호</th>
|
|
|
|
|
<th class="sorting" style="width: 160.141px;">제조 일련 번호</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">최소 유통단위 수량</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">최소 유통단위</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">낱개 단위 수량</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">낱개 단위</th>
|
|
|
|
|
<th class="sorting" style="width: 100.469px;">폐기수량</th>
|
|
|
|
|
<th class="sorting" style="width: 100.469px;">유효기간</th>
|
|
|
|
|
<th class="sorting" style="width: 160.141px;">제조번호</th>
|
|
|
|
|
<th class="sorting" style="width: 160.141px;">일련번호</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">이미지</th>
|
|
|
|
|
<th class="sorting" style="width: 160.469px;">유통단위수량</th>
|
|
|
|
|
<th class="sorting" style="width: 120.469px;">유통단위</th>
|
|
|
|
|
<th class="sorting" style="width: 130.469px;">낱개단위수량</th>
|
|
|
|
|
<th class="sorting" style="width: 100.469px;">낱개단위</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="tbody--productList">
|
|
|
|
@ -126,11 +130,11 @@
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prdValidDe}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfNo}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfSeq}</td>
|
|
|
|
|
<td class="cmn text-center prdDsuseImg" {onclick}="" {ondblclick}=""></td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{minDistbQy}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{minDistbUnit}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{pceUnit}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{dsuseQy}</td>
|
|
|
|
|
<td class="cmn text-center aaaa" {onclick}="" {ondblclick}=""></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="productListNotFound--productList">
|
|
|
|
@ -284,15 +288,35 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 저장
|
|
|
|
|
$P.control.save = (info) => {
|
|
|
|
|
if (!info) return;
|
|
|
|
|
|
|
|
|
|
let create = (info.mngId == "");
|
|
|
|
|
$P.control.save = (jsonBssh, datasetListPrd) => {
|
|
|
|
|
let saveBsshData = {
|
|
|
|
|
...jsonBssh,
|
|
|
|
|
rndDtlRptCnt: datasetListPrd.length,
|
|
|
|
|
userId: "${currentUser.account}"
|
|
|
|
|
}
|
|
|
|
|
let saveData = {
|
|
|
|
|
dsuseMgtJsonStr: JSON.stringify(saveBsshData),
|
|
|
|
|
dsuseMgtDtlsJsonStr: JSON.stringify(datasetListPrd),
|
|
|
|
|
// 폐기상품이미지목록
|
|
|
|
|
dsusePrdImgFiles: []
|
|
|
|
|
}
|
|
|
|
|
let create = (jsonBssh.dscdmngId == "");
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url: !create ? $P.control.urls.update : $P.control.urls.create
|
|
|
|
|
, data: info || {}
|
|
|
|
|
, success: resp => $P.control.onSave(resp)
|
|
|
|
|
url: '<c:url value="${apiHost}/api/biz/nims/v1/saveDsuseMgtReceipt" />'
|
|
|
|
|
, data: saveData || {}
|
|
|
|
|
, success: resp => {
|
|
|
|
|
if(!resp.success){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: resp.message
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//$P.control.onSave(resp.data)
|
|
|
|
|
dialog.alert("저장됐습니다.");
|
|
|
|
|
dialog.close(this.prefixed("dialog"));
|
|
|
|
|
//this._load();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -319,7 +343,7 @@
|
|
|
|
|
|
|
|
|
|
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), true, true);
|
|
|
|
|
|
|
|
|
|
fnMakeGridImageViewer($("#tbody--productList").find("td.aaaa").get(), "dsusePrdImgFiles");
|
|
|
|
|
fnMakeGridImageViewer($("#tbody--productList").find("td.prdDsuseImg").get(), "dsusePrdImgFiles");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
@ -359,11 +383,27 @@
|
|
|
|
|
// validate 확인
|
|
|
|
|
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
|
|
|
|
|
|
|
|
|
|
let bsshData = $P.bsshFormFields.get();
|
|
|
|
|
if(bsshData.bsshCd == ""){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "마약류 취급업체 정보를 입력해주세요."
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let dsProd = $P.productList.getDataset();
|
|
|
|
|
if(dsProd.length == 0){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "폐기 제품 정보를 입력해주세요."
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
|
|
|
|
|
, init: () => { setDialogZindex(); }
|
|
|
|
|
, onOK: () => {
|
|
|
|
|
$P.control.save($P.bsshFormFields.get()); // formFields
|
|
|
|
|
$P.control.save(bsshData, dsProd); // formFields
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -383,11 +423,12 @@
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let dupData = $P.productList
|
|
|
|
|
let isDup = $P.productList
|
|
|
|
|
.getDataset()
|
|
|
|
|
.filter(item => item.prductCd == $P.productFormFields.get().prductCd);
|
|
|
|
|
.filter(item => item.prductCd == $P.productFormFields.get().prductCd)
|
|
|
|
|
.length > 0;
|
|
|
|
|
|
|
|
|
|
if(dupData.length > 0){
|
|
|
|
|
if(isDup){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "등록한 상품[" + $P.productFormFields.get().prductCd + "]입니다"
|
|
|
|
|
});
|
|
|
|
|