Compare commits

..

No commits in common. "75f55007b26601cadc2ce1430899e11a2c513ef8" and "485145d706af29a204081c436d40516cc0a65e23" have entirely different histories.

6 changed files with 600 additions and 781 deletions

View File

@ -1,169 +1,153 @@
<template> <template>
<view class="container"> <view class="container">
<div class="line"></div> <div class="line"></div>
<view class="main"> <view class="main">
<view class="table"> <view class="table">
<view class="label">房产</view> <view class="label">房产</view>
<view class="flexBox" @click="choseCommunity"> <view class="flexBox" @click="choseCommunity">
<input <input type="text" v-model="changeComm" disabled placeholder="请选择房产">
type="text" <u-icon name="arrow-right"></u-icon>
v-model="changeComm" </view>
disabled </view>
placeholder="请选择房产" <view class="table">
/> <view class="label">姓名</view>
<u-icon name="arrow-right"></u-icon> <input type="text" v-model="nameVal" placeholder="请输入姓名">
</view> </view>
</view> <view class="table">
<view class="table"> <view class="label">手机</view>
<view class="label">姓名</view> <input type="text" v-model="phoneVal" placeholder="请输入手机号">
<input type="text" v-model="nameVal" placeholder="请输入姓名" /> </view>
</view> <view class="table">
<view class="table"> <view class="label">身份</view>
<view class="label">手机</view>
<input type="text" v-model="phoneVal" placeholder="请输入手机号" />
</view>
<view class="table">
<view class="label">身份</view>
<view class="flexBox" @click="chooseIdentity"> <view class="flexBox" @click="chooseIdentity">
<input <input type="number" v-model="selectedLabel" disabled placeholder="请选择身份">
type="number" <u-icon name="arrow-right"></u-icon>
v-model="selectedLabel" </view>
disabled
placeholder="请选择身份" </view>
/> <!-- <view class="tip">
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<!-- <view class="tip">
注意业主为在物业登记在册的人员需经过物业审 核确认后即可成为该房产的业主如需帮助可与物 业或平台联系 注意业主为在物业登记在册的人员需经过物业审 核确认后即可成为该房产的业主如需帮助可与物 业或平台联系
</view> --> </view> -->
</view> </view>
<view class="btn" @click="headerSubmitClick">确定</view> <view class="btn" @click="headerSubmitClick">确定</view>
<u-popup <u-popup :show="show" @close="close" mode="bottom" customStyle="width: 500rpx;" round="20rpx">
:show="show" <u-picker :show="show" :columns="columns" keyName="label" @cancel="close" @confirm="confirm"></u-picker>
@close="close" </u-popup>
mode="bottom" </view>
customStyle="width: 500rpx;"
round="20rpx"
>
<u-picker
:show="show"
:columns="columns"
keyName="label"
@cancel="close"
@confirm="confirm"
></u-picker>
</u-popup>
</view>
</template> </template>
<script> <script>
import { request, NavgateTo, isPhone } from "../../../utils"; import {
import { apiArr } from "../../../api/community"; request,
export default { NavgateTo,
onBackPress(options) { isPhone
console.log("from:" + options.from); } from '../../../utils';
}, import {
data() { apiArr
return { } from '../../../api/community';
communityId: "", export default {
roomId: "", onBackPress(options) {
managementMobile: "", console.log('from:' + options.from)
show: false, },
changeComm: "", data() {
columns: [ return {
[ communityId: '',
{ roomId: '',
label: "业主", managementMobile: '',
value: "1", show: false,
}, changeComm: '',
{ columns: [
label: "家属", [{
value: "2", label: "业主",
}, value: "1"
{ },
label: "租客", {
value: "3", label: "家属",
}, value: "2"
{ },
label: "访客", {
value: "4", label: "租客",
}, value: "3"
], },
], {
selectedValue: "", label: "访客",
selectedLabel: "", value: "4"
nameVal: "", },
phoneVal: "", ]
}; ],
}, selectedValue: '',
methods: { selectedLabel: '',
close() { nameVal: '',
this.show = false; phoneVal: '',
}, }
chooseIdentity() { },
this.show = true; methods: {
console.log(); close() {
}, this.show = false
confirm(selected) { },
console.log(selected.value[0].value); chooseIdentity() {
this.selectedValue = selected.value[0].value; this.show = true
this.selectedLabel = selected.value[0].label; console.log()
this.show = false; },
}, confirm(selected) {
headerCloseClick() { console.log(selected.value[0].value)
this.show = false; this.selectedValue = selected.value[0].value
}, this.selectedLabel = selected.value[0].label
this.show = false
},
headerCloseClick() {
this.show = false;
},
headerInputClick(e) { headerInputClick(e) {
const { name } = e.currentTarget.dataset; const {
const { value } = e.detail; name
this[name] = value; } = e.currentTarget.dataset;
}, const {
async headerSubmitClick() { value
await request(apiArr.create, "POST", { } = e.detail;
community_id: parseInt(this.communityId), this[name] = value;
room_id: parseInt(this.roomId), },
user_id: uni.getStorageSync("userId"), async headerSubmitClick() {
name: this.nameVal, // await request(apiArr.create, "POST", {
mobile: this.phoneVal, // community_id: parseInt(this.communityId),
type: parseInt(this.selectedValue), // room_id: parseInt(this.roomId),
id_type: 1, user_id: uni.getStorageSync('userId'),
}).then((res) => { name: this.nameVal, //
console.log(res); mobile: this.phoneVal, //
uni.showToast({ type: parseInt(this.selectedValue), //
title: "提交成功请等待物业审核!", id_type: 1
icon: "none", }).then(res => {
duration: 1500, console.log(res)
}); uni.showToast({
// title: '创建成功',
setTimeout(() => { icon: "none",
NavgateTo("/packages/community/myCommunity/index"); duration: 2000
}, 1500); });
}); NavgateTo("/packages/community/myCommunity/index")
}, })
choseCommunity() { },
NavgateTo("/packages/community/choseCommunity/index"); choseCommunity() {
}, NavgateTo("/packages/community/choseCommunity/index")
}, },
onLoad(options) { },
console.log("接收到的参数:", options);
this.communityId = options.community_id
? decodeURIComponent(options.community_id)
: "";
this.roomId = options.room_id ? decodeURIComponent(options.room_id) : "";
this.changeComm = options.changeVal
? decodeURIComponent(options.changeVal)
: "";
},
onReachBottom() {}, onLoad(options) {
}; console.log("接收到的参数:", options);
this.communityId = options.community_id ? decodeURIComponent(options.community_id) : ''
this.roomId = options.room_id ? decodeURIComponent(options.room_id) : ''
this.changeComm = options.changeVal ? decodeURIComponent(options.changeVal) : ''
},
onReachBottom() {
},
}
</script> </script>
<style> <style>
@import url("./index.css"); @import url("./index.css");
</style> </style>

