From c824e3bcb34f8b6f3c1435ddca91130367dc3729 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 16 一月 2024 10:41:25 +0800
Subject: [PATCH] Mr.Shi
---
 h5/pages/visitorApplication/visitorApplication.vue |   61 ++++++++++++++++++++++--------
 1 files changed, 45 insertions(+), 16 deletions(-)
diff --git a/h5/pages/visitorApplication/visitorApplication.vue b/h5/pages/visitorApplication/visitorApplication.vue
index fdca622..7e447e2 100644
--- a/h5/pages/visitorApplication/visitorApplication.vue
+++ b/h5/pages/visitorApplication/visitorApplication.vue
@@ -59,8 +59,17 @@
 					<input type="text" v-model="form1.reason" placeholder="璇疯緭鍏ユ潵璁夸簨鐢憋紝鎮ㄦ潵鍋氫粈涔堢殑" placeholder-style="color: #999999;" />
 				</view>
 			</view>
+			<view class="list_item">
+				<view class="list_item_label">
+					<text>闅忚杞﹁締</text>
+					<text></text>
+				</view>
+				<view class="list_item_content">
+					<input type="text" placeholder="璇疯緭鍏ヨ溅鐗屽彿" v-model="form1.carNos" maxlength="8" placeholder-style="color: #999999;" />
+				</view>
+			</view>
 		</view>
-		<view class="cate">
+		<!-- <view class="cate">
 			<view class="cate_head">杞﹁締淇℃伅</view>
 			<view class="cate_list">
 				<view class="cate_list_item" v-for="(item, index) in cars" :key="index">
@@ -69,7 +78,7 @@
 				</view>
 			</view>
 			<view class="cate_add" @click="show2 = true">+娣诲姞杞﹁締</view>
-		</view>
+		</view> -->
 		<view class="cate">
 			<view class="cate_head">闅忚浜哄憳淇℃伅</view>
 			<view class="cate_list">
@@ -101,7 +110,7 @@
 			@confirm="setoutDate"
 		></u-datetime-picker>
 		<!-- 闂ㄧ -->
-		<u-popup :show="show" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom" @close="show = false">
+		<u-popup :show="show" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom" @close="closeMJ">
 			<view class="menjin">
 				<view class="respondent-title">
 					閫夋嫨闂ㄧ
@@ -109,12 +118,12 @@
 				<scroll-view scroll-y class="list">
 					<view class="list_item" v-for="(item, index) in columns" :key="index" @click="seleMJ(index)">
 						<text>{{item.name}}</text>
-						<image src="@/static/video@2x.png" mode="widthFix" v-show="!item.active"></image>
-						<image src="@/static/video_sel@2x.png" mode="widthFix" v-show="item.active"></image>
+						<image src="@/static/checkbox@2x.png" mode="widthFix" v-show="!item.active"></image>
+						<image src="@/static/checkbo1x_sel@2x.png" mode="widthFix" v-show="item.active"></image>
 					</view>
 				</scroll-view>
 				<view class="menjin_footer">
-					<view class="menjin_footer_item" @click="show = false">鍙栨秷</view>
+					<view class="menjin_footer_item" @click="closeMJ">鍙栨秷</view>
 					<view class="menjin_footer_item" @click="submitMJ">纭</view>
 				</view>
 			</view>
@@ -235,8 +244,8 @@
 					<view class="adduser_list_item">
 						<view class="adduser_list_item_label1">
 							<text class="cc">浜鸿劯鐓х墖<b>*</b></text>
-							<text class="aa">1銆佽鎻愪緵浜斿畼娓呮櫚锛屼汉鑴稿眳涓殑姝i潰浜鸿劯鍏�</text>
-							<text class="aa">2銆佺収鐗囨棤閫嗗厜銆佹棤PS銆佹棤杩囧害缇庨澶勭悊</text>
+							<text class="aa">1銆佽鎻愪緵浜斿畼娓呮櫚锛屼汉鑴稿眳涓殑姝i潰浜鸿劯鍏嶅啝鐓х墖锛�</text>
+							<text class="aa">2銆佺収鐗囨棤閫嗗厜銆佹棤PS銆佹棤杩囧害缇庨澶勭悊锛�</text>
 						</view>
 						<view class="adduser_list_item_ipt">
 							<view class="adduser_list_item_ipt1_upload" @click="upload('faceImg')" v-if="!withUserList.faceImgUrl">
@@ -326,6 +335,12 @@
 			this.getUserValid()
 		},
 		methods: {
+			closeMJ() {
+				this.show = false
+				this.columns.forEach(item => {
+					item.active = false
+				})
+			},
 			submit() {
 				if (!this.form1.receptMemberId) return uni.showToast({
 					title: '琚浜轰笉鑳戒负绌�',
@@ -343,10 +358,12 @@
 					title: '璁块棶闂ㄧ涓嶈兘涓虹┖',
 					icon: 'none'
 				})
-				if (!this.form1.reason) return uni.showToast({
-					title: '鎷滆浜嬬敱涓嶈兘涓虹┖',
-					icon: 'none'
-				})
+				// if (!this.form1.reason) return uni.showToast({
+				// 	title: '鎷滆浜嬬敱涓嶈兘涓虹┖',
+				// 	icon: 'none'
+				// })
+				this.form1.starttime = this.form1.starttime + ':00'
+				this.form1.endtime = this.form1.endtime + ':00'
 				this.$u.api.createFk({
 					...this.form,
 					...this.form1,
@@ -381,6 +398,11 @@
 					title: '鎵嬫満鍙蜂笉鑳戒负绌�',
 					icon: 'none'
 				})
+				const regExp = /^1[3456789]\d{9}$/;
+				if (!regExp.test(this.withUserList.phone)) return uni.showToast({
+					title: '鎵嬫満鍙锋牸寮忛敊璇�',
+					icon: 'none'
+				})
 				if (!String(this.withUserList.idcardType)) return uni.showToast({
 					title: '璇佷欢绫诲瀷涓嶈兘涓虹┖',
 					icon: 'none'
@@ -389,6 +411,13 @@
 					title: '璇佷欢鍙风爜涓嶈兘涓虹┖',
 					icon: 'none'
 				})
+				if (this.withUserList.idcardType === 0) {
+					const regex = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}[\dxX]$/;
+					if (!regex.test(this.withUserList.idcardNo)) return uni.showToast({
+						title: '璇佷欢鍙风爜鏍煎紡閿欒',
+						icon: 'none'
+					})
+				}
 				if (!this.withUserList.faceImg) return uni.showToast({
 					title: '浜鸿劯鐓х墖涓嶈兘涓虹┖',
 					icon: 'none'
@@ -489,11 +518,11 @@
 				})
 			},
 			setinDate(e) {
-				this.form1.starttime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss');
+				this.form1.starttime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM');
 				this.show4 = false
 			},
 			setoutDate(e) {
-				this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss');
+				this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM');
 				this.show5 = false
 			},
 			// 鏌ヨ鐢ㄦ埛
@@ -658,7 +687,7 @@
 					align-items: center;
 					justify-content: space-between;
 					.adduser_list_item_label1 {
-						flex-shrink: 0;
+						flex: 1;
 						display: flex;
 						flex-direction: column;
 						.cc {
@@ -700,7 +729,7 @@
 						}
 					}
 					.adduser_list_item_ipt {
-						flex: 1;
+						flex-shrink: 0;
 						text-align: right;
 						font-size: 28rpx;
 						font-family: PingFangSC, PingFang SC;
--
Gitblit v1.9.3