|
|
@ -242,7 +242,7 @@ $(document).ready(function(){
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* DatasetControl
|
|
|
|
* DatasetControl
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$P.crdnControl = new DatasetControl({
|
|
|
|
$P.ctrl = new DatasetControl({
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
dataGetter : obj => obj["List"], appendData:true,
|
|
|
|
keymapper : info => info ? info.CRDN_ID : "",
|
|
|
|
keymapper : info => info ? info.CRDN_ID : "",
|
|
|
|
urls : {
|
|
|
|
urls : {
|
|
|
@ -257,24 +257,24 @@ $(document).ready(function(){
|
|
|
|
CRDN_YMD_TM : datetimeFormat
|
|
|
|
CRDN_YMD_TM : datetimeFormat
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$P.crdnControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.ctrl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.crdnControl.query = { pageNum : 1, fetchSize : $P.crdnControl.defaultFetchSize };
|
|
|
|
$P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize };
|
|
|
|
$P.crdnControl.beforeCurrent = null;
|
|
|
|
$P.ctrl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* Dataset.on
|
|
|
|
* Dataset.on
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$P.crdnControl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
$P.ctrl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
|
|
|
|
|
|
|
|
var t = $P.getGridTemplate();
|
|
|
|
var t = $P.getGridTemplate();
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
$P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs, option);
|
|
|
|
$P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option);
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}");
|
|
|
|
Apply.fromDataset.paging($P.ctrl.dataset, obj, "crdnPaging--${pageName}");
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
$P.ctrl.dataset.onCurrentChange = (dataItem) => {
|
|
|
|
Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]);
|
|
|
|
Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]);
|
|
|
|
if(!dataItem){
|
|
|
|
if(!dataItem){
|
|
|
|
$("#bottomCrdnPlc--${pageName}").val("");
|
|
|
|
$("#bottomCrdnPlc--${pageName}").val("");
|
|
|
|
|
|
|
|
|
|
|
@ -318,20 +318,20 @@ $(document).ready(function(){
|
|
|
|
$('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
|
|
|
|
$('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
|
|
|
|
$('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', TODAY());
|
|
|
|
$('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', TODAY());
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.dataset.setData([]);
|
|
|
|
$P.ctrl.dataset.setData([]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnResetAndChangeBiz = (taskSeCd) => {
|
|
|
|
$P.fnResetAndChangeBiz = (taskSeCd) => {
|
|
|
|
$P.fnReset();
|
|
|
|
$P.fnReset();
|
|
|
|
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/list.do");
|
|
|
|
$P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/list.do");
|
|
|
|
$P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/020/info.do");
|
|
|
|
$P.ctrl.urls.getInfo = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/020/info.do");
|
|
|
|
$P.crdnControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do");
|
|
|
|
$P.ctrl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.getParams = () => {
|
|
|
|
$P.getParams = () => {
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
var data = formFields.get();
|
|
|
|
var data = formFields.get();
|
|
|
|
data.fetchSize = $P.crdnControl.defaultFetchSize;
|
|
|
|
data.fetchSize = $P.ctrl.defaultFetchSize;
|
|
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -342,44 +342,44 @@ $(document).ready(function(){
|
|
|
|
$("#btnDelete--${pageName}").show();
|
|
|
|
$("#btnDelete--${pageName}").show();
|
|
|
|
$("#btnDeleteSameRcptYmd--${pageName}").show();
|
|
|
|
$("#btnDeleteSameRcptYmd--${pageName}").show();
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.query = $P.getParams();
|
|
|
|
$P.ctrl.query = $P.getParams();
|
|
|
|
$P.crdnControl.load(1);
|
|
|
|
$P.ctrl.load(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.scrollCrdnList = () => {
|
|
|
|
$P.scrollCrdnList = () => {
|
|
|
|
$P.crdnControl.load($P.crdnControl.query.pageNum + 1);
|
|
|
|
$P.ctrl.load($P.ctrl.query.pageNum + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.refreshCrdnList = () => {
|
|
|
|
$P.refreshCrdnList = () => {
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.beforeCurrent = {
|
|
|
|
$P.ctrl.beforeCurrent = {
|
|
|
|
key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"],
|
|
|
|
key : $P.ctrl.dataset.getCurrent()["CRDN_ID"],
|
|
|
|
index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
index : $P.ctrl.dataset.getCurrent()["ROW_NUM"] - 1
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDatasetControl.reload($P.crdnControl).then((resp)=>{
|
|
|
|
Apply.fromDatasetControl.reload($P.ctrl).then((resp)=>{
|
|
|
|
Apply.toDataset.set($P.crdnControl.dataset, resp);
|
|
|
|
Apply.toDataset.set($P.ctrl.dataset, resp);
|
|
|
|
$P.crdnControl.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
$P.ctrl.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
|
|
|
|
|
|
|
|
if($P.crdnControl.beforeCurrent != null){
|
|
|
|
if($P.ctrl.beforeCurrent != null){
|
|
|
|
var beforeCurrentKey = $P.crdnControl.beforeCurrent.key;
|
|
|
|
var beforeCurrentKey = $P.ctrl.beforeCurrent.key;
|
|
|
|
var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index;
|
|
|
|
var beforeCurrentIndex = $P.ctrl.beforeCurrent.index;
|
|
|
|
$P.crdnControl.beforeCurrent = null;
|
|
|
|
$P.ctrl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
if(!$P.crdnControl.dataset.empty){
|
|
|
|
if(!$P.ctrl.dataset.empty){
|
|
|
|
var info = $P.crdnControl.dataset.getData(beforeCurrentKey);
|
|
|
|
var info = $P.ctrl.dataset.getData(beforeCurrentKey);
|
|
|
|
|
|
|
|
|
|
|
|
if(info != null){
|
|
|
|
if(info != null){
|
|
|
|
$P.crdnControl.dataset.setCurrent(beforeCurrentKey,true);
|
|
|
|
$P.ctrl.dataset.setCurrent(beforeCurrentKey,true);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){
|
|
|
|
if(beforeCurrentIndex > ($P.ctrl.dataset.length - 1)){
|
|
|
|
info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1];
|
|
|
|
info = $P.ctrl.dataset.getDataset()[$P.ctrl.dataset.length - 1];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
info = $P.ctrl.dataset.getDataset()[beforeCurrentIndex];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.dataset.setCurrent(info["CRDN_ID"],true);
|
|
|
|
$P.ctrl.dataset.setCurrent(info["CRDN_ID"],true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -390,16 +390,16 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnExcelDown = () => {
|
|
|
|
$P.fnExcelDown = () => {
|
|
|
|
if($P.crdnControl.dataset.empty){
|
|
|
|
if($P.ctrl.dataset.empty){
|
|
|
|
alert("조회된 자료가 없습니다.");
|
|
|
|
alert("조회된 자료가 없습니다.");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"),
|
|
|
|
var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"),
|
|
|
|
$($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
|
|
|
|
$($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
|
|
|
|
$P.crdnControl.query.cellDefs = cellDefs;
|
|
|
|
$P.ctrl.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.download();
|
|
|
|
$P.ctrl.download();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.getGridTemplate = () => {
|
|
|
|
$P.getGridTemplate = () => {
|
|
|
@ -419,7 +419,7 @@ $(document).ready(function(){
|
|
|
|
$P.renderCrdnList = (total, listLength, trs, option) => {
|
|
|
|
$P.renderCrdnList = (total, listLength, trs, option) => {
|
|
|
|
|
|
|
|
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
var initScroll = ($P.crdnControl.query.pageNum < 2);
|
|
|
|
var initScroll = ($P.ctrl.query.pageNum < 2);
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
initScroll = false;
|
|
|
|
initScroll = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -443,7 +443,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
$("#crdnTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
$("#crdnTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
|
|
|
|
|
|
|
$("#bottomCrdnPlc--${pageName}").val($P.crdnControl.dataset.getData(dataKey)["CRDN_PLC"]);
|
|
|
|
$("#bottomCrdnPlc--${pageName}").val($P.ctrl.dataset.getData(dataKey)["CRDN_PLC"]);
|
|
|
|
|
|
|
|
|
|
|
|
if($P.holdList.includes(dataKey)){
|
|
|
|
if($P.holdList.includes(dataKey)){
|
|
|
|
$("#btnOpenCvlcptOrgnl--${pageName}").hide();
|
|
|
|
$("#btnOpenCvlcptOrgnl--${pageName}").hide();
|
|
|
@ -455,7 +455,7 @@ $(document).ready(function(){
|
|
|
|
$("#btnDeleteSameRcptYmd--${pageName}").show();
|
|
|
|
$("#btnDeleteSameRcptYmd--${pageName}").show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Apply.toDataset.current($P.crdnControl.dataset, dataKey);
|
|
|
|
Apply.toDataset.current($P.ctrl.dataset, dataKey);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.dblclickCrdnList = (dataKey) => {
|
|
|
|
$P.dblclickCrdnList = (dataKey) => {
|
|
|
@ -467,7 +467,7 @@ $(document).ready(function(){
|
|
|
|
var dialogId = "cvlcptInitialDataEditDialog--${pageName}";
|
|
|
|
var dialogId = "cvlcptInitialDataEditDialog--${pageName}";
|
|
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
ajax.get({
|
|
|
|
url : $P.crdnControl.urls.getInfo,
|
|
|
|
url : $P.ctrl.urls.getInfo,
|
|
|
|
data : {
|
|
|
|
data : {
|
|
|
|
"crdnId" : dataKey,
|
|
|
|
"crdnId" : dataKey,
|
|
|
|
"openerPageName" : "${pageName}"
|
|
|
|
"openerPageName" : "${pageName}"
|
|
|
@ -501,7 +501,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnHold = () => {
|
|
|
|
$P.fnHold = () => {
|
|
|
|
var curKey = $P.crdnControl.dataset.getCurrent()["CRDN_ID"];
|
|
|
|
var curKey = $P.ctrl.dataset.getCurrent()["CRDN_ID"];
|
|
|
|
if($P.holdList.includes(curKey)){
|
|
|
|
if($P.holdList.includes(curKey)){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -516,7 +516,7 @@ $(document).ready(function(){
|
|
|
|
$P.fnRemove = (rcptYmd) => {
|
|
|
|
$P.fnRemove = (rcptYmd) => {
|
|
|
|
|
|
|
|
|
|
|
|
if(rcptYmd != null){
|
|
|
|
if(rcptYmd != null){
|
|
|
|
var ds = $P.crdnControl.dataset.getDataset();
|
|
|
|
var ds = $P.ctrl.dataset.getDataset();
|
|
|
|
|
|
|
|
|
|
|
|
var crdnIds = [];
|
|
|
|
var crdnIds = [];
|
|
|
|
|
|
|
|
|
|
|
@ -531,18 +531,18 @@ $(document).ready(function(){
|
|
|
|
crdnIds.push(filtered[i].CRDN_ID);
|
|
|
|
crdnIds.push(filtered[i].CRDN_ID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.dataset.select(crdnIds,true);
|
|
|
|
$P.ctrl.dataset.select(crdnIds,true);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
var cur = $P.crdnControl.dataset.getCurrent();
|
|
|
|
var cur = $P.ctrl.dataset.getCurrent();
|
|
|
|
if(cur == null){
|
|
|
|
if(cur == null){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var curKey = cur["CRDN_ID"];
|
|
|
|
var curKey = cur["CRDN_ID"];
|
|
|
|
$P.crdnControl.dataset.select(curKey,true);
|
|
|
|
$P.ctrl.dataset.select(curKey,true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var selected = $P.crdnControl.dataset.getKeys("selected");
|
|
|
|
var selected = $P.ctrl.dataset.getKeys("selected");
|
|
|
|
if (selected.length < 1) {
|
|
|
|
if (selected.length < 1) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -552,7 +552,7 @@ $(document).ready(function(){
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
ajax.post({
|
|
|
|
url : $P.crdnControl.urls.remove,
|
|
|
|
url : $P.ctrl.urls.remove,
|
|
|
|
data : params,
|
|
|
|
data : params,
|
|
|
|
success : (resp) => {
|
|
|
|
success : (resp) => {
|
|
|
|
$P.removeCallback(resp);
|
|
|
|
$P.removeCallback(resp);
|
|
|
@ -568,7 +568,7 @@ $(document).ready(function(){
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnRemoveSameRcptYmd = () => {
|
|
|
|
$P.fnRemoveSameRcptYmd = () => {
|
|
|
|
var cur = $P.crdnControl.dataset.getCurrent();
|
|
|
|
var cur = $P.ctrl.dataset.getCurrent();
|
|
|
|
if(cur == null){
|
|
|
|
if(cur == null){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -586,7 +586,7 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnOpenCvlcptOrgnl = () => {
|
|
|
|
$P.fnOpenCvlcptOrgnl = () => {
|
|
|
|
var cur = $P.crdnControl.dataset.getCurrent();
|
|
|
|
var cur = $P.ctrl.dataset.getCurrent();
|
|
|
|
if(cur == null){
|
|
|
|
if(cur == null){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -624,12 +624,12 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
$P.provide = {
|
|
|
|
$P.provide = {
|
|
|
|
"getCountStatus" : function(currentKey){
|
|
|
|
"getCountStatus" : function(currentKey){
|
|
|
|
var ds = $P.crdnControl.dataset.getDataset();
|
|
|
|
var ds = $P.ctrl.dataset.getDataset();
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
return (index+1) + " of " + ds.length;
|
|
|
|
return (index+1) + " of " + ds.length;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"getNextKey" : function(currentKey){
|
|
|
|
"getNextKey" : function(currentKey){
|
|
|
|
var ds = $P.crdnControl.dataset.getDataset();
|
|
|
|
var ds = $P.ctrl.dataset.getDataset();
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
if(ds.length > index+1){
|
|
|
|
if(ds.length > index+1){
|
|
|
|
if($P.holdList.includes(ds[index+1]["CRDN_ID"])){
|
|
|
|
if($P.holdList.includes(ds[index+1]["CRDN_ID"])){
|
|
|
@ -642,7 +642,7 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"getPrevKey" : function(currentKey){
|
|
|
|
"getPrevKey" : function(currentKey){
|
|
|
|
var ds = $P.crdnControl.dataset.getDataset();
|
|
|
|
var ds = $P.ctrl.dataset.getDataset();
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
|
|
|
|
if(index != 0 && ds.length > 1){
|
|
|
|
if(index != 0 && ds.length > 1){
|
|
|
|
if($P.holdList.includes(ds[index-1]["CRDN_ID"])){
|
|
|
|
if($P.holdList.includes(ds[index-1]["CRDN_ID"])){
|
|
|
@ -664,7 +664,7 @@ $(document).ready(function(){
|
|
|
|
$P.refreshCrdnList();
|
|
|
|
$P.refreshCrdnList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"hasData" : function(key){
|
|
|
|
"hasData" : function(key){
|
|
|
|
if($P.crdnControl.dataset.getData(key) == null){
|
|
|
|
if($P.ctrl.dataset.getData(key) == null){
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|