From 95ab8469e5c9bb060b97041a0b3a1fd4940b64ff Mon Sep 17 00:00:00 2001
From: GULIMMO <2820890765@qq.com>
Date: Mon, 06 Nov 2023 16:41:56 +0800
Subject: [PATCH] 房屋管理、房屋详情修改,门牌号信息页面更新、场所记录页面搭建

---
 subPackage/bs/views/zhsb.vue               |    5 
 pages.json                                 |  513 ++++++++++++++-------------
 subPackage/bs/components/form/rentForm.vue |   11 
 subPackage/bs/views/rentDetail.vue         |    7 
 subPackage/house/houseNumber/index.vue     |  179 +++++++++
 subPackage/workbench/views/csjl.vue        |  156 ++++++++
 subPackage/house/family/index.vue          |    2 
 subPackage/bs/components/list/rentList.vue |   79 +++-
 subPackage/house/roomControl/index.vue     |  103 +++--
 9 files changed, 731 insertions(+), 324 deletions(-)

diff --git a/pages.json b/pages.json
index 80e4c34..f3d72b0 100644
--- a/pages.json
+++ b/pages.json
@@ -1,249 +1,266 @@
-{
-	"easycom": {
-		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
-	},
-	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
-		//首页
-		{
-			"path": "pages/home/index",
-			"style": {
-				"navigationBarTitleText": "首页",
-				"enablePullDownRefresh": false,
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/user/center",
-			"style": {
-				"navigationBarTitleText": "个人中心",
-				"enablePullDownRefresh": false,
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/login/login-account",
-			"style": {
-				// "navigationBarTitleText": "",
-				"enablePullDownRefresh": false,
-				"navigationStyle": "custom"
-			}
-		}
-
-	],
-	"subPackages": [
-		//我的
-		{
-			"root": "subPackage/user",
-			"pages": [
-				//切换角色
-				{
-					"path": "role/index",
-					"style": {
-						"navigationBarTitleText": "切换角色",
-						"enablePullDownRefresh": false,
-						"navigationBarBackgroundColor": "#4586fe",
-						"navigationBarTextStyle": "white"
-					}
-				},
-				//修改密码
-				{
-					"path": "password/index",
-					"style": {
-						"navigationBarTitleText": "修改密码",
-						"enablePullDownRefresh": false,
-						"navigationBarBackgroundColor": "#fff",
-						"navigationBarTextStyle": "black"
-					}
-				},
-				{
-					"path": "clockIn/index",
-					"style": {
-						"navigationBarTitleText": "在线打卡",
-						"enablePullDownRefresh": false,
-						"navigationBarBackgroundColor": "#fff",
-						"navigationBarTextStyle": "black"
-					}
-				}
-			]
-		},
-		
-		//工作台
-		{
-			"root": "subPackage/workbench",
-			"pages": [{
-					"path": "views/cscj",
-					"style": {
-						"navigationBarTitleText": "场所维护",
-						"enablePullDownRefresh": false,
-						"navigationBarBackgroundColor": "#4586fe",
-						"navigationBarTextStyle": "white"
-					}
-				},
-				{
-					"path":"views/rental",
-					"style": {
-						"navigationBarTitleText": "出租房管理",
-						"enablePullDownRefresh": false,
-						"navigationBarBackgroundColor": "#fff",
-						"navigationBarTextStyle": "black"
-					}
-				}
-			]
-		},
-		//报事
-		{
-			"root": "subPackage/bs",
-			"pages": [{
-					"path": "views/index",
-					"style": {
-						"navigationBarTitleText": "报事",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "views/bsReport",
-					"style": {
-						"navigationBarTitleText": "报事",
-						"navigationBarBackgroundColor": "#4586fe",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "views/bsList",
-					"style": {
-						"navigationBarTitleText": "报事列表",
-						"navigationBarBackgroundColor": "#4586fe",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "views/zhsb",
-					"style": {
-						"navigationBarTitleText": "租客上报",
-						"navigationBarBackgroundColor": "#fff",
-						"navigationBarTextStyle": "black",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "views/rentDetail",
-					"style": {
-						"navigationBarTitleText": "租户详情",
-						"navigationBarBackgroundColor": "#fff",
-						"navigationBarTextStyle": "black",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "views/repair",
-					"style": {
-						"navigationBarTitleText": "报事报修",
-						"navigationBarBackgroundColor": "#fff",
-						"navigationBarTextStyle": "black",
-						"enablePullDownRefresh": false,
-						"navigationStyle": "custom"
-					}
-				},
-				{
-					"path":"views/addRepair",
-					"style": {
-						"navigationBarTitleText": "公共维修",
-						"enablePullDownRefresh": false,
-						"navigationBarBackgroundColor": "#fff",
-						"navigationBarTextStyle": "black"
-					}
-				}
-			]
-		},
-		// 楼栋管理
-		{
-			"root": "subPackage/house",
-			"pages": [{
-					"path": "list/index",
-					"style": {
-						"navigationBarTitleText": "楼栋列表",
-						"navigationBarBackgroundColor": "#5887f9",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "family/index",
-					"style": {
-						"navigationBarTitleText": "楼盘",
-						"navigationBarBackgroundColor": "#5887f9",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "roomDetails/index",
-					"style": {
-						"navigationBarTitleText": "房屋详情",
-						"navigationBarBackgroundColor": "#5887f9",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "member/index",
-					"style": {
-						"navigationBarTitleText": "资料管理",
-						"navigationBarBackgroundColor": "#5887f9",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "member/householdLabel",
-					"style": {
-						"navigationBarTitleText": "标签管理",
-						"navigationBarBackgroundColor": "#5887f9",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": false
-					}
-				},
-				{
-					"path": "roomControl/index",
-					"style": {
-						"navigationBarTitleText": "房屋管理",
-						"navigationBarBackgroundColor": "#5887f9",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": false
-					}
-				}
-
-			]
-		}
-
-
-	],
-	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "",
-		"navigationBarBackgroundColor": "#fff",
-		"backgroundColor": "#4586FE"
-	},
-	"tabBar": {
-		// "custom": true,
-		"color": "#AFB8C3",
-		"selectedColor": "#5086FA",
-		"borderStyle": "white",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/home/index",
-				"selectedIconPath": "static/img/tabbar-01-selected.png",
-				"iconPath": "static/img/tabbar-01.png",
-				"text": "首页"
-			},
-			{
-				"pagePath": "pages/user/center",
-				"iconPath": "static/img/tabbar-03.png",
-				"selectedIconPath": "static/img/tabbar-03-selected.png",
-				"text": "我的"
-			}
-		]
-	}
+{
+	"easycom": {
+		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+	},
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		//首页
+		{
+			"path": "pages/home/index",
+			"style": {
+				"navigationBarTitleText": "首页",
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/user/center",
+			"style": {
+				"navigationBarTitleText": "个人中心",
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/login/login-account",
+			"style": {
+				// "navigationBarTitleText": "",
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+			}
+		}
+
+	],
+	"subPackages": [
+		//我的
+		{
+			"root": "subPackage/user",
+			"pages": [
+				//切换角色
+				{
+					"path": "role/index",
+					"style": {
+						"navigationBarTitleText": "切换角色",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#4586fe",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				//修改密码
+				{
+					"path": "password/index",
+					"style": {
+						"navigationBarTitleText": "修改密码",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black"
+					}
+				},
+				{
+					"path": "clockIn/index",
+					"style": {
+						"navigationBarTitleText": "在线打卡",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black"
+					}
+				}
+			]
+		},
+
+		//工作台
+		{
+			"root": "subPackage/workbench",
+			"pages": [{
+					"path": "views/cscj",
+					"style": {
+						"navigationBarTitleText": "场所维护",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#4586fe",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "views/csjl",
+					"style": {
+						"navigationBarTitleText": "场所记录",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black"
+					}
+				},
+				{
+					"path": "views/rental",
+					"style": {
+						"navigationBarTitleText": "出租房管理",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black"
+					}
+				}
+			]
+		},
+		//报事
+		{
+			"root": "subPackage/bs",
+			"pages": [{
+					"path": "views/index",
+					"style": {
+						"navigationBarTitleText": "报事",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "views/bsReport",
+					"style": {
+						"navigationBarTitleText": "报事",
+						"navigationBarBackgroundColor": "#4586fe",
+						"navigationBarTextStyle": "white",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "views/bsList",
+					"style": {
+						"navigationBarTitleText": "报事列表",
+						"navigationBarBackgroundColor": "#4586fe",
+						"navigationBarTextStyle": "white",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "views/zhsb",
+					"style": {
+						"navigationBarTitleText": "租客上报",
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "views/rentDetail",
+					"style": {
+						"navigationBarTitleText": "租户详情",
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "views/repair",
+					"style": {
+						"navigationBarTitleText": "报事报修",
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom"
+					}
+				},
+				{
+					"path": "views/addRepair",
+					"style": {
+						"navigationBarTitleText": "公共维修",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black"
+					}
+				}
+			]
+		},
+		// 楼栋管理
+		{
+			"root": "subPackage/house",
+			"pages": [{
+					"path": "list/index",
+					"style": {
+						"navigationBarTitleText": "楼栋列表",
+						"navigationBarBackgroundColor": "#5887f9",
+						"navigationBarTextStyle": "white",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "family/index",
+					"style": {
+						"navigationBarTitleText": "楼盘",
+						"navigationBarBackgroundColor": "#5887f9",
+						"navigationBarTextStyle": "white",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "roomDetails/index",
+					"style": {
+						"navigationBarTitleText": "房屋详情",
+						"navigationBarBackgroundColor": "#5887f9",
+						"navigationBarTextStyle": "white",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "member/index",
+					"style": {
+						"navigationBarTitleText": "资料管理",
+						"navigationBarBackgroundColor": "#5887f9",
+						"navigationBarTextStyle": "white",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "member/householdLabel",
+					"style": {
+						"navigationBarTitleText": "标签管理",
+						"navigationBarBackgroundColor": "#5887f9",
+						"navigationBarTextStyle": "white",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "roomControl/index",
+					"style": {
+						"navigationBarTitleText": "房屋管理",
+						"navigationBarBackgroundColor": "#5887f9",
+						"navigationBarTextStyle": "white",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "houseNumber/index",
+					"style": {
+						"navigationBarTitleText": "门牌码信息",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black"
+					}
+				}
+			]
+		}
+
+
+	],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "",
+		"navigationBarBackgroundColor": "#fff",
+		"backgroundColor": "#4586FE"
+	},
+	"tabBar": {
+		// "custom": true,
+		"color": "#AFB8C3",
+		"selectedColor": "#5086FA",
+		"borderStyle": "white",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/home/index",
+				"selectedIconPath": "static/img/tabbar-01-selected.png",
+				"iconPath": "static/img/tabbar-01.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/user/center",
+				"iconPath": "static/img/tabbar-03.png",
+				"selectedIconPath": "static/img/tabbar-03-selected.png",
+				"text": "我的"
+			}
+		]
+	}
 }
\ No newline at end of file
diff --git a/subPackage/bs/components/form/rentForm.vue b/subPackage/bs/components/form/rentForm.vue
index c7eb16c..db9d8bf 100644
--- a/subPackage/bs/components/form/rentForm.vue
+++ b/subPackage/bs/components/form/rentForm.vue
@@ -44,11 +44,12 @@
 					}, {
 						// 自定义验证函数,见上说明
 						validator: (rule, value, callback) => {
-							const reg = /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/
-							if (reg.test(value)) {
-								return true
-							}
-							return false
+							const reg =
+								/^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/
+							if (reg.test(value)) {
+								return true
+							}
+							return false
 						},
 						message: '请输入正确的身份证号',
 						// 触发器可以同时用blur和change
diff --git a/subPackage/bs/components/list/rentList.vue b/subPackage/bs/components/list/rentList.vue
index 83de5eb..073bd05 100644
--- a/subPackage/bs/components/list/rentList.vue
+++ b/subPackage/bs/components/list/rentList.vue
@@ -18,10 +18,8 @@
 
 			<view class="list-btn">
 				<u-button icon="edit-pen" class="btn-item" type="primary" plain text="修改"
-				:disabled="item.status == 1 || item.status == 2"
-					@click="pushPage(item)"></u-button>
-				<u-button icon="calendar" class="btn-item" type="primary" plain text="续租"
-				:disabled="item.status == 2"
+					:disabled="item.status == 1 || item.status == 2" @click="pushPage(item)"></u-button>
+				<u-button icon="calendar" class="btn-item" type="primary" plain text="续租" :disabled="item.status == 2"
 					@click="xzHandleClick(item)"></u-button>
 				<u-button icon="order" class="btn-item" type="primary" plain text="终止"
 					:disabled="item.status == 1 || item.status == 2" @click="terminate(item)"></u-button>
@@ -33,12 +31,13 @@
 			<u-divider text="已经到底了"></u-divider>
 		</view>
 
-		<u-datetime-picker :show="isPickerShow" @cancel="isPickerShow = false" mode="date"
+		<u-datetime-picker v-model="currentTime" :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" @cancel="isPickerShow = false" mode="date"
 			@confirm="dueTimeConfirm"></u-datetime-picker>
-		<u-datetime-picker :show="istPickerShow" @cancel="istPickerShow = false" mode="date"
+		<u-datetime-picker v-model="currentTime" :closeOnClickOverlay="true" @close="istPickerShow = false" :show="istPickerShow" @cancel="istPickerShow = false" mode="date"
 			@confirm="terminateTimeConfirm"></u-datetime-picker>
 		<u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
 			@cancel="isModelShow = false" @confirm="deleteRentalConfirm"></u-modal>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -72,7 +71,9 @@
 						name: '已终止',
 						value: 2
 					},
-				]
+				],
+				currentTime: Number(new Date()),
+				currentRentInfo: {}
 			}
 		},
 		methods: {
@@ -90,14 +91,14 @@
 				const {
 					code,
 					data
-				} = await deleteRentalInfo(this.currentRentalId)
-				if (code !== 200) {
-					uni.showToast({
-						title: "删除失败",
-						icon: "error",
-						duration: 1500
-					})
-					return
+				} = await deleteRentalInfo(this.currentRentalId)
+				if (code !== 200) {
+					uni.showToast({
+						title: "删除失败",
+						icon: "error",
+						duration: 1500
+					})
+					return
 				}
 				this.isModelShow = false
 				this.$emit('refreshData')
@@ -114,9 +115,24 @@
 			},
 			xzHandleClick(item) {
 				this.currentRentalId = item.housingRentalId
+				this.currentRentInfo = item
 				this.isPickerShow = true
 			},
 			async dueTimeConfirm(e) {
+				// 判断当前选中的时间是否小于租房时间
+				const {
+					rentalTime
+				} = this.currentRentInfo
+				const rentDate = new Date(rentalTime).getTime()
+				if (rentDate > e.value) {
+					this.$refs.uToast.show({
+						type: 'warning',
+						message: "续租时间不可小于租房时间",
+						position: 'top',
+						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
+					})
+					return
+				}
 				const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
 				const res = await updateDueTime({
 					id: this.currentRentalId,
@@ -127,7 +143,7 @@
 						title: "续租失败",
 						icon: "error",
 						duration: 1500
-					})
+					})
 					return
 				}
 				this.isPickerShow = false
@@ -137,19 +153,32 @@
 				this.currentRentalId = item.housingRentalId
 				this.istPickerShow = true
 			},
-			async terminateTimeConfirm(e) {
+			async terminateTimeConfirm(e) {
+				const {
+					rentalTime
+				} = this.currentRentInfo
+				const rentDate = new Date(rentalTime).getTime()
+				if (rentDate > e.value) {
+					this.$refs.uToast.show({
+						type: 'warning',
+						message: "终止时间不可小于租房时间",
+						position: 'top',
+						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
+					})
+					return
+				}
 				const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
 				const res = await updateDueTime({
 					id: this.currentRentalId,
 					terminationTime: time
-				})
-				if (res.code !== 200) {
-					uni.showToast({
-						title: "终止失败",
-						icon: "error",
-						duration: 1500
-					})
-					return
+				})
+				if (res.code !== 200) {
+					uni.showToast({
+						title: "终止失败",
+						icon: "error",
+						duration: 1500
+					})
+					return
 				}
 				this.istPickerShow = false
 				this.$emit('refreshData')
diff --git a/subPackage/bs/views/rentDetail.vue b/subPackage/bs/views/rentDetail.vue
index c49e031..7082d00 100644
--- a/subPackage/bs/views/rentDetail.vue
+++ b/subPackage/bs/views/rentDetail.vue
@@ -61,9 +61,9 @@
 			:popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
 		</select-bus>
 		<!--出租时间选择-->
-		<u-datetime-picker :closeOnClickOverlay="true" @close="rentTimeShow = false" :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
+		<u-datetime-picker v-model="currentTime" :closeOnClickOverlay="true" @close="rentTimeShow = false" :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
 			@cancel="rentTimeShow = false"></u-datetime-picker>
-		<u-datetime-picker :closeOnClickOverlay="true" @close="dueTimeShow = false" :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
+		<u-datetime-picker v-model="currentTime" :closeOnClickOverlay="true" @close="dueTimeShow = false" :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
 			@cancel="dueTimeShow = false"></u-datetime-picker>
 
 		<view class="bottom-tools">
@@ -184,7 +184,8 @@
 				selectBusKey: '',
 				typeShow: false,
 				houseCode: '',
-				rentId: ''
+				rentId: '',
+				currentTime: Number(new Date())
 			}
 		},
 		onLoad(option) {
diff --git a/subPackage/bs/views/zhsb.vue b/subPackage/bs/views/zhsb.vue
index 48c3154..0768d15 100644
--- a/subPackage/bs/views/zhsb.vue
+++ b/subPackage/bs/views/zhsb.vue
@@ -9,11 +9,6 @@
 						{{ location }}{{ room }}{{ `(共${num}人)` }}
 					</view>
 				</view>
-
-				<!-- <view class="item statistics">
-					<view class="room">{{ room }}</view>
-					<view class="num">{{ `(共${num}人)` }}</view>
-				</view> -->
 			</view>
 
 
diff --git a/subPackage/house/family/index.vue b/subPackage/house/family/index.vue
index 87abf69..9c98ca5 100644
--- a/subPackage/house/family/index.vue
+++ b/subPackage/house/family/index.vue
@@ -132,7 +132,7 @@
 			pushShopPage(e){
 				console.log(e,8888)
 				const { addressCode } = e
-				let url = `/subPackage/workbench/views/cscj?stdId=${addressCode}`
+				let url = `/subPackage/house/houseNumber/index?stdId=${addressCode}`
 				this.$u.func.globalNavigator(url, "navTo")
 			}
 		}
diff --git a/subPackage/house/houseNumber/index.vue b/subPackage/house/houseNumber/index.vue
new file mode 100644
index 0000000..94ed91c
--- /dev/null
+++ b/subPackage/house/houseNumber/index.vue
@@ -0,0 +1,179 @@
+<template>
+	<view class="container">
+		<view class="info-box">
+			<view class="policeman-box">
+				<view class="line-box">
+					<view class="title">公安局</view>
+					<view class="value">{{ policeData.branchName }}</view>
+				</view>
+				<view class="line-box">
+					<view class="title">派出所</view>
+					<view class="value">{{ policeData.localPoliceStationName }}</view>
+				</view>
+				<view class="line-box">
+					<view class="title">辖区民警</view>
+					<view class="value">{{ policeData.policeman }}</view>
+				</view>
+				<view class="line-box">
+					<view class="title">联系电话</view>
+					<view class="value">{{ policeData.policemanPhone }}</view>
+				</view>
+			</view>
+			<view class="fireman-box">
+				<view class="line-box">
+					<view class="title">消防照片</view>
+					<view class="value">未完善</view>
+				</view>
+				<view class="line-box">
+					<view class="title">采集人</view>
+					<view class="value">未完善</view>
+				</view>
+				<view class="line-box">
+					<view class="title">消防责任人</view>
+					<view class="value">未完善</view>
+				</view>
+				<view class="line-box">
+					<view class="title">采集时间</view>
+					<view class="value">未完善</view>
+				</view>
+				<view class="line-box">
+					<view class="title">历史事件</view>
+					<view class="value">未完善</view>
+				</view>
+			</view>
+		</view>
+		<view class="btn-box">
+			<view class="sl-box" @click="csjlClick">
+				<u-icon name="/static/icon/menu-01.png" size="30"></u-icon>
+				<text>场所记录</text>
+			</view>
+			<view class="sl-box" @click="cscjClick">
+				<u-icon name="/static/icon/menu-02.png" size="30"></u-icon>
+				<text>场所采集</text>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import {
+		getDoorplateAddressDetail
+	} from "@/api/doorplateAddress/doorplateAddress";
+	export default {
+		data() {
+			return {
+				stdId: '',
+				policeData: {
+					branchName: '未完善',
+					localPoliceStationName: '未完善',
+					policeman: '未完善',
+					policemanPhone: '未完善'
+				},
+				firemanData: {
+				
+				}
+			}
+		},
+		onLoad(option) {
+			this.stdId = option.stdId
+			this.getBuildingDetail()
+		},
+		methods: {
+			async getBuildingDetail() {
+				const {
+					code,
+					data
+				} = await getDoorplateAddressDetail({
+					stdId: this.stdId
+				})
+				if (code !== 200) {
+					uni.showToast({
+						title: "数据请求失败",
+						icon: "error",
+						duration: 1500
+					})
+					return
+				}
+				const {
+					branchName,
+					localPoliceStationName,
+					policeman,
+					policemanPhone
+				} = data
+				console.log(data);
+				this.policeData = {
+					branchName: branchName || '未完善',
+					localPoliceStationName: localPoliceStationName || '未完善',
+					policeman: policeman || '未完善',
+					policemanPhone: policemanPhone || '未完善'
+				}
+			},
+			cscjClick() {
+				this.$u.func.globalNavigator('/subPackage/workbench/views/cscj?stdId='+this.stdId)
+			},
+			csjlClick() {
+				this.$u.func.globalNavigator('/subPackage/workbench/views/csjl?stdId='+this.stdId)
+			}
+		},
+	}
+</script>
+<style lang="scss" scoped>
+	.container {
+		background-color: #f6f6f6;
+		height: 100%;
+
+		.info-box {
+			height: calc(100% - 110rpx);
+			padding-bottom: 20rpx;
+			overflow: auto;
+			.policeman-box,
+			.fireman-box {
+				background-color: #fff;
+				margin-top: 20rpx;
+				padding: 0 20rpx;
+
+				.line-box {
+					display: flex;
+					justify-content: space-between;
+					border-bottom: 1rpx solid #f6f6f6;
+					padding: 25rpx 0;
+					font-size: 32rpx;
+					.title {
+						flex-shrink: 0;
+					}
+					
+					.value {
+						color: #989898;
+						width: 50%;
+						word-wrap: break-word;
+						margin-left: 20rpx;
+						text-align: right;
+					}
+
+					&:last-child {
+						border: 0;
+					}
+				}
+			}
+		}
+
+		.btn-box {
+			width: 100%;
+			height: 90rpx;
+			background-color: #fff;
+			display: flex;
+			box-shadow: 0 2rpx 12rpx 0 rgba(0, 0, 0, .1);
+
+			.sl-box {
+				flex: 1;
+				display: flex;
+				justify-content: center;
+
+				text {
+					margin-left: 15rpx;
+					font-size: 27rpx;
+					line-height: 90rpx;
+				}
+			}
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/subPackage/house/roomControl/index.vue b/subPackage/house/roomControl/index.vue
index 6d207c4..9cc6754 100644
--- a/subPackage/house/roomControl/index.vue
+++ b/subPackage/house/roomControl/index.vue
@@ -2,26 +2,26 @@
 	<view class="container">
 		<view class="main">
 			<view class="content">
-				<u-form labelWidth="70" :model="form" ref="form">
+				<u-form labelWidth="70" :model="form" ref="form" :rules="rules">
 					<box-title title=""></box-title>
 
 					<view class="basic-info mt-20">
-						<u-form-item class="form-item" labelWidth="100" label="绑定手机" required>
+						<u-form-item class="form-item" labelWidth="100" label="绑定手机" required prop="phone">
 							<u--input border="none" v-model="form.phone" placeholder="请输入">
 							</u--input>
 						</u-form-item>
 
-						<u-form-item class="form-item" labelWidth="100" label="地址" >
+						<u-form-item class="form-item" labelWidth="100" label="地址">
 							<u--input border="none" v-model="form.address" disabled>
 							</u--input>
 						</u-form-item>
 
-						<u-form-item class="form-item" labelWidth="100" label="物业月费" >
+						<u-form-item class="form-item" labelWidth="100" label="物业月费">
 							<u--input border="none" v-model="form.propertyPrice" disabled>
 							</u--input>
 						</u-form-item>
 
-						<u-form-item class="form-item" labelWidth="100" label="到期时间" >
+						<u-form-item class="form-item" labelWidth="100" label="到期时间">
 							<u--input border="none" v-model="form.serviceDue" disabled>
 							</u--input>
 						</u-form-item>
@@ -30,18 +30,17 @@
 					<box-title class="mt-20" title="房屋外观"></box-title>
 					<view class="pic mt-20">
 						<u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
-							:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
-							:capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+							:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+							:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
+							@delete="deletePic">
 						</u-upload>
 					</view>
 
 					<box-title title="房屋标签"></box-title>
 					<view class="mt-20 flex label-btn-box b-c-w">
 						<view v-for="(item, index) in labelBtnList" :key="index">
-							<u-button color="#000" size="mini" type="primary" 
-							:style="{background: item.color}"
-							:plain="true" :text="item.name"
-								@click="showLabelPopup(item)"></u-button>
+							<u-button color="#000" size="mini" type="primary" :style="{background: item.color}"
+								:plain="true" :text="item.name" @click="showLabelPopup(item)"></u-button>
 						</view>
 					</view>
 				</u-form>
@@ -90,12 +89,15 @@
 		removeHouseLabel
 	} from "@/api/house/houseLabel.js";
 	import {
-		getHouseDetail,saveOrUpdateHouse
+		getHouseDetail,
+		saveOrUpdateHouse
 	} from "@/api/house/house.js";
 	import {
 		minioBaseUrl
 	} from '@/common/setting'
-import { number } from "echarts";
+	import {
+		number
+	} from "echarts";
 	export default {
 		mixins: [uploadMixin],
 		data() {
@@ -107,6 +109,30 @@
 					propertyPrice: "",
 					serviceDue: "",
 					imageUrls: "",
+				},
+				rules: {
+
+					phone: [{
+							required: true,
+							message: '请输入手机号',
+							// 可以单个或者同时写两个触发验证方式 
+							trigger: ['change', 'blur'],
+						},
+						{
+							// 自定义验证函数,见上说明
+							validator: (rule, value, callback) => {
+								const reg =
+									/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[1589]))\d{8}$/
+								if (reg.test(value)) {
+									return true
+								}
+								return false
+							},
+							message: '请输入正确的手机号',
+							// 触发器可以同时用blur和change
+							trigger: ['change', 'blur'],
+						}
+					]
 				},
 				showList: {
 					relation: false
@@ -152,7 +178,7 @@
 				labelValue: '',
 				remark: '',
 				// 标记
-				number:0
+				number: 0
 			}
 		},
 		created() {
@@ -176,16 +202,16 @@
 			async getHouseDetailInfo() {
 				var that = this;
 				const param = {
-					houseCode : this.houseCode
+					houseCode: this.houseCode
 				}
 				const res = await getHouseDetail(param)
 				// 房屋标签处理
 				const paramLabel = {
-					parentId:1001
+					parentId: 1001
 				}
 				const resLabel = await getLabelListByParentId(paramLabel)
 				this.labelBtnList = resLabel.data
-				if(null != res.data){
+				if (null != res.data) {
 					const images = []
 					const {
 						phone,
@@ -195,21 +221,21 @@
 						imageUrls,
 						houseLabelVOList
 					} = res.data
-					if(imageUrls.length>0){
+					if (imageUrls.length > 0) {
 						const urls = imageUrls.split(',')
 						// 遍历
-						urls.forEach(e=>{
+						urls.forEach(e => {
 							images.push({
-								url:minioBaseUrl + e,
+								url: minioBaseUrl + e,
 								name: e
 							})
 						})
 					}
-					
-					if(houseLabelVOList.length>0){
-						that.labelBtnList.forEach(e=>{
-							houseLabelVOList.forEach(f=>{
-								if(Number(e.id) == f.labelId){
+
+					if (houseLabelVOList.length > 0) {
+						that.labelBtnList.forEach(e => {
+							houseLabelVOList.forEach(f => {
+								if (Number(e.id) == f.labelId) {
 									e['color'] = f.color
 									e['remark'] = f.remark
 								}
@@ -229,13 +255,13 @@
 			// 获取房屋标签信息
 			async getLabelList() {
 				const param = {
-					parentId:1001
+					parentId: 1001
 				}
 				const res = await getLabelListByParentId(param)
 				this.labelBtnList = res.data
 			},
 			// 更新房屋数据
-			async updateHouseInfo(){
+			async updateHouseInfo() {
 				this.form['houseCode'] = this.houseCode
 				if (this.form.images.length > 0) {
 					let urls = []
@@ -262,7 +288,7 @@
 					duration: 1500,
 					success: () => {
 						setTimeout(() => {
-							// uni.navigateBack()
+							uni.navigateBack()
 						}, 1500)
 					}
 				})
@@ -277,8 +303,8 @@
 				this.labelModelInfo.title = item.name
 				this.currentLabelInfo = item
 				// 遍历标签集合
-				this.labelList.forEach(e=>{
-					if(e.color == item.color){
+				this.labelList.forEach(e => {
+					if (e.color == item.color) {
 						this.labelValue = e.name
 						this.remark = item.remark
 						this.number = 1
@@ -304,13 +330,13 @@
 				} = this.currentColorInfo
 				let res = null
 				if (name === '撤销') {
-					if(this.number==1){
+					if (this.number == 1) {
 						const data = {
-							labelId:id,
+							labelId: id,
 							houseCode: this.houseCode
 						}
 						res = await removeHouseLabel(data)
-					}else{
+					} else {
 						uni.showToast({
 							title: "无可撤销项",
 							icon: "error",
@@ -322,7 +348,7 @@
 					res = await updateHouseLabel({
 						houseCode: this.houseCode,
 						labelId: id,
-						remark:this.remark,
+						remark: this.remark,
 						color
 					})
 				}
@@ -334,11 +360,14 @@
 					})
 					return
 				}
-				// 刷新页面
-				this.getHouseDetailInfo()
+				// 刷新页面 (直接刷新页面上传但没提交的图片会直接没了)
+				// this.getHouseDetailInfo()
+				const labelIndex = this.labelBtnList.findIndex(item => item.id === id)
+				console.log(id);
+				this.labelBtnList[labelIndex].color = color
 				this.popupShow = false
 			},
-			
+
 		}
 	}
 </script>
diff --git a/subPackage/workbench/views/csjl.vue b/subPackage/workbench/views/csjl.vue
new file mode 100644
index 0000000..1fdfd90
--- /dev/null
+++ b/subPackage/workbench/views/csjl.vue
@@ -0,0 +1,156 @@
+<template>
+	<view class="container">
+		<view class="tabsAndSearch">
+			<view class="tabs">
+				<u-tabs :list="tabsList" @click="tabClick" :scrollable="false"></u-tabs>
+			</view>
+			<view class="search">
+				<u--input placeholder="请输入场所名称" prefixIcon="search" class="search-ipt"
+					prefixIconStyle="font-size: 22px;color: #909399"></u--input>
+			</view>
+		</view>
+		<view class="info-box">
+			<view class="records-card" v-for="records in recordsData" :key="records.id">
+				<view class="title">
+					<text>{{ records.title }}</text>
+					<text>{{ records.time }}</text>
+				</view>
+				<view class="info">
+					<view class="charge-man">
+						<text>场所负责人:</text>
+						<text>{{ records.chargeMan }}</text>
+					</view>
+					<view class="phone">
+						<text>手机号:</text>
+						<text>{{ records.phone }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				tabsList: [{
+						id: 1,
+						name: '全部'
+					},
+					{
+						id: 2,
+						name: '待完善'
+					},
+					{
+						id: 3,
+						name: '已完善'
+					}
+				],
+				recordsData: [{
+						id: 1,
+						title: '科创4栋',
+						time: new Date().toLocaleString(),
+						chargeMan: '铃铃铃',
+						phone: '17678654431'
+					},
+					{
+						id: 2,
+						title: '科创4栋',
+						time: new Date().toLocaleString(),
+						chargeMan: '铃铃铃',
+						phone: '17678654431'
+					},
+					{
+						id: 3,
+						title: '科创4栋',
+						time: new Date().toLocaleString(),
+						chargeMan: '铃铃铃',
+						phone: '17678654431'
+					},
+					{
+						id: 4,
+						title: '科创4栋',
+						time: new Date().toLocaleString(),
+						chargeMan: '铃铃铃',
+						phone: '17678654431'
+					}
+				]
+			}
+		},
+		methods: {
+			tabClick() {
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		height: 100%;
+		overflow-y: auto;
+		background-color: #f6f6f6;
+
+		.tabsAndSearch {
+			background-color: #fff;
+
+			.tabs {
+			}
+
+			.search {
+				padding: 20rpx 70rpx;
+
+				.search-ipt {
+					border: 0;
+					border-radius: 9999rpx;
+					background-color: #f6f6f6;
+				}
+			}
+
+		}
+
+		.info-box {
+			.records-card {
+				margin: 20rpx 30rpx 0 30rpx;
+				background-color: #fff;
+				padding: 30rpx;
+				border-radius: 10rpx;
+
+				.title {
+					line-height: 70rpx;
+					display: flex;
+					font-size: 35rpx;
+					display: flex;
+					justify-content: space-between;
+					border-bottom: 1rpx solid #f6f6f6;
+
+					text {
+						&:nth-child(1) {
+							font-weight: 700;
+						}
+
+						&:nth-child(2) {
+							font-size: 27rpx;
+							color: #999999;
+						}
+					}
+				}
+
+				.charge-man,
+				.phone {
+					display: flex;
+					justify-content: space-between;
+					font-weight: 30rpx;
+					color: #717171;
+					margin-top: 25rpx;
+					font-size: 30rpx;
+				}
+
+				&:last-child {
+					margin-bottom: 20rpx;
+				}
+			}
+		}
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3