Compare commits

..

No commits in common. "84ac2a6da57157c1b3fa0695d4c3b6c65535439f" and "b1f9dc134d773a9c63eb6e7787d6328b205638cd" have entirely different histories.

2 changed files with 190 additions and 245 deletions

View File

@ -50,11 +50,7 @@
:key="index" :key="index"
@click="headerServerClick(item)" @click="headerServerClick(item)"
> >
<image <image :src="item.ad_picture" mode="aspectFill" class="swiperBox2_img"/>
:src="item.ad_picture"
mode="aspectFill"
class="swiperBox2_img"
/>
</swiper-item> </swiper-item>
</swiper> </swiper>
</div> </div>
@ -175,7 +171,9 @@ import {
} from "../../../utils"; } from "../../../utils";
import { apiArr } from "../../../api/v2Community"; import { apiArr } from "../../../api/v2Community";
import { apiArr as apiArr2 } from "../../../api/community"; import {
apiArr as apiArr2
} from '../../../api/community';
export default { export default {
data() { data() {
@ -214,25 +212,18 @@ export default {
page_num: 1, page_num: 1,
flag: false, flag: false,
loadMoreText: "", loadMoreText: "",
isShowBill: false,
}; };
}, },
async onLoad(options) { async onLoad(options) {
await request(apiArr2.commInfo, "POST", { await request(apiArr2.commInfo, "POST", {
user_id: uni.getStorageSync("userId"), user_id: uni.getStorageSync("userId"),
longitude: uni.getStorageSync("location").lng, longitude: uni.getStorageSync("location").lng,
latitude: uni.getStorageSync("location").lat, latitude: uni.getStorageSync("location").lat,
page_num: this.page_num, page_num: this.page_num,
page_size: this.page_size, page_size: this.page_size,
}).then((res) => { }).then((res) => {
res.rows.find((item) => { this.communityList = res.rows;
if (item.community_id == uni.getStorageSync("changeCommData").id) {
this.isShowBill = item.bill_front_end_display == 1 ? true : false;
}
}); });
this.communityList = res.rows;
});
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.top; this.top = meun.top;
// this.top = meun.height + meun.top; // this.top = meun.height + meun.top;
@ -299,16 +290,6 @@ export default {
this.NotOpen(); this.NotOpen();
return; return;
} }
if (
e == "/packages/community/propertyPayment/index" &&
!this.isShowBill
) {
uni.showToast({
title: "请配置账单",
icon: "none",
});
return;
}
NavgateTo(e); NavgateTo(e);
}, },
@ -527,12 +508,12 @@ export default {
// this.loadMoreText = "1030"; // this.loadMoreText = "1030";
} }
this.selectedTab = index; this.selectedTab = index;
// tab // tab
if (!isTabChange && !this.flag && this.infoList.length > 0) { if (!isTabChange && !this.flag && this.infoList.length > 0) {
return; return;
} }
const res = await request(apiArr.infoPage, "POST", { const res = await request(apiArr.infoPage, "POST", {
community_id: Number(uni.getStorageSync("changeCommData").id), community_id: Number(uni.getStorageSync("changeCommData").id),
announcement_category_id: item.id, announcement_category_id: item.id,
@ -554,10 +535,7 @@ export default {
this.flag = hasMore; this.flag = hasMore;
// //
const isDataDuplicate = const isDataDuplicate = !isTabChange && this.infoList.length > 0 && newData.length > 0 &&
!isTabChange &&
this.infoList.length > 0 &&
newData.length > 0 &&
this.infoList[this.infoList.length - 1].id === newData[0].id; this.infoList[this.infoList.length - 1].id === newData[0].id;
// //

View File

@ -1,226 +1,193 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar <u-navbar title=" " leftIconSize="20px" leftIconColor="#FFFFFF" bgColor="transparent" :autoBack="true" />
title=" " <view class="container_body" :style="{ paddingTop: top + 'px' }">
leftIconSize="20px" <view class="title">物业公积金</view>
leftIconColor="#FFFFFF" <view class="title_bottom">
bgColor="transparent" <view>{{ moeny }}</view>
:autoBack="true" <u-icon name="info-circle" size="30rpx" color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);" />
/> </view>
<view class="container_body" :style="{ paddingTop: top + 'px' }"> <view class="name" @click="headerSwitchClick">
<view class="title">物业公积金</view> <text>{{defaultName.name}}</text>
<view class="title_bottom"> <u-icon name="arrow-right" color="#FFFFFF" size="30rpx" />
<view>{{ moeny }}</view> </view>
<u-icon </view>
name="info-circle" <view class="main">
size="30rpx" <view class="person_info" v-for="(item,index) in list.owners" :key="index">
color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);" <view class="item">
/> <view class="label">姓名</view>
</view> <view class="desc">{{ item.name }}</view>
<view class="name" @click="headerSwitchClick"> </view>
<text>{{ defaultName.name }}</text> <view class="item">
<u-icon name="arrow-right" color="#FFFFFF" size="30rpx" /> <view class="label">身份</view>
</view> <view class="desc" v-if="item.type == 1">业主</view>
</view> <view class="desc" v-if="item.type == 2">家属</view>
<view class="main"> <view class="desc" v-if="item.type == 3">租户</view>
<view <view class="desc" v-if="item.type == 4">访客</view>
class="person_info" </view>
v-for="(item, index) in list.owners" <!-- <view class="item">
: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 <u-icon name="info-circle-fill" size="30rpx" color="red" @click="headerIconClick(index)" />
name="info-circle-fill" <view class="popup" v-if="item.popupShow" @click="headerIconClick(index)">
size="30rpx" {{ item.identity == '业主' ? ownerDesc : desc }}
color="red" <view class="angle"></view>
@click="headerIconClick(index)" </view>
/> </view>
<view <view class="desc">{{item.property_fund_balance}}</view>
class="popup" </view>
v-if="item.popupShow" </view>
@click="headerIconClick(index)" </view>
> <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 <view class="item" v-for="(item,index) in houseList" :key="index" @click="headerConfirmClick(item)">
class="item" <text>{{ item.name }}</text>
v-for="(item, index) in houseList" <image
:key="index" v-if="item.checked"
@click="headerConfirmClick(item)" class="pic"
> src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/community_providentFund_Group_1444.png"
<text>{{ item.name }}</text> mode="scaleToFill"
<image />
v-if="item.checked" <image
class="pic" v-else
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/community_providentFund_Group_1444.png" class="pic"
mode="scaleToFill" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/community_providentFund_Ellipse_160.png"
/> mode="scaleToFill"
<image />
v-else </view>
class="pic" </view>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/community_providentFund_Ellipse_160.png" </view>
mode="scaleToFill" </u-popup>
/> </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: '物业公积金可通用至您加入的所有房产,任一房产的物业相关费用均可用该物业公积金抵扣。',
desc: "物业公积金可通用至您加入的所有房产,任一房产的物业相关费用均可用该物业公积金抵扣。", defaultName: '',
defaultName: "", list: [
list: [],
houseList: [], ],
roomList: [], houseList: [
],
roomList:[]
}
},
async onLoad(options) {
const itemObj = JSON.parse(decodeURIComponent(options.item));
console.log("🚀 ~ onLoad ~ options.item:", itemObj)
// itemObjdefaultName
this.defaultName = {
...itemObj,
checked: true
};
const meun = menuButtonInfo();
this.top = meun.height + meun.top;
await this.getRoomList()
await this.getInfo()
},
itemObj: '', methods: {
}; headerConfirmClick(item) {
}, this.defaultName = {
async onLoad(options) { ...item,
if (options.item) { checked: true
this.itemObj = JSON.parse(decodeURIComponent(options.item)); };
this.defaultName = { this.show = false;
...this.itemObj, this.getInfo()
checked: true, },
}; //
} else { headerSwitchClick() {
this.defaultName = { this.show = true;
...this.houseList[0], const newRes = this.roomList.map(item => {
checked: true, if (item.name === this.defaultName.name) {
}; return {
} ...item,
console.log(this.itemObj) checked: true
const meun = menuButtonInfo(); }
this.top = meun.height + meun.top; }
await this.getRoomList(); return {
await this.getInfo(); ...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() { // this.defaultName = res.rows[0]
this.show = true; })
const newRes = this.roomList.map((item) => { },
if (item.name === this.defaultName.name) { async getInfo(){
return { await request(apiArr.getGovernmentByRoom,"POST",{
...item, room_id:this.defaultName.room_id
checked: true, }).then(res=>{
}; res.owners.forEach(item => {
} item.popupShow = false
return { });
...item, this.list = res
checked: false, })
}; },
}); goPay(){
console.log("newResnewRes", newRes); NavgateTo("../propertyPayment/index")
this.houseList = newRes; }
}, },
// }
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;
if (!this.itemObj) {
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>