|
|
|
|
@ -50,7 +50,7 @@
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr name="exmptnVhclTheadTr">
|
|
|
|
|
<th style="width: 80px;">No.</th>
|
|
|
|
|
<th style="width: 130px;">차량번호</th>
|
|
|
|
|
<th data-sort="VHRNO" style="width: 130px;">차량번호</th>
|
|
|
|
|
<th style="width: 200px;">사유</th>
|
|
|
|
|
<th style="width: 150px;">공문번호</th>
|
|
|
|
|
<th style="width: 150px;">소유주명</th>
|
|
|
|
|
@ -119,14 +119,31 @@ $(document).ready(function(){
|
|
|
|
|
ctrl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
|
var t = $P.getGridTemplate();
|
|
|
|
|
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
|
$P.renderExmptnVhclList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
|
|
|
|
|
|
|
|
|
|
$P.renderExmptnVhclList(ctrl.dataset.totalSize = obj["Paging"]?.totalSize, ctrl.dataset.length, trs, option);
|
|
|
|
|
|
|
|
|
|
$P.pagingSupport.setPagingInfo(obj);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ctrl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
|
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("exmptnVhclTbody"));
|
|
|
|
|
}
|
|
|
|
|
ctrl.dataset.onSort = sorter => {
|
|
|
|
|
let t = $P.getGridTemplate(),
|
|
|
|
|
trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
|
$P.renderExmptnVhclList(ctrl.dataset.totalSize, ctrl.dataset.length, trs);
|
|
|
|
|
|
|
|
|
|
document.querySelectorAll("div[data-doctx='${pageName}'] table[name='exmptnVhclTable'] th[data-sort]").forEach(th => {
|
|
|
|
|
th.classList.remove(
|
|
|
|
|
TableSupport.cssClass.sortable,
|
|
|
|
|
TableSupport.cssClass.asc,
|
|
|
|
|
TableSupport.cssClass.desc
|
|
|
|
|
);
|
|
|
|
|
if (th.getAttribute("data-sort") == sorter.by)
|
|
|
|
|
th.classList.add(TableSupport.cssClass[sorter.order]);
|
|
|
|
|
else
|
|
|
|
|
th.classList.add(TableSupport.cssClass.sortable);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.pagingSupport = new FimsPagingSupport({
|
|
|
|
|
doq: $P,
|
|
|
|
|
@ -195,31 +212,24 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.renderExmptnVhclList = (total, listLength, trs, option) => {
|
|
|
|
|
|
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
|
var initScroll = (ctrl.query.pageNum < 2);
|
|
|
|
|
let initScroll = (ctrl.query.pageNum < 2);
|
|
|
|
|
if (option != null && option.reloaded){
|
|
|
|
|
initScroll = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.findn("table-responsive").changeContent(trs, initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
//보안모드
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.clickExmptnVhclList = (dataIndex) => {
|
|
|
|
|
if (dataIndex == ""){
|
|
|
|
|
if (!dataIndex) {
|
|
|
|
|
$P.$findn("btnOpenDelRsn").prop("disabled", true);
|
|
|
|
|
$P.$findn("btnHistory").prop("disabled", true);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ctrl.dataset.getData(dataIndex)["DEL_YN"] == "N"){
|
|
|
|
|
$P.$findn("btnOpenDelRsn").prop("disabled", false);
|
|
|
|
|
} else {
|
|
|
|
|
$P.$findn("btnOpenDelRsn").prop("disabled", true);
|
|
|
|
|
}
|
|
|
|
|
$P.$findn("btnOpenDelRsn").prop("disabled", ctrl.dataset.getData(dataIndex)["DEL_YN"] != "N");
|
|
|
|
|
$P.$findn("btnHistory").prop("disabled", false);
|
|
|
|
|
|
|
|
|
|
$P.$findn("exmptnVhclTbody").setCurrentRow(dataIndex);
|
|
|
|
|
@ -386,6 +396,11 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.sortExmptnVhclList = e => {
|
|
|
|
|
let col = e.getAttribute("data-sort");
|
|
|
|
|
ctrl.dataset.sort(col);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* element.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
@ -396,6 +411,9 @@ $(document).ready(function(){
|
|
|
|
|
$P.$findn("btnCreate").on('click', () => { $P.newInfo(); });
|
|
|
|
|
$P.$findn("btnOpenDelRsn").on('click', () => { $P.fnOpenDelRsnDialog(); });
|
|
|
|
|
$P.$findn("btnHistory").on('click', () => { $P.fnOpenHistory(); });
|
|
|
|
|
document.querySelectorAll("div[data-doctx='${pageName}'] table[name='exmptnVhclTable'] th[data-sort]").forEach(th => {
|
|
|
|
|
th.addEventListener('dblclick', () => $P.sortExmptnVhclList(th));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Componentization.fnMakeScrollableTable($P.findn("table-responsive"), $P.scrollExmptnVhclList);
|
|
|
|
|
Componentization.fnMakeResizableTable($P.findn("table-responsive"));
|
|
|
|
|
|