MicroCommunityWeb/public/components/property/viewFeeConfigData/viewFeeConfigData.js
2022-07-23 18:36:06 +08:00

59 lines
2.5 KiB
JavaScript

(function(vc) {
vc.extends({
data: {
viewFeeConfigDataInfo: {
configId: '',
}
},
_initMethod: function() {
},
_initEvent: function() {
vc.on('viewFeeConfigData', 'showData', function(_param) {
$that.viewFeeConfigDataInfo.configId = _param.configId;
$that._loadFeeConfigData();
});
},
methods: {
_loadFeeConfigData: function() {
let param = {
params: {
page: 1,
row: 1,
communityId: vc.getCurrentCommunity().communityId,
configId: $that.viewFeeConfigDataInfo.configId
}
};
//发送get请求
vc.http.apiGet('/feeConfig.listFeeConfigs', param,
function(json, res) {
let _feeConfigManageInfo = JSON.parse(json);
let _feeConfig = _feeConfigManageInfo.feeConfigs[0];
vc.emit('viewData', 'openViewDataModal', {
title: _feeConfig.feeName + " 费用项",
data: {
"费用项ID": _feeConfig.configId,
"费用类型": _feeConfig.feeTypeCdName,
"收费项目": _feeConfig.feeName,
"费用标识": _feeConfig.feeFlagName,
"催缴类型": _feeConfig.billTypeName,
"付费类型": _feeConfig.paymentCd == '1200' ? '预付费' : '后付费',
"缴费周期": _feeConfig.paymentCycle,
"计费起始时间": _feeConfig.startTime,
"计费终止时间": _feeConfig.endTime,
"公式": _feeConfig.computingFormulaName,
"计费单价": _feeConfig.computingFormula == '2002' ? '-' : _feeConfig.squarePrice,
"附加/固定费用": _feeConfig.additionalAmount,
}
})
},
function(errInfo, error) {
console.log('请求失败处理');
}
);
},
}
});
})(window.vc);