处理按房屋排序问题

This commit is contained in:
wuxw 2022-04-20 13:48:19 +08:00
parent 913bc8d09c
commit 794e5afe66
2 changed files with 26 additions and 2 deletions

View File

@ -89,7 +89,9 @@
_totalAmount += parseFloat(item.amountOwed);
})
$that.simplifyRoomFeeInfo.totalAmount = _totalAmount.toFixed(2);
vc.component.simplifyRoomFeeInfo.fees = _feeConfigInfo.fees;
vc.component.simplifyRoomFeeInfo.fees = _feeConfigInfo.fees.sort($that._roomFeeCompare);
vc.emit('simplifyRoomFee', 'paginationPlus', 'init', {
total: _feeConfigInfo.records,
currentPage: _page
@ -100,6 +102,17 @@
}
);
},
_roomFeeCompare:function(a,b){
var val1 = a.payerObjName;
var val2 = b.payerObjName;
if (val1 < val2) {
return -1;
} else if (val1 > val2) {
return 1;
} else {
return 0;
}
},
_toOwnerPayFee: function() {
vc.jumpToPage('/#/pages/property/owePayFeeOrder?payObjId=' + $that.simplifyRoomFeeInfo.roomId + "&payObjType=3333&roomName=" + $that.simplifyRoomFeeInfo.roomName);
},

View File

@ -68,7 +68,7 @@
if (!_fees || _fees.length < 1) {
return;
}
$that.batchPayFeeOrderInfo.batchFees = _fees;
$that.batchPayFeeOrderInfo.batchFees = _fees.sort($that._batchRoomFeeCompare);
$that.batchPayFeeOrderInfo.selectPayFeeIds = [];
$that.batchPayFeeOrderInfo.batchFees.forEach(item => {
$that.batchPayFeeOrderInfo.selectPayFeeIds.push(item.feeId);
@ -92,6 +92,17 @@
}
);
},
_batchRoomFeeCompare:function(a,b){
var val1 = a.payerObjName;
var val2 = b.payerObjName;
if (val1 < val2) {
return -1;
} else if (val1 > val2) {
return 1;
} else {
return 0;
}
},
_pushPayObjs: function() {
let _allBatchFees = $that.batchPayFeeOrderInfo.allBatchFees;
let _payObjs = $that.batchPayFeeOrderInfo.payObjs;