修复物业公积金数据异常的问题

This commit is contained in:
赵毅 2025-08-02 17:21:05 +08:00
parent b1f9dc134d
commit 7dc5ee160f

View File

@ -1,11 +1,21 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title=" " leftIconSize="20px" leftIconColor="#FFFFFF" bgColor="transparent" :autoBack="true" /> <u-navbar
title=" "
leftIconSize="20px"
leftIconColor="#FFFFFF"
bgColor="transparent"
:autoBack="true"
/>
<view class="container_body" :style="{ paddingTop: top + 'px' }"> <view class="container_body" :style="{ paddingTop: top + 'px' }">
<view class="title">物业公积金</view> <view class="title">物业公积金</view>
<view class="title_bottom"> <view class="title_bottom">
<view>{{ moeny }}</view> <view>{{ moeny }}</view>
<u-icon name="info-circle" size="30rpx" color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);" /> <u-icon
name="info-circle"
size="30rpx"
color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);"
/>
</view> </view>
<view class="name" @click="headerSwitchClick"> <view class="name" @click="headerSwitchClick">
<text>{{ defaultName.name }}</text> <text>{{ defaultName.name }}</text>
@ -13,7 +23,11 @@
</view> </view>
</view> </view>
<view class="main"> <view class="main">
<view class="person_info" v-for="(item,index) in list.owners" :key="index"> <view
class="person_info"
v-for="(item, index) in list.owners"
:key="index"
>
<view class="item"> <view class="item">
<view class="label">姓名</view> <view class="label">姓名</view>
<view class="desc">{{ item.name }}</view> <view class="desc">{{ item.name }}</view>
@ -36,9 +50,18 @@
<view class="item"> <view class="item">
<view class="label fix"> <view class="label fix">
<text>物业费公积金总余额</text> <text>物业费公积金总余额</text>
<u-icon name="info-circle-fill" size="30rpx" color="red" @click="headerIconClick(index)" /> <u-icon
<view class="popup" v-if="item.popupShow" @click="headerIconClick(index)"> name="info-circle-fill"
{{ item.identity == '业主' ? ownerDesc : desc }} size="30rpx"
color="red"
@click="headerIconClick(index)"
/>
<view
class="popup"
v-if="item.popupShow"
@click="headerIconClick(index)"
>
{{ item.identity == "业主" ? ownerDesc : desc }}
<view class="angle"></view> <view class="angle"></view>
</view> </view>
</view> </view>
@ -57,7 +80,12 @@
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="main"> <view class="main">
<view class="item" v-for="(item,index) in houseList" :key="index" @click="headerConfirmClick(item)"> <view
class="item"
v-for="(item, index) in houseList"
:key="index"
@click="headerConfirmClick(item)"
>
<text>{{ item.name }}</text> <text>{{ item.name }}</text>
<image <image
v-if="item.checked" v-if="item.checked"
@ -84,74 +112,78 @@ import {
picUrl, picUrl,
uniqueByField, uniqueByField,
menuButtonInfo, menuButtonInfo,
NavgateTo NavgateTo,
} from '../../../utils'; } from "../../../utils";
import { apiArr } from '../../../api/v2Community';
import { apiArr } from "../../../api/v2Community";
export default { export default {
data() { data() {
return { return {
top: '', top: "",
moeny: '0.00', moeny: "0.00",
show: false, show: false,
ownerDesc: '本房产的物业公积金为该房产的所有成员物业公积金总和。无需经过成员同意便可用于本房产的物业费抵扣,一旦成功抵扣,成员所拥有的物业公积金将自动进行扣除。', ownerDesc:
desc: '物业公积金可通用至您加入的所有房产,任一房产的物业相关费用均可用该物业公积金抵扣。', "本房产的物业公积金为该房产的所有成员物业公积金总和。无需经过成员同意便可用于本房产的物业费抵扣,一旦成功抵扣,成员所拥有的物业公积金将自动进行扣除。",
defaultName: '', desc: "物业公积金可通用至您加入的所有房产,任一房产的物业相关费用均可用该物业公积金抵扣。",
list: [ defaultName: "",
list: [],
houseList: [],
roomList: [],
], itemObj: '',
houseList: [ };
],
roomList:[]
}
}, },
async onLoad(options) { async onLoad(options) {
const itemObj = JSON.parse(decodeURIComponent(options.item)); if (options.item) {
console.log("🚀 ~ onLoad ~ options.item:", itemObj) this.itemObj = JSON.parse(decodeURIComponent(options.item));
// itemObjdefaultName
this.defaultName = { this.defaultName = {
...itemObj, ...this.itemObj,
checked: true checked: true,
}; };
} else {
this.defaultName = {
...this.houseList[0],
checked: true,
};
}
console.log(this.itemObj)
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.height + meun.top; this.top = meun.height + meun.top;
await this.getRoomList() await this.getRoomList();
await this.getInfo() await this.getInfo();
}, },
methods: { methods: {
headerConfirmClick(item) { headerConfirmClick(item) {
this.defaultName = { this.defaultName = {
...item, ...item,
checked: true checked: true,
}; };
this.show = false; this.show = false;
this.getInfo() this.getInfo();
}, },
// //
headerSwitchClick() { headerSwitchClick() {
this.show = true; this.show = true;
const newRes = this.roomList.map(item => { const newRes = this.roomList.map((item) => {
if (item.name === this.defaultName.name) { if (item.name === this.defaultName.name) {
return { return {
...item, ...item,
checked: true checked: true,
} };
} }
return { return {
...item, ...item,
checked: false checked: false,
} };
}); });
console.log('newResnewRes', newRes); console.log("newResnewRes", newRes);
this.houseList = newRes; this.houseList = newRes;
}, },
// //
headerIconClick(ind) { headerIconClick(ind) {
this.list.owners[ind].popupShow = !this.list.owners[ind].popupShow this.list.owners[ind].popupShow = !this.list.owners[ind].popupShow;
}, },
close() { close() {
this.show = false; this.show = false;
@ -161,33 +193,34 @@ export default {
await request(apiArr.getCommunityList, "POST", { await request(apiArr.getCommunityList, "POST", {
page_num: 1, page_num: 1,
page_size: 50, page_size: 50,
community_id:uni.getStorageSync("changeCommData").id community_id: uni.getStorageSync("changeCommData").id,
}).then(res=>{ }).then((res) => {
res.rows.forEach(item=>{ res.rows.forEach((item) => {
item.checked = false item.checked = false;
}) });
this.roomList = res.rows this.roomList = res.rows;
// this.defaultName = res.rows[0] if (!this.itemObj) {
}) this.defaultName = res.rows[0];
}
});
}, },
async getInfo() { async getInfo() {
await request(apiArr.getGovernmentByRoom, "POST", { await request(apiArr.getGovernmentByRoom, "POST", {
room_id:this.defaultName.room_id room_id: this.defaultName.room_id,
}).then(res=>{ }).then((res) => {
res.owners.forEach(item => { res.owners.forEach((item) => {
item.popupShow = false item.popupShow = false;
});
this.list = res;
}); });
this.list = res
})
}, },
goPay() { goPay() {
NavgateTo("../propertyPayment/index") NavgateTo("../propertyPayment/index");
}
}, },
} },
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import './index.scss'; @import "./index.scss";
</style> </style>