|
|
@ -10,14 +10,13 @@
|
|
|
|
<div class="container-search">
|
|
|
|
<div class="container-search">
|
|
|
|
<!-- hidden -->
|
|
|
|
<!-- hidden -->
|
|
|
|
<div class="row my-0 mx-1 g-0" style="align-items: baseline">
|
|
|
|
<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>
|
|
|
|
<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-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-150" id="productCd--${pageName}" name="schProductCd" maxlength="13" oninput="this.value = this.value.slice(0, 13)">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="col-md-3">
|
|
|
|
<button type="button" class="btn btn-search w-px-50" id="btnSearch--${pageName}" title="검색">검색</button>
|
|
|
|
<button type="button" class="btn btn-search w-px-50" id="btnSearch--${pageName}" title="검색">NIMS 검색</button>
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnSearch2--${pageName}" title="검색">NIMS 검색</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -25,10 +24,11 @@
|
|
|
|
<!-- / 업무 버튼 표시 -->
|
|
|
|
<!-- / 업무 버튼 표시 -->
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
|
|
|
|
<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">
|
|
|
|
<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>
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<th class="cmn" style="width: 70px;">No.</th>
|
|
|
|
<th class="sorting" style="width: 146.156px;">제품코드</th>
|
|
|
|
<th class="sorting" style="width: 146.156px;">제품코드</th>
|
|
|
|
<th class="sorting" style="width: 350.141px;">제품명</th>
|
|
|
|
<th class="sorting" style="width: 350.141px;">제품명</th>
|
|
|
|
<th class="sorting" style="width: 120.469px;">유통단위</th>
|
|
|
|
<th class="sorting" style="width: 120.469px;">유통단위</th>
|
|
|
@ -42,6 +42,7 @@
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
<template id="${infoPrefix}Row--${pageName}">
|
|
|
|
<template id="${infoPrefix}Row--${pageName}">
|
|
|
|
<tr data-key="{keyCnt}">
|
|
|
|
<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-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
|
|
|
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
|
|
|
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdMinDistbQy} {stdPackngStleNm}</td>
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdMinDistbQy} {stdPackngStleNm}</td>
|
|
|
@ -64,31 +65,35 @@
|
|
|
|
<label id="${infoPrefix}Paging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
|
|
|
|
<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 id="${infoPrefix}Paging--${pageName}" class="pagination pagination-primary" style="display: none;">
|
|
|
|
</ul>
|
|
|
|
</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>
|
|
|
|
</div>
|
|
|
|
<div class="card col-6">
|
|
|
|
<div class="card col-6">
|
|
|
|
<form id="frmSearch--${pageName}Detail" name="frmSearchDetail">
|
|
|
|
<form id="frmSearch--${pageName}Detail" name="frmSearchDetail">
|
|
|
|
|
|
|
|
<input type="hidden" id="bsshCd" name="bsshCd">
|
|
|
|
<div class="container-search">
|
|
|
|
<div class="container-search">
|
|
|
|
<!-- hidden -->
|
|
|
|
<!-- hidden -->
|
|
|
|
<div class="row my-0 mx-1 g-0" style="align-items: baseline">
|
|
|
|
<div class="row my-0 mx-1 g-0" style="align-items: baseline">
|
|
|
|
<div class="col-md-5">
|
|
|
|
<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="1">제조번호</option>
|
|
|
|
<option value="2">일련번호</option>
|
|
|
|
<option value="2">일련번호</option>
|
|
|
|
</select>
|
|
|
|
</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>
|
|
|
|
<div class="col-md-5">
|
|
|
|
<div class="col-md-5">
|
|
|
|
<label for="schPrdValidDe--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label>
|
|
|
|
<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="유효기간" />
|
|
|
|
<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>
|
|
|
|
<div class="col-md-2">
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<span style="padding-left: 50px; font-weight: bold; color: #696cff">유효기간(제조번호 또는 시리얼번호 조회 결과 내에서 조회)</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
<!-- 업무 버튼 표시 -->
|
|
|
|
<!-- 업무 버튼 표시 -->
|
|
|
@ -96,23 +101,23 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_1_wrapper--${pageName}">
|
|
|
|
<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">
|
|
|
|
<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>
|
|
|
|
<tr>
|
|
|
|
<%-- <th class="sorting" style="width: 146.156px;">제품코드</th>--%>
|
|
|
|
<th class="cmn" style="width: 70px;">No.</th>
|
|
|
|
<%-- <th class="sorting" style="width: 330.141px;">제품명</th>--%>
|
|
|
|
<th class="sorting" style="width: 146px;">제품코드</th>
|
|
|
|
<th class="sorting" style="width: 120.469px;">유효기간</th>
|
|
|
|
<th class="sorting" style="width: 110px;">유효기간</th>
|
|
|
|
<th class="sorting" style="width: 160.469px;">제조번호</th>
|
|
|
|
<th class="sorting" style="width: 155px;">제조번호</th>
|
|
|
|
<th class="sorting" style="width: 160.469px;">제조일련번호</th>
|
|
|
|
<th class="sorting" style="width: 155px;">제조일련번호</th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
<tbody id="tbody--${pageName}Detail">
|
|
|
|
<tbody id="tbody--${pageName}Detail">
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
<template id="${infoPrefix}Row--${pageName}Detail">
|
|
|
|
<template id="${infoPrefix}Row--${pageName}Detail">
|
|
|
|
<tr data-key="{keyCnt}">
|
|
|
|
<tr data-key="{keyCnt}">
|
|
|
|
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>--%>
|
|
|
|
<td class="row-num text-end" onclick="{onclick}" ondblclick="{ondblclick}"></td>
|
|
|
|
<%-- <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</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}">{prdValidDe}</td>
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfNo}</td>
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfNo}</td>
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfSeq}</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 id="${infoPrefix}DetailPaging--${pageName}" class="pagination pagination-primary" style="display: none;">
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
<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>
|
|
|
|
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="선택">선택</button>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
@ -195,7 +201,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.detailControl = new DatasetControl({
|
|
|
|
$P.seqInfoControl = new DatasetControl({
|
|
|
|
urls : {
|
|
|
|
urls : {
|
|
|
|
load : wctx.url("/adds/nims/getNimsProductSeqInfo.do"), // 시리얼번호 검색
|
|
|
|
load : wctx.url("/adds/nims/getNimsProductSeqInfo.do"), // 시리얼번호 검색
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -227,7 +233,7 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// $P.control 설정
|
|
|
|
// $P.control 설정
|
|
|
|
$P.detailControl.defaultFetchSize = FETCH_MD; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
|
|
|
$P.seqInfoControl.defaultFetchSize = FETCH_MD; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -237,15 +243,15 @@
|
|
|
|
// Dataset 변경 이벤트
|
|
|
|
// Dataset 변경 이벤트
|
|
|
|
|
|
|
|
|
|
|
|
$P.control.onDatasetChange = (obj, option) => {
|
|
|
|
$P.control.onDatasetChange = (obj, option) => {
|
|
|
|
$P.renderList(obj.${infoPrefix}Total, option);
|
|
|
|
$P.renderList(obj.totalCount, option);
|
|
|
|
|
|
|
|
|
|
|
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
|
|
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
|
|
|
list: $P.control.dataset
|
|
|
|
list: $P.control.dataset
|
|
|
|
, prefix: "${infoPrefix}Paging--${pageName}"
|
|
|
|
, prefix: "${infoPrefix}Paging--${pageName}"
|
|
|
|
, start: obj.${infoPrefix}Start
|
|
|
|
, start: obj.${infoPrefix}Start
|
|
|
|
, totalSize: $P.control.dataset.length
|
|
|
|
, totalSize: obj.totalCount
|
|
|
|
, fetchSize: obj.${infoPrefix}Fetch
|
|
|
|
, fetchSize: obj.${infoPrefix}Fetch
|
|
|
|
, func: "pageObject['${pageName}'].control.load({index})"
|
|
|
|
//, func: "pageObject['${pageName}'].control.load({index})"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -254,20 +260,20 @@
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
$P.control.onCurrentChange = item => {
|
|
|
|
$P.control.onCurrentChange = item => {
|
|
|
|
if (!item) {
|
|
|
|
if (!item) {
|
|
|
|
$P.detailControl.setData([]);
|
|
|
|
$P.seqInfoControl.setData([]);
|
|
|
|
$("#btnSearch3--${pageName}").prop("disabled", true);
|
|
|
|
$("#btnSearchDtl--${pageName}").prop("disabled", true);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let key = item.data.keyCnt;
|
|
|
|
let key = item.data.keyCnt;
|
|
|
|
$("#tbody--${pageName}").setCurrentRow(key);
|
|
|
|
$("#tbody--${pageName}").setCurrentRow(key);
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnSearch3--${pageName}").prop("disabled", false);
|
|
|
|
$("#btnSearchDtl--${pageName}").prop("disabled", false);
|
|
|
|
$P.fnDetailSearchList();
|
|
|
|
$P.fnDetailSearchList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
$P.detailControl.onCurrentChange = (item) => {
|
|
|
|
$P.seqInfoControl.onCurrentChange = (item) => {
|
|
|
|
if (!item) return;
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
|
|
let key = item.data.keyCnt;
|
|
|
|
let key = item.data.keyCnt;
|
|
|
@ -275,20 +281,17 @@
|
|
|
|
$("#tbody--${pageName}Detail").setCurrentRow(key);
|
|
|
|
$("#tbody--${pageName}Detail").setCurrentRow(key);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.detailControl.onDatasetChange = (obj, option) => {
|
|
|
|
$P.seqInfoControl.onDatasetChange = (obj, option) => {
|
|
|
|
$P.renderDetailList(obj.totalCount, option);
|
|
|
|
$P.renderDetailList(obj.totalCount, option);
|
|
|
|
|
|
|
|
|
|
|
|
$("#${infoPrefix}DetailPaging--${pageName}").setPagingInfo({
|
|
|
|
$("#${infoPrefix}DetailPaging--${pageName}").setPagingInfo({
|
|
|
|
list: $P.detailControl.dataset
|
|
|
|
list: $P.seqInfoControl.dataset
|
|
|
|
, prefix: "${infoPrefix}DetailPaging--${pageName}"
|
|
|
|
, prefix: "${infoPrefix}DetailPaging--${pageName}"
|
|
|
|
, totalSize: obj.totalCount
|
|
|
|
, totalSize: obj.totalCount
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
// 저장 callback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 저장
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* DataTables 이벤트
|
|
|
|
* DataTables 이벤트
|
|
|
@ -299,30 +302,20 @@
|
|
|
|
let ${infoPrefix}List = $P.control.dataset;
|
|
|
|
let ${infoPrefix}List = $P.control.dataset;
|
|
|
|
let empty = ${infoPrefix}List.empty;
|
|
|
|
let empty = ${infoPrefix}List.empty;
|
|
|
|
|
|
|
|
|
|
|
|
// 업무별 DataTables(그리드) tr, td
|
|
|
|
let trs = empty ?
|
|
|
|
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content;
|
|
|
|
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] :
|
|
|
|
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
|
|
|
|
${infoPrefix}List.inStrings(
|
|
|
|
let foundTds = $(foundContent).find("td");
|
|
|
|
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML,
|
|
|
|
|
|
|
|
(str, dataItem) => str
|
|
|
|
foundTds.each(function() {
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("keyCnt") + "');"));
|
|
|
|
foundTr.appendChild(this.cloneNode(true));
|
|
|
|
let noMore = (${infoPrefix}List.length >= totalSize);
|
|
|
|
});
|
|
|
|
let initScroll = ($P.control.query.pageNum < 2);
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
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());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#table-responsive-0--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.renderDetailList = (totalSize, option) => {
|
|
|
|
$P.renderDetailList = (totalSize, option) => {
|
|
|
|
let ${infoPrefix}DetailList = $P.detailControl.dataset;
|
|
|
|
let ${infoPrefix}DetailList = $P.seqInfoControl.dataset;
|
|
|
|
let empty = ${infoPrefix}DetailList.empty;
|
|
|
|
let empty = ${infoPrefix}DetailList.empty;
|
|
|
|
|
|
|
|
|
|
|
|
let trs = empty ?
|
|
|
|
let trs = empty ?
|
|
|
@ -330,16 +323,13 @@
|
|
|
|
${infoPrefix}DetailList.inStrings(
|
|
|
|
${infoPrefix}DetailList.inStrings(
|
|
|
|
document.getElementById("${infoPrefix}Row--${pageName}Detail").innerHTML, <%-- from template#${infoPrefix}Row --%>
|
|
|
|
document.getElementById("${infoPrefix}Row--${pageName}Detail").innerHTML, <%-- from template#${infoPrefix}Row --%>
|
|
|
|
(str, dataItem) => str
|
|
|
|
(str, dataItem) => str
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].detailControl.setCurrent('" + dataItem.getValue("keyCnt") + "');")
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].seqInfoControl.setCurrent('" + dataItem.getValue("keyCnt") + "');")
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()")
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()"));
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let noMore = (${infoPrefix}DetailList.length >= totalSize);
|
|
|
|
let noMore = (${infoPrefix}DetailList.length >= totalSize);
|
|
|
|
let initScroll = ($P.detailControl.query.pageNum < 2);
|
|
|
|
let initScroll = ($P.seqInfoControl.query.pageNum < 2);
|
|
|
|
|
|
|
|
|
|
|
|
$("#table-responsive-1--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
$("#table-responsive-1--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* 사용자 함수(function)
|
|
|
|
* 사용자 함수(function)
|
|
|
@ -349,12 +339,33 @@
|
|
|
|
* 버튼 clickEvent
|
|
|
|
* 버튼 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.control.query = {
|
|
|
|
... $P.formFields.get(),
|
|
|
|
... $P.formFields.get(),
|
|
|
|
|
|
|
|
pg: 1,
|
|
|
|
p: $P.formFields.get().schProductCd,
|
|
|
|
p: $P.formFields.get().schProductCd,
|
|
|
|
pn: $P.formFields.get().schProductNm,
|
|
|
|
pn: $P.formFields.get().schProductNm,
|
|
|
|
dbSkipYn: dbSkipYn? dbSkipYn : "N",
|
|
|
|
bc: bsshCd, //업체코드
|
|
|
|
userId: "${currentUser.account}"
|
|
|
|
userId: "${currentUser.account}"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수
|
|
|
|
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수
|
|
|
@ -362,36 +373,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
$P.control.load(1);
|
|
|
|
$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.fnDetailSearchList = () => {
|
|
|
|
$P.detailControl.query = {
|
|
|
|
if(!$P.control.dataset.getCurrent()?.prductCd){
|
|
|
|
fg: $('#schOpt--productMain').val(), // 1-제조번호, 2-시리얼번호
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let bsshCd = '${bsshCd}';
|
|
|
|
|
|
|
|
if(!$('#chkDtlBsshCd--${pageName}').is(":checked")){
|
|
|
|
|
|
|
|
bsshCd = '';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.seqInfoControl.query = {
|
|
|
|
|
|
|
|
fg: $('#schOpt--productPopup').val(), // 1-제조번호, 2-시리얼번호
|
|
|
|
pg: 1,
|
|
|
|
pg: 1,
|
|
|
|
p: $P.control.dataset.getCurrent().prductCd , //제품코드
|
|
|
|
p: $P.control.dataset.getCurrent().prductCd , //제품코드
|
|
|
|
prdValidDe: $("input[name='schPrdValidDe']").val().replaceAll("-", ""),
|
|
|
|
t: $('#schText--productPopup').val(), //제조번호 또는 시리얼번호
|
|
|
|
t: $('#schText--productMain').val(), //제조번호 또는 시리얼번호
|
|
|
|
vd: $("input[name='schPrdValidDe']").val().replaceAll("-", ""),
|
|
|
|
|
|
|
|
bc: bsshCd, //업체코드
|
|
|
|
userId: "${currentUser.account}"
|
|
|
|
userId: "${currentUser.account}"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.detailControl.query.fetchSize = FETCH_MD; // 한번에 조회되는 자료 건수
|
|
|
|
$P.seqInfoControl.query.fetchSize = FETCH_MD; // 한번에 조회되는 자료 건수
|
|
|
|
$P.detailControl.query.delYn = "N"; // 삭제 여부
|
|
|
|
$P.seqInfoControl.query.delYn = "N"; // 삭제 여부
|
|
|
|
|
|
|
|
|
|
|
|
$P.detailControl.load(1);
|
|
|
|
$P.seqInfoControl.load(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//그리드(우)조회(스크롤)
|
|
|
|
//그리드(우)조회(스크롤)
|
|
|
|
$P.scrollDetailDataList = () => {
|
|
|
|
$P.scrollDetailDataList = () => {
|
|
|
|
|
|
|
|
$P.seqInfoControl.query.pg = $P.seqInfoControl.query.pageNum + 1;
|
|
|
|
$P.detailControl.query.pg = $P.detailControl.query.pageNum + 1;
|
|
|
|
$P.seqInfoControl.load($P.seqInfoControl.query.pageNum + 1);
|
|
|
|
$P.detailControl.load($P.detailControl.query.pageNum + 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 저장
|
|
|
|
// 저장
|
|
|
|
$P.fnSave = () => {
|
|
|
|
$P.fnSave = () => {
|
|
|
|
let openPage = new AddsFormFields("#${openPage}");
|
|
|
|
let openPage = new AddsFormFields("#${openPage}");
|
|
|
|
productData = {...$P.control.getCurrent(), ...$P.detailControl.getCurrent()}
|
|
|
|
productData = {...$P.control.getCurrent(), ...$P.seqInfoControl.getCurrent()}
|
|
|
|
openPage.set (null,productData); // formFields
|
|
|
|
openPage.set (null,productData); // formFields
|
|
|
|
dialog.close("productMainDialog");
|
|
|
|
dialog.close("productPopupDialog");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
@ -415,20 +442,31 @@
|
|
|
|
// 버튼 이벤트
|
|
|
|
// 버튼 이벤트
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
|
|
|
|
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
|
|
|
|
$("#btnSearch2--${pageName}").on("click", () => $P.fnSearchList("Y"));
|
|
|
|
$("#btnSearchDtl--${pageName}").on("click", () => $P.fnDetailSearchList());
|
|
|
|
$("#btnSearch3--${pageName}").on("click", () => $P.fnDetailSearchList());
|
|
|
|
$("#chkDtlBsshCd--${pageName}").on("change", () => $P.fnDetailSearchList());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList);
|
|
|
|
$("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList);
|
|
|
|
|
|
|
|
|
|
|
|
$("#frmSearch--${pageName}Detail input").onEnterPress($P.fnDetailSearchList);
|
|
|
|
$("#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 = () => {
|
|
|
|
$P.initForm = () => {
|
|
|
|
$("#btnSearch3--${pageName}").prop("disabled", true);
|
|
|
|
$("#btnSearchDtl--${pageName}").prop("disabled", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|