优化代码

This commit is contained in:
wuxw 2023-11-07 02:01:29 +08:00
parent 28d532ed6c
commit 447570d3c3

View File

@ -91,13 +91,11 @@
$that.simplifyRoomFeeInfo.total = _feeConfigInfo.total;
$that.simplifyRoomFeeInfo.records = _feeConfigInfo.records;
let _totalAmount = 0.0;
if (_totalAmount && _totalAmount.length > 0) {
_feeConfigInfo.fees.forEach(item => {
_totalAmount += parseFloat(item.amountOwed);
})
$that.simplifyRoomFeeInfo.totalAmount = _totalAmount.toFixed(2);
$that.simplifyRoomFeeInfo.fees = _feeConfigInfo.fees.sort($that._roomFeeCompare);
}
vc.emit('simplifyRoomFee', 'paginationPlus', 'init', {
total: $that.simplifyRoomFeeInfo.records,
dataCount: $that.simplifyRoomFeeInfo.total,
@ -123,6 +121,7 @@
_toOwnerPayFee: function () {
vc.jumpToPage('/#/pages/property/owePayFeeOrder?payObjId=' + $that.simplifyRoomFeeInfo.roomId + "&payObjType=3333&roomName=" + $that.simplifyRoomFeeInfo.roomName);
},
_openRoomCreateFeeAddModal: function () {
$that.simplifyRoomFeeInfo.ownerName = $that.simplifyRoomFeeInfo.name;
vc.emit('roomCreateFeeAdd', 'openRoomCreateFeeAddModal', {
@ -140,7 +139,6 @@
},
_getAttrValue: function (_attrs, _specCd) {
let _value = "";
if (_attrs && _attrs.length > 0) {
_attrs.forEach(item => {
if (item.specCd == _specCd) {
_value = item.value;
@ -148,7 +146,6 @@
}
});
return _value;
}
},
_getDeadlineTime: function (_fee) {
if (_fee.amountOwed == 0 && _fee.endTime == _fee.deadlineTime) {
@ -320,6 +317,7 @@
"公式": _feeConfig.computingFormulaName,
"计费单价": _feeConfig.computingFormula == '2002' ? '-' : _feeConfig.squarePrice,
"附加/固定费用": _feeConfig.additionalAmount,
}
})
},
@ -327,6 +325,7 @@
console.log('请求失败处理');
}
);
},
_viewRoomFee: function (_fee) {
let _data = {