|
|
|
@ -8,21 +8,17 @@
|
|
|
|
|
<!-- hidden -->
|
|
|
|
|
<%-- <label for="bssh--${pageName}">마약류 취급업체 정보</label>--%>
|
|
|
|
|
<div class="row my-1 mx-4 g-1" style="align-items: baseline">
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
|
<label for="schBsshNm--${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="schBsshNm--${pageName}" name="schBsshNm" data-map="schBsshNm" >
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<label for="schBsshNm--${pageName}" class="w-px-140 bg-lighter pe-2 col-form-label text-sm-end">취급업체명/식별번호</label>
|
|
|
|
|
<input type="text" class="form-control w-px-100" id="schBsshNm--${pageName}" name="schBsshNm" data-map="schBsshNm" >
|
|
|
|
|
<input type="text" class="form-control w-px-120" id="schBsshCd--${pageName}" name="schBsshCd" data-map="schBsshCd" >
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
|
<label for="schRprsntvNm--${pageName}" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end">대표자명</label>
|
|
|
|
|
<input type="text" class="form-control w-50" id="schRprsntvNm--${pageName}" name="schRprsntvNm" data-map="schRprsntvNm" >
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
|
<label for="schBsshCd--${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="schBsshCd--${pageName}" name="schBsshCd" data-map="schBsshCd" >
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
|
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">검색</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" id="btnSearch2--${pageName}" title="검색">NIMS 검색</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" id="btnSearch--${pageName}" title="검색">NIMS 검색</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -42,30 +38,24 @@
|
|
|
|
|
<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-responsive--${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 style="width: 15.828px;text-align:center;" tabindex="0">No</th> -->
|
|
|
|
|
<th class="sorting" style="width: 140.156px;">취급자번호</th>
|
|
|
|
|
<th class="sorting" style="width: 250.141px;">취급업체명</th>
|
|
|
|
|
<th class="sorting" style="width: 160.141px;">업종명</th>
|
|
|
|
|
<th class="sorting" style="width: 120.469px;">대표자</th>
|
|
|
|
|
<th class="sorting" style="width: 250.469px;">허가번호</th>
|
|
|
|
|
<%-- <th class="sorting" style="width: 120.469px;">담당자명</th>--%>
|
|
|
|
|
<%-- <th class="sorting" style="width: 120.469px;">구분</th>--%>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="tbody--${pageName}">
|
|
|
|
|
</tbody>
|
|
|
|
|
<template id="${infoPrefix}Row--${pageName}">
|
|
|
|
|
<tr data-key="{bsshCd}">
|
|
|
|
|
<!-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshCd}</td> -->
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshCd}</td>
|
|
|
|
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bsshNm}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{indutyNm}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{rprsntvNm}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prmisnNo}</td>
|
|
|
|
|
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{chrgNm}</td>--%>
|
|
|
|
|
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{hdntNm}</td>--%>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="${infoPrefix}NotFound--${pageName}">
|
|
|
|
@ -131,15 +121,16 @@
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// Dataset 변경 이벤트
|
|
|
|
|
|
|
|
|
|
$P.control.onDatasetChange = (obj) => {
|
|
|
|
|
$P.renderList(obj.${infoPrefix}Total);
|
|
|
|
|
$P.control.onDatasetChange = (obj, 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})"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
@ -162,33 +153,22 @@
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// DataTables에 click, dbclick 이벤트
|
|
|
|
|
|
|
|
|
|
$P.renderList = (totalSize) => {
|
|
|
|
|
$P.renderList = (totalSize, option) => {
|
|
|
|
|
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("bsshCd") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()");
|
|
|
|
|
|
|
|
|
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
|
|
|
|
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
|
|
|
|
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("bsshCd") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()"));
|
|
|
|
|
|
|
|
|
|
let noMore = (${infoPrefix}List.length >= totalSize);
|
|
|
|
|
let initScroll = ($P.control.query.pageNum < 2);
|
|
|
|
|
|
|
|
|
|
$("#tbody--${pageName}").html(trs.join());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
}
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 사용자 함수(function)
|
|
|
|
@ -199,12 +179,25 @@
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
$P.fnSearchList = () => {
|
|
|
|
|
if($P.formFields.get().schBsshCd.length + $P.formFields.get().schBsshNm.length === 0){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "취급업체명 또는 취급자식별번호중<br>하나는 필수입니다."
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($P.formFields.get().schBsshNm.length !== 0 && $P.formFields.get().schBsshNm.length < 2){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "취급업체명은 2자 이상으로 조회해 주세요."
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.control.query = {
|
|
|
|
|
//... $P.formFields.get(),
|
|
|
|
|
pg: 1,
|
|
|
|
|
bc: $P.formFields.get().schBsshCd,
|
|
|
|
|
bn: $P.formFields.get().schBsshNm,
|
|
|
|
|
rprsntvNm: $P.formFields.get().schRprsntvNm,
|
|
|
|
|
//dbSkipYn: dbSkipYn? dbSkipYn : "N",
|
|
|
|
|
userId: "${currentUser.account}"
|
|
|
|
|
};
|
|
|
|
|
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수
|
|
|
|
@ -213,6 +206,12 @@
|
|
|
|
|
$P.control.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollDataList = () => {
|
|
|
|
|
|
|
|
|
|
$P.control.query.pg = $P.control.query.pageNum + 1;
|
|
|
|
|
$P.control.load($P.control.query.pageNum + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 저장
|
|
|
|
|
$P.fnSave = () => {
|
|
|
|
|
let openPage = new AddsFormFields("#${openPage}");
|
|
|
|
@ -228,13 +227,12 @@
|
|
|
|
|
// 버튼 이벤트
|
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
|
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
|
|
|
|
|
$("#btnSearch2--${pageName}").on("click", () => $P.fnSearchList("Y"));
|
|
|
|
|
|
|
|
|
|
$("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
|
|
|
|
|
Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
|
|
|
|
|
Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
|
|
|
|
|
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
|
$P.initForm = () => {}
|
|
|
|
|