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

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

View File

@ -1,193 +1,226 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title=" " leftIconSize="20px" leftIconColor="#FFFFFF" bgColor="transparent" :autoBack="true" /> <u-navbar
<view class="container_body" :style="{ paddingTop: top + 'px' }"> title=" "
<view class="title">物业公积金</view> leftIconSize="20px"
<view class="title_bottom"> leftIconColor="#FFFFFF"
<view>{{ moeny }}</view> bgColor="transparent"
<u-icon name="info-circle" size="30rpx" color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);" /> :autoBack="true"
</view> />
<view class="name" @click="headerSwitchClick"> <view class="container_body" :style="{ paddingTop: top + 'px' }">
<text>{{defaultName.name}}</text> <view class="title">物业公积金</view>
<u-icon name="arrow-right" color="#FFFFFF" size="30rpx" /> <view class="title_bottom">
</view> <view>{{ moeny }}</view>
</view> <u-icon
<view class="main"> name="info-circle"
<view class="person_info" v-for="(item,index) in list.owners" :key="index"> size="30rpx"
<view class="item"> color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);"
<view class="label">姓名</view> />
<view class="desc">{{ item.name }}</view> </view>
</view> <view class="name" @click="headerSwitchClick">
<view class="item"> <text>{{ defaultName.name }}</text>
<view class="label">身份</view> <u-icon name="arrow-right" color="#FFFFFF" size="30rpx" />
<view class="desc" v-if="item.type == 1">业主</view> </view>
<view class="desc" v-if="item.type == 2">家属</view> </view>
<view class="desc" v-if="item.type == 3">租户</view> <view class="main">
<view class="desc" v-if="item.type == 4">访客</view> <view
</view> class="person_info"
<!-- <view class="item"> v-for="(item, index) in list.owners"
:key="index"
>
<view class="item">
<view class="label">姓名</view>
<view class="desc">{{ item.name }}</view>
</view>
<view class="item">
<view class="label">身份</view>
<view class="desc" v-if="item.type == 1">业主</view>
<view class="desc" v-if="item.type == 2">家属</view>
<view class="desc" v-if="item.type == 3">租户</view>
<view class="desc" v-if="item.type == 4">访客</view>
</view>
<!-- <view class="item">
<view class="label">手机号</view> <view class="label">手机号</view>
<view class="desc">{{item.mobile}}</view> <view class="desc">{{item.mobile}}</view>
</view> --> </view> -->
<view class="item"> <view class="item">
<view class="label">房产总数</view> <view class="label">房产总数</view>
<view class="desc">{{ item.count_of_rooms }}</view> <view class="desc">{{ item.count_of_rooms }}</view>
</view> </view>
<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"
<view class="angle"></view> color="red"
</view> @click="headerIconClick(index)"
</view> />
<view class="desc">{{item.property_fund_balance}}</view> <view
</view> class="popup"
</view> v-if="item.popupShow"
</view> @click="headerIconClick(index)"
<view class="btn" @click="goPay">去抵扣物业账单</view> >
{{ item.identity == "业主" ? ownerDesc : desc }}
<view class="angle"></view>
</view>
</view>
<view class="desc">{{ item.property_fund_balance }}</view>
</view>
</view>
</view>
<view class="btn" @click="goPay">去抵扣物业账单</view>
<u-popup :show="show" :round="50" @close="close"> <u-popup :show="show" :round="50" @close="close">
<view class="select_Popup"> <view class="select_Popup">
<view class="header"> <view class="header">
<view></view> <view></view>
<view class="title">选择房源</view> <view class="title">选择房源</view>
<view class="close" @click="close">取消</view> <view class="close" @click="close">取消</view>
</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
<text>{{ item.name }}</text> class="item"
<image v-for="(item, index) in houseList"
v-if="item.checked" :key="index"
class="pic" @click="headerConfirmClick(item)"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/community_providentFund_Group_1444.png" >
mode="scaleToFill" <text>{{ item.name }}</text>
/> <image
<image v-if="item.checked"
v-else class="pic"
class="pic" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/community_providentFund_Group_1444.png"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/community_providentFund_Ellipse_160.png" mode="scaleToFill"
mode="scaleToFill" />
/> <image
</view> v-else
</view> class="pic"
</view> src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/community_providentFund_Ellipse_160.png"
</u-popup> mode="scaleToFill"
</view> />
</view>
</view>
</view>
</u-popup>
</view>
</template> </template>
<script> <script>
import { import {
request, request,
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: [ };
},
async onLoad(options) {
if (options.item) {
this.itemObj = JSON.parse(decodeURIComponent(options.item));
this.defaultName = {
...this.itemObj,
checked: true,
};
} else {
this.defaultName = {
...this.houseList[0],
checked: true,
};
}
console.log(this.itemObj)
const meun = menuButtonInfo();
this.top = meun.height + meun.top;
await this.getRoomList();
await this.getInfo();
},
], methods: {
roomList:[] headerConfirmClick(item) {
} this.defaultName = {
}, ...item,
async onLoad(options) { checked: true,
const itemObj = JSON.parse(decodeURIComponent(options.item)); };
console.log("🚀 ~ onLoad ~ options.item:", itemObj) this.show = false;
// itemObjdefaultName this.getInfo();
this.defaultName = { },
...itemObj, //
checked: true headerSwitchClick() {
}; this.show = true;
const meun = menuButtonInfo(); const newRes = this.roomList.map((item) => {
this.top = meun.height + meun.top; if (item.name === this.defaultName.name) {
await this.getRoomList() return {
await this.getInfo() ...item,
}, checked: true,
};
}
return {
...item,
checked: false,
};
});
console.log("newResnewRes", newRes);
this.houseList = newRes;
},
//
headerIconClick(ind) {
this.list.owners[ind].popupShow = !this.list.owners[ind].popupShow;
},
close() {
this.show = false;
},
methods: { async getRoomList() {
headerConfirmClick(item) { await request(apiArr.getCommunityList, "POST", {
this.defaultName = { page_num: 1,
...item, page_size: 50,
checked: true community_id: uni.getStorageSync("changeCommData").id,
}; }).then((res) => {
this.show = false; res.rows.forEach((item) => {
this.getInfo() item.checked = false;
}, });
// this.roomList = res.rows;
headerSwitchClick() { if (!this.itemObj) {
this.show = true; this.defaultName = res.rows[0];
const newRes = this.roomList.map(item => { }
if (item.name === this.defaultName.name) { });
return { },
...item, async getInfo() {
checked: true await request(apiArr.getGovernmentByRoom, "POST", {
} room_id: this.defaultName.room_id,
} }).then((res) => {
return { res.owners.forEach((item) => {
...item, item.popupShow = false;
checked: false });
} this.list = res;
}); });
console.log('newResnewRes', newRes); },
this.houseList = newRes; goPay() {
}, NavgateTo("../propertyPayment/index");
// },
headerIconClick(ind) { },
this.list.owners[ind].popupShow = !this.list.owners[ind].popupShow };
},
close() {
this.show = false;
},
async getRoomList(){
await request(apiArr.getCommunityList,"POST",{
page_num:1,
page_size:50,
community_id:uni.getStorageSync("changeCommData").id
}).then(res=>{
res.rows.forEach(item=>{
item.checked = false
})
this.roomList = res.rows
// this.defaultName = res.rows[0]
})
},
async getInfo(){
await request(apiArr.getGovernmentByRoom,"POST",{
room_id:this.defaultName.room_id
}).then(res=>{
res.owners.forEach(item => {
item.popupShow = false
});
this.list = res
})
},
goPay(){
NavgateTo("../propertyPayment/index")
}
},
}
</script> </script>
<style lang="scss"> <style lang="scss">
@import './index.scss'; @import "./index.scss";
</style> </style>