|
|
|
@ -128,9 +128,10 @@
|
|
|
|
|
<div class="card col-6">
|
|
|
|
|
<label class="form-label fw-bold form-search-title" for="Rslt--${pageName}">결과 정보</label>
|
|
|
|
|
<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-250" 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">
|
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_1_wrapper--${pageName}">
|
|
|
|
|
<div class="table-responsive ox-scroll oy-scroll h-px-250" 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 class="sticky-thead">
|
|
|
|
|
<tr id="theadTr--${pageName}"
|
|
|
|
|
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
|
|
|
|
@ -179,10 +180,10 @@
|
|
|
|
|
<label class="form-label fw-bold form-search-title" for="RsltDetail--${pageName}">제품 정보</label>
|
|
|
|
|
<div class="row g-1">
|
|
|
|
|
<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-300" id="table-responsive-1--${pageName}">
|
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_2_wrapper--${pageName}">
|
|
|
|
|
<div class="table-responsive ox-scroll oy-scroll h-px-300" id="table-responsive-2--${pageName}">
|
|
|
|
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer"
|
|
|
|
|
id="DataTables_Table_1--${pageName}" aria-describedby="DataTables_Table_0_info">
|
|
|
|
|
id="DataTables_Table_2--${pageName}" aria-describedby="DataTables_Table_2_info">
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="cmn" style="width: 72px;">No.</th>
|
|
|
|
@ -279,6 +280,29 @@
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$P.mappingControl = new DatasetControl({
|
|
|
|
|
urls : {
|
|
|
|
|
load : '<c:url value="${apiHost}/api/biz/nims/v1/getDsuseMgtMapping" />',
|
|
|
|
|
}
|
|
|
|
|
, prefix: "dsuseMgtMapping"
|
|
|
|
|
, prefixName: "마약류 제품 조회"
|
|
|
|
|
, keymapper: info => info ? info.dscdmngId : ""
|
|
|
|
|
, dataGetter : obj => {
|
|
|
|
|
if (!obj.success){
|
|
|
|
|
dialog.alert(obj.message);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return obj.data
|
|
|
|
|
}
|
|
|
|
|
, appendData: true
|
|
|
|
|
, infoSize: "xl"
|
|
|
|
|
, formats: {
|
|
|
|
|
hdrDe: dateFormat
|
|
|
|
|
, rptDe: dateFormat
|
|
|
|
|
, dsuseDe: dateFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
@ -305,6 +329,13 @@
|
|
|
|
|
var dscdmngId = item.data.dscdmngId;
|
|
|
|
|
$P.detailControl.query = { "schDscdmngId" : dscdmngId};
|
|
|
|
|
$P.detailControl.load(1);
|
|
|
|
|
|
|
|
|
|
$P.mappingControl.query = {
|
|
|
|
|
dscdmngId: $P.formFields.get().dscdmngId,
|
|
|
|
|
userId: "suji"
|
|
|
|
|
//userId: "${currentUser.account}"
|
|
|
|
|
};
|
|
|
|
|
$P.mappingControl.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.detailControl.onCurrentChange = (item) => {
|
|
|
|
@ -315,6 +346,19 @@
|
|
|
|
|
$("#tbody--${pageName}Detail").setCurrentRow(key);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.mappingControl.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.mappingControl.onCurrentChange = item => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
let key = item.data.usrRptIdNo;
|
|
|
|
|
$("#tbody--${pageName}Mapping").setCurrentRow(key);
|
|
|
|
|
// Dataset 셋팅
|
|
|
|
|
$P.formFields.set($P.mappingControl, item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 저장 callback
|
|
|
|
|
$P.control.onSave = (resp) => {
|
|
|
|
@ -390,50 +434,21 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//추가
|
|
|
|
|
$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
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 초기 셋팅
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 이벤트 설정
|
|
|
|
|
$P.setEvent = () => {
|
|
|
|
|
// 안내문 등록 버튼 이벤트
|
|
|
|
|
$("#btnBsshSearch--${pageName}").on("click", function() {
|
|
|
|
|
$P.fnSearchBssh($(this).attr("title"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#btnProductSearch--${pageName}").on("click", function() {
|
|
|
|
|
$P.fnSearchProduct($(this).attr("title"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 버튼 이벤트
|
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
|
|
|
|
|
|
$("#btnAdd--${pageName}").on("click", () => $P.fnAdd()); // 추가
|
|
|
|
|
|
|
|
|
|
$("#btnDel--${pageName}").on("click", () => $P.fnDel()); // 추가
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
|
$P.initForm = () => {
|
|
|
|
|
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
|
|
|
|
|
// fnMakeScrollableTable($("#table-responsive-0--${pageName}")[0], $P.scrollDataList);
|
|
|
|
|
// fnMakeScrollableTable($("#table-responsive-1--${pageName}")[0], $P.scrollDataList);
|
|
|
|
|
// fnMakeScrollableTable($("#table-responsive-2--${pageName}")[0], $P.scrollDataList);
|
|
|
|
|
// Dialog 마우스로 드래그 할 수 있도록 설정.
|
|
|
|
|
//fnMakeDraggableDialog(document.getElementById($P.control.prefix + "Dialog"));
|
|
|
|
|
}
|
|
|
|
|