|
|
|
@ -9,9 +9,7 @@
|
|
|
|
|
<div class="container flex-grow-1 px-0">
|
|
|
|
|
<!-- Page Body -->
|
|
|
|
|
<div class="card">
|
|
|
|
|
|
|
|
|
|
<!-- 입력 영역 -->
|
|
|
|
|
<!-- <form id="frmEdit--${pageName}" name="frmEdit"> -->
|
|
|
|
|
<form id="bssh--${pageName}" name="bssh">
|
|
|
|
|
<!-- hidden -->
|
|
|
|
|
<label for="bssh--${pageName}">마약류 취급업체 정보</label>
|
|
|
|
@ -66,25 +64,25 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
<label for="prdlstMstCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 번호</label>
|
|
|
|
|
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="prdlstMstCd" data-map="" readonly>
|
|
|
|
|
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="mnfNo" data-map="prdlstMstCd" readonly>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
<label for="prdlstMstCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 일련 번호</label>
|
|
|
|
|
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="prdlstMstCd" data-map="" readonly>
|
|
|
|
|
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="mnfSeq" data-map="prdlstMstCd" readonly>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
<label for="rgsDt--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label>
|
|
|
|
|
<input type="text" class="form-control w-60" id="rgsDt--${pageName}" name="rgsDt" data-map="rgsDt" readonly>
|
|
|
|
|
<input type="text" class="form-control w-60" id="rgsDt--${pageName}" name="prdValidDe" data-map="rgsDt" readonly>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
<label for="prdMinDistbQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">최소 유통단위 수량</label>
|
|
|
|
|
<input type="text" class="form-control w-30" id="prdMinDistbQy--${pageName}" name="prdMinDistbQy" data-map="prdMinDistbQy" readonly>
|
|
|
|
|
<input type="text" class="form-control w-30" id="stdPackngStleNm--${pageName}" name="stdPackngStleNm" data-map="stdPackngStleNm" readonly>
|
|
|
|
|
<input type="text" class="form-control w-30" id="prdMinDistbQy--${pageName}" name="minDistbQy" data-map="prdMinDistbQy" readonly>
|
|
|
|
|
<input type="text" class="form-control w-30" id="stdPackngStleNm--${pageName}" name="minDistbUnit" data-map="stdPackngStleNm" readonly>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
<label for="prdTotPceQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">낱개 단위 수량</label>
|
|
|
|
|
<input type="text" class="form-control w-30" id="prdTotPceQy--${pageName}" name="prdTotPceQy" data-map="prdTotPceQy" readonly>
|
|
|
|
|
<input type="text" class="form-control w-30" id="pceCoUnitNm--${pageName}" name="pceCoUnitNm" data-map="pceCoUnitNm" readonly>
|
|
|
|
|
<input type="text" class="form-control w-30" id="prdTotPceQy--${pageName}" name="pceQy" data-map="prdTotPceQy" readonly>
|
|
|
|
|
<input type="text" class="form-control w-30" id="pceCoUnitNm--${pageName}" name="pceUnit" data-map="pceCoUnitNm" readonly>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
<label for="dsuseQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기 수량</label>
|
|
|
|
@ -94,45 +92,55 @@
|
|
|
|
|
<div style=" align-content: center; text-align: center;">
|
|
|
|
|
<span>
|
|
|
|
|
<!-- 업무 버튼 -->
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">추가</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">제거</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnAdd--${pageName}" title="저장">추가</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnDel--${pageName}" title="저장">제거</button>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr><th style="width: 15.828px;text-align:center;" tabindex="0">No</th>
|
|
|
|
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--productList" aria-describedby="DataTables_Table_0_info">
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr id="theadTr--productList"
|
|
|
|
|
data-by="by--productList" data-by-output="byOutput--productList" data-main-option="mainOption--productList" data-sub-option="subOption--productList">
|
|
|
|
|
<th style="width: 15.828px;text-align:center;" tabindex="0">No</th>
|
|
|
|
|
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 223.719px;">제품명</th>
|
|
|
|
|
<th class="sorting" style="width: 146.156px;">제품코드</th>
|
|
|
|
|
<th class="sorting" style="width: 160.141px;">제품번호</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: 230.469px;">낱개 단위</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">폐기 수량</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">이미지</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="userList">
|
|
|
|
|
|
|
|
|
|
<tbody id="tbody--productList">
|
|
|
|
|
</tbody>
|
|
|
|
|
<template id="prductRow">
|
|
|
|
|
<tr data-key="{PRDUCT_CD}">
|
|
|
|
|
<td style="text-align:center;"><input value="{PRDUCT_CD}" onchange="userControl.select('{PRDUCT_CD}', this.checked);" type="checkbox" class="form-check-input"></td>
|
|
|
|
|
<td {onclick}="" {ondblclick}="">{PRDUCT_CD}</td>
|
|
|
|
|
<td {onclick}="" {ondblclick}="">{PRDUCT_NM}</td>
|
|
|
|
|
<td {onclick}="" {ondblclick}="">{MNF_NO}</td>
|
|
|
|
|
<td {onclick}="" {ondblclick}="">{PRD_VALID_DE}</td>
|
|
|
|
|
<td {onclick}="" {ondblclick}="">{MIN_DISTB_QY}</td>
|
|
|
|
|
<td {onclick}="" {ondblclick}="">{PCE_QY}</td>
|
|
|
|
|
<td {onclick}="" {ondblclick}="">{DSUSE_QY}</td>
|
|
|
|
|
<td {onclick}="" {ondblclick}=""></td>
|
|
|
|
|
<template id="productListRow--productList">
|
|
|
|
|
<tr data-key="{prductCd}">
|
|
|
|
|
<td style="text-align:center;"><input value="prductCd" onchange="userControl.select('{prductCd}', this.checked);" type="checkbox" class="form-check-input"></td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prductCd}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prductNm}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfNo}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfSeq}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prdValidDe}</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}="">{pceQy}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{pceUnit}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}="">{dsuseQy}</td>
|
|
|
|
|
<td class="cmn text-center" {onclick}="" {ondblclick}=""></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="productListNotFound--productList">
|
|
|
|
|
<tr class="odd">
|
|
|
|
|
<td valign="top" colspan="13" class="dataTables_empty text-center">제품 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
</table>
|
|
|
|
|
<!-- </form> /입력 영역 -->
|
|
|
|
|
</div> <!-- <div class="card"> -->
|
|
|
|
|
|
|
|
|
|
<!-- 업무 버튼 표시 -->
|
|
|
|
|
<div>
|
|
|
|
|
<span class="container-page-btn">
|
|
|
|
@ -143,7 +151,6 @@
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- / 업무 버튼 표시 -->
|
|
|
|
|
|
|
|
|
|
</div> <!-- / Content <div class="container flex-grow-1 px-0"> -->
|
|
|
|
|
</div> <!-- / inner page html <div class="content-wrapper"> -->
|
|
|
|
|
|
|
|
|
@ -182,6 +189,14 @@
|
|
|
|
|
, dataGetter: obj => obj.${infoPrefix}Info
|
|
|
|
|
, infoSize: "xl"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$P.productList = new Dataset({
|
|
|
|
|
prefix: "dsuseMgtReceiptProductList"
|
|
|
|
|
, prefixName: "마약류 제품 조회"
|
|
|
|
|
, keymapper: info => info ? info.prductCd : ""
|
|
|
|
|
, dataGetter: obj => obj
|
|
|
|
|
, infoSize: "xl"
|
|
|
|
|
});
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
@ -271,6 +286,34 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.productList.onDataSetChange = item => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
let empty = $P.productListList.empty;
|
|
|
|
|
|
|
|
|
|
// 업무별 DataTables(그리드) tr, td
|
|
|
|
|
let foundContent = document.getElementById("productListRow--productList").content;
|
|
|
|
|
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
|
|
|
|
|
let foundTds = $(foundContent).find("td");
|
|
|
|
|
|
|
|
|
|
foundTds.each(function() {
|
|
|
|
|
foundTr.appendChild(this.cloneNode(true));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
let replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].productList.setCurrent('" + dataItem.getValue("prductCd") + "');");
|
|
|
|
|
|
|
|
|
|
let trs = empty ? [document.getElementById("$productListNotFound--productList").content.outerHTML]
|
|
|
|
|
: $P.productList.inStrings(foundTr.outerHTML, replacer);
|
|
|
|
|
|
|
|
|
|
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), true, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DataTables 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 사용자 함수(function)
|
|
|
|
|
**************************************************************************/
|
|
|
|
@ -306,6 +349,24 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//추가
|
|
|
|
|
$P.fnAdd = () => {
|
|
|
|
|
$P.productList.addData($P.productFormFields.get());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnDel = () => {
|
|
|
|
|
// validate 확인
|
|
|
|
|
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
|
|
|
|
|
, init: () => { setDialogZindex(); }
|
|
|
|
|
, onOK: () => {
|
|
|
|
|
$P.control.save($P.bsshFormFields.get()); // formFields
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 초기 셋팅
|
|
|
|
|
**************************************************************************/
|
|
|
|
@ -322,6 +383,11 @@
|
|
|
|
|
|
|
|
|
|
// 버튼 이벤트
|
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
|
|
|
|
|
|
$("#btnAdd--${pageName}").on("click", () => $P.fnAdd()); // 추가
|
|
|
|
|
|
|
|
|
|
$("#btnDel--${pageName}").on("click", () => $P.fnDel()); // 추가
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
|