huangmp 4 年之前
父節點
當前提交
7a8973f308

+ 8 - 4
assets/http/api.js

@@ -33,9 +33,7 @@ const openDoor = p => http.post("/community-app-service/app/member/openDoor", p)
 
 const getResidentialListByMember = p => http.post('/community-app-service/app/residential/getResidentialListByMember',
 	p)
-
-
-
+	
 const feedback = p => http.post("/community-app-service/app/feedback/submit", p)
 
 //获取地理位置
@@ -77,6 +75,11 @@ const hasMember = p => http.post('/community-app-service/app/houseuser/hasMember
 //绑定家人
 const bindRoom = (p, q) => http.post('/community-app-service/app/houseuser/bindRoom?memberId=' + p, q)
 
+//房间
+const room={
+	list:(p) => http.post('/community-app-service/app/room/list', p)
+}
+
 //删除家人
 const deleteUserById = p => http.post('/community-app-service/app/houseuser/deleteUserById', p)
 
@@ -265,5 +268,6 @@ export const api = {
 	guestRecordsCount,
 	guestRecordsSubmit,
 	getOpenData,
-	parking
+	parking,
+	room
 }

+ 1 - 1
comps/bindHome.vue

@@ -96,7 +96,7 @@
 					return
 				}
 				let params = {
-					phone: this.vuex_member.phone,
+					idCard: this.vuex_member.idcard,
 					name: this.vuex_member.name,
 				}
 				let list = (await this.$http.getHouseUserCondition(params)).data.data

+ 9 - 3
pages/myCar/add.vue

@@ -127,7 +127,7 @@
 
 		<view>
 			<view class="bg-white" style="height: 80rpx;"></view>
-			<view v-if="step==1" class="" @click="next" style="width: 90%;margin: 0 auto ;margin-bottom: 10%;">
+			<view v-if="step==1" class="" @click="next" style="width: 90%;margin: 0 auto ;position: absolute;bottom: 50rpx;left: 0;right: 0;">
 				<view class="cu-btn round base-bg-color" style="padding: 40rpx;width: 100%;">
 					<text>下一步</text>
 				</view>
@@ -310,12 +310,17 @@
 				this.initParkingSpace()
 			},
 			parkingSpaceConfirm(e) {
+				let id= e[0].value
+				let flag= this.parkingSpaceList.some(item=>item.id==id && item.isUsed==1)
+				if (flag) {
+					this.$dialog.showModal('该车位已被占用,请联系社区负责人',false)
+					return
+				}
 				this.parkingSpaceLabel = e[0].label
-				this.parkingSpaceValue = e[0].value
+				this.parkingSpaceValue = id
 			},
 			//车位 end
 			parseParams(options) {
-				console.log(options);
 				if (this.$isEmpty(options)) {
 					return
 				}
@@ -364,6 +369,7 @@
 					return
 				}
 				let that = this;
+				this.model.parkingLotId=this.parkingLotValue
 				this.model.residentialId = uni.getStorageSync('residentialId')
 				this.model.personId = this.vuex_member.id
 				this.model.personName = this.vuex_member.name

+ 1 - 1
pages/myCar/myCar.vue

@@ -217,7 +217,7 @@
 			downCallback(mescroll){
 				setTimeout(()=>{
 					this.mescroll.resetUpScroll()
-				},1500)
+				},200)
 			},
 			upCallback(mescroll) {
 				let that = this;

+ 14 - 0
pages/register/register.vue

@@ -24,6 +24,13 @@
 					maxlength="11" class="placeholder_style">
 				</input>
 			</view>
+			<view class="form_group">
+				<text class="red">*</text>
+				<text class="sex">身份证:</text>
+				<input placeholder="请输入身份证号" v-model="idcard" placeholder-class="placeholder_style" type="number"
+					maxlength="11" class="placeholder_style">
+				</input>
+			</view>
 			<view class="form_group">
 				<text class="red">*</text>
 				<text class="sex">验证码:</text>
@@ -75,6 +82,8 @@
 				name: null,
 				//姓名
 				tel: null,
+				//身份证号
+				idcard:null,
 				//获取到的手机栏中的值
 				verify_code: null,
 				//验证码
@@ -177,6 +186,10 @@
 					app.globalData.autoFailHint("请输入手机号");
 					return;
 				}