View File

@ -1,57 +1,39 @@
<template> <template>
<div class="container"> <div class="container">
<div class="currentAdd"> <div class="currentAdd">
<div class="currentAdd_left">{{ city.region }}</div> <div class="currentAdd_left">{{city.region}}</div>
<div class="currentAdd_right" @click="changeAddress"> <div class="currentAdd_right" @click="changeAddress">
切换城市 切换城市
<image <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_choseAddress.png"></image>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_choseAddress.png" </div>
></image> </div>
</div>
</div>
<div class="communityBox" v-if="step == 1"> <div class="communityBox" v-if="step == 1">
<div class="search"> <div class="search">
<input <input type="text" placeholder="请输入小区名称" v-model="communityName">
type="text" <image @click="searchByName" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image>
placeholder="请输入小区名称" </div>
v-model="communityName"
/>
<image
@click="searchByName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
></image>
</div>
<!-- @click="chooseCommunity(item)" --> <!-- @click="chooseCommunity(item)" -->
<div class="communityList"> <div class="communityList">
<div <div class="communityItem" v-for="item in communityList" :key="item.community_id" @click="nextStep(item)">
class="communityItem" <div class="communityItem_left">
v-for="item in communityList" <div class="communityItem_tit">{{item.name}}</div>
:key="item.community_id" <div class="communityItem_address">{{item.addr}}</div>
@click="nextStep(item)" </div>
> <div class="communityItem_right">
<div class="communityItem_left"> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communityMore.png"></image>
<div class="communityItem_tit">{{ item.name }}</div> </div>
<div class="communityItem_address">{{ item.addr }}</div> </div>
</div> </div>
<div class="communityItem_right">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communityMore.png"
></image>
</div>
</div>
</div>
<div class="empty" v-if="communityList.length == 0"> <div class="empty" v-if="communityList.length == 0">
<image <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png" <span>未找到相关信息的小区</span>
></image> </div>
<span>未找到相关信息的小区</span> </div>
</div>
</div>
<!-- <div class="communityBox" v-if="step == 2"> <!-- <div class="communityBox" v-if="step == 2">
<div class="search"> <div class="search">
<input type="text" placeholder="请输入楼栋名称"> <input type="text" placeholder="请输入楼栋名称">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image>
@ -69,285 +51,235 @@
</div> </div>
</div> --> </div> -->
<div class="communityBox" v-if="step == 2"> <div class="communityBox" v-if="step == 2">
<div class="search"> <div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入楼栋名称" /> <input v-model="searchQuery" type="text" placeholder="请输入楼栋名称">
<image <image @click="searchName" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image>
@click="searchName" </div>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
></image>
</div>
<div class="floorList"> <div class="floorList">
<div <div @click="nextStep(item)" class="floorItem" v-for="(item, index) in filteredFloorsList" :key="index">
@click="nextStep(item, index)" {{ item.label }}
:class="{ active: index === selectedFloorIndex }" </div>
class="floorItem" </div>
v-for="(item, index) in filteredFloorsList"
:key="index"
>
{{ item.label }}
</div>
</div>
<div class="empty" v-if="filteredFloorsList.length === 0"> <div class="empty" v-if="filteredFloorsList.length === 0">
<image <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png" <span>未找到相关信息的楼栋</span>
></image> </div>
<span>未找到相关信息的楼栋</span> </div>
</div>
</div>
<div class="communityBox" v-if="step == 3"> <div class="communityBox" v-if="step == 3">
<div class="search"> <div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入楼层名称" /> <input v-model="searchQuery" type="text" placeholder="请输入楼层名称">
<image <image @click="searchName" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image>
@click="searchName" </div>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
></image>
</div>
<div class="roomList"> <div class="roomList">
<!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> --> <!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> -->
<div <div @click="nextStep(item)" class="roomItem" v-for="(item,index) in filteredFloorsList" :key="index">
@click="nextStep(item, index, 'room')" {{item.label}}
:class="{ active2: index === selectedRoomIndex }" </div>
class="roomItem" </div>
v-for="(item, index) in filteredFloorsList"
:key="index"
>
{{ item.label }}
</div>
</div>
<div class="empty" v-if="filteredFloorsList.length === 0"> <div class="empty" v-if="filteredFloorsList.length === 0">
<image <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png" <span>未找到相关信息的楼层</span>
></image> </div>
<span>未找到相关信息的楼层</span> </div>
</div>
</div>
<div class="communityBox" v-if="step == 4"> <div class="communityBox" v-if="step == 4">
<div class="search"> <div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入房间名称" /> <input v-model="searchQuery" type="text" placeholder="请输入房间名称">
<image <image @click="searchName" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image>
@click="searchName" </div>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
></image>
</div>
<div class="roomList"> <div class="roomList">
<!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> --> <!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> -->
<div <div @click="nextStep(item)" class="roomItem" v-for="(item,index) in filteredFloorsList" :key="index">
@click="nextStep(item, index, 'room')" {{item.label}}
:class="{ active2: index === selectedRoomIndex }" </div>
class="roomItem" </div>
v-for="(item, index) in filteredFloorsList"
:key="index"
>
{{ item.label }}
</div>
</div>
<div class="empty" v-if="filteredFloorsList.length === 0"> <div class="empty" v-if="filteredFloorsList.length === 0">
<image <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png" <span>未找到相关信息的房间</span>
></image> </div>
<span>未找到相关信息的房间</span> </div>
</div>
</div>
<areaPopup :show="show" @selectArea="selectArea" @close="close"></areaPopup>
<div class="dialogBox" v-if="dialogBoxShow"> <areaPopup :show="show" @selectArea="selectArea" @close="close"></areaPopup>
<div class="dialogBoxCon">
<div class="dialogBoxCon1">确认选择</div> <div class="dialogBox" v-if="dialogBoxShow">
<div class="dialogBoxCon2">{{ cName }}</div> <div class="dialogBoxCon">
<div class="dialogBoxCon3">{{ facilityName + fName + rName }}</div> <div class="dialogBoxCon1">确认选择</div>
<div class="dialogBoxConBtnList"> <div class="dialogBoxCon2">{{cName}}</div>
<div class="dialogBoxConBtnItem1" @click="dialogBoxShow = false"> <div class="dialogBoxCon3">{{facilityName + fName + rName}}</div>
取消 <div class="dialogBoxConBtnList">
</div> <div class="dialogBoxConBtnItem1" @click="dialogBoxShow = false">取消</div>
<div class="dialogBoxConBtnItem2" @click="confirmComm">确定</div> <div class="dialogBoxConBtnItem2" @click="confirmComm">确定</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { apiArr } from "../../../api/community"; import {
import { apiArr
request, } from '../../../api/community';
picUrl, import {
uniqueByField, request,
menuButtonInfo, picUrl,
NavgateTo, uniqueByField,
} from "../../../utils"; menuButtonInfo,
NavgateTo
} from '../../../utils';
export default { export default {
data() { data() {
return { return {
selectedFloorIndex: -1, show: false,
selectedRoomIndex: -1, step: "1",
show: false, communityName: '',
step: "1", cName: '',
communityName: "", fName: '',
cName: "", communityId: '',
fName: "", communityList: [],
communityId: "", facilityName: '',
communityList: [], // foloorList: [],
facilityName: "", // floorsList: [],
// foloorList: [], rName: '',
// floorsList: [], roomId: '',
rName: "", // roomList: [],
roomId: "", page_num: 1,
// roomList: [], page_size: 10,
page_num: 1, dialogBoxShow: false,
page_size: 10, searchQuery: '',
dialogBoxShow: false, filteredFloorsList: [],
searchQuery: "", searchList: [],
filteredFloorsList: [], city: uni.getStorageSync('location'),
searchList: [], currentCommunity:""
city: uni.getStorageSync("location"), }
currentCommunity: "", },
}; methods: {
}, changeAddress() {
methods: { this.show = true
changeAddress() { },
this.show = true; close() {
}, this.show = false
close() { },
this.show = false; selectArea(val) {
}, console.log(val);
selectArea(val) { this.city = {
console.log(val); region: val.confirmDist.ad_name.split(',').join(''),
this.city = { ...val.confirmDist
region: val.confirmDist.ad_name.split(",").join(""), }
...val.confirmDist, this.searchByName();
}; this.show = false
this.searchByName(); },
this.show = false; async searchByName() {
}, console.log(this.communityName,'zzz')
async searchByName() { await request(apiArr.getAllList, "POST", {
console.log(this.communityName, "zzz"); community_id: '',
await request(apiArr.getAllList, "POST", { name: this.communityName,
community_id: "", comm_code: '',
name: this.communityName, ad_code: this.city.ad_code ? this.city.ad_code : uni.getStorageSync('ad_code'),
comm_code: "", page_num: this.page_num,
ad_code: this.city.ad_code page_size: this.page_size
? this.city.ad_code }).then(res => {
: uni.getStorageSync("ad_code"), console.log(res.rows)
page_num: this.page_num, this.communityList = res.rows
page_size: this.page_size, })
}).then((res) => { },
console.log(res.rows); async nextStep(item) {
this.communityList = res.rows; this.communityId = item.community_id ? item.community_id : this.communityId;
}); this.facilityName = this.facilityName ? this.facilityName : item.label;
}, this.fName = this.step == 4 ? this.fName : (this.facilityName ? item.label : '')
async nextStep(item, index, type = "") { await request(apiArr.commRoomSelect, "POST", {
if (type === "room") { community_ids: item.community_id ? item.community_id : this.communityId,
this.selectedRoomIndex = index; facility_names: this.facilityName,
} else { floors: this.facilityName ? (this.facilityName == this.fName ? '' : item.label) : '',
this.selectedFloorIndex = index; }).then(res => {
} this.filteredFloorsList = this.step == 4 ? this.filteredFloorsList : res.rows
this.communityId = item.community_id this.searchList = res.rows
? item.community_id this.searchQuery = ''
: this.communityId; if (this.step == '1') {
this.facilityName = this.facilityName ? this.facilityName : item.label; this.step = '2';
this.fName = this.cName = item.name;
this.step == 4 ? this.fName : this.facilityName ? item.label : ""; // this.foloorList = res.rows
await request(apiArr.commRoomSelect, "POST", { } else if (this.step == '2') {
community_ids: item.community_id ? item.community_id : this.communityId, this.step = '3';
facility_names: this.facilityName, // this.floorsList = res.rows
floors: this.facilityName } else if (this.step == '3') {
? this.facilityName == this.fName console.log(item.label);
? "" this.fName = item.label;
: item.label // this.roomList = res.rows
: "", this.step = '4';
}).then((res) => { } else {
this.filteredFloorsList = this.dialogBoxShow = true;
this.step == 4 ? this.filteredFloorsList : res.rows; this.rName = item.label
this.searchList = res.rows; this.romId = item.value
this.searchQuery = ""; }
if (this.step == "1") { })
this.step = "2"; },
this.cName = item.name; searchName() {
// this.foloorList = res.rows //
} else if (this.step == "2") { this.filteredFloorsList = this.searchList.filter(item =>
this.step = "3"; item.label.includes(this.searchQuery)
// this.floorsList = res.rows );
} else if (this.step == "3") { },
console.log(item.label); confirmComm() {
this.fName = item.label; const params = {
// this.roomList = res.rows changeVal: `${this.cName}${this.facilityName}${this.fName}${this.rName}`,
this.step = "4"; community_id: this.communityId,
} else { room_id: this.romId
this.dialogBoxShow = true; };
this.rName = item.label; console.log(params)
this.romId = item.value; //
} function createQueryString(params) {
}); return Object.keys(params)
}, .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
searchName() { .join('&');
// }
this.filteredFloorsList = this.searchList.filter((item) =>
item.label.includes(this.searchQuery)
);
},
confirmComm() {
const params = {
changeVal: `${this.cName}${this.facilityName}${this.fName}${this.rName}`,
community_id: this.communityId,
room_id: this.romId,
};
console.log(params);
//
function createQueryString(params) {
return Object.keys(params)
.map(
(key) =>
`${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`
)
.join("&");
}
// //
const targetPath = "/packages/community/addCommunity/index"; const targetPath = "/packages/community/addCommunity/index";
const queryString = createQueryString(params); const queryString = createQueryString(params);
const fullPath = `${targetPath}?${queryString}`; const fullPath = `${targetPath}?${queryString}`;
// //
NavgateTo(fullPath); NavgateTo(fullPath);
}, },
// //
chooseCommunity(e) { chooseCommunity(e){
this.currentCommunity = e; this.currentCommunity = e
this.getRoomSelect()
},
//
getRoomSelect(){
request(apiArr.commRoomSelect,"POST",{
community_ids:this.currentCommunity.community_id,
}).then(res=>{
console.log(res);
this.step = 2
})
},
},
this.getRoomSelect(); onLoad(options) {
}, const meun = menuButtonInfo();
// this.searchByName()
getRoomSelect() { },
request(apiArr.commRoomSelect, "POST", {
community_ids: this.currentCommunity.community_id,
}).then((res) => {
console.log(res);
this.step = 2;
});
},
},
onLoad(options) { onReachBottom() {
const meun = menuButtonInfo();
this.searchByName();
},
onReachBottom() {}, },
}; }
</script> </script>
<style> <style>
@import url("./index.css"); @import url("./index.css");
</style> </style>

View File

@ -104,10 +104,6 @@ image {
margin: 0 5rpx; margin: 0 5rpx;
} }
.swiperBox2_img{
border-radius: 20rpx 20rpx 0 0;
}
.active { .active {
width: 26rpx; width: 26rpx;
} }
@ -189,10 +185,6 @@ image {
transform: translateX(-50%); transform: translateX(-50%);
} }
.newsList{
margin-bottom: 100rpx;
}
.newsItem { .newsItem {
display: flex; display: flex;
align-items: center; align-items: center;
@ -315,8 +307,4 @@ image {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
}
.grid_Text{
font-size: 24rpx;
} }

View File

@ -50,7 +50,7 @@
:key="index" :key="index"
@click="headerServerClick(item)" @click="headerServerClick(item)"
> >
<image :src="item.ad_picture" mode="aspectFill" class="swiperBox2_img"/> <image :src="item.ad_picture" mode="aspectFill" />
</swiper-item> </swiper-item>
</swiper> </swiper>
</div> </div>
@ -70,7 +70,7 @@
:key="index" :key="index"
> >
<image class="grid_Pic" :src="item.nav_icon" mode=""></image> <image class="grid_Pic" :src="item.nav_icon" mode=""></image>
<text class="grid_Text">{{ item.nav_name }}</text> <text>{{ item.nav_name }}</text>
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
@ -501,7 +501,6 @@ export default {
}, },
async selectTab(index, item) { async selectTab(index, item) {
console.log("🚀 ~ selectTab ~ item:", item)
const isTabChange = this.selectedTab !== index; const isTabChange = this.selectedTab !== index;
if (isTabChange) { if (isTabChange) {
this.page_num = 1; this.page_num = 1;
@ -509,6 +508,7 @@ export default {
// this.loadMoreText = "1030"; // this.loadMoreText = "1030";
} }
this.selectedTab = index; this.selectedTab = index;
console.log("选中的tab:", index);
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,

View File

@ -1,305 +1,238 @@
<template> <template>
<div class="container"> <div class="container">
<div <div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
class="searchBox" <div class="searchBox_add">
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }" <u-icon bold color="#000" size="40" name="arrow-left" @click="back"></u-icon>
> </div>
<div class="searchBox_add"> </div>
<u-icon
bold
color="#000"
size="40"
name="arrow-left"
@click="back"
></u-icon>
</div>
</div>
<div class="community"> <div class="community">
<div class="community_left"> <div class="community_left">
<image <image mode="aspectFill"
mode="aspectFill" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/test.png" alt="" />
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/test.png" </div>
alt="" <div class="community_right" @click="changeShow">
/> <div class="community_right_text">
</div> <div class="community_right_text1">{{ currentRoom.name }}</div>
<div class="community_right" @click="changeShow"> <div class="community_right_text2">{{ currentCommunityAddr }}</div>
<div class="community_right_text"> </div>
<div class="community_right_text1">{{ currentRoom.name }}</div> <div class="community_right_more">
<div class="community_right_text2">{{ currentCommunityAddr }}</div> <u-icon bold color="#999999" size="30" name="arrow-right" @click="back"></u-icon>
</div> </div>
<div class="community_right_more"> </div>
<u-icon bold color="#999999" size="30" name="arrow-right"></u-icon> </div>
</div>
</div>
</div>
<div class="tabList"> <div class="tabList">
<div <div class="tabItem" :class="active == 0 ? 'active' : ''" @click="changeTab(0)">账单</div>
class="tabItem" <div class="line"></div>
:class="active == 0 ? 'active' : ''" <div class="tabItem" :class="active == 1 ? 'active' : ''" @click="changeTab(1)">缴费记录</div>
@click="changeTab(0)" </div>
>
账单
</div>
<div class="line"></div>
<div
class="tabItem"
:class="active == 1 ? 'active' : ''"
@click="changeTab(1)"
>
缴费记录
</div>
</div>
<div class="homeMoney" v-if="active == 0"> <div class="homeMoney" v-if="active == 0">
<div class="homeMoney_box"> <div class="homeMoney_box">
<div class="homeMoney_box_left"> <div class="homeMoney_box_left">
<div class="homeMoney_box_left1">物业公积金</div> <div class="homeMoney_box_left1">物业公积金</div>
<div class="homeMoney_box_left2">可抵扣账户金额</div> <div class="homeMoney_box_left2">可抵扣账户金额</div>
</div> </div>
<div class="homeMoney_box_right"> <div class="homeMoney_box_right">
<div class="homeMoney_box_right1"> <div class="homeMoney_box_right1"><span></span>{{ balanceMoney }}</div>
<span></span>{{ balanceMoney }} <div class="homeMoney_box_right2" @click="more">
</div> 查看详情
<div class="homeMoney_box_right2" @click="more"> <div style="margin-left: 12rpx;">
查看详情 <u-icon bold color="#894B11" size="30" name="arrow-right" ></u-icon>
<div style="margin-left: 12rpx"> </div>
<u-icon </div>
bold </div>
color="#894B11" </div>
size="30" </div>
name="arrow-right"
></u-icon>
</div>
</div>
</div>
</div>
</div>
<div class="payList" v-if="active == 0"> <div class="payList" v-if="active == 0">
<div class="payItem" v-for="(item, index) in Bill" :key="index"> <div class="payItem" v-for="(item, index) in Bill" :key="index">
<div class="payItem_tit"> <div class="payItem_tit">
<div class="payItem_left"> <div class="payItem_left">
<checkbox <checkbox :checked="item.check" @click="checkChange(item, index)"></checkbox>
:checked="item.check" <div style="margin-left: 24rpx;">{{ item.order_date }}</div>
@click="checkChange(item, index)" </div>
></checkbox> <div class="payItem_right">
<div style="margin-left: 24rpx">{{ item.order_date }}</div> <span></span>
</div> {{ item.unpaid_amount }}
<div class="payItem_right"> <p>未缴</p>
<span></span>
{{ item.unpaid_amount }}
<p>未缴</p>
<div style="margin-left: 40rpx" @click="changeCheck(item, index)"> <div style="margin-left: 40rpx;" @click="changeCheck(item, index)">
<u-icon <u-icon bold color="#894B11" size="30" name="arrow-down" v-if="!item.more"></u-icon>
bold <u-icon bold color="#894B11" size="30" name="arrow-up" v-if="item.more"></u-icon>
color="#894B11" </div>
size="30" </div>
name="arrow-down" </div>
v-if="!item.more" <div class="payItem_List" v-for="(items, indes) in item.community_order_rows" v-if="item.more"
></u-icon> :key="items.order_id">
<u-icon <checkbox :checked="items.check" @click="itemsCheckChange(items, indes, index)"></checkbox>
bold <div class="Item_time" v-if="items.billing_cycle == 1">{{ items.order_date }}</div>
color="#894B11" <div class="Item_time" v-if="items.billing_cycle == 2">{{ items.order_datetime }}</div>
size="30" <div class="Item_type">{{ items.community_fee_type.type_name }}</div>
name="arrow-up" <div class="Item_money">{{ items.money }}</div>
v-if="item.more" <div class="Item_status" v-if="items.status == 0">未付款</div>
></u-icon> <div class="Item_status sucess" v-if="items.status == 1">已付款</div>
</div> </div>
</div> </div>
</div> </div>
<div v-if="item.more">
<div
class="payItem_List"
v-for="(items, indes) in item.community_order_rows"
:key="items.order_id"
>
<checkbox
:checked="items.check"
@click="itemsCheckChange(items, indes, index)"
></checkbox>
<div class="Item_time" v-if="items.billing_cycle == 1">
{{ items.order_date }}
</div>
<div class="Item_time" v-if="items.billing_cycle == 2">
{{ items.order_datetime }}
</div>
<div class="Item_type">
{{ items.community_fee_type.type_name }}
</div>
<div class="Item_money">{{ items.money }}</div>
<div class="Item_status" v-if="items.status == 0">未付款</div>
<div class="Item_status sucess" v-if="items.status == 1">
已付款
</div>
</div>
</div>
</div>
</div>
<!-- 选择支付类型 --> <!-- 选择支付类型 -->
<div class="payTypeList" v-if="active == 0"> <div class="payTypeList" v-if="active == 0">
<div class="PayTypeItem"> <div class="PayTypeItem">
<div class="PayTypeItem_left"> <div class="PayTypeItem_left">
<div class="PayTypeItem_img"> <div class="PayTypeItem_img">
<image <image mode="aspectFill"
mode="aspectFill" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png" alt="" />
alt="" </div>
/> <div class="PayTypeItem_con">
</div> <div class="PayTypeItem_con_tit">微信支付</div>
<div class="PayTypeItem_con"> <div class="PayTypeItem_con_msg">单笔支付限额10000.00</div>
<div class="PayTypeItem_con_tit">微信支付</div> </div>
<div class="PayTypeItem_con_msg">单笔支付限额10000.00</div> </div>
</div>
</div>
<div class="PayTypeItem_right"> <div class="PayTypeItem_right">
<radio :checked="payType == 1" @click="changePayType(1)"></radio> <radio :checked="payType == 1" @click="changePayType(1)"></radio>
</div> </div>
</div> </div>
<div class="line3"></div> <div class="line3"></div>
<div class="PayTypeItem"> <div class="PayTypeItem">
<div class="PayTypeItem_left"> <div class="PayTypeItem_left">
<div class="PayTypeItem_img"> <div class="PayTypeItem_img">
<image <image mode="aspectFill"
mode="aspectFill" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_homeMoney.png"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_homeMoney.png" alt="" />
alt="" </div>
/> <div class="PayTypeItem_con">
</div> <div class="PayTypeItem_con_tit">物业公积金支付</div>
<div class="PayTypeItem_con"> <div class="PayTypeItem_con_msg">单笔支付限额10000.00</div>
<div class="PayTypeItem_con_tit">物业公积金支付</div> </div>
<div class="PayTypeItem_con_msg">单笔支付限额10000.00</div> </div>
</div>
</div>
<div class="PayTypeItem_right"> <div class="PayTypeItem_right">
<radio :checked="payType == 2" @click="changePayType(2)"></radio> <radio :checked="payType == 2" @click="changePayType(2)"></radio>
</div> </div>
</div> </div>
</div> </div>
<div class="bottom" v-if="active == 0"> <div class="bottom" v-if="active == 0">
<div class="bottom_left"> <div class="bottom_left">
<span>合计</span> <span>合计</span>
<p></p> <p></p>
{{ currentMoney }} {{ currentMoney }}
</div> </div>
<div class="bottom_right" @click="OrderPay">立即支付</div> <div class="bottom_right" @click="OrderPay">
</div> 立即支付
</div>
</div>
<div class="payHisList" v-if="active == 1">
<div class="payHisItem" v-for="item in payOrderList" :key="item.id">
<div class="row">
<div class="row_label">缴费金额</div>
<div class="row_con1">{{ item.money }}</div>
</div>
<div class="row">
<div class="row_label2"></div>
<div class="row_con2">{{ item.pay_time }}支付</div>
</div>
<div class="line4"></div>
<div class="row">
<div class="row_label">绑定房源</div>
<div class="row_con3">
<div class="row_con3_1">
{{ item.community_order.length }}个账单
</div>
<div class="row_con3_2">明细可从收据查看</div>
</div>
</div>
<div class="row"> <div class="payHisList" v-if="active == 1">
<div class="row_label">应缴费金额</div> <div class="payHisItem" v-for="item in payOrderList" :key="item.id">
<div class="row_con4">{{ item.money }}</div> <div class="row">
</div> <div class="row_label">缴费金额</div>
<div class="row_con1">{{ item.money }}</div>
</div>
<div class="row">
<div class="row_label2"></div>
<div class="row_con2">{{ item.pay_time }}支付</div>
</div>
<div class="line4"></div>
<div class="row">
<div class="row_label">绑定房源</div>
<div class="row_con3">
<div class="row_con3_1">{{ item.community_order.length }}个账单</div>
<div class="row_con3_2">明细可从收据查看</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="row_label">物业费公积金抵扣金额</div> <div class="row_label">应缴费金额</div>
<div class="row_con4">-{{ item.reduction_money }}</div> <div class="row_con4">{{ item.money }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="row_label">缴费单号</div> <div class="row_label">物业费公积金抵扣金额</div>
<div class="row_con4">{{ item.order_pay_no }}</div> <div class="row_con4">-{{ item.reduction_money }}</div>
</div> </div>
<div class="line4"></div>
<div class="Receipt">收据</div>
</div>
</div>
<div class="boxshadow" v-if="show" @click="changeShow"> <div class="row">
<div class="boxshadowCon"> <div class="row_label">缴费单号</div>
<div class="boxshadowCon_Tit"> <div class="row_con4">{{ item.order_pay_no }} </div>
选择房源 </div>
<div class="cancel">取消</div> <div class="line4"></div>
</div> <div class="Receipt">收据</div>
<div class="lines"></div>
<div class="communityList" v-if="roomList.length > 0">
<div
class="communityItem"
v-for="item in roomList"
:key="item.room_id"
@click="selectRoom(item)"
>
<div class="communityItem_text">
{{ item.facility_name }}{{ item.floor }} {{ item.number }}
</div>
<div class="communityItem_radio">
<radio :checked="selectedRoomId === item.room_id"></radio>
</div>
</div>
</div>
<div class="communityList" v-else>
<div class="communityItem">
<div class="communityItem_text">暂无房源</div>
</div>
</div>
</div>
</div>
<div class="boxshadow" v-if="show2" @click="changeShow2"> </div>
<div class="boxshadowCon"> </div>
<div class="boxshadowCon_Tit">
付款总金额
<div class="cancel">取消</div>
</div>
<div class="boxshadowCon_subTit"><span></span>4900.00</div>
<div class="lines"></div>
<div class="BanlenceList">
<div class="banlenceItem">
<div class="banlenceItem_left">
<image
mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png"
alt=""
/>
微信支付
</div>
<div class="banlenceItem_right"><span></span>4900.00</div>
</div>
<div class="line3"></div>
<div class="banlenceItem">
<div class="banlenceItem_left">
<image
mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_homeMoney.png"
alt=""
/>
物业公积金支付
</div>
<div class="banlenceItem_right"><span></span>4900.00</div>
</div>
</div>
<div class="btn">物业公积金+微信支付 <span></span>4900.00</div> <div class="boxshadow" v-if="show" @click="changeShow">
</div> <div class="boxshadowCon">
</div> <div class="boxshadowCon_Tit">
</div> 选择房源
<div class="cancel">取消</div>
</div>
<div class="lines"></div>
<div class="communityList">
<div class="communityItem" v-for="item in roomList" :key="item.room_id">
<div class="communityItem_text">{{ item.facility_name }}{{ item.floor }} {{ item.number }}</div>
<div class="communityItem_radio">
<radio></radio>
</div>
</div>
</div>
</div>
</div>
<div class="boxshadow" v-if="show2" @click="changeShow2">
<div class="boxshadowCon">
<div class="boxshadowCon_Tit">
付款总金额
<div class="cancel">取消</div>
</div>
<div class="boxshadowCon_subTit">
<span></span>4900.00
</div>
<div class="lines"></div>
<div class="BanlenceList">
<div class="banlenceItem">
<div class="banlenceItem_left">
<image mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png"
alt="" />
微信支付
</div>
<div class="banlenceItem_right">
<span></span>4900.00
</div>
</div>
<div class="line3"></div>
<div class="banlenceItem">
<div class="banlenceItem_left">
<image mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_homeMoney.png"
alt="" />
物业公积金支付
</div>
<div class="banlenceItem_right">
<span></span>4900.00
</div>
</div>
</div>
<div class="btn">
物业公积金+微信支付 <span></span>4900.00
</div>
</div>
</div>
</div>
</template> </template>
<script> <script>
@ -326,7 +259,6 @@ export default {
show2: false, show2: false,
roomList: [], roomList: [],
currentRoom: {}, currentRoom: {},
selectedRoomId: '', // ID
currentCommunity: "", // currentCommunity: "", //
currentCommunityAddr: "", // currentCommunityAddr: "", //
Bill: "", // Bill: "", //
@ -382,24 +314,11 @@ export default {
}).then(res => { }).then(res => {
this.roomList = res.rows this.roomList = res.rows
this.currentRoom = this.roomList[0] this.currentRoom = this.roomList[0]
this.selectedRoomId = this.currentRoom.room_id
this.getOrderList() this.getOrderList()
}) })
}, },
//
selectRoom(item){
// ID
this.selectedRoomId = item.room_id;
//
console.log('选中的房源数据:', item);
this.currentRoom = item;
this.getOrderList()
},
// //
async getUserGovenmentMoney() { async getUserGovenmentMoney() {
request(apiArr.getUserGovenmentMoney, "POST", {}).then(res => { request(apiArr.getUserGovenmentMoney, "POST", {}).then(res => {

View File

@ -25,10 +25,10 @@
<view class="desc" v-if="item.type == 3">租户</view> <view class="desc" v-if="item.type == 3">租户</view>
<view class="desc" v-if="item.type == 4">访客</view> <view class="desc" v-if="item.type == 4">访客</view>
</view> </view>
<!-- <view class="item"> <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>
@ -46,7 +46,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btn" @click="goPay">去抵扣物业账单</view> <view class="btn">去抵扣物业账单</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">
@ -84,7 +84,6 @@ import {
picUrl, picUrl,
uniqueByField, uniqueByField,
menuButtonInfo, menuButtonInfo,
NavgateTo
} from '../../../utils'; } from '../../../utils';
import { apiArr } from '../../../api/v2Community'; import { apiArr } from '../../../api/v2Community';
@ -178,9 +177,6 @@ export default {
this.list = res this.list = res
}) })
}, },
goPay(){
NavgateTo("../propertyPayment/index")
}
}, },
} }
</script> </script>