|
|
|
@ -10,25 +10,25 @@
|
|
|
|
|
<div class="container-search">
|
|
|
|
|
<!-- hidden -->
|
|
|
|
|
<div class="row my-0 mx-1 g-0" style="align-items: baseline">
|
|
|
|
|
<div class="col-md-8">
|
|
|
|
|
<div class="col-md-9">
|
|
|
|
|
<label for="ProductNm--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">제품명/코드</label>
|
|
|
|
|
<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" >
|
|
|
|
|
<input type="text" class="form-control w-px-100" id="productNm--${pageName}" name="schProductNm">
|
|
|
|
|
<input type="text" class="form-control w-px-150" id="productCd--${pageName}" name="schProductCd" maxlength="13" oninput="this.value = this.value.slice(0, 13)">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
<button type="button" class="btn btn-search w-px-50" id="btnSearch--${pageName}" title="검색">검색</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnSearch2--${pageName}" title="검색">NIMS 검색</button>
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
|
<button type="button" class="btn btn-search w-px-50" id="btnSearch--${pageName}" title="검색">NIMS 검색</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<!-- / 업무 버튼 표시 -->
|
|
|
|
|
<!-- / 업무 버튼 표시 -->
|
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
|
|
|
|
|
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsiv-0--${pageName}">
|
|
|
|
|
<div class="table-responsive ox-scroll oy-scroll h-px-600" id="table-responsive-0--${pageName}">
|
|
|
|
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
|
|
|
|
|
<thead>
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="cmn" style="width: 70px;">No.</th>
|
|
|
|
|
<th class="sorting" style="width: 146.156px;">제품코드</th>
|
|
|
|
|
<th class="sorting" style="width: 350.141px;">제품명</th>
|
|
|
|
|
<th class="sorting" style="width: 120.469px;">유통단위</th>
|
|
|
|
@ -38,10 +38,11 @@
|
|
|
|
|
<th class="sorting" style="width: 130.469px;">취급자번호</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="tbody--${pageName}">
|
|
|
|
|
<tbody id="tbody--${pageName}">
|
|
|
|
|
</tbody>
|
|
|
|
|
<template id="${infoPrefix}Row--${pageName}">
|
|
|
|
|
<tr data-key="{keyCnt}">
|
|
|
|
|
<td class="row-num text-end" onclick="{onclick}" ondblclick="{ondblclick}"></td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
|
|
|
|
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdMinDistbQy} {stdPackngStleNm}</td>
|
|
|
|
@ -64,55 +65,59 @@
|
|
|
|
|
<label id="${infoPrefix}Paging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
|
|
|
|
|
<ul id="${infoPrefix}Paging--${pageName}" class="pagination pagination-primary" style="display: none;">
|
|
|
|
|
</ul>
|
|
|
|
|
<!-- FIXME:: NIMS API 개발 완료후 적용 -->
|
|
|
|
|
<%--
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
|
<input type="checkbox" id="chkBsshCd--${pageName}" name="chkBsshCd" title="업체코드적용" style="align-items: baseline"/> <strong>신규API 업체코드 적용</strong>
|
|
|
|
|
</span>
|
|
|
|
|
--%>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card col-6">
|
|
|
|
|
<form id="frmSearch--${pageName}Detail" name="frmSearchDetail">
|
|
|
|
|
<input type="hidden" id="bsshCd" name="bsshCd">
|
|
|
|
|
<div class="container-search">
|
|
|
|
|
<!-- hidden -->
|
|
|
|
|
<div class="row my-0 mx-1 g-0" style="align-items: baseline">
|
|
|
|
|
<div class="col-md-5">
|
|
|
|
|
<select id="schOpt--${pageName}" name="schOpt" class="form-selectxit">
|
|
|
|
|
<select id="schOpt--${pageName}" name="schOpt" class="form-select" style="width: 106px !important;">
|
|
|
|
|
<option value="1">제조번호</option>
|
|
|
|
|
<option value="2">일련번호</option>
|
|
|
|
|
</select>
|
|
|
|
|
<input type="text" class="form-control w-60" id="schText--${pageName}" name="schText" >
|
|
|
|
|
<input type="text" class="form-control w-px-100" id="schText--${pageName}" name="schText" >
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-5">
|
|
|
|
|
<label for="schPrdValidDe--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label>
|
|
|
|
|
<input type="text" class="form-control w-50" id="schPrdValidDe--${pageName}" name="schPrdValidDe" data-fmt-type="day" data-map="schPrdValidDe" autocomplete="off" title="유효기간" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-2">
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-90" id="btnSearch3--${pageName}" title="검색">NIMS 검색</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-60" id="btnSearchDtl--${pageName}" title="검색">NIMS 검색</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span style="padding-left: 50px; font-weight: bold; color: #696cff">유효기간(제조번호 또는 시리얼번호 조회 결과 내에서 조회)</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</form>
|
|
|
|
|
<!-- 업무 버튼 표시 -->
|
|
|
|
|
<div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_1_wrapper--${pageName}">
|
|
|
|
|
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive-1--${pageName}">
|
|
|
|
|
<div class="table-responsive ox-scroll oy-scroll h-px-600" id="table-responsive-1--${pageName}">
|
|
|
|
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_1--${pageName}" aria-describedby="DataTables_Table_1_info">
|
|
|
|
|
<thead>
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr>
|
|
|
|
|
<%-- <th class="sorting" style="width: 146.156px;">제품코드</th>--%>
|
|
|
|
|
<%-- <th class="sorting" style="width: 330.141px;">제품명</th>--%>
|
|
|
|
|
<th class="sorting" style="width: 120.469px;">유효기간</th>
|
|
|
|
|
<th class="sorting" style="width: 160.469px;">제조번호</th>
|
|
|
|
|
<th class="sorting" style="width: 160.469px;">제조일련번호</th>
|
|
|
|
|
<th class="cmn" style="width: 70px;">No.</th>
|
|
|
|
|
<th class="sorting" style="width: 146px;">제품코드</th>
|
|
|
|
|
<th class="sorting" style="width: 110px;">유효기간</th>
|
|
|
|
|
<th class="sorting" style="width: 155px;">제조번호</th>
|
|
|
|
|
<th class="sorting" style="width: 155px;">제조일련번호</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="tbody--${pageName}Detail">
|
|
|
|
|
<tbody id="tbody--${pageName}Detail">
|
|
|
|
|
</tbody>
|
|
|
|
|
<template id="${infoPrefix}Row--${pageName}Detail">
|
|
|
|
|
<tr data-key="{keyCnt}">
|
|
|
|
|
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>--%>
|
|
|
|
|
<%-- <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>--%>
|
|
|
|
|
<td class="row-num text-end" onclick="{onclick}" ondblclick="{ondblclick}"></td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdValidDe}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfNo}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfSeq}</td>
|
|
|
|
@ -132,6 +137,7 @@
|
|
|
|
|
<ul id="${infoPrefix}DetailPaging--${pageName}" class="pagination pagination-primary" style="display: none;">
|
|
|
|
|
</ul>
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
|
<input type="checkbox" id="chkDtlBsshCd--${pageName}" name="chkDtlBsshCd" title="업체코드적용" style="align-items: baseline"/> <strong>신규 API 업체코드 적용</strong>
|
|
|
|
|
<!-- 업무 버튼 -->
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="선택">선택</button>
|
|
|
|
|
</span>
|
|
|
|
@ -189,13 +195,13 @@
|
|
|
|
|
, appendData: true
|
|
|
|
|
, infoSize: "xl"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $P.control 설정
|
|
|
|
|
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.detailControl = new DatasetControl({
|
|
|
|
|
|
|
|
|
|
$P.seqInfoControl = new DatasetControl({
|
|
|
|
|
urls : {
|
|
|
|
|
load : wctx.url("/adds/nims/getNimsProductSeqInfo.do"), // 시리얼번호 검색
|
|
|
|
|
}
|
|
|
|
@ -225,9 +231,9 @@
|
|
|
|
|
prdValidDe: dateFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $P.control 설정
|
|
|
|
|
$P.detailControl.defaultFetchSize = FETCH_MD; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
|
|
|
|
$P.seqInfoControl.defaultFetchSize = FETCH_MD; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -235,39 +241,39 @@
|
|
|
|
|
* DatasetControl 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// Dataset 변경 이벤트
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.control.onDatasetChange = (obj, option) => {
|
|
|
|
|
$P.renderList(obj.${infoPrefix}Total, option);
|
|
|
|
|
$P.renderList(obj.totalCount, option);
|
|
|
|
|
|
|
|
|
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.control.dataset
|
|
|
|
|
, prefix: "${infoPrefix}Paging--${pageName}"
|
|
|
|
|
, start: obj.${infoPrefix}Start
|
|
|
|
|
, totalSize: $P.control.dataset.length
|
|
|
|
|
, totalSize: obj.totalCount
|
|
|
|
|
, fetchSize: obj.${infoPrefix}Fetch
|
|
|
|
|
, func: "pageObject['${pageName}'].control.load({index})"
|
|
|
|
|
//, func: "pageObject['${pageName}'].control.load({index})"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
|
$P.control.onCurrentChange = item => {
|
|
|
|
|
if (!item) {
|
|
|
|
|
$P.detailControl.setData([]);
|
|
|
|
|
$("#btnSearch3--${pageName}").prop("disabled", true);
|
|
|
|
|
$P.seqInfoControl.setData([]);
|
|
|
|
|
$("#btnSearchDtl--${pageName}").prop("disabled", true);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let key = item.data.keyCnt;
|
|
|
|
|
$("#tbody--${pageName}").setCurrentRow(key);
|
|
|
|
|
|
|
|
|
|
$("#btnSearch3--${pageName}").prop("disabled", false);
|
|
|
|
|
|
|
|
|
|
$("#btnSearchDtl--${pageName}").prop("disabled", false);
|
|
|
|
|
$P.fnDetailSearchList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
|
$P.detailControl.onCurrentChange = (item) => {
|
|
|
|
|
$P.seqInfoControl.onCurrentChange = (item) => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
let key = item.data.keyCnt;
|
|
|
|
@ -275,20 +281,17 @@
|
|
|
|
|
$("#tbody--${pageName}Detail").setCurrentRow(key);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.detailControl.onDatasetChange = (obj, option) => {
|
|
|
|
|
$P.seqInfoControl.onDatasetChange = (obj, option) => {
|
|
|
|
|
$P.renderDetailList(obj.totalCount, option);
|
|
|
|
|
|
|
|
|
|
$("#${infoPrefix}DetailPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.detailControl.dataset
|
|
|
|
|
list: $P.seqInfoControl.dataset
|
|
|
|
|
, prefix: "${infoPrefix}DetailPaging--${pageName}"
|
|
|
|
|
, totalSize: obj.totalCount
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
// 저장 callback
|
|
|
|
|
|
|
|
|
|
// 저장
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DataTables 이벤트
|
|
|
|
@ -299,30 +302,20 @@
|
|
|
|
|
let ${infoPrefix}List = $P.control.dataset;
|
|
|
|
|
let empty = ${infoPrefix}List.empty;
|
|
|
|
|
|
|
|
|
|
// 업무별 DataTables(그리드) tr, td
|
|
|
|
|
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").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}'].control.setCurrent('" + dataItem.getValue("keyCnt") + "');");
|
|
|
|
|
// .replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()");
|
|
|
|
|
|
|
|
|
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML]
|
|
|
|
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#tbody--${pageName}").html(trs.join());
|
|
|
|
|
let trs = empty ?
|
|
|
|
|
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] :
|
|
|
|
|
${infoPrefix}List.inStrings(
|
|
|
|
|
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML,
|
|
|
|
|
(str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("keyCnt") + "');"));
|
|
|
|
|
let noMore = (${infoPrefix}List.length >= totalSize);
|
|
|
|
|
let initScroll = ($P.control.query.pageNum < 2);
|
|
|
|
|
|
|
|
|
|
$("#table-responsive-0--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.renderDetailList = (totalSize, option) => {
|
|
|
|
|
let ${infoPrefix}DetailList = $P.detailControl.dataset;
|
|
|
|
|
let ${infoPrefix}DetailList = $P.seqInfoControl.dataset;
|
|
|
|
|
let empty = ${infoPrefix}DetailList.empty;
|
|
|
|
|
|
|
|
|
|
let trs = empty ?
|
|
|
|
@ -330,16 +323,13 @@
|
|
|
|
|
${infoPrefix}DetailList.inStrings(
|
|
|
|
|
document.getElementById("${infoPrefix}Row--${pageName}Detail").innerHTML, <%-- from template#${infoPrefix}Row --%>
|
|
|
|
|
(str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].detailControl.setCurrent('" + dataItem.getValue("keyCnt") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()")
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].seqInfoControl.setCurrent('" + dataItem.getValue("keyCnt") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()"));
|
|
|
|
|
|
|
|
|
|
let noMore = (${infoPrefix}DetailList.length >= totalSize);
|
|
|
|
|
let initScroll = ($P.detailControl.query.pageNum < 2);
|
|
|
|
|
|
|
|
|
|
$("#table-responsive-1--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
let initScroll = ($P.seqInfoControl.query.pageNum < 2);
|
|
|
|
|
|
|
|
|
|
$("#table-responsive-1--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
}
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 사용자 함수(function)
|
|
|
|
@ -349,12 +339,33 @@
|
|
|
|
|
* 버튼 clickEvent
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
//그리드(좌)조회(새로 조회)
|
|
|
|
|
$P.fnSearchList = (dbSkipYn) => {
|
|
|
|
|
$P.fnSearchList = () => {
|
|
|
|
|
if($P.formFields.get().schProductNm.length + $P.formFields.get().schProductCd.length === 0){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "상품명 또는 상품번호중 하나는 필수입니다."
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if($P.formFields.get().schProductNm.length !== 0 && $P.formFields.get().schProductNm.length < 2){
|
|
|
|
|
// dialog.alert({
|
|
|
|
|
// content: "상품명은 2자 이상으로 조회해 주세요."
|
|
|
|
|
// });
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// FIXME:: NIMS API 개발 완료후 적용
|
|
|
|
|
let bsshCd = '${bsshCd}';
|
|
|
|
|
<%--if(!$('#chkBsshCd--${pageName}').is(":checked")){--%>
|
|
|
|
|
<%-- bsshCd = '';--%>
|
|
|
|
|
<%--}--%>
|
|
|
|
|
|
|
|
|
|
$P.control.query = {
|
|
|
|
|
... $P.formFields.get(),
|
|
|
|
|
pg: 1,
|
|
|
|
|
p: $P.formFields.get().schProductCd,
|
|
|
|
|
pn: $P.formFields.get().schProductNm,
|
|
|
|
|
dbSkipYn: dbSkipYn? dbSkipYn : "N",
|
|
|
|
|
bc: bsshCd, //업체코드
|
|
|
|
|
userId: "${currentUser.account}"
|
|
|
|
|
};
|
|
|
|
|
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수
|
|
|
|
@ -362,36 +373,52 @@
|
|
|
|
|
|
|
|
|
|
$P.control.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.scrollList = () => {
|
|
|
|
|
$P.control.query.pg = $P.control.query.pageNum + 1;
|
|
|
|
|
$P.control.load($P.control.query.pageNum + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//그리드(우)조회(새로 조회)
|
|
|
|
|
$P.fnDetailSearchList = () => {
|
|
|
|
|
$P.detailControl.query = {
|
|
|
|
|
fg: $('#schOpt--productMain').val(), // 1-제조번호, 2-시리얼번호
|
|
|
|
|
if(!$P.control.dataset.getCurrent()?.prductCd){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
let bsshCd = '${bsshCd}';
|
|
|
|
|
if(!$('#chkDtlBsshCd--${pageName}').is(":checked")){
|
|
|
|
|
bsshCd = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.seqInfoControl.query = {
|
|
|
|
|
fg: $('#schOpt--productPopup').val(), // 1-제조번호, 2-시리얼번호
|
|
|
|
|
pg: 1,
|
|
|
|
|
p: $P.control.dataset.getCurrent().prductCd , //제품코드
|
|
|
|
|
prdValidDe: $("input[name='schPrdValidDe']").val().replaceAll("-", ""),
|
|
|
|
|
t: $('#schText--productMain').val(), //제조번호 또는 시리얼번호
|
|
|
|
|
p: $P.control.dataset.getCurrent().prductCd , //제품코드
|
|
|
|
|
t: $('#schText--productPopup').val(), //제조번호 또는 시리얼번호
|
|
|
|
|
vd: $("input[name='schPrdValidDe']").val().replaceAll("-", ""),
|
|
|
|
|
bc: bsshCd, //업체코드
|
|
|
|
|
userId: "${currentUser.account}"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.detailControl.query.fetchSize = FETCH_MD; // 한번에 조회되는 자료 건수
|
|
|
|
|
$P.detailControl.query.delYn = "N"; // 삭제 여부
|
|
|
|
|
$P.seqInfoControl.query.fetchSize = FETCH_MD; // 한번에 조회되는 자료 건수
|
|
|
|
|
$P.seqInfoControl.query.delYn = "N"; // 삭제 여부
|
|
|
|
|
|
|
|
|
|
$P.detailControl.load(1);
|
|
|
|
|
$P.seqInfoControl.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//그리드(우)조회(스크롤)
|
|
|
|
|
$P.scrollDetailDataList = () => {
|
|
|
|
|
|
|
|
|
|
$P.detailControl.query.pg = $P.detailControl.query.pageNum + 1;
|
|
|
|
|
$P.detailControl.load($P.detailControl.query.pageNum + 1);
|
|
|
|
|
$P.seqInfoControl.query.pg = $P.seqInfoControl.query.pageNum + 1;
|
|
|
|
|
$P.seqInfoControl.load($P.seqInfoControl.query.pageNum + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 저장
|
|
|
|
|
$P.fnSave = () => {
|
|
|
|
|
let openPage = new AddsFormFields("#${openPage}");
|
|
|
|
|
productData = {...$P.control.getCurrent(), ...$P.detailControl.getCurrent()}
|
|
|
|
|
productData = {...$P.control.getCurrent(), ...$P.seqInfoControl.getCurrent()}
|
|
|
|
|
openPage.set (null,productData); // formFields
|
|
|
|
|
dialog.close("productMainDialog");
|
|
|
|
|
dialog.close("productPopupDialog");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
@ -399,7 +426,7 @@
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 이벤트 설정
|
|
|
|
|
$P.setEvent = () => {
|
|
|
|
|
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
|
|
|
|
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
|
|
|
|
$("#frmSearch--${pageName}").find(".form-date").each(function() {
|
|
|
|
|
$(this).on("input", function() {
|
|
|
|
|
let value = this.value.replaceAll("-", "");
|
|
|
|
@ -411,24 +438,35 @@
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 버튼 이벤트
|
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
|
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
|
|
|
|
|
$("#btnSearch2--${pageName}").on("click", () => $P.fnSearchList("Y"));
|
|
|
|
|
$("#btnSearch3--${pageName}").on("click", () => $P.fnDetailSearchList());
|
|
|
|
|
|
|
|
|
|
$("#btnSearchDtl--${pageName}").on("click", () => $P.fnDetailSearchList());
|
|
|
|
|
$("#chkDtlBsshCd--${pageName}").on("change", () => $P.fnDetailSearchList());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#frmSearch--${pageName}Detail input").onEnterPress($P.fnDetailSearchList);
|
|
|
|
|
|
|
|
|
|
Componentization.fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}')
|
|
|
|
|
, (tr)=>{ return $(tr).find("td.row-num")[0]; }
|
|
|
|
|
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
|
|
|
|
|
);
|
|
|
|
|
Componentization.fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail')
|
|
|
|
|
, (tr)=>{ return $(tr).find("td.row-num")[0]; }
|
|
|
|
|
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fnMakeScrollableTable($("#table-responsive-1--${pageName}")[0], $P.scrollDetailDataList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Componentization.fnMakeScrollableTable($("#table-responsive-0--${pageName}")[0], $P.scrollList);
|
|
|
|
|
Componentization.fnMakeScrollableTable($("#table-responsive-1--${pageName}")[0], $P.scrollDetailDataList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
|
$P.initForm = () => {
|
|
|
|
|
$("#btnSearch3--${pageName}").prop("disabled", true);
|
|
|
|
|
$("#btnSearchDtl--${pageName}").prop("disabled", true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|