mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
28d532ed6c
commit
447570d3c3
@ -91,13 +91,11 @@
|
|||||||
$that.simplifyRoomFeeInfo.total = _feeConfigInfo.total;
|
$that.simplifyRoomFeeInfo.total = _feeConfigInfo.total;
|
||||||
$that.simplifyRoomFeeInfo.records = _feeConfigInfo.records;
|
$that.simplifyRoomFeeInfo.records = _feeConfigInfo.records;
|
||||||
let _totalAmount = 0.0;
|
let _totalAmount = 0.0;
|
||||||
if (_totalAmount && _totalAmount.length > 0) {
|
|
||||||
_feeConfigInfo.fees.forEach(item => {
|
_feeConfigInfo.fees.forEach(item => {
|
||||||
_totalAmount += parseFloat(item.amountOwed);
|
_totalAmount += parseFloat(item.amountOwed);
|
||||||
})
|
})
|
||||||
$that.simplifyRoomFeeInfo.totalAmount = _totalAmount.toFixed(2);
|
$that.simplifyRoomFeeInfo.totalAmount = _totalAmount.toFixed(2);
|
||||||
$that.simplifyRoomFeeInfo.fees = _feeConfigInfo.fees.sort($that._roomFeeCompare);
|
$that.simplifyRoomFeeInfo.fees = _feeConfigInfo.fees.sort($that._roomFeeCompare);
|
||||||
}
|
|
||||||
vc.emit('simplifyRoomFee', 'paginationPlus', 'init', {
|
vc.emit('simplifyRoomFee', 'paginationPlus', 'init', {
|
||||||
total: $that.simplifyRoomFeeInfo.records,
|
total: $that.simplifyRoomFeeInfo.records,
|
||||||
dataCount: $that.simplifyRoomFeeInfo.total,
|
dataCount: $that.simplifyRoomFeeInfo.total,
|
||||||
@ -123,6 +121,7 @@
|
|||||||
_toOwnerPayFee: function () {
|
_toOwnerPayFee: function () {
|
||||||
vc.jumpToPage('/#/pages/property/owePayFeeOrder?payObjId=' + $that.simplifyRoomFeeInfo.roomId + "&payObjType=3333&roomName=" + $that.simplifyRoomFeeInfo.roomName);
|
vc.jumpToPage('/#/pages/property/owePayFeeOrder?payObjId=' + $that.simplifyRoomFeeInfo.roomId + "&payObjType=3333&roomName=" + $that.simplifyRoomFeeInfo.roomName);
|
||||||
},
|
},
|
||||||
|
|
||||||
_openRoomCreateFeeAddModal: function () {
|
_openRoomCreateFeeAddModal: function () {
|
||||||
$that.simplifyRoomFeeInfo.ownerName = $that.simplifyRoomFeeInfo.name;
|
$that.simplifyRoomFeeInfo.ownerName = $that.simplifyRoomFeeInfo.name;
|
||||||
vc.emit('roomCreateFeeAdd', 'openRoomCreateFeeAddModal', {
|
vc.emit('roomCreateFeeAdd', 'openRoomCreateFeeAddModal', {
|
||||||
@ -140,7 +139,6 @@
|
|||||||
},
|
},
|
||||||
_getAttrValue: function (_attrs, _specCd) {
|
_getAttrValue: function (_attrs, _specCd) {
|
||||||
let _value = "";
|
let _value = "";
|
||||||
if (_attrs && _attrs.length > 0) {
|
|
||||||
_attrs.forEach(item => {
|
_attrs.forEach(item => {
|
||||||
if (item.specCd == _specCd) {
|
if (item.specCd == _specCd) {
|
||||||
_value = item.value;
|
_value = item.value;
|
||||||
@ -148,7 +146,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return _value;
|
return _value;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
_getDeadlineTime: function (_fee) {
|
_getDeadlineTime: function (_fee) {
|
||||||
if (_fee.amountOwed == 0 && _fee.endTime == _fee.deadlineTime) {
|
if (_fee.amountOwed == 0 && _fee.endTime == _fee.deadlineTime) {
|
||||||
@ -320,6 +317,7 @@
|
|||||||
"公式": _feeConfig.computingFormulaName,
|
"公式": _feeConfig.computingFormulaName,
|
||||||
"计费单价": _feeConfig.computingFormula == '2002' ? '-' : _feeConfig.squarePrice,
|
"计费单价": _feeConfig.computingFormula == '2002' ? '-' : _feeConfig.squarePrice,
|
||||||
"附加/固定费用": _feeConfig.additionalAmount,
|
"附加/固定费用": _feeConfig.additionalAmount,
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -327,6 +325,7 @@
|
|||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
},
|
},
|
||||||
_viewRoomFee: function (_fee) {
|
_viewRoomFee: function (_fee) {
|
||||||
let _data = {
|
let _data = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user