From 794e5afe66ba2a72384f2b044ee1c4231103baa5 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Wed, 20 Apr 2022 13:48:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=8C=89=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/simplifyRoomFee/simplifyRoomFee.js | 15 ++++++++++++++- .../property/batchPayFeeOrder/batchPayFeeOrder.js | 13 ++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/public/components/property/simplifyRoomFee/simplifyRoomFee.js b/public/components/property/simplifyRoomFee/simplifyRoomFee.js index 226b647a8..ebc8bb69c 100755 --- a/public/components/property/simplifyRoomFee/simplifyRoomFee.js +++ b/public/components/property/simplifyRoomFee/simplifyRoomFee.js @@ -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); }, diff --git a/public/pages/property/batchPayFeeOrder/batchPayFeeOrder.js b/public/pages/property/batchPayFeeOrder/batchPayFeeOrder.js index c612296fd..a1e044784 100644 --- a/public/pages/property/batchPayFeeOrder/batchPayFeeOrder.js +++ b/public/pages/property/batchPayFeeOrder/batchPayFeeOrder.js @@ -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;