修改物业缴费的缴费记录显示问题
This commit is contained in:
parent
f5d3cd79de
commit
34e8c05b91
@ -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">
|
||||||
@ -302,6 +302,33 @@ export default {
|
|||||||
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) {
|
||||||
this.active = index;
|
this.active = 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);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user