DatasetControl 인스턴스 생성 수정

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

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

@ -120,6 +120,7 @@
<script> <script>
LoadScript("crdn03010Script",wctx.url("/resources/js/fims/crdn/crdn03010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
@ -136,20 +137,8 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
var ctrl= $P.ctrl = new DatasetControl({ var ctrl = newCrdn03010Control($P);
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
}
});
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;

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

@ -162,8 +162,9 @@
</div> </div>
<script> <script>
LoadScript("crdn05020Script",wctx.url("/resources/js/fims/crdn/crdn05020.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}"); pageObject["${pageName}"] = newDoctxFinder("${pageName}");
$(document).ready(function(){ $(document).ready(function(){
@ -175,17 +176,7 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({ var ctrl = newCrdn05020Control($P);
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
}
});
ctrl.dataset.onDatasetChange = (obj, option) => { ctrl.dataset.onDatasetChange = (obj, option) => {

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

@ -285,6 +285,7 @@
<script> <script>
LoadScript("crdn06010Script",wctx.url("/resources/js/fims/crdn/crdn06010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
@ -306,23 +307,7 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({ var ctrl = newCrdn06010Control($P);
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
}
});
ctrl.defaultFetchSize = FETCH_XS; ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize }; ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };

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

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

@ -123,10 +123,12 @@
<script> <script>
LoadScript("crdn08010Script",wctx.url("/resources/js/fims/crdn/crdn08010.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
*
pageObject["${pageName}"] = newDoctxFinder("${pageName}"); pageObject["${pageName}"] = newDoctxFinder("${pageName}");
$(document).ready(function(){ $(document).ready(function(){
@ -136,23 +138,7 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({ var ctrl = newCrdn08010Control($P);
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
}
});
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;

@ -63,10 +63,9 @@
</form> </form>
</div> </div>
<script> <script>
LoadScript("crdn08020Script",wctx.url("/resources/js/fims/crdn/crdn08020.js?ver=${ver}"));
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
@ -94,17 +93,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 = newCrdn08020Control($P);
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 : {
}
});
/************************************************************************** /**************************************************************************
* pageObject.function * pageObject.function

@ -62,6 +62,8 @@
</div> </div>
</div> </div>
<script> <script>
LoadScript("crdn08030Script",wctx.url("/resources/js/fims/crdn/crdn08030.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}"); pageObject["${pageName}"] = newDoctxFinder("${pageName}");
var NTR034 = new CommonCodes(${NTR034}); var NTR034 = new CommonCodes(${NTR034});
@ -75,19 +77,7 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl, DatasetSupport, FormFields * DatasetControl, DatasetSupport, FormFields
**************************************************************************/ **************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({ var ctrl = newCrdn08030Control($P);
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
}
});
ctrl.dataset.onDatasetChange = (obj, option) => { ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate(); 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