From dd4b75d3f418e7107a44d21cb2f22ca20b791dc8 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 01 Nov 2023 18:10:06 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app

---
 api/doorplateAddress/doorplateAddress.js   |   47 +
 subPackage/house/roomDetails/index.vue     |  522 ++++++++++---------
 subPackage/bs/views/zhsb.vue               |  316 ++++++-----
 subPackage/bs/components/form/rentForm.vue |   60 ++
 subPackage/bs/views/rentDetail.vue         |  484 ++++++++++--------
 subPackage/house/family/index.vue          |    2 
 subPackage/house/roomControl/index.vue     |   90 ++-
 7 files changed, 868 insertions(+), 653 deletions(-)

diff --git a/api/doorplateAddress/doorplateAddress.js b/api/doorplateAddress/doorplateAddress.js
index 5ad328d..28c559c 100644
--- a/api/doorplateAddress/doorplateAddress.js
+++ b/api/doorplateAddress/doorplateAddress.js
@@ -11,7 +11,7 @@
 		}
 	})
 }
-
+// 获取社区信息
 export const getHouseList = (type, name) => {
 	return http.request({
 		url: '/blade-doorplateAddress/doorplateAddress/getHousesList',
@@ -23,6 +23,7 @@
 	})
 }
 
+// 获取当前楼栋信息
 export const getHouseInfoList = (type, code) => {
 	return http.request({
 		url: '/blade-doorplateAddress/doorplateAddress/getHousesList',
@@ -34,6 +35,7 @@
 	})
 }
 
+// 获取当前房屋出租信息
 export const getHouseRentInfo = (code) => {
 	return http.request({
 		url: '/blade-doorplateAddress/doorplateAddress/getHouseRentInfo',
@@ -42,4 +44,47 @@
 			code
 		}
 	})
+}
+
+// 获取房屋标签信息
+export const getHouseLabelList = () => {
+	return http.request({
+		url: '/blade-label/label/getLabelList',
+		method: 'GET',
+		params: {
+			parentId: 1001
+		}
+	})
+}
+
+// 获取房屋详细信息
+export const getHouseDetail = (houseCode) => {
+	return http.request({
+		url: '/blade-house/house/getHouseDetail',
+		method: 'GET',
+		params: {
+			houseCode
+		}
+	})
+}
+
+
+// 获取房屋详细信息
+export const addHouseRental = (data) => {
+	return http.request({
+		url: 'blade-houseRental/houseRental/add',
+		method: 'POST',
+		data
+	})
+}
+
+export const uploadFile = (data) => {
+	return http.request({
+		url: '/blade-resource/oss/endpoint/put-file',
+		method: 'post',
+		custom: {
+			Authorization: true
+		},
+		data
+	})
 }
