From fb8db39ccdca6ca638b3e133d186cb3fe6a558bc Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Mon, 04 Mar 2024 17:43:08 +0800
Subject: [PATCH] 更新

---
 subPackage/workbench/views/editExamine.vue |  125 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 121 insertions(+), 4 deletions(-)

diff --git a/subPackage/workbench/views/editExamine.vue b/subPackage/workbench/views/editExamine.vue
index 5ad2511..35e5623 100644
--- a/subPackage/workbench/views/editExamine.vue
+++ b/subPackage/workbench/views/editExamine.vue
@@ -5,7 +5,7 @@
 				<box-title :title="'基本信息'"></box-title>
 				<u-form labelWidth="70" :model="form" :rules="rules" ref="form" class="form">
 					<u-form-item label="场所位置" required class="form-item" prop="location" @click="getLocation">
-						<u--input border="none" v-model="form.location" placeholder="请选择场所位置"></u--input>
+						<u--textarea border="none" v-model="form.location" placeholder="请选择场所位置"></u--textarea>
 						<u-icon slot="right" name="arrow-right"></u-icon>
 					</u-form-item>
 					<u-form-item label="经纬度" required class="form-item">
@@ -20,6 +20,21 @@
 					</u-form-item>
 					<u-form-item label="法人电话" class="form-item" prop="legalTel" required>
 						<u--input border="none" type="number" v-model="form.legalTel" placeholder="请填写法人电话"></u--input>
+					</u-form-item>
+					<u-form-item class="form-item" label="标准地址" required prop="houseCodeBinds"
+						@click="isShowPopup = true">
+						<u--input v-if="!addressNames.length" border="none" disabled disabledColor="#ffffff"
+							placeholder="请选择标准地址">
+						</u--input>
+						<!-- <u-textarea v-if="addressNames" border="none" :disabled="true" disabledColor="#ffffff"
+							v-model="addressNames" placeholder="请选择标准地址">
+						</u-textarea> -->
+						<view v-if="addressNames.length">
+							<view class="f-28" v-for="i in addressNames">
+								{{i}}
+							</view>
+						</view>
+						<u-icon slot="right" name="arrow-right"></u-icon>
 					</u-form-item>
 				</u-form>
 			</view>
@@ -59,6 +74,25 @@
 		</view>
 
 
+		<u-popup :show="isShowPopup" mode="bottom" :round="12" closeable="true" @close="isShowPopup = false">
+			<view class="popup-content">
+				<view class="popup-title f-30">选择标准地址</view>
+				<scroll-view class="popup-list" :scroll-y="true">
+					<u-checkbox-group v-model="checkedPlace" iconPlacement="right" placement="column"
+						@change="checkboxChange" shape="circle">
+						<view class="popup-list-item flex j-c-s-b" v-for="(i,k) in placeList" :key="k">
+							<text class="f-28" style="width:85%">{{i.addressName}}</text>
+							<u-checkbox :name="k"></u-checkbox>
+						</view>
+
+					</u-checkbox-group>
+				</scroll-view>
+
+			</view>
+
+		</u-popup>
+
+
 		<footer-btn @click="submit"></footer-btn>
 
 		<!-- <view class="btn-group">
@@ -77,12 +111,19 @@
 		updatePlaceExtData,
 		getPlaceDetail
 	} from '@/api/placeExp/placeExp.js'
-	import uploadMixin from "@/mixin/uploadMixin";
+	import uploadMixin from "@/mixin/uploadMixinPlace";
 	import boxTitle from "@/subPackage/workbench/components/boxTitle/index.vue"
 	import formItem from '../components/formItem.vue'
 	import {
 		minioBaseUrl
 	} from '@/common/setting'
+
+
+
+	import {
+		getPlaceList
+	} from '@/api/place/place.js'
+
 	export default {
 		mixins: [uploadMixin],
 		components: {
@@ -99,7 +140,8 @@
 					legalPerson: '',
 					legalTel: '',
 					imageUrls: [],
-					planImageUrls: []
+					planImageUrls: [],
+					houseCodeBinds: ""
 				},
 				rules: {
 					"location": {
@@ -133,7 +175,11 @@
 				},
 				personNum: 1,
 				curSelectSite: {},
-				jwd: ""
+				jwd: "",
+				placeList: [],
+				isShowPopup: false,
+				checkedPlace: [],
+				addressNames: []
 			}
 		},
 		onShow() {
@@ -144,12 +190,47 @@
 			//onReady 为uni-app支持的生命周期之一
 			this.$refs.form.setRules(this.rules)
 		},
+
 		mounted() {
+
 			this.$nextTick(() => {
 				this.getCsDetails()
+				this.getPlace();
 			})
 		},
 		methods: {
+
+			checkboxChange(n) {
+				console.log('change', n);
+				let list = n;
+				let ids = [];
+				let names = []
+
+				for (let i = 0, ii = list.length; i < ii; i++) {
+
+					ids.push(this.placeList[list[i]].addressCode)
+					names.push(this.placeList[list[i]].addressName)
+				}
+
+
+
+				this.$set(this.form, "houseCodeBinds", ids.join(","))
+				this.addressNames = names;
+
+
+
+			},
+
+			getPlace() {
+				getPlaceList({
+					addressName: this.form.location
+				}).then(res => {
+					console.log(res)
+					this.placeList = res.data;
+				})
+			},
+
+
 			getLocation() {
 				uni.chooseLocation({
 					success: (res) => {
@@ -386,4 +467,40 @@
 		border: 1rpx solid #EEEEEE;
 		background-color: #fff;
 	}
+
+
+	.popup-content {
+		width: 100%;
+		padding: 0 30rpx 30rpx;
+		box-sizing: border-box;
+		background-color: #fff;
+		// height: 800rpx;
+
+		.popup-title {
+			padding: 30rpx 0;
+			text-align: center;
+			font-weight: bold;
+		}
+
+		.popup-list {
+			height: 600rpx;
+			margin-top: 20rpx;
+		}
+
+		.popup-list-item {
+			padding: 20rpx 0;
+			border-bottom: 1px solid #f1f1f1;
+			position: relative;
+		}
+
+		.address-name {
+			width: 90%;
+		}
+
+		.check-icon {
+			position: absolute;
+			right: 20rpx;
+			top: 20rpx;
+		}
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3