소스 정리

main
이범준 3 months ago
parent a402c5d74a
commit aacc228c97

@ -121,10 +121,11 @@
</div> </div>
<script> <script>
LoadScript("crdn01010Script",wctx.url("/resources/js/fims/crdn/crdn01010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
pageObject["${pageName}"] = newDoctxFinder("${pageName}"); pageObject["${pageName}"] = newDoctxFinder("${pageName}");
$(document).ready(function(){ $(document).ready(function(){
@ -134,18 +135,7 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({ var ctrl = newCrdn01010Control($P);
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.FILE_LAYOUT_ID : "",
urls : {
load : "",
getInfo : ""
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat
}
});
ctrl.defaultFetchSize = FETCH_XS; ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };

@ -245,6 +245,8 @@
</div> </div>
<script> <script>
LoadScript("crdn01020Script",wctx.url("/resources/js/fims/crdn/crdn01020.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}"); pageObject["${pageName}"] = newDoctxFinder("${pageName}");
pageObject["${pageName}"].provided = {}; pageObject["${pageName}"].provided = {};
@ -268,18 +270,7 @@ $(document).ready(function(){
**************************************************************************/ **************************************************************************/
$P.formFields = new FimsFormFields($P.selectorn("frmEdit")); $P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.ctrl = new DatasetControl({ var ctrl = newCrdn01020DatasetControl($P);
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.FILE_LAYOUT_ID : "",
urls : {
create : wctx.url("/${taskSeCd}/crdn/crdn01/020/create.do"),
update : wctx.url("/${taskSeCd}/crdn/crdn01/020/update.do"),
remove : wctx.url("/${taskSeCd}/crdn/crdn01/020/remove.do")
},
formats: {
}
});
ctrl.dataset.onCurrentChange = (dataItem) => { ctrl.dataset.onCurrentChange = (dataItem) => {
if(!dataItem){ if(!dataItem){

@ -377,7 +377,7 @@
</div> </div>
<script> <script>
LoadScript("crdn02010Script","/resources/js/fims/crdn/crdn02010.js?ver=${ver}"); LoadScript("crdn02010Script",wctx.url("/resources/js/fims/crdn/crdn02010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
@ -396,7 +396,7 @@ $(document).ready(function(){
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
//단속사진검사 datasetControl 인스턴스 //단속사진검사 datasetControl 인스턴스
var ctrl = $P.ctrl = newCrdn02010Control(); var ctrl = newCrdn02010Control($P);
ctrl.defaultFetchSize = FETCH_XS; ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null; ctrl.beforeCurrent = null;
@ -441,7 +441,7 @@ $(document).ready(function(){
} }
//동일차량검사 datasetControl 인스턴스 //동일차량검사 datasetControl 인스턴스
var alt = $P.alt = newCrdn02010Alt(); var alt = newCrdn02010Alt($P);
alt.defaultFetchSize = FETCH_XS; alt.defaultFetchSize = FETCH_XS;
alt.query = { pageNum : 1, fetchSize : alt.defaultFetchSize }; alt.query = { pageNum : 1, fetchSize : alt.defaultFetchSize };
alt.beforeCurrent = null; alt.beforeCurrent = null;
@ -466,7 +466,7 @@ $(document).ready(function(){
} }
} }
var shift = $P.shift = new newCrdn02010Shift(); var shift = newCrdn02010Shift($P);
shift.dataset.onDatasetChange = (obj, option) => { shift.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate("sameVehicleInspectionSub"); var t = $P.getGridTemplate("sameVehicleInspectionSub");

@ -240,6 +240,7 @@
</div> </div>
<script> <script>
LoadScript("crdn07010Script",wctx.url("/resources/js/fims/crdn/crdn07010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -256,20 +257,7 @@ $(document).ready(function(){
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
//사용중인 팀 //사용중인 팀
var ctrl = $P.ctrl = new DatasetControl({ var ctrl = newCrdn07010Control($P);
dataGetter : obj => obj["List"], appendData:false,
keymapper : info => info ? info.TEAM_ID : "",
urls : {
load : "",
remove : "",
save : ""
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat
}
});
ctrl.dataset.onDatasetChange = (obj, option) => { ctrl.dataset.onDatasetChange = (obj, option) => {
@ -307,16 +295,7 @@ $(document).ready(function(){
} }
//삭제된 팀 //삭제된 팀
var alt = $P.alt = new DatasetControl({ var alt = newCrdn07010Alt($P);
dataGetter : obj => obj["List"], appendData: false,
keymapper : info => info ? info.TEAM_ID : "",
urls : { },
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat
}
});
alt.dataset.onDatasetChange = (obj, option) => { alt.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate("delTeam"); var t = $P.getGridTemplate("delTeam");

@ -316,7 +316,7 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
var ctrl = $P.ctrl = newCvlc05010Control(); var ctrl = newCvlc05010Control($P);
/************************************************************************** /**************************************************************************
* pageObject.function * pageObject.function

@ -49,7 +49,7 @@ $(document).ready(function() {
/************************************************************************** /**************************************************************************
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
var ctrl = $P.ctrl = newSprt01010Control(); var ctrl = newSprt01010Control($P);
// Dataset 변경 이벤트 // Dataset 변경 이벤트
ctrl.upDataset.onDatasetChange = (obj, option) => { ctrl.upDataset.onDatasetChange = (obj, option) => {

@ -171,6 +171,8 @@
</div> </div>
<script> <script>
LoadScript("statMainScript",wctx.url("/resources/js/fims/stat/statMain.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -186,26 +188,7 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl, Dataset, FormFields * DatasetControl, Dataset, FormFields
**************************************************************************/ **************************************************************************/
var alt = $P.alt = new DatasetControl({ var alt = newStatMainAlt($P);
dataGetter : obj => Array.isArray(obj) ? obj : [], appendData:false,
keymapper : info => info ? info.DATA_ID : "",
urls : { },
formats : {
CVLCPT_PRCS_PRNMNT_DT : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
LEVY_EXCL_YMD : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
PSTMARK_YMD : dateFormat,
CRDN_YMD_TM : datetimeFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
CVLCPT_PRCS_PRNMNT_DT : datetimeFormat,
FFNLG_CRDN_AMT : numberFormat,
FFNLG_AMT : numberFormat,
RCVMT_AMT : numberFormat
}
});
alt.dataset.onDatasetChange = (obj, option) => { alt.dataset.onDatasetChange = (obj, option) => {

@ -0,0 +1,15 @@
function newCrdn01010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.FILE_LAYOUT_ID : "",
urls : {
load : "",
getInfo : ""
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat
}
});
return page.ctrl;
}

@ -0,0 +1,15 @@
function newCrdn01020Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.FILE_LAYOUT_ID : "",
urls : {
create : wctx.url("/${taskSeCd}/crdn/crdn01/020/create.do"),
update : wctx.url("/${taskSeCd}/crdn/crdn01/020/update.do"),
remove : wctx.url("/${taskSeCd}/crdn/crdn01/020/remove.do")
},
formats: {
}
});
return page.ctrl;
}

@ -1,5 +1,5 @@
function newCrdn02010Control(doctx = ""){ function newCrdn02010Control(page, doctx = ""){
let ctrl = new DatasetControl({ page.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 : {
@ -11,11 +11,11 @@ function newCrdn02010Control(doctx = ""){
ADVNTCE_AMT : numberFormat ADVNTCE_AMT : numberFormat
} }
}); });
return ctrl; return page.ctrl;
} }
function newCrdn02010Alt(doctx = ""){ function newCrdn02010Alt(page, doctx = ""){
let ctrl = new DatasetControl({ page.alt = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID_LIST : "", keymapper : info => info ? info.CRDN_ID_LIST : "",
urls : { urls : {
@ -26,11 +26,11 @@ function newCrdn02010Alt(doctx = ""){
FFNLG_CRDN_AMT : numberFormat FFNLG_CRDN_AMT : numberFormat
} }
}); });
return ctrl; return page.alt;
} }
function newCrdn02010Shift(doctx = ""){ function newCrdn02010Shift(page, doctx = ""){
let ctrl = new DatasetControl({ page.shift = new DatasetControl({
dataGetter : obj => obj["List"], dataGetter : obj => obj["List"],
keymapper : info => info ? info.CRDN_ID : "", keymapper : info => info ? info.CRDN_ID : "",
urls : { urls : {
@ -42,7 +42,7 @@ function newCrdn02010Shift(doctx = ""){
} }
}); });
return ctrl; return page.shift;
} }
function fnMakeImgTagForInspection(url, title, crdnPhotoId, mosaic) { function fnMakeImgTagForInspection(url, title, crdnPhotoId, mosaic) {

@ -0,0 +1,31 @@
function newCrdn07010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:false,
keymapper : info => info ? info.TEAM_ID : "",
urls : {
load : "",
remove : "",
save : ""
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat
}
});
return page.ctrl;
}
function newCrdn07010Alt(page, doctx = ""){
page.alt = new DatasetControl({
dataGetter : obj => obj["List"], appendData: false,
keymapper : info => info ? info.TEAM_ID : "",
urls : { },
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat
}
});
return page.alt;
}

@ -1,6 +1,6 @@
function newCvlc05010Control(doctx = ""){ function newCvlc05010Control(page, doctx = ""){
let ctrl = new AnswerBodyControl({ page.ctrl = new AnswerBodyControl({
dataGetter : obj => obj["levyCaseList"], urls : {}, formats : {}, dataGetter : obj => obj["levyCaseList"], urls : {}, formats : {},
keymapper : info => info ? info.VLTN_CASE_ID : "" keymapper : info => info ? info.VLTN_CASE_ID : ""
}, },
@ -12,7 +12,7 @@ function newCvlc05010Control(doctx = ""){
dataGetter : obj => obj["nonlevyCaseList"], urls : {}, formats : {}, dataGetter : obj => obj["nonlevyCaseList"], urls : {}, formats : {},
keymapper : info => info ? info.LEVY_EXCL_RSN_CD : "" keymapper : info => info ? info.LEVY_EXCL_RSN_CD : ""
}); });
return ctrl; return page.ctrl;
} }
class AnswerBodyControl { class AnswerBodyControl {

@ -1,5 +1,5 @@
function newSprt01010Control(doctx = ""){ function newSprt01010Control(page, doctx = ""){
let ctrl = new IntegrationSearchControl( { page.ctrl = new IntegrationSearchControl( {
dataGetter: obj => Array.isArray(obj) ? obj : [], dataGetter: obj => Array.isArray(obj) ? obj : [],
appendData: false, appendData: false,
keymapper: data => data ? data.CRDN_ID : "", keymapper: data => data ? data.CRDN_ID : "",
@ -33,7 +33,7 @@ function newSprt01010Control(doctx = ""){
, MDFCN_DT: datetimeFormat , MDFCN_DT: datetimeFormat
} }
}); });
return ctrl; return page.ctrl;
} }
class IntegrationSearchControl extends DatasetControl { class IntegrationSearchControl extends DatasetControl {

@ -0,0 +1,23 @@
function newStatMainAlt(page, doctx = ""){
page.alt = new DatasetControl({
dataGetter : obj => Array.isArray(obj) ? obj : [], appendData:false,
keymapper : info => info ? info.DATA_ID : "",
urls : { },
formats : {
CVLCPT_PRCS_PRNMNT_DT : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
LEVY_EXCL_YMD : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
PSTMARK_YMD : dateFormat,
CRDN_YMD_TM : datetimeFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
CVLCPT_PRCS_PRNMNT_DT : datetimeFormat,
FFNLG_CRDN_AMT : numberFormat,
FFNLG_AMT : numberFormat,
RCVMT_AMT : numberFormat
}
});
return page.alt;
}
Loading…
Cancel
Save