feat: 제품 검색 신규 API 적용 - NIMS API 개발 완료후 필요시 URL 변경 필요

dev
Jonguk. Lim 1 month ago
parent 7b27eda963
commit 6ea0523e75

@ -63,14 +63,24 @@
</div>
<div class="d-flex flex-row p-3 justify-content-between">
<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 개발 완료후 적용 -->
<%--
<ul id="${infoPrefix}Paging--${pageName}" class="pagination pagination-primary" style="display: none;"></ul>
<!-- FIXME:: NIMS API 개발 완료후 적용: disabled 제거 -->
<span class="container-window-btn-right">
<input type="checkbox" id="chkBsshCd--${pageName}" name="chkBsshCd" title="업체코드적용" style="align-items: baseline"/>&nbsp;<strong>신규API 업체코드 적용</strong>
<div style="display: none;">
<label class="form-label fw-bold form-search-title text-end" for="schPrdCd--${pageName}">제품 조회 구분</label>
<div class="form-check form-check-inline mt-3">
<input id="bcPrd" name="schPrdCd" value="bcPrd" type="radio" class="form-check-input"/>
<label class="form-check-label" for="bcPrd">업체</label>
</div>
<div class="form-check form-check-inline">
<input id="nimsPrd" name="schPrdCd" value="nimsPrd" type="radio" class="form-check-input"/>
<label class="form-check-label" for="nimsPrd">NIMS</label>
</div>
</div>
</span>
--%>
</div>
</div>
<div class="card col-6">
@ -136,7 +146,6 @@
<label id="${infoPrefix}DetailPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="${infoPrefix}DetailPaging--${pageName}" class="pagination pagination-primary" style="display: none;"></ul>
<span class="container-window-btn-right">
<div>
<label class="form-label fw-bold form-search-title text-end" for="schSttsCd--${pageName}">제조번호 조회 구분</label>
@ -211,8 +220,6 @@
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.seqInfoControl = new DatasetControl({
urls : {
load : wctx.url("/adds/nims/getNimsProductSeqInfo.do"), // 시리얼번호 검색
@ -247,8 +254,6 @@
// $P.control 설정
$P.seqInfoControl.defaultFetchSize = FETCH_MD; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
@ -301,8 +306,6 @@
, prefix: "${infoPrefix}DetailPaging--${pageName}"
, totalSize: obj.totalCount
});
};
/**************************************************************************
@ -358,19 +361,12 @@
});
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 = '';--%>
<%--}--%>
if($('input:radio[name="schPrdCd"]:checked').val() === 'nimsPrd'){
bsshCd = '';
}
$P.control.query = {
... $P.formFields.get(),
@ -386,13 +382,11 @@
$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 = () => {
@ -457,6 +451,7 @@
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
$("#btnSearchDtl--${pageName}").on("click", () => $P.fnDetailSearchList());
$('input:radio[name="schPrdCd"]').on("change", () => $P.fnSearchList());
$('input:radio[name="schMnfNo"]').on("change", () => $P.fnDetailSearchList());
$("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList);
@ -480,6 +475,7 @@
// 초기 화면 설정
$P.initForm = () => {
$("#btnSearchDtl--${pageName}").prop("disabled", true);
$('input:radio[name="schPrdCd"]').filter('[value="bcPrd"]').prop('checked', true);
$('input:radio[name="schMnfNo"]').filter('[value="bc"]').prop('checked', true);
}

Loading…
Cancel
Save