@@ -151,7 +144,7 @@
实收: {{reportFeeSummaryInfo.allReceivedAmount}}元
- 欠费: {{reportFeeSummaryInfo.totalPreferentialAmount}}元
+ 欠费: {{_computeTotalOweAmount()}}元
欠费: {{reportFeeSummaryInfo.allOweAmount}}元
diff --git a/public/pages/property/reportFeeSummary/reportFeeSummary.js b/public/pages/property/reportFeeSummary/reportFeeSummary.js
index 689c90b13..bb07312bb 100755
--- a/public/pages/property/reportFeeSummary/reportFeeSummary.js
+++ b/public/pages/property/reportFeeSummary/reportFeeSummary.js
@@ -1,7 +1,7 @@
/**
入驻小区
**/
-(function (vc) {
+(function(vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
@@ -33,8 +33,8 @@
}
},
watch: {
- 'reportFeeSummaryInfo.feeConfigs': function () {//'goodList'是我要渲染的对象,也就是我要等到它渲染完才能调用函数
- this.$nextTick(function () {
+ 'reportFeeSummaryInfo.feeConfigs': function() { //'goodList'是我要渲染的对象,也就是我要等到它渲染完才能调用函数
+ this.$nextTick(function() {
$('#configIds').selectpicker({
title: '请选择费用项',
styleBase: 'form-control',
@@ -43,13 +43,13 @@
})
}
},
- _initMethod: function () {
+ _initMethod: function() {
vc.component._initDate();
$that._listFeeConfigs();
vc.component._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
},
- _initEvent: function () {
- $('#configIds').on('changed.bs.select', function (e, clickedIndex, isSelected, previousValue) {
+ _initEvent: function() {
+ $('#configIds').on('changed.bs.select', function(e, clickedIndex, isSelected, previousValue) {
// do something...
if (isSelected) {
$that.reportFeeSummaryInfo.feeConfigNames.push({
@@ -67,17 +67,17 @@
$that.reportFeeSummaryInfo.feeConfigNames = _feeConfigNames;
}
});
- vc.on('reportFeeSummary', 'chooseFloor', function (_param) {
+ vc.on('reportFeeSummary', 'chooseFloor', function(_param) {
vc.component.reportFeeSummaryInfo.conditions.floorId = _param.floorId;
vc.component.reportFeeSummaryInfo.conditions.floorName = _param.floorName;
vc.component.loadUnits(_param.floorId);
});
- vc.on('pagination', 'page_event', function (_currentPage) {
+ vc.on('pagination', 'page_event', function(_currentPage) {
vc.component._listFees(_currentPage, DEFAULT_ROWS);
});
},
methods: {
- _initDate: function () {
+ _initDate: function() {
$(".startTime").datetimepicker({
minView: "month",
language: 'zh-CN',
@@ -99,12 +99,12 @@
todayBtn: true
});
$('.startTime').datetimepicker()
- .on('changeDate', function (ev) {
+ .on('changeDate', function(ev) {
var value = $(".startTime").val();
vc.component.reportFeeSummaryInfo.conditions.startTime = value;
});
$('.endTime').datetimepicker()
- .on('changeDate', function (ev) {
+ .on('changeDate', function(ev) {
var value = $(".endTime").val();
vc.component.reportFeeSummaryInfo.conditions.endTime = value;
let start = Date.parse(new Date($that.reportFeeSummaryInfo.conditions.startTime))
@@ -128,11 +128,11 @@
}
},
//查询
- _queryMethod: function () {
+ _queryMethod: function() {
vc.component._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
},
//查询方法
- _listFees: function (_page, _rows) {
+ _listFees: function(_page, _rows) {
vc.component.reportFeeSummaryInfo.conditions.page = _page;
vc.component.reportFeeSummaryInfo.conditions.row = _rows;
vc.component.reportFeeSummaryInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
@@ -143,7 +143,7 @@
//发送get请求
vc.http.apiGet('/reportFeeMonthStatistics/queryReportFeeSummary',
param,
- function (json, res) {
+ function(json, res) {
var _reportFeeSummaryInfo = JSON.parse(json);
vc.component.reportFeeSummaryInfo.total = _reportFeeSummaryInfo.total;
vc.component.reportFeeSummaryInfo.records = _reportFeeSummaryInfo.records;
@@ -174,13 +174,14 @@
dataCount: vc.component.reportFeeSummaryInfo.total,
currentPage: _page
});
- }, function (errInfo, error) {
+ },
+ function(errInfo, error) {
console.log('请求失败处理');
}
);
},
//重置
- _resetMethod: function (_page, _rows) {
+ _resetMethod: function(_page, _rows) {
vc.component.reportFeeSummaryInfo.conditions.floorName = "";
vc.component.reportFeeSummaryInfo.conditions.floorId = "";
vc.component.reportFeeSummaryInfo.conditions.unitId = "";
@@ -189,7 +190,7 @@
vc.component.reportFeeSummaryInfo.conditions.endTime = "";
$that._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
},
- loadUnits: function (_floorId) {
+ loadUnits: function(_floorId) {
var param = {
params: {
floorId: _floorId,
@@ -200,7 +201,7 @@
'room',
'loadUnits',
param,
- function (json, res) {
+ function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let tmpUnits = JSON.parse(json);
@@ -209,22 +210,22 @@
}
vc.toast(json);
},
- function (errInfo, error) {
+ function(errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
},
- _openChooseFloorMethod: function () {
+ _openChooseFloorMethod: function() {
vc.emit('searchFloor', 'openSearchFloorModel', {});
},
- _moreCondition: function () {
+ _moreCondition: function() {
if (vc.component.reportFeeSummaryInfo.moreCondition) {
vc.component.reportFeeSummaryInfo.moreCondition = false;
} else {
vc.component.reportFeeSummaryInfo.moreCondition = true;
}
},
- _listFeeConfigs: function () {
+ _listFeeConfigs: function() {
var param = {
params: {
page: 1,
@@ -234,15 +235,15 @@
};
//发送get请求
vc.http.get('feeConfigManage', 'list', param,
- function (json, res) {
+ function(json, res) {
var _feeConfigManageInfo = JSON.parse(json);
vc.component.reportFeeSummaryInfo.feeConfigs = _feeConfigManageInfo.feeConfigs;
},
- function (errInfo, error) {
+ function(errInfo, error) {
console.log('请求失败处理');
});
},
- _getFeeReceivedAmountAmount: function (item, fee) {
+ _getFeeReceivedAmountAmount: function(item, fee) {
let _items = fee.items;
if (!_items) {
return 0;
@@ -256,19 +257,29 @@
})
return _value;
},
- _exportExcel: function () {
+ _exportExcel: function() {
vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=reportFeeSummary&' + vc.objToGetParam($that.reportFeeSummaryInfo.conditions));
},
- _computeSum: function (a, b) {
+ _computeSum: function(a, b) {
return (parseFloat(a) + parseFloat(b)).toFixed(2)
},
- _computeOweFee: function (fee) {
+ _computeOweFee: function(fee) {
let _oweFee = (parseFloat(fee.hisOweAmount) + parseFloat(fee.curReceivableAmount) - parseFloat(fee.curReceivedAmount) - parseFloat(fee.hisOweReceivedAmount)).toFixed(2);
if (_oweFee < 0) {
return _oweFee;
}
return _oweFee;
+ },
+ _computeTotalOweAmount: function() {
+ if (!window.$that) {
+ return 0;
+ }
+ let _amount = 0;
+ $that.reportFeeSummaryInfo.fees.forEach(item => {
+ _amount += parseFloat($that._computeOweFee(item));
+ })
+ return _amount.toFixed(2);
}
}
});
-})(window.vc);
+})(window.vc);
\ No newline at end of file