\ No newline at end of file
diff --git a/subPackage/bs/components/form/rentForm.vue b/subPackage/bs/components/form/rentForm.vue
new file mode 100644
index 0000000..987b39b
--- /dev/null
+++ b/subPackage/bs/components/form/rentForm.vue
@@ -0,0 +1,60 @@
+<template>
+	<u-form :model="form" class="form-box" :rules="rules">
+		<u-form-item class="form-item" label="姓名" required prop="name" labelWidth="80">
+			<u-input v-model="form.name" border="none" placeholder="姓名" />
+		</u-form-item>
+		<u-form-item class="form-item" label="联系方式" labelWidth="80">
+			<u-input v-model="form.phone" border="none" placeholder="联系方式" />
+		</u-form-item>
+		<u-form-item class="form-item" label="身份证号码" required prop="idCard" labelWidth="80">
+			<u-input v-model="form.idCard" border="none" placeholder="身份证号码" />
+		</u-form-item>
+		<u-form-item class="form-item" label="户籍地址" labelWidth="80">
+			<u-input v-model="form.domicile" border="none" placeholder="选填" />
+		</u-form-item>
+		<u-form-item class="form-item" label="工作单位" labelWidth="80">
+			<u-input v-model="form.workUnit" border="none" placeholder="选填" />
+		</u-form-item>
+	</u-form>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				form: {
+					name: '',
+					phone: '',
+					idCard: '',
+					domicile: '',
+					workUnit: ''
+				},
+				rules: {
+					name: [{
+						required: true,
+						message: '请输入姓名',
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change', 'blur'],
+					}],
+					idCard: [{
+						required: true,
+						message: '请输入身份证号',
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change', 'blur'],
+					}]
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.form-box {
+		background: #fff;
+
+		.form-item {
+			padding: 5rpx 20rpx;
+			border-bottom: 1px solid #eff1f3;
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/subPackage/bs/views/rentDetail.vue b/subPackage/bs/views/rentDetail.vue
index 7625d76..738aa9e 100644
--- a/subPackage/bs/views/rentDetail.vue
+++ b/subPackage/bs/views/rentDetail.vue
@@ -1,219 +1,267 @@
-<template>
-	<view class="container">
-		<u-form labelWidth="70" :model="form" :rules="rules" ref="form">
-			<view class="box-title">
-				<box-title title="基础信息"></box-title>
-			</view>
-			<view class="basic-info">
-
-
-
-				<u-form-item @click="showSelectBus(dataList.relation, '租客关系', 'relationName','relation')"
-					class="form-item" labelWidth="100" label="租客关系" required prop="type">
-					<u--input border="none" v-model="relationName" disabled disabledColor="#ffffff" placeholder="请选择">
-					</u--input>
-					<u-icon slot="right" name="arrow-right"></u-icon>
-				</u-form-item>
-
-				<u-form-item @click="showSelectBus(dataList.houseType, '房屋状态', 'houseTypeName','houseType')"
-					class="form-item" labelWidth="100" label="房屋状态:" required prop="type">
-					<u--input border="none" v-model="houseTypeName" disabled disabledColor="#ffffff" placeholder="请选择">
-					</u--input>
-					<u-icon slot="right" name="arrow-right"></u-icon>
-				</u-form-item>
-
-
-				<u-form-item @click="showSelectBus(dataList.rentalUse, '租房用途', 'rentalUseName','rentalUse')"
-					class="form-item" labelWidth="100" label="租房用途:" required prop="type">
-					<u--input border="none" v-model="rentalUseName" disabled disabledColor="#ffffff" placeholder="请选择">
-					</u--input>
-					<u-icon slot="right" name="arrow-right"></u-icon>
-				</u-form-item>
-
-				<u-form-item @click="rentTimeShow = true" class="form-item" labelWidth="100" label="租房时间:" required
-					prop="type">
-					<u--input border="none" v-model="form.rentTime" disabled disabledColor="#ffffff" placeholder="请选择">
-					</u--input>
-					<u-icon slot="right" name="arrow-right"></u-icon>
-				</u-form-item>
-
-			</view>
-
-			<view class="box-title">
-				<box-title title="合同上传"></box-title>
-			</view>
-
-			<view class="pic">
-
-				<u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
-					:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
-					:capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
-				</u-upload>
-			</view>
-
-			<view class="box-title">
-				<box-title title="租客信息"></box-title>
-			</view>
-
-			<view class="rent-info">
-
-
-			</view>
-
-
-		</u-form>
-
-
-		<!-- 事件类型下拉框 -->
-		<select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio"
-			:popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
-		</select-bus>
-		<!--出租时间选择-->
-		<u-datetime-picker :show="rentTimeShow" v-model="form.rentTime" mode="date"></u-datetime-picker>
-
-
-
-
-
-	</view>
-</template>
-
-<script>
-	import selectBus from "@/components/my-components/selectBus.vue"
-	import uploadMixin from "@/mixin/uploadMixin";
-	export default {
-		mixins: [uploadMixin],
-		components: {
-			selectBus
-		},
-		data() {
-			return {
-				form: {
-					relation: "",
-					houseTyep: "",
-					rentTime: "",
-				},
-				rules: {},
-				rentTimeShow: false,
-
-				relationName: "",
-				houseTypeName: "",
-				rentalUseName: "",
-				dataList: {
-					relation: [{
-							name: "同一户",
-							value: "1"
-						},
-						{
-							name: "不同户",
-							value: "2"
-						}
-					],
-					houseType: [{
-							name: "部分出租",
-							value: "1"
-						},
-						{
-							name: "全部出租",
-							value: "2"
-						}
-					],
-					rentalUse: [{
-							name: "仓库",
-							value: "1"
-						},
-						{
-							name: "办公",
-							value: "2"
-						},
-						{
-							name: "商用",
-							value: "3"
-						},
-						{
-							name: "居住",
-							value: "4"
-						}
-					]
-				},
-				selectBusList: [],
-				selectBusTitle: '',
-				selectBusModel: '',
-				selectBusKey: '',
-				typeShow: false
-
-
-			}
-		},
-		created() {
-
-		},
-		mounted() {
-
-		},
-		onLoad(option) {
-
-		},
-		onShow() {
-
-		},
-		methods: {
-			showSelectBus(data, title, model, key) {
-				this.selectBusList = data
-				this.selectBusTitle = title
-				this.selectBusModel = model
-				this.selectBusKey = key
-				this.typeShow = true
-			},
-			//类型选择确认
-			typeSelect(item) {
-				this[this.selectBusModel] = item.name
-				this.form[this.selectBusKey] = item.value
-				this.typeShow = !this.typeShow
-			},
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	.container {
-		position: relative;
-		width: 100%;
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		background: #F9F9FA;
-
-		.box-title {
-			padding: 10px 0;
-		}
-
-		.basic-info {
-
-			.form-item {
-				background-color: #ffffff;
-				padding: 5rpx 20rpx;
-				border-bottom: 1px solid #eff1f3;
-			}
-
-		}
-
-		.pic {
-			background-color: #ffffff;
-			padding: 40rpx 30rpx;
-		}
-
-		.btn-group {
-			padding: 30rpx;
-			position: absolute;
-			bottom: 28rpx;
-			width: calc(100% - 60rpx);
-
-			.btn {
-				margin-bottom: 30rpx;
-			}
-		}
-
-
-	}
+<template>
+	<view class="container">
+		<u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+			<view class="box-title">
+				<box-title title="基础信息"></box-title>
+			</view>
+			<view class="basic-info">
+				<u-form-item @click="showSelectBus(dataList.relation, '租客关系', 'relationName','relation')"
+					class="form-item" labelWidth="100" label="租客关系" required prop="type">
+					<u--input border="none" v-model="relationName" disabled disabledColor="#ffffff" placeholder="请选择">
+					</u--input>
+					<u-icon slot="right" name="arrow-right"></u-icon>
+				</u-form-item>
+				<u-form-item @click="showSelectBus(dataList.houseType, '房屋状态', 'houseTypeName','houseType')"
+					class="form-item" labelWidth="100" label="房屋状态:" required prop="type">
+					<u--input border="none" v-model="houseTypeName" disabled disabledColor="#ffffff" placeholder="请选择">
+					</u--input>
+					<u-icon slot="right" name="arrow-right"></u-icon>
+				</u-form-item>
+				<u-form-item @click="showSelectBus(dataList.rentalUse, '租房用途', 'rentalUseName','rentalUse')"
+					class="form-item" labelWidth="100" label="租房用途:" required prop="type">
+					<u--input border="none" v-model="rentalUseName" disabled disabledColor="#ffffff" placeholder="请选择">
+					</u--input>
+					<u-icon slot="right" name="arrow-right"></u-icon>
+				</u-form-item>
+				<u-form-item @click="rentTimeShow = true" class="form-item" labelWidth="100" label="租房时间:" required
+					prop="type">
+					<u--input border="none" v-model="form.rentTime" disabled disabledColor="#ffffff" placeholder="请选择">
+					</u--input>
+					<u-icon slot="right" name="arrow-right"></u-icon>
+				</u-form-item>
+			</view>
+			<view class="box-title">
+				<box-title title="合同上传"></box-title>
+			</view>
+
+			<view class="pic">
+
+				<u-upload :fileList="imagesList"
+					:previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
+					:multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
+					@afterRead="afterReadImg" @delete="deletePic">
+				</u-upload>
+			</view>
+
+			<view class="rent-info">
+				<view v-for="item in rentFormNum" :key="item">
+					<view class="box-title">
+						<box-title :title="'租客信息-#'+item">
+							<template #titleMore v-if="item !== 1">
+								<u-icon size="25" name="trash" color='#EF0724'></u-icon>
+							</template>
+						</box-title>
+					</view>
+					<rentForm ref="rentform" />
+				</view>
+			</view>
+
+
+		</u-form>
+
+
+		<!-- 事件类型下拉框 -->
+		<select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio"
+			:popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
+		</select-bus>
+		<!--出租时间选择-->
+		<u-datetime-picker :show="rentTimeShow" v-model="form.rentTime" mode="date"
+			@confirm="rentTimeShow = false"></u-datetime-picker>
+
+
+		<view class="bottom-tools">
+			<u-button plain class="btn-item" type="success" @click="addRentForm">再加一人</u-button>
+			<u-button class="btn-item" type="error" @click="decRentForm">删除</u-button>
+			<u-button class="btn-item" type="primary" @click="save">保存</u-button>
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import selectBus from "@/components/my-components/selectBus.vue"
+	import rentForm from '../components/form/rentForm.vue'
+	import uploadMixin from "@/mixin/uploadMixin";
+	import {
+		uploadFile,
+		addHouseRental
+	} from "@/api/doorplateAddress/doorplateAddress";
+	export default {
+		mixins: [uploadMixin],
+		components: {
+			selectBus,
+			rentForm
+		},
+		data() {
+			return {
+				form: {
+					relation: "",
+					rentTime: "",
+				},
+				imagesList: [],
+				rules: {},
+				rentTimeShow: false,
+				rentFormNum: 1,
+				relationName: "",
+				houseTypeName: "",
+				rentalUseName: "",
+				dataList: {
+					relation: [{
+							name: "同一户",
+							value: "1"
+						},
+						{
+							name: "不同户",
+							value: "2"
+						}
+					],
+					houseType: [{
+							name: "部分出租",
+							value: "1"
+						},
+						{
+							name: "全部出租",
+							value: "2"
+						}
+					],
+					rentalUse: [{
+							name: "仓库",
+							value: "1"
+						},
+						{
+							name: "办公",
+							value: "2"
+						},
+						{
+							name: "商用",
+							value: "3"
+						},
+						{
+							name: "居住",
+							value: "4"
+						}
+					]
+				},
+				selectBusList: [],
+				selectBusTitle: '',
+				selectBusModel: '',
+				selectBusKey: '',
+				typeShow: false,
+				houseCode: ''
+			}
+		},
+		created() {
+
+		},
+		mounted() {
+
+		},
+		onLoad(option) {
+			this.houseCode = option.houseCode
+		},
+		onShow() {
+
+		},
+		methods: {
+			showSelectBus(data, title, model, key) {
+				this.selectBusList = data
+				this.selectBusTitle = title
+				this.selectBusModel = model
+				this.selectBusKey = key
+				this.typeShow = true
+			},
+			//类型选择确认
+			typeSelect(item) {
+				this[this.selectBusModel] = item.name
+				this.form[this.selectBusKey] = item.value
+				this.typeShow = !this.typeShow
+			},
+			beforeUpload(e) {
+				console.log(e)
+				return false
+			},
+			addRentForm() {
+				this.rentFormNum++
+			},
+			decRentForm() {
+				this.rentFormNum > 1 && this.rentFormNum--
+			},
+			async save() {
+				let houseTenantVOList = []
+				this.$refs.rentform.forEach(item => {
+					houseTenantVOList.push(item.form)
+				})
+				const relationIndex = this.dataList.relation.findIndex(item => item.name === this.relationName)
+				const statusIndex = this.dataList.houseType.findIndex(item => item.name === this.houseTypeName)
+				const rentalIndex = this.dataList.rentalUse.findIndex(item => item.name === this.rentalUseName)
+				let params = {
+					houseCode: this.houseCode,
+					tenantRelationship: this.dataList.relation[relationIndex].value,
+					rentalTime: this.form.rentalTime,
+					houseStatus: this.dataList.houseType[statusIndex].value,
+					rentalUse: this.dataList.rentalUse[rentalIndex].value,
+					houseTenantVOList
+				}
+				
+				const res = await addHouseRental(params)
+				console.log(res)
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.container {
+		position: relative;
+		width: 100%;
+		display: flex;
+		flex-direction: column;
+		background: #F9F9FA;
+		padding-bottom: 200rpx;
+
+		.box-title {
+			padding: 10px 0;
+		}
+
+		.basic-info {
+
+			.form-item {
+				background-color: #ffffff;
+				padding: 5rpx 20rpx;
+				border-bottom: 1px solid #eff1f3;
+			}
+
+		}
+
+		.pic {
+			background-color: #ffffff;
+			padding: 40rpx 30rpx;
+		}
+
+		.btn-group {
+			padding: 30rpx;
+			position: absolute;
+			bottom: 28rpx;
+			width: calc(100% - 60rpx);
+
+			.btn {
+				margin-bottom: 30rpx;
+			}
+		}
+
+		.bottom-tools {
+			display: flex;
+			background-color: #ffffff;
+			position: fixed;
+			bottom: 0;
+			width: 100%;
+			border-top: 1rpx solid #e4e4e4;
+			z-index: 999;
+
+			.btn-item {
+				margin: 40rpx;
+			}
+		}
+	}
 </style>
\ No newline at end of file
diff --git a/subPackage/bs/views/zhsb.vue b/subPackage/bs/views/zhsb.vue
index 4ff95e7..c8f8019 100644
--- a/subPackage/bs/views/zhsb.vue
+++ b/subPackage/bs/views/zhsb.vue
@@ -1,149 +1,169 @@
-<template>
-	<view class="container">
-		<view class="content-box">
-			<view class="info">
-				<view class="item location">
-					<u-icon name="map" color="#000000" size="16"></u-icon>
-					<view class="location">
-						{{location}}
-					</view>
-				</view>
-
-				<view class="item statistics">
-					<view class="room">{{room}}</view>
-					<view class="num">{{`(共${num}人)`}}</view>
-				</view>
-			</view>
-
-
-			<view class="box-title">
-				<box-title title="出租管理"></box-title>
-			</view>
-
-			<view class="list">
-				<rentList :list="rentList"></rentList>
-			</view>
-		</view>
-
-
-		<view class="bottom">
-			<view class="btn">
-				<u-button @click="addRent" type="primary" :plain="true" text="添加租赁信息"></u-button>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import rentList from "@/subPackage/bs/components/list/rentList.vue"
-	export default {
-		components: {
-			rentList
-		},
-		data() {
-			return {
-				location: "万达晶座:11栋楼",
-				room: "一单元303室",
-				num: "1",
-
-				//出租列表
-				rentList: [{
-						name: "张三",
-						num: "1",
-						startTime: "2022-01-01",
-						endTime: "2023-12-23",
-						status: "未到期"
-					},
-					{
-						name: "测试",
-						num: "2",
-						startTime: "2022-01-01",
-						endTime: "2023-12-23",
-						status: "未到期"
-					},
-					{
-						name: "张三",
-						num: "1",
-						startTime: "2022-01-01",
-						endTime: "2023-12-23",
-						status: "未到期"
-					}
-				]
-			}
-		},
-		created() {
-
-		},
-		mounted() {
-
-		},
-		onLoad(option) {
-
-		},
-		onShow() {
-
-		},
-		methods: {
-			addRent() {
-				this.$u.func.globalNavigator("/subPackage/bs/views/rentDetail")
-			}
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	.container {
-		position: relative;
-		width: 100%;
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		background: #F9F9FA;
-
-		.content-box {
-			height: 0;
-			flex: 1;
-			overflow-y: auto;
-		}
-
-		.list {
-			// padding-bottom: 20px;
-		}
-
-		.item {
-			display: flex;
-			padding: 30rpx 20rpx;
-			background-color: #ffffff;
-			border-bottom: 1px solid #eff1f3;
-		}
-
-		.location {
-			font-weight: 700;
-		}
-
-		.room {
-			font-weight: 700;
-		}
-
-		.bottom {
-			padding: 20rpx;
-			background-color: #ffffff;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-
-			.btn {
-				// width: calc(100% - 40rpx);
-			}
-		}
-
-	}
-
-	.box-title {
-		padding: 40rpx 0;
-	}
-
-	view {
-		font-size: 32rpx;
-	}
+<template>
+	<view class="container">
+		<view class="content-box">
+			<view class="info">
+				<view class="item location">
+					<u-icon name="map" color="#000000" size="16"></u-icon>
+					<view class="location">
+						{{location}}
+					</view>
+				</view>
+
+				<view class="item statistics">
+					<view class="room">{{room}}</view>
+					<view class="num">{{`(共${num}人)`}}</view>
+				</view>
+			</view>
+
+
+			<view class="box-title">
+				<box-title title="出租管理"></box-title>
+			</view>
+			<view class="list">
+				<rentList :list="rentList"></rentList>
+			</view>
+		</view>
+
+
+		<view class="bottom">
+			<view class="btn">
+				<u-button @click="addRent" type="primary" :plain="true" text="添加租赁信息"></u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import rentList from "@/subPackage/bs/components/list/rentList.vue"
+	import {
+		getHouseRentInfo
+	} from "@/api/doorplateAddress/doorplateAddress";
+	import {
+		logAdd
+	} from "../../../api/system/logManage";
+	export default {
+		components: {
+			rentList
+		},
+		data() {
+			return {
+				houseCode: '',
+				location: "万达晶座:11栋楼",
+				room: "一单元303室",
+				num: "1",
+
+				//出租列表
+				rentList: [{
+					name: "张三",
+					num: "1",
+					startTime: "2022-01-01",
+					endTime: "2023-12-23",
+					status: "未到期"
+				}]
+			}
+		},
+		created() {
+
+		},
+		mounted() {
+			console.log(this.$store)
+		},
+		onLoad(option) {
+			const {
+				houseCode
+			} = option
+			this.houseCode = houseCode
+		},
+		onShow() {
+			this.getHouseRent()
+		},
+		methods: {
+			async getHouseRent() {
+				const res = await getHouseRentInfo(this.houseCode)
+				const {
+					aoiName,
+					buildingName,
+					doorplateName,
+					unitName,
+					houseRentalList: {
+						houseTenantVOList
+					}
+				} = res.data
+				console.log(res.data)
+				this.location = aoiName + buildingName
+				this.room = unitName + doorplateName + "室"
+				this.rentList = houseTenantVOList || []
+				this.rentList.length !== 0 && this.rentList.forEach(item => {
+					if (!item.houseTenantVOList) {
+						num += item.houseTenantVOList.length
+					}
+					// 事件格式处理
+					item.startTime = item.rentalTime.split(' ')[0]
+					item.endTime = item.dueTime.split(' ')[0]
+					item.status === 1 ? '未到期' : '到期'
+					item.num = item.houseTenantVOList.length
+				})
+			},
+			addRent() {
+				this.$u.func.globalNavigator("/subPackage/bs/views/rentDetail?houseCode="+this.houseCode)
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.container {
+		position: relative;
+		width: 100%;
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		background: #F9F9FA;
+
+		.content-box {
+			height: 0;
+			flex: 1;
+			overflow-y: auto;
+		}
+
+		.list {
+			// padding-bottom: 20px;
+		}
+
+		.item {
+			display: flex;
+			padding: 30rpx 20rpx;
+			background-color: #ffffff;
+			border-bottom: 1px solid #eff1f3;
+		}
+
+		.location {
+			font-weight: 700;
+		}
+
+		.room {
+			font-weight: 700;
+		}
+
+		.bottom {
+			padding: 20rpx;
+			background-color: #ffffff;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			.btn {
+				// width: calc(100% - 40rpx);
+			}
+		}
+
+	}
+
+	.box-title {
+		padding: 40rpx 0;
+	}
+
+	view {
+		font-size: 32rpx;
+	}
 </style>
\ No newline at end of file
diff --git a/subPackage/house/family/index.vue b/subPackage/house/family/index.vue
index 018ac15..c867726 100644
--- a/subPackage/house/family/index.vue
+++ b/subPackage/house/family/index.vue
@@ -18,7 +18,7 @@
 								<u-grid class="flex flex-wrap" col="2" :border="true">
 									<u-grid-item v-for="(scItem, scIndex) in cItem.children" :key="scItem.id"  @click.native="pushPage(scItem)">
 										<view class="room-box flex f-d-c">
-											<view class="flex a-i-c j-c-s-b" v-show="scItem.residentialStatus">
+											<view class="flex a-i-c j-c-s-b">
 												<view class="l">{{scItem.realName}}</view>
 												<view class="r flex">
 													<view v-show="scItem.residentialStatus">
diff --git a/subPackage/house/roomControl/index.vue b/subPackage/house/roomControl/index.vue
index b989721..0ab9ad1 100644
--- a/subPackage/house/roomControl/index.vue
+++ b/subPackage/house/roomControl/index.vue
@@ -2,34 +2,34 @@
 	<view class="container">
 		<view class="main">
 			<view class="content">
-				<u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+				<u-form labelWidth="70" :model="form" ref="form">
 					<box-title title=""></box-title>
 
 					<view class="basic-info mt-20">
-						<u-form-item class="form-item" labelWidth="100" label="绑定手机" required prop="location">
-							<u--input border="none" v-model="form.location" placeholder="请输入">
+						<u-form-item class="form-item" labelWidth="100" label="绑定手机" required>
+							<u--input border="none" v-model="form.phone" placeholder="请输入">
 							</u--input>
 						</u-form-item>
 
-						<u-form-item class="form-item" labelWidth="100" label="地址" required prop="location">
-							<u--input border="none" v-model="form.location">
+						<u-form-item class="form-item" labelWidth="100" label="地址" required>
+							<u--input border="none" v-model="form.address">
 							</u--input>
 						</u-form-item>
 
-						<u-form-item class="form-item" labelWidth="100" label="物业月费" required prop="location">
-							<u--input border="none" v-model="form.location">
+						<u-form-item class="form-item" labelWidth="100" label="物业月费" required>
+							<u--input border="none" v-model="form.property_price">
 							</u--input>
 						</u-form-item>
 
-						<u-form-item class="form-item" labelWidth="100" label="到期时间" required prop="location">
-							<u--input border="none" v-model="form.location">
+						<u-form-item class="form-item" labelWidth="100" label="到期时间" required>
+							<u--input border="none" v-model="form.service_due">
 							</u--input>
 						</u-form-item>
 					</view>
 
 					<box-title class="mt-20" title="房屋外观"></box-title>
 					<view class="pic mt-20">
-						<u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+						<u-upload :fileList="form.image_urls" :previewFullImage="uploadConfig.previewFullImage"
 							:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
 							:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
 							@delete="deletePic">
@@ -53,12 +53,12 @@
 		<u-modal style="flex: none;" :show="popupShow" :closeOnClickOverlay="true" showCancelButton @cancel="popupShow = false" @confirm="popupConfirm">
 			<view class="slot-content">
 				<view class="flex_base">
-					安置房
+					{{ labelModelInfo.title }}
 				</view>
 
 				<u-radio-group class="mt-40" v-model="labelValue" placement="row">
 					<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in labelList" :key="index"
-						:label="item.name" :name="item.name" :activeColor="item.color" @change="radioChange">
+						:label="item.name" :name="item.name" :activeColor="item.color" @change="radioChange(item)">
 					</u-radio>
 				</u-radio-group>
 
@@ -76,12 +76,21 @@
 
 <script>
 	import uploadMixin from "@/mixin/uploadMixin";
+	import {
+		getHouseDetail,
+		getHouseLabelList
+	} from "@/api/doorplateAddress/doorplateAddress";
 	export default {
 		mixins: [uploadMixin],
 		data() {
 			return {
+				houseCode: '',
 				form: {
-					relation: ""
+					phone: "",
+					address: "",
+					property_price: "",
+					service_due: "",
+					image_urls: []
 				},
 				showList: {
 					relation: false
@@ -95,26 +104,8 @@
 
 				popupShow: false,
 
-				labelBtnList: [{
-						name: '商品房'
-					},
-					{
-						name: '自建房'
-					},
-					{
-						name: '安置房'
-					},
-					{
-						name: '公房'
-					},
-					{
-						name: '危房'
-					},
-					{
-						name: '出租房'
-					},
-				],
-
+				labelBtnList: [],
+				
 				// 安置房弹框中
 				labelList: [{
 						name: '撤销',
@@ -136,7 +127,12 @@
 						color: '#EE0A24'
 					}
 				],
+				labelModelInfo: {
+					title: '',
+					selectedColor: ''
+				},
 				labelValue: '苹果',
+				value1: ''
 			}
 		},
 		created() {
@@ -146,18 +142,42 @@
 
 		},
 		onLoad(option) {
-
+			const { code } = option
+			this.houseCode = code
 		},
 		onShow() {
-
+			this.getLabelList()
 		},
 		methods: {
 			showLabelPopup(item) {
 				this.popupShow = true
+				this.labelModelInfo.title = item.name
 			},
 			
 			popupConfirm(){
 				this.popupShow = false
+			},
+			
+			radioChange(item) {
+				
+			},
+			async getHouseDetailInfo() {
+				const res = await getHouseDetail()
+				const { phone, address, property_price, service_due, image_urls } = res.data
+				this.form = {
+					phone,
+					address,
+					property_price,
+					service_due,
+					image_urls: [
+						image_urls
+					]
+				}
+				
+			},
+			async getLabelList() {
+				const res = await getHouseLabelList()
+				this.labelBtnList = res.data
 			}
 		}
 	}
diff --git a/subPackage/house/roomDetails/index.vue b/subPackage/house/roomDetails/index.vue
index 3fdc026..313f698 100644
--- a/subPackage/house/roomDetails/index.vue
+++ b/subPackage/house/roomDetails/index.vue
@@ -1,251 +1,273 @@
-<template>
-	<view class="container">
-		<view class="main">
-			<view class="content">
-				<view class="base b-c-w">
-					<view class="flex a-i-c">
-						<u-icon name="photo"></u-icon> {{ houseTitle }}
-					</view>
-					<view class="flex j-c-s-b">
-						<view>
-							{{ unitName }}单元 {{ houseName }}室
-							<!-- (共2人) -->
-						</view>
-						<view class="flex a-i-c">
-							<u-button size='small' shape="circle" type="primary" :plain="true" text="房屋管理"></u-button>
-						</view>
-					</view>
-				</view>
-
-				<view class="mt-40 owner-box b-c-w" v-for="(item, index) in ownerInfoList" :key="index">
-					<view class="flex">
-						<view class="l flex-1 flex">
-							<view class="flex_base">
-								<view class="head-img flex_base">
-									<u--image shape="circle" :showLoading="true" :src="item.src" width="120rpx"
-										height="120rpx"></u--image>
-								</view>
-							</view>
-							<view class="info">
-								<view>姓名:{{item.name}}</view>
-								<view class="flex">
-									手机:{{item.phoneNumber}} <u-icon name="phone-fill" color="#4586FE"></u-icon>
-								</view>
-								<view class="flex">
-									关系:
-									<view class="flex a-i-c">
-										<u-tag :text="item.relationship" size="mini"
-											:bgColor="item.residentialStatus == 1 ? '#07C160' : '#1989FA'"></u-tag>
-									</view>
-								</view>
-							</view>
-						</view>
-						<view class="r flex f-d-c j-c-s-a">
-							<view>
-								<u-button size='small' type="primary" :plain="true" text="资料管理"></u-button>
-							</view>
-							<view>
-								<u-button size='small' type="primary" :plain="true" text="标签管理"></u-button>
-							</view>
-						</view>
-					</view>
-					<view class="flex a-i-c j-c-s-b">
-						<view class="l flex">
-							<u-icon name="photo"></u-icon>
-							<u-icon name="photo"></u-icon>
-						</view>
-						<view class="r">
-							<u-icon name="trash-fill" color="red"></u-icon>
-						</view>
-					</view>
-				</view>
-
-				<view class="mt-20 rent-out-box">
-					<box-title :title="'出租管理'"></box-title>
-
-					<view class="mt-40 rent-out-list b-c-w" v-for="(item, index) in rentOutList" :key="index">
-						<view class="t flex j-c-s-b a-i-c">
-							<view class="l">
-								租客:{{item.tenant}}(共{{item.allNum}}人)
-							</view>
-							<view class="r">
-								<u-icon name="trash-fill" color="red"></u-icon>
-							</view>
-						</view>
-						<view class="t flex j-c-s-b a-i-c">
-							<view class="l">
-								{{item.rentalTime}} - {{item.dueTime}}
-							</view>
-							<view class="r">
-								{{item.status == 1 ? '已到期' : '未到期'}}
-							</view>
-						</view>
-						<view class="btn-box flex j-c-s-a">
-							<u-button color="#CDF3DF" text="修改"></u-button>
-							<u-button color="#DAE7FF" text="续租"></u-button>
-							<u-button color="#FCCED3" text="终止"></u-button>
-						</view>
-					</view>
-				</view>
-
-				<u-divider text="已经到底了"></u-divider>
-			</view>
-
-			<view class="edit-btn">
-				<view>
-					<u-button type="primary" text="添加成员"></u-button>
-				</view>
-
-				<view>
-					<u-button type="primary" :plain="true" text="添加租赁信息"></u-button>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		getHouseRentInfo
-	} from "@/api/doorplateAddress/doorplateAddress";
-	export default {
-		components: {},
-
-		data() {
-			return {
-				houseTitle: '',
-				currentId: '',
-				houseName: '',
-				unitName: '',
-				ownerInfoList: [],
-				rentOutList: []
-			}
-		},
-
-		onLoad(e) {
-			const { id } = e
-			this.currentId = id
-		},
-		onShow() {
-			this.getHouseRentInfoList()
-		},
-
-		methods: {
-			async getHouseRentInfoList() {
-				const res = await getHouseRentInfo(this.currentId)
-				const { districtName, doorplateName, buildingName, houseName, unitName, houseRentalList, householdList } = res.data
-				this.houseTitle = districtName + ':' + buildingName
-				this.rentOutList = houseRentalList
-				this.ownerInfoList = householdList
-				this.houseName = houseName
-				this.unitName = unitName
-				// 判断当前租客有没有过期
-				this.rentOutList.forEach(item => {
-					// 事件格式处理
-					item.rentalTime = item.rentalTime.split(' ')[0]
-					item.dueTime = item.dueTime.split(' ')[0]
-					// 当前房间租客数量
-					item.allNum = item.houseTenantVOList.length
-					// 多人个租客将第一个作为显示
-					item.tenant = item.houseTenantVOList.length > 0 ? item.houseTenantVOList[0].name : ''
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.container {
-		width: 100%;
-		height: 100%;
-
-		display: flex;
-		flex-direction: column;
-		background: #F9F9FA;
-		font-size: 26rpx;
-
-
-		.main {
-			position: relative;
-			height: 0;
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-
-			.content {
-				height: 0;
-				flex: 1;
-				overflow-y: auto;
-
-				.base {
-					&>view {
-						padding: 0 10rpx;
-						height: 96rpx;
-						line-height: 96rpx;
-						border-bottom: 1rpx solid #EBEDF0;
-					}
-				}
-
-				.owner-box {
-
-
-					.l {
-						align-items: center;
-
-						.head-img {
-							width: 164rpx;
-							height: 164rpx;
-							background: #EBEDF0;
-							border-radius: 50%;
-						}
-
-						.info {
-							margin-left: 16rpx;
-
-							&>view {
-								height: 66rpx;
-								line-height: 66rpx;
-							}
-						}
-					}
-
-					&>view {
-						padding: 10px;
-					}
-
-					&>view:last-child {
-						height: 44rpx;
-						border-top: 1rpx solid #EBEDF0;
-					}
-				}
-
-				.rent-out-box {
-
-					.rent-out-list {
-						padding: 20rpx 16rpx;
-						
-						.t {
-							height: 72rpx;
-							
-						}
-
-						.btn-box {
-							&>.u-button {
-								margin: 0 16rpx;
-							}
-						}
-					}
-				}
-			}
-
-			.edit-btn {
-				height: 116rpx;
-				display: flex;
-				justify-content: space-around;
-				align-items: center;
-				background: #fff;
-				border-top: 1rpx solid #ccc;
-			}
-		}
-	}
+<template>
+	<view class="container">
+		<view class="main">
+			<view class="content">
+				<view class="base b-c-w">
+					<view class="flex a-i-c">
+						<u-icon name="photo"></u-icon> {{ houseInfo.houseTitle }}
+					</view>
+					<view class="flex j-c-s-b">
+						<view>
+							{{ houseInfo.unitName }}单元 {{ houseInfo.houseName }}室(共{{ houseInfo.allNum }}人)
+						</view>
+						<view class="flex a-i-c">
+							<u-button @click="pushPage" size='small' shape="circle" type="primary" :plain="true"
+								text="房屋管理"></u-button>
+						</view>
+					</view>
+				</view>
+
+				<view class="mt-40 owner-box b-c-w" v-for="(item, index) in ownerInfoList" :key="index">
+					<view class="flex">
+						<view class="l flex-1 flex">
+							<view class="flex_base">
+								<view class="head-img flex_base">
+									<u--image shape="circle" :showLoading="true" :src="item.src" width="120rpx"
+										height="120rpx"></u--image>
+								</view>
+							</view>
+							<view class="info">
+								<view>姓名:{{item.name}}</view>
+								<view class="flex">
+									手机:{{item.phoneNumber}} <u-icon name="phone-fill" color="#4586FE"></u-icon>
+								</view>
+								<view class="flex">
+									关系:
+									<view class="flex a-i-c">
+										<u-tag :text="item.relationship" size="mini"
+											:bgColor="item.residentialStatus == 1 ? '#07C160' : '#1989FA'"></u-tag>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="r flex f-d-c j-c-s-a">
+							<view>
+								<u-button size='small' type="primary" :plain="true" text="资料管理"></u-button>
+							</view>
+							<view>
+								<u-button size='small' type="primary" :plain="true" text="标签管理"></u-button>
+							</view>
+						</view>
+					</view>
+					<view class="flex a-i-c j-c-s-b">
+						<view class="l flex">
+							<u-icon name="photo"></u-icon>
+							<u-icon name="photo"></u-icon>
+						</view>
+						<view class="r">
+							<u-icon name="trash-fill" color="red"></u-icon>
+						</view>
+					</view>
+				</view>
+
+				<view class="mt-20 rent-out-box">
+					<box-title :title="'出租管理'"></box-title>
+
+					<view class="mt-40 rent-out-list b-c-w" v-for="(item, index) in rentOutList" :key="index">
+						<view class="t flex j-c-s-b a-i-c">
+							<view class="l">
+								租客:{{item.tenant}}(共{{item.allNum}}人)
+							</view>
+							<view class="r">
+								<u-icon name="trash-fill" color="red"></u-icon>
+							</view>
+						</view>
+						<view class="t flex j-c-s-b a-i-c">
+							<view class="l">
+								{{item.rentalTime}} - {{item.dueTime}}
+							</view>
+							<view class="r">
+								{{item.status == 1 ? '已到期' : '未到期'}}
+							</view>
+						</view>
+						<view class="btn-box flex j-c-s-a">
+							<u-button color="#CDF3DF" text="修改"></u-button>
+							<u-button color="#DAE7FF" text="续租"></u-button>
+							<u-button color="#FCCED3" text="终止"></u-button>
+						</view>
+					</view>
+				</view>
+
+				<u-divider text="已经到底了"></u-divider>
+			</view>
+
+			<view class="edit-btn">
+				<view>
+					<u-button type="primary" text="添加成员"></u-button>
+				</view>
+
+				<view>
+					<u-button type="primary" :plain="true" text="添加租赁信息"></u-button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getHouseRentInfo
+	} from "@/api/doorplateAddress/doorplateAddress";
+	export default {
+		components: {},
+
+		data() {
+			return {
+				currentId: '',
+				houseInfo: {
+					// 房间号
+					houseName: '',
+					// 单元号
+					unitName: '',
+					houseTitle: '',
+					// 人员数量
+					allNum: 0
+				},
+				ownerInfoList: [],
+				rentOutList: []
+			}
+		},
+
+		onLoad(e) {
+			const {
+				id
+			} = e
+			this.currentId = id
+		},
+		onShow() {
+			this.getHouseRentInfoList()
+		},
+
+		methods: {
+			async getHouseRentInfoList() {
+				const res = await getHouseRentInfo(this.currentId)
+				const {
+					aoiName,
+					buildingName,
+					houseName,
+					unitName,
+					houseRentalList,
+					householdList
+				} = res.data
+				console.log(res.data)
+				this.rentOutList = houseRentalList
+				this.ownerInfoList = householdList
+				this.houseInfo.houseName = houseName
+				this.houseInfo.unitName = unitName
+				this.houseInfo.houseTitle = aoiName + ':' + buildingName
+				// 判断当前租客有没有过期
+				this.rentOutList.forEach(item => {
+					// 事件格式处理
+					item.rentalTime = item.rentalTime.split(' ')[0]
+					item.dueTime = item.dueTime.split(' ')[0]
+					// 当前房间租客数量
+					item.allNum = item.houseTenantVOList.length
+					// 多人个租客将第一个作为显示
+					item.tenant = item.houseTenantVOList.length > 0 ? item.houseTenantVOList[0].name : ''
+				})
+				this.houseInfo.allNum = householdList.length
+				console.log(res.data)
+			},
+			pushPage() {
+				const url = `/subPackage/house/roomControl/index?code=${this.currentId}`
+				this.$u.func.globalNavigator(url, "navTo")
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		width: 100%;
+		height: 100%;
+
+		display: flex;
+		flex-direction: column;
+		background: #F9F9FA;
+		font-size: 26rpx;
+
+
+		.main {
+			position: relative;
+			height: 0;
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+
+			.content {
+				height: 0;
+				flex: 1;
+				overflow-y: auto;
+
+				.base {
+					&>view {
+						padding: 0 10rpx;
+						height: 96rpx;
+						line-height: 96rpx;
+						border-bottom: 1rpx solid #EBEDF0;
+					}
+				}
+
+				.owner-box {
+
+
+					.l {
+						align-items: center;
+
+						.head-img {
+							width: 164rpx;
+							height: 164rpx;
+							background: #EBEDF0;
+							border-radius: 50%;
+						}
+
+						.info {
+							margin-left: 16rpx;
+
+							&>view {
+								height: 66rpx;
+								line-height: 66rpx;
+							}
+						}
+					}
+
+					&>view {
+						padding: 10px;
+					}
+
+					&>view:last-child {
+						height: 44rpx;
+						border-top: 1rpx solid #EBEDF0;
+					}
+				}
+
+				.rent-out-box {
+
+					.rent-out-list {
+						padding: 20rpx 16rpx;
+
+						.t {
+							height: 72rpx;
+
+						}
+
+						.btn-box {
+							&>.u-button {
+								margin: 0 16rpx;
+							}
+						}
+					}
+				}
+			}
+
+			.edit-btn {
+				height: 116rpx;
+				display: flex;
+				justify-content: space-around;
+				align-items: center;
+				background: #fff;
+				border-top: 1rpx solid #ccc;
+			}
+		}
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3