|
|
|
@ -56,8 +56,9 @@
|
|
|
|
|
<div>
|
|
|
|
|
<span class="container-page-btn">
|
|
|
|
|
<div class="d-flex flex-row justify-content-between">
|
|
|
|
|
<label id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
|
|
|
|
|
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
|
|
|
|
|
<label id="rductPaging--${pageName}PagingInfo" class="dataTables_info"
|
|
|
|
|
role="status" aria-live="polite"></label>
|
|
|
|
|
<ul id="rductPaging--${pageName}" class="pagination pagination-primary">
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
@ -72,7 +73,7 @@
|
|
|
|
|
<table id="DataTables_Table_0--${pageName}"
|
|
|
|
|
class="datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr id="crdnTheadTr--${pageName}"
|
|
|
|
|
<tr id="rductTheadTr--${pageName}"
|
|
|
|
|
data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
|
|
|
|
|
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
|
|
|
|
|
<th style="min-width: 80px;">No.</th>
|
|
|
|
@ -93,8 +94,8 @@
|
|
|
|
|
style="min-width: 80px;">처리상태</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="crdnTbody--${pageName}"></tbody>
|
|
|
|
|
<template id="crdnRow--${pageName}">
|
|
|
|
|
<tbody id="rductTbody--${pageName}"></tbody>
|
|
|
|
|
<template id="rductRow--${pageName}">
|
|
|
|
|
<tr data-key="{CRDN_ID}">
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{RDUCT_YMD}</td>
|
|
|
|
@ -107,7 +108,7 @@
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STTS_CD}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="crdnNotFound--${pageName}">
|
|
|
|
|
<template id="rductNotFound--${pageName}">
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="9" class="dataTables_empty text-center">단속 정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -145,7 +146,7 @@ $(document).ready(function(){
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.crdnControl = new DatasetControl({
|
|
|
|
|
$P.rductControl = new DatasetControl({
|
|
|
|
|
urls : { load : "", getInfo : "" },
|
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
|
keymapper : info => info ? info.CRDN_ID : "",
|
|
|
|
@ -159,41 +160,41 @@ $(document).ready(function(){
|
|
|
|
|
BLNC : numberFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$P.crdnControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.crdnControl.untilPageNum = 0;
|
|
|
|
|
$P.crdnControl.beforeCurrent = null;
|
|
|
|
|
$P.crdnControl.tableRenderComplete = false;
|
|
|
|
|
$P.rductControl.defaultFetchSize = FETCH_XS;
|
|
|
|
|
$P.rductControl.untilPageNum = 0;
|
|
|
|
|
$P.rductControl.beforeCurrent = null;
|
|
|
|
|
$P.rductControl.tableRenderComplete = false;
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.crdnControl.onDatasetChange = (obj) => {
|
|
|
|
|
$P.rductControl.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
$P.renderCrdnList(obj["Total"]);
|
|
|
|
|
$P.renderRductList(obj["Total"]);
|
|
|
|
|
|
|
|
|
|
$("#crdnPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.crdnControl.dataset,
|
|
|
|
|
prefix: "crdnPaging--${pageName}",
|
|
|
|
|
$("#rductPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.rductControl.dataset,
|
|
|
|
|
prefix: "rductPaging--${pageName}",
|
|
|
|
|
start: obj["Start"],
|
|
|
|
|
totalSize: obj["Total"],
|
|
|
|
|
fetchSize: obj["Fetch"],
|
|
|
|
|
func: "pageObject['${pageName}'].crdnControl.load({index})"
|
|
|
|
|
func: "pageObject['${pageName}'].rductControl.load({index})"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.tableRenderComplete = true;
|
|
|
|
|
$P.rductControl.tableRenderComplete = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.onCurrentChange = (item) => {
|
|
|
|
|
$P.rductControl.onCurrentChange = (item) => {
|
|
|
|
|
|
|
|
|
|
if(!$P.crdnControl.tableRenderComplete){
|
|
|
|
|
if(!$P.rductControl.tableRenderComplete){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.tableRenderComplete = false;
|
|
|
|
|
$P.rductControl.tableRenderComplete = false;
|
|
|
|
|
if(!item){
|
|
|
|
|
$P.clickCrdnList("", true);
|
|
|
|
|
$P.clickRductList("", true);
|
|
|
|
|
} else {
|
|
|
|
|
$P.clickCrdnList($P.crdnControl.getCurrent()["CRDN_ID"], true);
|
|
|
|
|
$P.clickRductList($P.rductControl.getCurrent()["CRDN_ID"], true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -203,24 +204,24 @@ $(document).ready(function(){
|
|
|
|
|
$P.fnReset = () => {
|
|
|
|
|
$('#schRductYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
|
|
|
|
|
$('#schRductYmdTo--${pageName}').datepicker('setDate', new Date());
|
|
|
|
|
$P.crdnControl.setData([]);
|
|
|
|
|
$P.rductControl.setData([]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnResetAndChangeBiz = taskSeCd => {
|
|
|
|
|
$P.fnReset();
|
|
|
|
|
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn04/040/list.do");
|
|
|
|
|
$P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do");
|
|
|
|
|
$P.rductControl.urls.load = wctx.url("/"+taskSeCd+"/levy/levy02/010/list.do");
|
|
|
|
|
$P.rductControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.refreshCrdnList = () => {
|
|
|
|
|
$P.crdnControl.untilPageNum = $P.crdnControl.query.pageNum;
|
|
|
|
|
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize * $P.crdnControl.query.pageNum;
|
|
|
|
|
$P.crdnControl.load(1);
|
|
|
|
|
$P.refreshRductList = () => {
|
|
|
|
|
$P.rductControl.untilPageNum = $P.rductControl.query.pageNum;
|
|
|
|
|
$P.rductControl.query.fetchSize = $P.rductControl.defaultFetchSize * $P.rductControl.query.pageNum;
|
|
|
|
|
$P.rductControl.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.searchCrdnList = () => {
|
|
|
|
|
$P.crdnControl.query = $P.getParams();
|
|
|
|
|
$P.crdnControl.load(1);
|
|
|
|
|
$P.searchRductList = () => {
|
|
|
|
|
$P.rductControl.query = $P.getParams();
|
|
|
|
|
$P.rductControl.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollEnd = (obj) => {
|
|
|
|
@ -235,30 +236,30 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()){
|
|
|
|
|
obj.dataset.scrollStatus = "waiting";
|
|
|
|
|
$P.scrollCrdnList();
|
|
|
|
|
$P.scrollRductList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.scrollCrdnList = () => {
|
|
|
|
|
$P.crdnControl.load($P.crdnControl.query.pageNum + 1);
|
|
|
|
|
$P.scrollRductList = () => {
|
|
|
|
|
$P.rductControl.load($P.rductControl.query.pageNum + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.clickCrdnList = (dataKey, auto) => {
|
|
|
|
|
$P.clickRductList = (dataKey, auto) => {
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#crdnTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
$("#rductTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
|
|
|
|
|
if(!auto){
|
|
|
|
|
$P.crdnControl.setCurrent(dataKey);
|
|
|
|
|
$P.rductControl.setCurrent(dataKey);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.dblclickCrdnList = (dataKey) => {
|
|
|
|
|
$P.dblclickRductList = (dataKey) => {
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : $P.crdnControl.urls.getInfo,
|
|
|
|
|
url : $P.rductControl.urls.getInfo,
|
|
|
|
|
data : { "crdnId" : dataKey },
|
|
|
|
|
success : resp => {
|
|
|
|
|
|
|
|
|
@ -273,40 +274,40 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.renderCrdnList = (total) => {
|
|
|
|
|
$P.renderRductList = (total) => {
|
|
|
|
|
|
|
|
|
|
var crdnList = $P.crdnControl.dataset;
|
|
|
|
|
var empty = crdnList.empty;
|
|
|
|
|
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
|
|
|
|
|
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
|
|
|
|
|
var rductList = $P.rductControl.dataset;
|
|
|
|
|
var empty = rductList.empty;
|
|
|
|
|
var notFound = [document.getElementById("rductNotFound--${pageName}").innerHTML];
|
|
|
|
|
var found = document.getElementById("rductRow--${pageName}").innerHTML;
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickRductList('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickRductList('" + dataItem.getValue("CRDN_ID") + "');");
|
|
|
|
|
|
|
|
|
|
var trs = empty ? notFound : crdnList.inStrings(found,replacer);
|
|
|
|
|
var trs = empty ? notFound : rductList.inStrings(found,replacer);
|
|
|
|
|
|
|
|
|
|
$("#crdnTbody--${pageName}").html(trs.join());
|
|
|
|
|
$("#rductTbody--${pageName}").html(trs.join());
|
|
|
|
|
|
|
|
|
|
//보안모드
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
|
|
|
|
|
if(total == crdnList.length){
|
|
|
|
|
if(total == rductList.length){
|
|
|
|
|
$("#table-responsive--${pageName}").attr("data-scroll-status", "complete");
|
|
|
|
|
} else {
|
|
|
|
|
$("#table-responsive--${pageName}").removeAttr("data-scroll-status");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($P.crdnControl.untilPageNum != 0){
|
|
|
|
|
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize;
|
|
|
|
|
$P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum;
|
|
|
|
|
$P.crdnControl.untilPageNum = 0;
|
|
|
|
|
if($P.rductControl.untilPageNum != 0){
|
|
|
|
|
$P.rductControl.query.fetchSize = $P.rductControl.defaultFetchSize;
|
|
|
|
|
$P.rductControl.query.pageNum = $P.rductControl.untilPageNum;
|
|
|
|
|
$P.rductControl.untilPageNum = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.getParams = () => {
|
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
var data = formFields.get();
|
|
|
|
|
data.fetchSize = $P.crdnControl.defaultFetchSize;
|
|
|
|
|
data.fetchSize = $P.rductControl.defaultFetchSize;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -315,7 +316,7 @@ $(document).ready(function(){
|
|
|
|
|
* element.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
|
|
|
|
|
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
|
|
|
|
|
$('#btnSearch--${pageName}').on('click', () => $P.searchRductList());
|
|
|
|
|
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|