DatasetControl 인스턴스 생성 수정

main
이범준 3 months ago
parent aacc228c97
commit 452499e718

@ -36,6 +36,7 @@
<!-- / 업무 버튼 표시 -->
<script>
LoadScript("crdn02050Script",wctx.url("/resources/js/fims/crdn/crdn02050.js?ver=${ver}"));
/**************************************************************************
* Global Variable
@ -51,14 +52,7 @@ $(document).ready(function(){
**************************************************************************/
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj.crdnInfo,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
update : wctx.url("/PVS/crdn/crdn02/050/update.do")
},
formats: {}
});
var ctrl = newCrdn02050Control($P);
ctrl.dataset.onCurrentChange = (dataItem) => {
$P.formFields.set(ctrl,dataItem);

@ -120,6 +120,7 @@
<script>
LoadScript("crdn03010Script",wctx.url("/resources/js/fims/crdn/crdn03010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
@ -136,20 +137,8 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl= $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
load : wctx.url("/DPV/crdn/crdn03/030/list.do"),
getInfo : wctx.url("/DPV/sprt/sprt02/010/main.do"),
update: wctx.url("/DPV/crdn/crdn03/030/update.do")
},
formats: {
CRDN_YMD_TM : datetimeFormat,
FFNLG_CRDN_AMT : numberFormat,
BLNC : numberFormat
}
});
var ctrl = newCrdn03010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null;

@ -105,6 +105,8 @@
<div class="content-backdrop fade"></div>
</div>
<script>
LoadScript("crdn05010Script",wctx.url("/resources/js/fims/crdn/crdn05010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -121,16 +123,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
load : ""
},
formats: {
CRDN_YMD_TM : datetimeFormat
}
});
var ctrl = newCrdn05010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };

@ -162,8 +162,9 @@
</div>
<script>
LoadScript("crdn05020Script",wctx.url("/resources/js/fims/crdn/crdn05020.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
$(document).ready(function(){
@ -175,17 +176,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"],
keymapper : info => info ? info.FILE_NAME : "",
urls : { },
formats: {
CRDN_YMD : dateFormat,
CRDN_TM : timeFormat,
CRDN_BGNG_TM : timeFormat,
CRDN_END_TM : timeFormat
}
});
var ctrl = newCrdn05020Control($P);
ctrl.dataset.onDatasetChange = (obj, option) => {

@ -362,6 +362,8 @@
</div>
<script>
LoadScript("crdn05030Script",wctx.url("/resources/js/fims/crdn/crdn05030.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -382,16 +384,7 @@ $(document).ready(function(){
$P.uploadSet = uploadSupport($P.selectorn("inputUploadSet"));
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
create : wctx.url("/${taskSeCd}/crdn/crdn05/030/create.do")
},
formats: {
}
});
var ctrl = newCrdn05030Control($P);
$P.uploadSet.onDatasetChange = () => {
var files = $P.uploadSet.getDataset();

@ -285,6 +285,7 @@
<script>
LoadScript("crdn06010Script",wctx.url("/resources/js/fims/crdn/crdn06010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
@ -306,23 +307,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
load : "",
getInfo : ""
},
formats: {
CRDN_YMD_TM : datetimeFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
CVLCPT_PRCS_PRNMNT_DT : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
RCVMT_AMT : numberFormat,
LEVY_EXCL_YMD : dateFormat
}
});
var ctrl = newCrdn06010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };

@ -215,6 +215,8 @@
<!-- / inner page html <div class="content-pop"> -->
<script>
LoadScript("crdn06020Script",wctx.url("/resources/js/fims/crdn/crdn06020.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -237,13 +239,18 @@ $(document).ready(function() {
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.ctrl = new DatasetControl({
prefix: "crdn"
, prefixName: "단속"
, keymapper: info => info ? info.CRDN_ID : ""
, dataGetter: obj => obj.crdnInfo
});
var ctrl = newCrdn06020Control($P);
// 저장
ctrl.save = (info) => {
if (!info) return;
ajax.post({
url: ctrl.urls.update
, data: info || {}
, success: resp => ctrl.onSave(resp)
});
}
ctrl.onCurrentChange = (item) => {
if (!item) return;
@ -275,17 +282,6 @@ $(document).ready(function() {
}
}
// 저장
ctrl.save = (info) => {
if (!info) return;
ajax.post({
url: ctrl.urls.update
, data: info || {}
, success: resp => ctrl.onSave(resp)
});
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/

@ -57,6 +57,8 @@
<!-- / inner page html <div class="content-pop"> -->
<script>
LoadScript("crdn06030Script",wctx.url("/resources/js/fims/crdn/crdn06030.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -78,13 +80,19 @@ $(document).ready(function() {
// FormFields
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.ctrl = new DatasetControl({
prefix: "crdnSttsCd"
, prefixName: "단속처리상태"
, keymapper: info => info ? info.CRDN_ID : ""
, dataGetter: obj => obj.${infoPrefix}Info
});
var ctrl = newCrdn06030Control($P, { infoPrefix : "${infoPrefix}" });
// 저장
ctrl.save = (info) => {
if (!info) return;
ajax.post({
url: ctrl.urls.update
, data: info || {}
, success: resp => ctrl.onSave(resp)
});
}
// 현재 선택 자료 변경 이벤트
ctrl.onCurrentChange = (item) => {
if (!item) return;
@ -114,17 +122,7 @@ $(document).ready(function() {
}
}
// 저장
ctrl.save = (info) => {
if (!info) return;
ajax.post({
url: ctrl.urls.update
, data: info || {}
, success: resp => ctrl.onSave(resp)
});
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/

@ -473,7 +473,7 @@ $(document).ready(function(){
}
}
$P.fnResetAndChangeBiz(defaultBizValue);
$P.fnResetAndChangeBiz($P.$findn("frmSearch").find("input[name='taskSeCd']:checked").val());
$P.$findn("frmSearch").find("input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");

@ -123,10 +123,12 @@
<script>
LoadScript("crdn08010Script",wctx.url("/resources/js/fims/crdn/crdn08010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
*
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
$(document).ready(function(){
@ -136,23 +138,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.EXMPTN_VHCL_ID : "",
urls : {
load : wctx.url("/BPV/crdn/crdn08/010/list.do"),
remove : wctx.url("/BPV/crdn/crdn08/010/remove.do"),
newInfo : wctx.url("/BPV/crdn/crdn08/020/info.do"),
getInfo : wctx.url("/BPV/crdn/crdn08/020/info.do")
},
formats: {
EXMPTN_BGNG_YMD : dateFormat,
EXMPTN_END_YMD : dateFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat
}
});
var ctrl = newCrdn08010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null;

@ -63,10 +63,9 @@
</form>
</div>
<script>
LoadScript("crdn08020Script",wctx.url("/resources/js/fims/crdn/crdn08020.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
@ -94,17 +93,7 @@ $(document).ready(function(){
**************************************************************************/
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj.exmptnVhclInfo,
keymapper : info => info ? info.EXMPTN_VHCL_ID : "",
urls : {
create : wctx.url("/BPV/crdn/crdn08/020/create.do"),
update : wctx.url("/BPV/crdn/crdn08/020/update.do")
},
formats : {
}
});
var ctrl = newCrdn08020Control($P);
/**************************************************************************
* pageObject.function

@ -62,6 +62,8 @@
</div>
</div>
<script>
LoadScript("crdn08030Script",wctx.url("/resources/js/fims/crdn/crdn08030.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
var NTR034 = new CommonCodes(${NTR034});
@ -75,19 +77,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj, appendData:false,
keymapper : info => info ? info.HSTRY_SN : "",
urls : { },
formats: {
EXMPTN_BGNG_YMD : dateFormat,
EXMPTN_END_YMD : dateFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat,
DEL_YN : NTR034
}
});
var ctrl = newCrdn08030Control($P);
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();

@ -0,0 +1,11 @@
function newCrdn02050Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj.crdnInfo,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
update : wctx.url("/PVS/crdn/crdn02/050/update.do")
},
formats: {}
});
return page.ctrl;
}

@ -0,0 +1,17 @@
function newCrdn03010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
load : wctx.url("/DPV/crdn/crdn03/030/list.do"),
getInfo : wctx.url("/DPV/sprt/sprt02/010/main.do"),
update: wctx.url("/DPV/crdn/crdn03/030/update.do")
},
formats: {
CRDN_YMD_TM : datetimeFormat,
FFNLG_CRDN_AMT : numberFormat,
BLNC : numberFormat
}
});
return page.ctrl;
}

@ -0,0 +1,13 @@
function newCrdn05010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
load : ""
},
formats: {
CRDN_YMD_TM : datetimeFormat
}
});
return page.ctrl;
}

@ -0,0 +1,14 @@
function newCrdn05020Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"],
keymapper : info => info ? info.FILE_NAME : "",
urls : { },
formats: {
CRDN_YMD : dateFormat,
CRDN_TM : timeFormat,
CRDN_BGNG_TM : timeFormat,
CRDN_END_TM : timeFormat
}
});
return page.ctrl;
}

@ -0,0 +1,13 @@
function newCrdn05030Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
create : wctx.url("/${taskSeCd}/crdn/crdn05/030/create.do")
},
formats: {
}
});
return page.ctrl;
}

@ -0,0 +1,20 @@
function newCrdn06010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
urls : {
load : "",
getInfo : ""
},
formats: {
CRDN_YMD_TM : datetimeFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
CVLCPT_PRCS_PRNMNT_DT : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
RCVMT_AMT : numberFormat,
LEVY_EXCL_YMD : dateFormat
}
});
return page.ctrl;
}

@ -0,0 +1,9 @@
function newCrdn06020Control(page, doctx = ""){
page.ctrl = new DatasetControl({
prefix: "crdn"
, prefixName: "단속"
, keymapper: info => info ? info.CRDN_ID : ""
, dataGetter: obj => obj.crdnInfo
});
return page.ctrl;
}

@ -0,0 +1,9 @@
function newCrdn06030Control(page, conf={}){
page.ctrl = new DatasetControl({
prefix: "crdnSttsCd"
, prefixName: "단속처리상태"
, keymapper: info => info ? info.CRDN_ID : ""
, dataGetter: obj => obj[conf.infoPrefix+"Info"]
});
return page.ctrl;
}

@ -0,0 +1,20 @@
function newCrdn08010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.EXMPTN_VHCL_ID : "",
urls : {
load : wctx.url("/BPV/crdn/crdn08/010/list.do"),
remove : wctx.url("/BPV/crdn/crdn08/010/remove.do"),
newInfo : wctx.url("/BPV/crdn/crdn08/020/info.do"),
getInfo : wctx.url("/BPV/crdn/crdn08/020/info.do")
},
formats: {
EXMPTN_BGNG_YMD : dateFormat,
EXMPTN_END_YMD : dateFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat
}
});
return page.ctrl;
}

@ -0,0 +1,14 @@
function newCrdn08020Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj.exmptnVhclInfo,
keymapper : info => info ? info.EXMPTN_VHCL_ID : "",
urls : {
create : wctx.url("/BPV/crdn/crdn08/020/create.do"),
update : wctx.url("/BPV/crdn/crdn08/020/update.do")
},
formats : {
}
});
return page.ctrl;
}

@ -0,0 +1,16 @@
function newCrdn08030Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj, appendData:false,
keymapper : info => info ? info.HSTRY_SN : "",
urls : { },
formats: {
EXMPTN_BGNG_YMD : dateFormat,
EXMPTN_END_YMD : dateFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat,
DEL_YN : NTR034
}
});
return page.ctrl;
}
Loading…
Cancel
Save