+				if (this.$isNotEmpty(this.idcard)) {
+					this.$u.toast('请输入身份证号')
+					return
+				}
 				if (!this.$u.test.mobile(tel)) {
 					//自动关闭提示弹窗
 					app.globalData.autoFailHint("请填写正确的手机号码");
@@ -198,6 +211,7 @@
 				let params = {};
 				params['name'] = name;
 				params['tel'] = tel;
+				params['idcard']=this.idcard
 				params['verify_code'] = verify_code;
 
 				params['create_type'] = 0;

+ 99 - 85
pages/services/property/detail.vue

@@ -1,165 +1,164 @@
 <template>
 	<view>
-<!-- 		<view class="bg-blue padding" style="height: 100rpx;">
-			<view class="text-xxl ">
-				<text v-if="dataDetail.handleStatus==-1">已撤销</text>
-				<text v-else-if="dataDetail.handleStatus==0">待处理</text>
-				<text v-else-if="dataDetail.handleStatus==1">已处理</text>
-			</view>
-			<view class="text-df padding-top-xs">
-				<text v-if="dataDetail.handleStatus==-1">当前工单已取消</text>
-				<text v-else-if="dataDetail.handleStatus==0">当前工单待处理,请耐心等待</text>
-				<text v-else-if="dataDetail.handleStatus==1">当前工单已完成</text>
-			</view>
-		</view> -->
-		
 		<view class=" bg-white padding solid-bottom">
 			<view class="flex justify-between">
 				<view class="text-black">
-					<text>工单编号:{{dataDetail.jobNo}}</text>
+					<text>工单编号:{{dataDetail.repairNo}}</text>
 					<text class="text-blue padding-left-sm" @click="copy(dataDetail.repairNo)">复制</text>
 				</view>
-				<view class="text-red">
-					<text v-if="dataDetail.jobStatus==-1">已撤销</text>
-					<text v-else-if="dataDetail.jobStatus==0">待处理</text>
-					<text v-else-if="dataDetail.jobStatus==1">已处理</text>
+				<view>
+					<text class="text-orange" v-if="dataDetail.handleStatus==0">待处理</text>
+					<text class="" v-if="dataDetail.handleStatus==1">处理中</text>
+					<text class="text-orange" v-if="dataDetail.handleStatus==2">已处理</text>
+					<text class="text-red" v-if="dataDetail.handleStatus==3">不做处理</text>
 				</view>
 			</view>
 		</view>
 		<u-cell-group>
-			<u-cell-item :arrow="false" icon="home" title="所在小区" :value="dataDetail.residentialName"></u-cell-item>
-			<u-cell-item :arrow="false" icon="map" title="维修位置" :value="dataDetail.reportPosition"></u-cell-item>
-			<u-cell-item :arrow="false" icon="clock" title="创建时间" :value="dataDetail.createTime"></u-cell-item>
-			<u-cell-item v-if="dataDetail.jobStatus==1" :arrow="false" icon="clock" title="完成时间" :value="dataDetail.handleTime"></u-cell-item>
+			<u-cell-item :arrow="false" title="所在小区" :value="dataDetail.residentialName"></u-cell-item>
+			<u-cell-item :arrow="false" title="维修位置" :value="dataDetail.reportPosition"></u-cell-item>
+			<u-cell-item :arrow="false" title="创建时间" :value="dataDetail.createTime"></u-cell-item>
+			<u-cell-item :arrow="false" title="受理状态" :value="acceptStatus"></u-cell-item>
 		</u-cell-group>
 		<view class="cu-card dynamic no-card bg-white" style="padding: 30rpx;">
 			<view class="cu-item shadow">
-				<view class=" grid flex-sub  col-4 grid-square" >
-					<view @click="previewPic(index,picArr)" v-for="(item,index) in picArr" :key="index" class="bg-img" :style="{backgroundImage: 'url(' + item + ')'}">
+				<view class=" grid flex-sub  col-5 grid-square">
+					<view @click="previewPic(index,picArr)" v-for="(item,index) in picArr" :key="index" class="bg-img"
+						:style="{backgroundImage: 'url(' + item + ')'}">
 					</view>
 				</view>
 			</view>
-			<view class="padding-top-20">
+			<view class="padding-top-30">
 				<text>故障描述:</text>
 				<text class="content">
 					{{dataDetail.reportDetail}}
 				</text>
 			</view>
 		</view>
-		
-	<!-- 	<view class="margin-top-sm margin-bottom-sm padding bg-white flex" style="box-sizing: border-box;">
-			<view class="">
-				<text class="">故障描述:</text>
-			</view>
-			<view class="flex-sub" >
-				<text class="">{{dataDetail.reportDetail}}</text>
-			</view>
-		</view> -->
-		
-		<view v-if="dataDetail.jobStatus==1&&dataDetail.estimateStatus==1" class="margin-top-sm margin-bottom-sm padding bg-white flex" style="box-sizing: border-box;">
+
+		<view v-if="dataDetail.jobStatus==1&&dataDetail.estimateStatus==1"
+			class="margin-top-sm margin-bottom-sm padding bg-white flex" style="box-sizing: border-box;">
 			<view class="">
 				<text class="">工单评价:</text>
 			</view>
-			<view class="flex-sub" >
+			<view class="flex-sub">
 				<text class="">{{dataDetail.comment}}</text>
 			</view>
 		</view>
-		
-		<view  class="footer-fixed   padding-sm bg-white flex justify-end margin-right-30" style="box-sizing: border-box;z-index: 999;padding: 20rpx;">
+
+
+		<view class="margin-top-10">
+			<history></history>
+		</view>
+
+		<view class="footer-fixed   padding-sm bg-white flex justify-end margin-right-30"
+			style="box-sizing: border-box;z-index: 999;padding: 20rpx;">
 			<!-- 待处理,取消工单 -->
 			<view class="cu-btn sm lineBlue round " v-if="dataDetail.jobStatus==0" @click="cancelItem()">
 				取消工单
 			</view>
 			<!-- 已撤销工单,删除工单 -->
-			<view class="cu-btn sm lineBlue round margin-right-20" v-if="dataDetail.jobStatus==-1||dataDetail.jobStatus==1" @click="deleteItem()" >
+			<view class="cu-btn sm lineBlue round margin-right-20"
+				v-if="dataDetail.jobStatus==-1||dataDetail.jobStatus==1" @click="deleteItem()">
 				删除工单
 			</view>
-			<!-- v-if="dataDetail.handleStatus==1&&dataDetail.estimateStatus==0" -->
 			<!-- 已处理,待评价 -->
-			<navigator url="./comment" v-if="dataDetail.jobStatus==1&&dataDetail.estimateStatus==0" class="cu-btn sm bg-blue  round "  >
+			<navigator url="./comment" v-if="dataDetail.jobStatus==1&&dataDetail.estimateStatus==0"
+				class="cu-btn sm bg-blue  round ">
 				写评价
 			</navigator>
 		</view>
 	</view>
 </template>
 <script>
-	var app=getApp()
-	var that=this
+	import history from "./list/history.vue"
+	var app = getApp()
+	var that = this
 	export default {
+		components: {
+			history
+		},
 		data() {
 			return {
 				//报修编号
-				id:'',
-				content:'',
-				dataDetail:{},
-				picArr:[]
+				id: '',
+				content: '',
+				dataDetail: {},
+				picArr: []
 			}
 		},
 		onLoad(options) {
-			that=this
-			this.id=options.id
+			that = this
+			this.id = options.id
 		},
 		onShow() {
 			this.fetchDetail()
 		},
+		computed:{
+			acceptStatus(){
+				let status={
+					0:'等待受理',
+					1:'已受理',
+					2:'拒绝受理'
+				}
+				return status[this.dataDetail.acceptStatus]
+			}
+		},
 		methods: {
-			previewPic(index,picArr){
+			previewPic(index, picArr) {
 				console.log(index);
 				uni.previewImage({
-					urls:picArr,
-					current:index
+					urls: picArr,
+					current: index
 				})
 			},
-			copy(data){
+			copy(data) {
 				uni.setClipboardData({
-					data:data
+					data: data
 				})
 			},
-			fetchDetail(){
-				// let operation='estateRepair/estateRepairDetail'
-				let data={
-					id:this.id
+			fetchDetail() {
+				let data = {
+					id: this.id
 				}
-				that.$http.estateRepairDetail(data).then (res=>{
-					app.globalData.dataDetail=res.data.estateRepairDetail
-					that.dataDetail=res.data.estateRepairDetail
-					that.picArr=that.dataDetail.pic.split(',')
-					
+				that.$http.estateRepairDetail(data).then(res => {
+					that.dataDetail = res.data.data
+					that.picArr = that.dataDetail.pic.split(',')
 				});
 			},
-			cancelItem(){
-				app.globalData.twoFailHint("确定要取消该工单?",function(){
+			cancelItem() {
+				app.globalData.twoFailHint("确定要取消该工单?", function() {
 					//取消状态
-					that.dataDetail.jobStatus=-1
+					that.dataDetail.jobStatus = -1
 					// let operation='estateRepair/addEstateRepair'
-					that.$http.addEstateRepair(that.dataDetail).then (res =>{
-						if (res.data.add_result==true) {
-							app.globalData.oneFailHint("取消成功",function(){
+					that.$http.addEstateRepair(that.dataDetail).then(res => {
+						if (res.data.add_result == true) {
+							app.globalData.oneFailHint("取消成功", function() {
 								that.fetchDetail()
 							});
-						}else{
+						} else {
 							app.globalData.oneFailHint(res.data.add_result);
 						}
-						
+
 					});
 				})
 			},
-			deleteItem(){
-				app.globalData.twoFailHint("确定要删除该工单?",function(){
+			deleteItem() {
+				app.globalData.twoFailHint("确定要删除该工单?", function() {
 					//删除状态
-					that.dataDetail.status=-1
+					that.dataDetail.status = -1
 					// let operation='estateRepair/addEstateRepair'
-					that.$http.addEstateRepair(that.dataDetail).then(res =>{
-						if (res.data.add_result==true) {
-							app.globalData.oneFailHint("删除成功",function(){
+					that.$http.addEstateRepair(that.dataDetail).then(res => {
+						if (res.data.add_result == true) {
+							app.globalData.oneFailHint("删除成功", function() {
 								uni.navigateBack({
-									delta:"1"
+									delta: "1"
 								})
 							});
-						}else{
+						} else {
 							app.globalData.oneFailHint(res.data.add_result);
 						}
-						
+
 					});
 				})
 			},
@@ -167,14 +166,29 @@
 	}
 </script>
 
-<style lang="scss">
-	.bg-blue{
+<style lang="scss" scoped>
+	.bg-blue {
 		background-color: #59a5f0;
 		color: #FFFFFF;
 	}
-	
-	.lineBlue{
+
+	.lineBlue {
 		color: #59a5f0;
 		border: 1rpx solid #59a5f0;
 	}
+	
+	/deep/ .u-cell.data-v-65423b64 {
+	    display: flex;
+	    flex-direction: row;
+	    align-items: center;
+	    position: relative;
+	    box-sizing: border-box;
+	    width: 100%;
+	    padding: 18rpx 32rpx;
+	    font-size: 28rpx;
+	    line-height: 54rpx;
+	    color: #606266;
+	    background-color: #fff;
+	    text-align: left;
+	}
 </style>

+ 93 - 85
pages/services/property/list/card.vue

@@ -9,18 +9,20 @@
 					</view>
 				</view>
 				<view class="right">
-					<text class="text-red" v-if="item.handleStatus==-1">已取消</text>
 					<text class="text-orange" v-if="item.handleStatus==0">待处理</text>
-					<text class="" v-if="item.handleStatus==1">已完成</text>
-					<text class="text-orange" v-if="item.handleStatus==2">待评价</text>
+					<text class="" v-if="item.handleStatus==1">处理中</text>
+					<text class="text-green" v-if="item.handleStatus==2">已处理</text>
+					<text class="text-red" v-if="item.handleStatus==3">不做处理</text>
 				</view>
 			</view>
 			<view class="item">
 				<view class="left">
 					<view style="padding: 0 30rpx;">
 						<view class="content">
-							<text class="padding-right-10">所在小区:</text>
-							<text >{{item.residentialName}}</text>
+							<text class="padding-right-10">受理状态:</text>
+							<text class="text-orange" v-if="item.acceptStatus==0">待受理</text>
+							<text class="text-green" v-if="item.acceptStatus==1">已受理</text>
+							<text class="text-red" v-if="item.acceptStatus==2">拒绝受理</text>
 						</view>
 						<view class="content">
 							<text class="padding-right-10">维修位置:</text>
@@ -33,8 +35,8 @@
 					</view>
 				</view>
 			</view>
-			<view class="bottom" >
-				<button @click.stop="" open-type="contact" class="cu-btn  sm round line-black margin-right-20" >
+			<view class="bottom">
+				<button @click.stop="" open-type="contact" class="cu-btn  sm round line-black margin-right-20">
 					联系物业
 				</button>
 				<!-- 待处理,显示取消工单 -->
@@ -55,95 +57,101 @@
 </template>
 
 <script>
-export default {
-	name: 'card',
-	props:{
-		list:{
-			type:Array,
-			default:()=>{
-				[]
+	export default {
+		name: 'card',
+		props: {
+			list: {
+				type: Array,
+				default: () => {
+					[]
+				}
 			}
-		}
-	},
-	data() {
-		return {
-			
-		};
-	},
-	onLoad() {
-		
-	},
-	methods:{
-		copy(data){
-			uni.setClipboardData({
-				data:data
-			})
-		},
-		goDetail(item){
-			getApp().globalData.dataDetail=item
-			uni.navigateTo({
-				url:"../detail?id="+item.id
-			})
-		},
-		cancel(item){
-			this.$emit('cancel',item)
 		},
-		comment(item){
-			getApp().globalData.dataDetail=item
-			uni.navigateTo({
-				url:"../comment"
-			})
+		data() {
+			return {
+
+			};
 		},
-		deleteItem(item){
-			this.$emit('deleteItem',item)
+		onLoad() {
+
 		},
-	}
-};
+		methods: {
+			copy(data) {
+				uni.setClipboardData({
+					data: data
+				})
+			},
+			goDetail(item) {
+				getApp().globalData.dataDetail = item
+				uni.navigateTo({
+					url: "../detail?id=" + item.id
+				})
+			},
+			cancel(item) {
+				this.$emit('cancel', item)
+			},
+			comment(item) {
+				getApp().globalData.dataDetail = item
+				uni.navigateTo({
+					url: "../comment"
+				})
+			},
+			deleteItem(item) {
+				this.$emit('deleteItem', item)
+			},
+		}
+	};
 </script>
 
 <style lang="scss">
-.bg-blue{
-	background-color: #59a5f0;
-	color: #FFFFFF;
-}
-	
-.data {
-	width: 710rpx;
-	background-color: #ffffff;
-	margin: 20rpx auto;
-	border-radius: 6rpx;
-	box-sizing: border-box;
-	padding: 20rpx;
-	font-size: 28rpx;
-	.top {
-		display: flex;
-		justify-content: space-between;
-		padding-bottom: 20rpx;
-		border-bottom: 1rpx solid $dt-border-color-sm;
-		.left {
+	.bg-blue {
+		background-color: #59a5f0;
+		color: #FFFFFF;
+	}
+
+	.data {
+		background-color: #ffffff;
+		margin: 10rpx;
+		border-radius: 6rpx;
+		box-sizing: border-box;
+		padding: 20rpx;
+		font-size: 28rpx;
+
+		.top {
 			display: flex;
-			align-items: center;
-			.title {
-				margin: 0 10rpx;
-				font-size: 30rpx;
+			justify-content: space-between;
+			padding-bottom: 20rpx;
+			border-bottom: 1rpx solid $dt-border-color-sm;
+
+			.left {
+				display: flex;
+				align-items: center;
+
+				.title {
+					margin: 0 10rpx;
+					font-size: 30rpx;
+				}
+			}
+
+			.right {
+				margin-right: 10rpx;
 			}
 		}
-		.right{
-			margin-right: 10rpx;
+
+		.item {
+			margin: 5rpx 0 20rpx 0;
+
+			.content {
+				border-bottom: 1rpx dashed #DDDDDD;
+				padding: 30rpx 0;
+			}
 		}
-	}
-	.item {
-		margin: 5rpx 0 20rpx 0;
-		.content {
-			border-bottom: 1rpx dashed #DDDDDD;
-			padding: 30rpx 0;
+
+		.bottom {
+			display: flex;
+			margin-top: 30rpx;
+			justify-content: flex-end;
+			align-items: center;
 		}
 	}
-	.bottom {
-		display: flex;
-		margin-top: 30rpx;
-		justify-content: flex-end;
-		align-items: center;
-	}
-}
 </style>

+ 98 - 0
pages/services/property/list/history.vue

@@ -0,0 +1,98 @@
+<template>
+	<view class="history bg-white" >
+		<view style="margin: -10rpx 0 50rpx -10rpx;" class="text-bold">
+			报修进度
+		</view>
+		<u-time-line>
+			<u-time-line-item nodeTop="2" v-for="(item,index) in 10" :key="index">
+				<template v-slot:node>
+					<view class="u-node bg-white">
+						<u-icon name="clock-fill" color="#5064eb" :size="28"></u-icon>
+					</view>
+				</template>
+				<template v-slot:content>
+					<view>
+						<view class="">2022-03-30 15:17:04</view>
+						<view style="width: 636rpx;">
+							<view class="content">
+								<view class="flex justify-between">
+									<view class="">
+										<view class="nav-title">
+											<text class="">人员姓名:</text>
+											<text class="">黄明潘</text>
+										</view>
+										<view class="nav-title">
+											<text>测量体温:</text>
+											<text class="text-red">36.9 ℃</text>
+										</view>
+										<view class="nav-title">
+											<text>所属企业:</text>
+											<text>所属企业</text>
+										</view>
+									</view>
+									<view class="">
+										<image
+											@click="$util.preview('http://192.168.1.218:1889/miniofile/cyzh/upload/20220330/d5557aceee4b8cad094c1d0083dd80cf.jpg')"
+											src="http://192.168.1.218:1889/miniofile/cyzh/upload/20220330/d5557aceee4b8cad094c1d0083dd80cf.jpg"
+											style="width: 110rpx;height: 110rpx;border-radius: 10rpx;" mode=""></image>
+									</view>
+								</view>
+								<view class="nav-title">
+									<text>开门方式:</text>
+									<text>人脸识别开门</text>
+								</view>
+							</view>
+
+						</view>
+					</view>
+				</template>
+			</u-time-line-item>
+		</u-time-line>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array
+			}
+		},
+		data() {
+			return {
+
+			};
+		},
+		onLoad() {
+
+		},
+		methods: {
+
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	page {
+		background-color: #FFFFFF;
+	}
+
+	.nav-title {
+		font-size: 28upx;
+		font-weight: 300;
+		padding-top: 20rpx;
+	}
+
+	.history {
+		box-sizing: border-box;
+		padding: 40rpx 20rpx 20rpx 50rpx;
+	}
+
+	.content {
+		box-shadow: 0 8rpx 10rpx rgba(234, 234, 234, 0.5), 8rpx 0rpx 10rpx rgba(234, 234, 234, .5), -8rpx 0rpx 10rpx rgba(234, 234, 234, .5);
+		background-color: #FFFFFF;
+		padding: 20rpx;
+		border-radius: 10rpx;
+		margin: 20rpx 0;
+	}
+</style>

+ 2 - 2
pages/services/property/list/item.vue

@@ -82,7 +82,7 @@
 			cancel(item){
 				let that=this
 				app.globalData.twoFailHint("确定要取消该工单?",function(){
-					item.handleStatus=-1
+					item.handleStatus=3
 					// let operation='estateRepair/addEstateRepair'
 					that.$http.addEstateRepair(item).then (res =>{
 						console.log(res,"ress");
@@ -112,7 +112,7 @@
 						current:mescroll.num,
 						size:mescroll.size,
 					},
-					memberId:getApp().globalData.member.id,
+					memberId:this.vuex_member.id,
 					handleStatus:this.item.value
 				}
 				try{

+ 79 - 102
pages/services/property/list/list.vue

@@ -1,119 +1,96 @@
 <template>
-	<view class="container">
-		<view class="tabs">
-			<scroll-view scroll-x class="bg-white nav">
-				<view class="flex text-center">
-					<view class="cu-item flex-sub" :class="index==current?'text-blue text-xl text-bold':'text-lg'" v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
-						{{item.name}}
-					</view>
-				</view>
-			</scroll-view>
-		</view>
-		<view style="height: 100%;">
-			<swiper style="height: 100%;" :current="current"  @change="swiperChange"
-				@animationfinish="animationfinish">
-				<swiper-item  v-for="(item, index) in tabs" :key="index">
-					<scroll-view scroll-y style="height: 100%;">
-						<item :refresh="refresh" :i="index" :item="item" :type="current"></item>
-					</scroll-view>
-				</swiper-item>
-			</swiper>
-		</view>
+	<view class="">
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
+			:up="upOption">
+			<card @deleteItem="deleteItem" :list="list" @cancel="cancel"></card>
+		</mescroll-body>
 	</view>
 </template>
+
 <script>
-	import item from "./item.vue"
+	import MescrollMixin from "@/comps/mescroll-body/mescroll-mixins.js";
+	import card from "./card.vue"
 	export default {
+		mixins: [MescrollMixin], // 使用mixin
+		name: '',
 		components: {
-			item
+			card
 		},
 		data() {
 			return {
-				//是否第一次进入页面
-				isfirst:false,
-				//动态让item主动刷新
-				refresh:false,
-				scrollLeft:0,
-				current: 0,
-				swiperCurrent:0,
-				tabs: [
-					//数据库数据状态- 
-					//工单状态 -1 已取消  0:待处理  1:已处理
-					//评价 estimateStatus 待评价0  已评价 1
-					{
-						name: '全部',
-						value:''
-					},
-					{
-						name: '待处理',
-						value:0
-					},
-					{
-						name: '已取消',
-						value:-1
-					},
-					{
-						name:'待评价',
-						value:2
-					},
-					{
-						name:'已完成',
-						value:1
-					}
-				],
-			}
+				list: [],
+				page: {
+					current: 1,
+					size: 30,
+				},
+			};
 		},
-		onShow(){
-			if (this.isfirst) {
-				this.isfirst=false
-			}else{
-				//刷新列表
-				this.refresh=!this.refresh
-			}
-		},
-		onLoad() {
-			this.isfirst=true
-		},
-		methods:{
-			tabChange(index) {
-				this.current = index
-				// this.scrollLeft = (index - 1) * 60
+		methods: {
+			/**
+			 * @param {Object} item 删除订单
+			 */
+			deleteItem(item) {
+				this.$dialog.showModal('确定要删除该工单').then(_=>{
+					//删除状态
+					item.isDeleted = 1
+					this.$http.addEstateRepair(item).then(res => {
+						if (res.data.add_result == true) {
+							this.$u.toast('删除成功')
+							this.mescroll.resetUpScroll()
+						} else {
+							app.globalData.oneFailHint(res.data.add_result);
+						}
+					
+					});
+				})
 			},
-			swiperChange(e) {
-			  uni.pageScrollTo({
-			      scrollTop: 0,
-			      duration: 0
-			  });
-			  this.current = e.detail.current
-			  // this.scrollLeft = (this.current - 1) * 60
+			/**
+			 * 取消订单
+			 * @param {Object} item 订单实体
+			 */
+			cancel(item) {
+				this.$dialog.showModal('确定要取消该工单').then(_ => {
+					item.handleStatus = 3
+					this.$http.addEstateRepair(item).then(res => {
+						if (res.data.success) {
+							this.$u.toast('取消成功')
+							this.mescroll.resetUpScroll()
+						} else {
+							getApp().globalData.oneFailHint(res.data.add_result);
+						}
+					});
+				})
 			},
-			animationfinish({detail: { current }}) {
-				this.swiperCurrent = current;
-				this.current = current;
+			downCallback(mescroll) {
+				setTimeout(() => {
+					this.mescroll.resetUpScroll()
+				}, 200)
 			},
+			upCallback(mescroll) {
+				let data = {
+					"page": {
+						current: mescroll.num,
+						size: mescroll.size,
+					},
+					memberId: this.vuex_member.id,
+				}
+				try {
+					this.$http.estateRepairList(data).then(res => {
+						let data = res.data.data
+						let records = data.records
+						let length = records.length
+						mescroll.endBySize(length, data.total);
+						if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
+						this.list = this.list.concat(records); //追加新数据
+					});
+				} catch (e) {
+					mescroll.endErr();
+				}
+			}
 		}
-	}
+	};
 </script>
 
 <style lang="scss" scoped>
-	.text-xl{
-		font-size: 34rpx;
-	}
-	
-	.container {
-	  height: calc(100vh - 78rpx);
-	  background-color: #F6F6F6;
-	  padding: 78rpx 0rpx 0rpx;
-	 .tabs {
-	    position: fixed;
-	    top: -10rpx;
-		left: 0;
-		display: flex;
-		align-items: center;
-		width: 100%;
-		background-color: #FFFFFF;
-		box-sizing: border-box;
-		z-index: 3;
-	  }
-}
-</style>
+
+</style>

+ 96 - 49
pages/services/property/property.vue

@@ -4,19 +4,23 @@
 			<view class="form">
 				<view class="flex">
 					<view class="need">*</view>
-					<view>请选择小区</view>
+					<view>所在小区</view>
 				</view>
-				<view class="bg-gray padding-20 " @click="residentialShow=true">
+				<view class="bg-gray padding-20">
 					<input disabled type="text" placeholder="请选择您所在的小区" v-model="data.residentialName" />
 				</view>
 			</view>
 			<view class="form">
 				<view class="flex">
 					<view class="need">*</view>
-					<view>报修位置</view>
+					<view>报修地点</view>
 				</view>
-				<view class="bg-gray padding-20 ">
-					<input type="text" placeholder="请输入报修的具体位置" v-model="data.reportPosition" />
+				<view class="bg-gray padding-20 margin-top-20" style="position: relative;">
+					<input placeholder="报修地点" v-model="data.reportPosition" />
+					<view @click.stop="roomShow=true" class="cu-btn df bg-blue radius"
+						style="position: absolute;right: 10rpx;top: 0;bottom: 0;margin:auto;z-index: 99;">
+						选择我的房屋
+					</view>
 				</view>
 			</view>
 			<view class="form ">
@@ -24,8 +28,12 @@
 					<view class="need">*</view>
 					<view>联系方式</view>
 				</view>
-				<view class="bg-gray padding-20 ">
+				<view class="bg-gray padding-20 " style="position: relative;">
 					<input maxlength="11" type="number" placeholder="请输入您的联系方式" v-model="data.reportorPhone" />
+					<button class="cu-btn df bg-blue radius" @getphonenumber="getPhoneNumber"  open-type="getPhoneNumber"
+						style="position: absolute;right: 10rpx;top: 0;bottom: 0;margin:auto;z-index: 99;">
+						获取微信电话
+					</button>
 				</view>
 			</view>
 			<view class="form">
@@ -37,22 +45,13 @@
 					<input disabled type="number" placeholder="请选择预约时间" v-model="dateTimeStr" />
 				</view>
 			</view>
-			<view class="form">
-				<view class="flex">
-					<view class="need">*</view>
-					<view>故障简述</view>
-				</view>
-				<view class="bg-gray padding-20 ">
-					<input type="text" placeholder="请输入故障简述" v-model="data.repairName" />
-				</view>
-			</view>
 		</view>
 
 		<view class="card ">
 			<view class="form" style="height: 320rpx;">
 				<view class="bg-gray padding-10">
-					<u-input v-model="data.reportDetail" type="textarea" maxlength="100" height="240"
-						placeholder="故障详细描述" style="width: 100%;line-height: 50rpx;" />
+					<u-input v-model="data.reportDetail" type="textarea" maxlength="100" height="240" placeholder="故障描述(必填)"
+						style="width: 100%;line-height: 50rpx;" />
 					<view class="text-right text-df text-gray padding-top-10">
 						{{data.reportDetail.length}} / 100
 					</view>
@@ -80,17 +79,18 @@
 			</view>
 		</view>
 		<view style="height: 160rpx;"></view>
-		<view style="z-index: 999;" class="footer-fixed" :style="{'margin-bottom': safeAreaBottom+'rpx'}" @click="submit">
+		<view style="z-index: 999;" class="footer-fixed" :style="{'margin-bottom': safeAreaBottom+'rpx'}"
+			@click="submit">
 			<view class="cu-btn  flex  text-lg bg-red-btn" style="padding: 46rpx 0;">
 				确定提交
 			</view>
 		</view>
-		
+
 		<u-mask z-index="99999" :show="maskShow" @click="maskShow = false">
 			<view style="margin: 20rpx;" @click.stop="">
 				<textarea @confirm="confirm" @keyboardheightchange="keyboardheightchange" v-model="data.reportDetail"
 					value="" style="background-color: #FFFFFF;width: 100%;padding: 20rpx;box-sizing: border-box;"
-					placeholder="请填写故障描述(必填)" />
+					placeholder="请对您的问题进行描述(必填)" />
 				<view class="bg-white text-right text-df text-gray padding-10">
 					{{data.reportDetail.length}} / 100
 				</view>
@@ -100,39 +100,37 @@
 			<time-selector @getDateTime="timeConfirm"></time-selector>
 		</u-popup>
 
-		<u-select :default-value="defaultValue" value-name="residentialId" label-name="residentialName"
-			@confirm="residentialConfirm" z-index="9999999" v-model="residentialShow" :list="residentialList">
-		</u-select>
+		<u-select v-model="roomShow" :list="roomList" @confirm="roomChange" label-name="fullRoomName"
+			value-name="fullRoomName"></u-select>
 	</view>
 </template>
 
 <script>
 	import timeSelector from '@/comps/mp-time/index.vue';
 	var app = getApp()
-	var that;
 	export default {
 		components: {
 			timeSelector
 		},
 		data() {
 			return {
-				defaultValue: [],
+				sessionKey:'',
 				platform: '',
 				maskShow: false,
 				//图片回显
 				imgList: [],
 				data: {
 					//上报人
-					reportor:'',
+					reportor: '',
 					//保修电话
-					reportorPhone:'',
-					repairName:'',
+					reportorPhone: '',
+					repairName: '',
 					//故障详情描述
 					reportDetail: '',
 					//报事来源,1:小程序,2:后台
-					reportSource:1,
+					reportSource: 1,
 					//故障位置
-					reportPosition: '',	
+					reportPosition: '',
 					//处理状态:待处理
 					handleStatus: 0,
 					//小区id
@@ -144,8 +142,14 @@
 					endTime: '',
 				},
 				base64_image: [],
+
+				roomList: [],
+				roomShow: false,
+
 				residentialShow: false,
+				defaultValue: [],
 				residentialList: [],
+
 				timeShow: false,
 				dateTimeStr: ''
 			}
@@ -157,28 +161,75 @@
 			this.data.reportorPhone = getApp().globalData.member.phone
 		},
 		methods: {
+			getPhoneNumber(e) {
+				if (e.detail.errMsg == "getPhoneNumber:ok") {
+					let params = {
+						sessionKey: this.sessionKey,
+						encryptedData: e.detail.encryptedData,
+						iv: e.detail.iv
+					}
+					this.$http.getOpenData(params).then(res => {
+						this.data.reportorPhone = res.data.purePhoneNumber
+					})
+					return
+				}
+				this.$u.toast('获取手机号失败')
+			},
+			async getSessionKey(){
+				let jsCode = await new Promise((resolve, reject) => {
+					uni.login({
+						provider: 'weixin',
+						success: res => {
+							resolve(res.code);
+						},
+						fail: err => {
+							reject(err);
+						}
+					})
+				})
+				let params = {
+					js_code: jsCode,
+					name: 'community',
+					app_type: 1
+				};
+				let res = await this.$http.getOpenid(params);
+				this.sessionKey = res.data.session_key
+			},
 			initData() {
-				that = this
+				this.getSessionKey()
 				//判断是ios还是安卓,ios键盘上移会挤压遮挡层
 				this.platform = this.$u.os() || "android"
-				this.data.memberId=app.globalData.member.id
+				this.data.memberId = app.globalData.member.id
 				if (this.$isEmpty(this.data.memberId)) {
 					this.$dialog.showModalAndBack('系统异常')
 					return
 				}
 				//获取用户的userid
-				this.data.reportor = app.globalData.member?app.globalData.member.name:'未知' 
-				//从缓存中获取房屋列表
-				this.residentialList = uni.getStorageSync("residentialList")//从缓存中获取默认的小区名字和小区id
+				this.data.reportor = app.globalData.member ? app.globalData.member.name : '未知'
 				//从缓存中获取默认的小区名字和小区id
 				this.data.residentialName = uni.getStorageSync("plotName")
 				this.data.residentialId = uni.getStorageSync("residentialId")
-				//社区选择器的默认值
-				this.residentialList.forEach((item, index) => {
-					if (item.residentialId === this.data.residentialId) {
-						this.defaultValue.push(index)
-						return
+				//获取我的房间
+				this.getRoomByMemberId()
+			},
+			roomChange(e) {
+				this.data.reportPosition = e[0].value
+			},
+			getRoomByMemberId() {
+				let memberId = this.vuex_member.id
+				let params = {
+					residentialId: uni.getStorageSync('residentialId'),
+					id: memberId
+				}
+				this.$http.getRoomByMemberId(params).then(res => {
+					if (res.data.success) {
+						this.roomList = res.data.data
+						this.roomList.forEach(item => {
+							item.fullRoomName = item.residentialName + "-" + item.buildingName + "-" + item
+								.unitName + "-" + item.name
+						})
 					}
+
 				})
 			},
 			submit() {
@@ -187,7 +238,7 @@
 					return
 				}
 				if (this.$isEmpty(this.data.reportPosition)) {
-					this.$u.toast("请填写具体位置")
+					this.$u.toast("请输入报修的具体地点")
 					return
 				}
 				if (this.$isEmpty(this.data.reportorPhone)) {
@@ -207,14 +258,14 @@
 					this.$u.toast("开始时间不能小于结束时间")
 					return
 				}
-				if (this.$isEmpty(this.data.repairName)) {
-					this.$u.toast("请输入故障简述")
+				if (this.$isEmpty(this.data.reportDetail)) {
+					this.$u.toast("请对您的问题进行描述")
 					return
 				}
 				this.data.pic = this.base64_image.join(",")
-				that.$http.addEstateRepair(this.data).then(res => {
+				this.$http.addEstateRepair(this.data).then(res => {
 					if (res.data.success) {
-						app.globalData.oneFailHint("提交成功");
+						this.$dialog.showModalAndBack('提交成功')
 					} else {
 						app.globalData.oneFailHint("提交失败");
 					}
@@ -229,10 +280,6 @@
 			confirm() {
 				this.maskShow = false
 			},
-			residentialConfirm(e) {
-				this.data.residentialId = e[0].value
-				this.data.residentialName = e[0].label
-			},
 			keyboardheightchange(e) {
 				if (e.detail.height == 0) {
 					this.maskShow = false