|
|
@ -138,8 +138,8 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* Global Variable
|
|
|
|
* Global Variable
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
|
|
|
|
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -154,9 +154,9 @@ $(document).ready(function(){
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* DatasetControl
|
|
|
|
* DatasetControl, DatasetSupport, FormFields
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$P.ctrl = new DatasetControl({
|
|
|
|
var ctrl = $P.ctrl = new DatasetControl({
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
keymapper : info => info ? info.DEPT_CD : "",
|
|
|
|
keymapper : info => info ? info.DEPT_CD : "",
|
|
|
|
urls : {
|
|
|
|
urls : {
|
|
|
@ -168,34 +168,30 @@ $(document).ready(function(){
|
|
|
|
MDFCN_DT : datetimeFormat
|
|
|
|
MDFCN_DT : datetimeFormat
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$P.ctrl.defaultFetchSize = FETCH_XS;
|
|
|
|
ctrl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize };
|
|
|
|
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
|
|
|
|
$P.ctrl.beforeCurrent = null;
|
|
|
|
ctrl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ctrl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
/**************************************************************************
|
|
|
|
|
|
|
|
* Dataset.on
|
|
|
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
$P.ctrl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
|
|
|
|
var t = $P.getGridTemplate();
|
|
|
|
var t = $P.getGridTemplate();
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
$P.renderDeptList(obj["Total"], $P.ctrl.dataset.length, trs, option);
|
|
|
|
$P.renderDeptList(obj["Total"], ctrl.dataset.length, trs, option);
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDataset.paging($P.ctrl.dataset, obj, $P.findn("deptPaging"), $P.findn("deptPagingInfo"));
|
|
|
|
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("deptPaging"), $P.findn("deptPagingInfo"));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.ctrl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
ctrl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $P.findn("deptTbody"));
|
|
|
|
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("deptTbody"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.ctrl.dataset.onSelectionChange = (selectedArr) => {
|
|
|
|
ctrl.dataset.onSelectionChange = (selectedArr) => {
|
|
|
|
Apply.fromDataset.gridCheckbox($P.ctrl.dataset, $P.findn("deptTbody"), 1, selectedArr);
|
|
|
|
Apply.fromDataset.gridCheckbox(ctrl.dataset, $P.findn("deptTbody"), 1, selectedArr);
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* pageObject.function
|
|
|
|
* pageObject.function
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$P.fnReset = () => {
|
|
|
|
$P.fnReset = () => {
|
|
|
|
var searchForm = $P.$findn("frmSearch");
|
|
|
|
var searchForm = $P.$findn("frmSearch");
|
|
|
|
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
|
|
|
|
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
|
|
|
@ -205,32 +201,32 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
searchForm.find("select[name='sggCd']").val(MY_INFO.info.sggCd);
|
|
|
|
searchForm.find("select[name='sggCd']").val(MY_INFO.info.sggCd);
|
|
|
|
|
|
|
|
|
|
|
|
$P.ctrl.dataset.setData([]);
|
|
|
|
ctrl.dataset.setData([]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.getParams = () => {
|
|
|
|
$P.getParams = () => {
|
|
|
|
var formFields = new FimsFormFields($P.selectorn("frmSearch"));
|
|
|
|
var formFields = new FimsFormFields($P.selectorn("frmSearch"));
|
|
|
|
var data = formFields.get();
|
|
|
|
var data = formFields.get();
|
|
|
|
data.fetchSize = $P.ctrl.defaultFetchSize;
|
|
|
|
data.fetchSize = ctrl.defaultFetchSize;
|
|
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.searchDeptList = () => {
|
|
|
|
$P.searchDeptList = () => {
|
|
|
|
$P.ctrl.query = $P.getParams();
|
|
|
|
ctrl.query = $P.getParams();
|
|
|
|
$P.ctrl.load(1);
|
|
|
|
ctrl.load(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.scrollDeptList = () => {
|
|
|
|
$P.scrollDeptList = () => {
|
|
|
|
$P.ctrl.load($P.ctrl.query.pageNum + 1);
|
|
|
|
ctrl.load(ctrl.query.pageNum + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.refreshDeptList = () => {
|
|
|
|
$P.refreshDeptList = () => {
|
|
|
|
if($P.ctrl.query.pageNum == null){
|
|
|
|
if(ctrl.query.pageNum == null){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.ctrl.reload({all : true});
|
|
|
|
ctrl.reload({all : true});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.getGridTemplate = () => {
|
|
|
|
$P.getGridTemplate = () => {
|
|
|
@ -250,7 +246,7 @@ $(document).ready(function(){
|
|
|
|
$P.renderDeptList = (total, listLength, trs, option) => {
|
|
|
|
$P.renderDeptList = (total, listLength, trs, option) => {
|
|
|
|
|
|
|
|
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
var initScroll = ($P.ctrl.query.pageNum < 2);
|
|
|
|
var initScroll = (ctrl.query.pageNum < 2);
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
initScroll = false;
|
|
|
|
initScroll = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -268,7 +264,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
$P.$findn("deptTbody").setCurrentRow(dataKey);
|
|
|
|
$P.$findn("deptTbody").setCurrentRow(dataKey);
|
|
|
|
|
|
|
|
|
|
|
|
Apply.toDataset.current($P.ctrl.dataset, dataKey);
|
|
|
|
Apply.toDataset.current(ctrl.dataset, dataKey);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.dblclickDeptList = (dataKey) => {
|
|
|
|
$P.dblclickDeptList = (dataKey) => {
|
|
|
@ -282,7 +278,7 @@ $(document).ready(function(){
|
|
|
|
params.deptCd = deptCd;
|
|
|
|
params.deptCd = deptCd;
|
|
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
ajax.get({
|
|
|
|
url : $P.ctrl.urls.getInfo,
|
|
|
|
url : ctrl.urls.getInfo,
|
|
|
|
data : params,
|
|
|
|
data : params,
|
|
|
|
success : (resp) => {
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
|
@ -325,14 +321,14 @@ $(document).ready(function(){
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* element.on
|
|
|
|
* element.on
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$P.$findn("btnReset").on('click', () => $P.fnReset());
|
|
|
|
$P.$findn("btnReset").on('click', () => $P.fnReset());
|
|
|
|
$P.$findn("btnSearch").on('click', () => $P.searchDeptList());
|
|
|
|
$P.$findn("btnSearch").on('click', () => $P.searchDeptList());
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* 초기화
|
|
|
|
* 초기화
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
Componentization.fnMakeResizableTable($P.findn("table-responsive"));
|
|
|
|
Componentization.fnMakeResizableTable($P.findn("table-responsive"));
|
|
|
|
Componentization.fnMakeScrollableTable($P.findn("table-responsive"), $P.scrollDeptList);
|
|
|
|
Componentization.fnMakeScrollableTable($P.findn("table-responsive"), $P.scrollDeptList);
|
|
|
|
|
|
|
|
|
|
|
|