修改物业缴费的缴费记录显示问题

This commit is contained in:
赵毅 2025-09-29 16:47:34 +08:00
parent f5d3cd79de
commit 34e8c05b91

View File

@ -149,7 +149,7 @@
<view class="payHisItem" v-for="item in payOrderList" :key="item.id">
<view class="row">
<view class="row_label">缴费金额</view>
<view class="row_con1">{{ item.money }}</view>
<view class="row_con1">{{ item.money + item.property_housing_fund }}</view>
</view>
<view class="row">
<view class="row_label2"></view>
@ -168,12 +168,12 @@
<view class="row">
<view class="row_label">应缴费金额</view>
<view class="row_con4">{{ item.money }}</view>
<view class="row_con4">{{ item.money + item.property_housing_fund }}</view>
</view>
<view class="row">
<view class="row_label">物业费公积金抵扣金额</view>
<view class="row_con4">-{{ item.reduction_money }}</view>
<view class="row_con4">-{{ item.property_housing_fund }}</view>
</view>
<view class="row">
@ -302,6 +302,33 @@ export default {
this.getUserGovenmentMoney();
},
//
onPullDownRefresh() {
//
if (this.active === 0) {
//
Promise.all([
this.getUserGovenmentMoney(),
this.getRoomSelect()
]).then(() => {
//
uni.stopPullDownRefresh();
}).catch(() => {
//
uni.stopPullDownRefresh();
});
} else if (this.active === 1) {
//
this.getPayList().then(() => {
//
uni.stopPullDownRefresh();
}).catch(() => {
//
uni.stopPullDownRefresh();
});
}
},
methods: {
changeTab(index) {
this.active = index;
@ -330,6 +357,7 @@ export default {
},
//
getRoomSelect() {
return new Promise((resolve, reject) => {
request(apiArr.getCommunityRoomList, "POST", {
community_id: this.currentCommunity.id,
page_num: 1,
@ -338,7 +366,14 @@ export default {
this.roomList = res.rows;
this.currentRoom = this.roomList[0];
this.selectedRoomId = this.currentRoom.room_id;
this.getOrderList();
this.getOrderList().then(() => {
resolve();
}).catch((error) => {
reject(error);
});
}).catch((error) => {
reject(error);
});
});
},
@ -354,16 +389,22 @@ export default {
},
//
async getUserGovenmentMoney() {
getUserGovenmentMoney() {
return new Promise((resolve, reject) => {
request(apiArr.getUserGovenmentMoney, "POST", {}).then((res) => {
console.log(res, "公积金");
this.balanceMoney = res.balance_after;
resolve();
}).catch((error) => {
reject(error);
});
});
},
//
async getOrderList() {
await request(apiArr.getOrderList, "POST", {
getOrderList() {
return new Promise((resolve, reject) => {
request(apiArr.getOrderList, "POST", {
room_id: this.currentRoom.room_id,
page_num: 1,
page_size: 50,
@ -377,6 +418,10 @@ export default {
});
});
this.Bill = res.rows;
resolve();
}).catch((error) => {
reject(error);
});
});
},
//
@ -387,10 +432,8 @@ export default {
checkChange(e, index) {
this.Bill[index].check = !this.Bill[index].check;
this.Bill[index].community_order_rows.forEach((item) => {
if (this.Bill[index].check) {
item.check = true;
} else {
item.check = false;
if (item.pay_status == 1) {
item.check = this.Bill[index].check;
}
});
@ -490,6 +533,10 @@ export default {
const fundAmount = Math.min(Number(this.balanceMoney), Number(this.currentMoney));
payParams.property_housing_fund = fundAmount.toFixed(2);
if (isComboPay && payParams.money == 0) {
this.payType = 2;
}
//
if (this.payType == 2 && !isComboPay) {
if (Number(this.balanceMoney) < Number(this.currentMoney)) {
@ -504,7 +551,7 @@ export default {
}
//
if (isComboPay) {
if (isComboPay && (payParams.money != 0.00 ||payParams.money != 0)) {
this.payType = 3;
name_mini = "微信 + 物业公积金";
}
@ -522,14 +569,15 @@ export default {
order_pay_id: res.id,
}
request(apiArr.tradeQuery, "POST", params).then(res => {
console.log("🚀 ~ createPay ~ res:", res)
uni.showToast({
title: '支付成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.getRoomSelect();
this.getUserGovenmentMoney();
}, 1500);
})
});
} else if (res.cancel) {
@ -602,6 +650,7 @@ export default {
//
getPayList() {
return new Promise((resolve, reject) => {
request(apiArr.getPayOrderList, "POST", {
room_id: this.currentRoom.room_id,
page_num: this.page_num,
@ -614,7 +663,11 @@ export default {
flag = false;
}
this.flag = flag;
this.payOrderList = res.rows
this.payOrderList = res.rows;
resolve();
}).catch((error) => {
reject(error);
});
});
},