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

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