소스 정리

main
이범준 3 months ago
parent a402c5d74a
commit aacc228c97

@ -121,10 +121,11 @@
</div>
<script>
LoadScript("crdn01010Script",wctx.url("/resources/js/fims/crdn/crdn01010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
$(document).ready(function(){
@ -134,18 +135,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = $P.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
}
});
var ctrl = newCrdn01010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };

@ -245,6 +245,8 @@
</div>
<script>
LoadScript("crdn01020Script",wctx.url("/resources/js/fims/crdn/crdn01020.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
pageObject["${pageName}"].provided = {};
@ -268,18 +270,7 @@ $(document).ready(function(){
**************************************************************************/
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.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: {
}
});
var ctrl = newCrdn01020DatasetControl($P);
ctrl.dataset.onCurrentChange = (dataItem) => {
if(!dataItem){

@ -377,7 +377,7 @@
</div>
<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
@ -396,7 +396,7 @@ $(document).ready(function(){
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
//단속사진검사 datasetControl 인스턴스
var ctrl = $P.ctrl = newCrdn02010Control();
var ctrl = newCrdn02010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null;
@ -441,7 +441,7 @@ $(document).ready(function(){
}
//동일차량검사 datasetControl 인스턴스
var alt = $P.alt = newCrdn02010Alt();
var alt = newCrdn02010Alt($P);
alt.defaultFetchSize = FETCH_XS;
alt.query = { pageNum : 1, fetchSize : alt.defaultFetchSize };
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) => {
var t = $P.getGridTemplate("sameVehicleInspectionSub");

@ -240,6 +240,7 @@
</div>
<script>
LoadScript("crdn07010Script",wctx.url("/resources/js/fims/crdn/crdn07010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -256,20 +257,7 @@ $(document).ready(function(){
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
//사용중인 팀
var ctrl = $P.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
}
});
var ctrl = newCrdn07010Control($P);
ctrl.dataset.onDatasetChange = (obj, option) => {
@ -307,16 +295,7 @@ $(document).ready(function(){
}
//삭제된 팀
var alt = $P.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
}
});
var alt = newCrdn07010Alt($P);
alt.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate("delTeam");

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

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

@ -171,6 +171,8 @@
</div>
<script>
LoadScript("statMainScript",wctx.url("/resources/js/fims/stat/statMain.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -186,26 +188,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, Dataset, FormFields
**************************************************************************/
var alt = $P.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
}
});
var alt = newStatMainAlt($P);
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 = ""){
let ctrl = new DatasetControl({
function newCrdn02010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
@ -11,11 +11,11 @@ function newCrdn02010Control(doctx = ""){
ADVNTCE_AMT : numberFormat
}
});
return ctrl;
return page.ctrl;
}
function newCrdn02010Alt(doctx = ""){
let ctrl = new DatasetControl({
function newCrdn02010Alt(page, doctx = ""){
page.alt = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID_LIST : "",
urls : {
@ -26,11 +26,11 @@ function newCrdn02010Alt(doctx = ""){
FFNLG_CRDN_AMT : numberFormat
}
});
return ctrl;
return page.alt;
}
function newCrdn02010Shift(doctx = ""){
let ctrl = new DatasetControl({
function newCrdn02010Shift(page, doctx = ""){
page.shift = new DatasetControl({
dataGetter : obj => obj["List"],
keymapper : info => info ? info.CRDN_ID : "",
urls : {
@ -42,7 +42,7 @@ function newCrdn02010Shift(doctx = ""){
}
});
return ctrl;
return page.shift;
}
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 : {},
keymapper : info => info ? info.VLTN_CASE_ID : ""
},
@ -12,7 +12,7 @@ function newCvlc05010Control(doctx = ""){
dataGetter : obj => obj["nonlevyCaseList"], urls : {}, formats : {},
keymapper : info => info ? info.LEVY_EXCL_RSN_CD : ""
});
return ctrl;
return page.ctrl;
}
class AnswerBodyControl {

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