From b62578f8b43f15be89b3d14f463f11aed03e6fb9 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 09 五月 2024 18:57:25 +0800
Subject: [PATCH] 最新版本

---
 h5/pages/visitorApplication/visitorApplication.vue |   90 ++++++++++++++++++++++++++++++++++----------
 1 files changed, 69 insertions(+), 21 deletions(-)

diff --git a/h5/pages/visitorApplication/visitorApplication.vue b/h5/pages/visitorApplication/visitorApplication.vue
index bdf5b0a..9c96377 100644
--- a/h5/pages/visitorApplication/visitorApplication.vue
+++ b/h5/pages/visitorApplication/visitorApplication.vue
@@ -2,13 +2,13 @@
 	<view class="visit">
 		<view class="head">鎷滆淇℃伅</view>
 		<view class="list">
-			<view class="list_item">
+			<!-- <view class="list_item">
 				<view class="list_item_label">
 					<text>琚浜烘墜鏈�</text>
 					<text>*</text>
 				</view>
 				<view class="list_item_content">
-					<input type="number" maxlength="11" v-model="form1.phone1" placeholder="璇疯緭鍏ユ墜鏈哄彿" @blur="getUser" placeholder-style="color: #999999;" />
+					<input type="number" maxlength="11" v-model="form1.phone1" :placeholder="verify == '0' ? '杈撳叆鎵嬫満鍙峰悗鑷姩鑾峰彇' : '璇疯緭鍏ユ墜鏈哄彿'" @blur="getUser" placeholder-style="color: #999999;" />
 				</view>
 			</view>
 			<view class="list_item">
@@ -18,6 +18,16 @@
 				</view>
 				<view class="list_item_content">
 					<input type="text" placeholder="璇疯緭鍏ュ鍚�" v-model="form1.receptMemberName" @blur="getUser" 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" @click="showName = true">
+					<text :style="{color: form1.name ? '#000000' : ''}">{{form1.name ? form1.name : '璇烽�夋嫨'}}</text>
+					<u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
 				</view>
 			</view>
 			<view class="list_item">
@@ -51,13 +61,32 @@
 					<u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
 				</view>
 			</view>
+			<div class="empty"></div>
 			<view class="list_item">
 				<view class="list_item_label">
 					<text>鎷滆浜嬬敱</text>
 					<text>*</text>
 				</view>
 				<view class="list_item_content">
-					<input type="text" v-model="form1.reason" placeholder="璇疯緭鍏ユ潵璁夸簨鐢憋紝鎮ㄦ潵鍋氫粈涔堢殑" placeholder-style="color: #999999;" />
+					<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">
+					<switch color="#4e99a9" style="transform:scale(0.8)" @change="constructionChange" />
+				</view>
+			</view>
+			<view class="list_item">
+				<view class="list_item_label">
+					<text>鏂藉伐鍐呭</text>
+					<text>*</text>
+				</view>
+				<view class="list_item_content">
+					<input type="text" v-model="form1.ss" placeholder="璇疯緭鍏ユ柦宸ュ唴瀹�" placeholder-style="color: #999999;" />
 				</view>
 			</view>
 			<view class="list_item">
@@ -107,8 +136,7 @@
 		<u-datetime-picker
 			v-if="form1.starttime"
 			:show="show5"
-			:minDate="new Date(form1.starttime).getTime()"
-			:maxDate="new Date(maxTime).getTime()"
+			:minDate="formatTimeStamp(form1.starttime)"
 			mode="datetime"
 			@cancel="show5 = false"
 			@confirm="setoutDate"
@@ -283,6 +311,7 @@
 			</view>
 		</u-popup>
 		<u-picker keyName="name" :show="show6" :columns="columns1" @confirm="seleIdcard" @cancel="show6 = false"></u-picker>
+		<u-picker keyName="name" :show="showName" :columns="columnsNames" @confirm="selectedName" @cancel="showName = false"></u-picker>
 		<!-- <tly-picture-cut ref="tlyPictureCut" :pictureSrc="photoSrc" @createImg="uploadImg"></tly-picture-cut> -->
 		<keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" />
 		<qf-image-cropper ref="cropper" :width="280" :height="280" :radius="30" @crop="uploadImg"></qf-image-cropper>
@@ -300,6 +329,7 @@
 				photoSrc: '',
 				type: '',
 				inputType: '',
+				showName: false,
 				show: false,
 				show1: false,
 				show2: false,
@@ -309,7 +339,12 @@
 				show6: false,
 				show7: false,
 				fileList: [],
-				columns1: [[{name: '韬唤璇�', id: 0}, {name: '娓境璇佷欢', id: 1},{name: '鎶ょ収', id: 2}]],
+				columns1: [
+					[{name: '韬唤璇�', id: 0}, {name: '娓境璇佷欢', id: 1},{name: '鎶ょ収', id: 2}],
+				],
+				columnsNames: [
+					[{name: '寮犱笁', id: 0},{name: '寮犱笁', id: 1},{name: '寮犱笁', id: 2},]
+				],
 				columns: [],
 				cars: [],
 				day: null,
@@ -351,9 +386,9 @@
 			if (options.data) {
 				this.form = JSON.parse(options.data)
 			}
-			this.getvisit()
-			this.getVisit1()
-			this.getUserValid()
+			// this.getvisit()
+			// this.getVisit1()
+			// this.getUserValid()
 		},
 		methods: {
 			openInput(type) {
@@ -372,11 +407,14 @@
 			closeInput() {
 				this.$refs.keyboard.close()
 			},
+			constructionChange(e) {
+				console.log(e.detail.value);
+			},
 			uploadImg(file) {
 				this.$refs.cropper.close()
 				uni.showLoading({ title: '涓婁紶涓�', mask: true });
 				uni.uploadFile({
-					url: `${this.$baseUrl}public/api/uploadFtp.do`,
+					url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`,
 					filePath: file.tempFilePath,
 					name: 'file',
 					formData: {
@@ -526,15 +564,10 @@
 				}
 				uni.chooseImage({
 					success: (chooseImageRes) => {
-						// if (type === 'faceImg') {
-						// 	this.photoSrc = chooseImageRes.tempFilePaths[0];
-						// 	this.$refs.tlyPictureCut.showPop();
-						// 	return
-						// }
 						uni.showLoading({ title: '涓婁紶涓�', mask: true });
 						for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
 							uni.uploadFile({
-								url: `${this.$baseUrl}public/api/uploadFtp.do`,
+								url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`,
 								filePath: chooseImageRes.tempFilePaths[i],
 								name: 'file',
 								formData: {
@@ -564,6 +597,11 @@
 				this.withUserList.idcardType = e.value[0].id
 				this.withUserList.idcardTypeName = e.value[0].name
 				this.show6 = false
+			},
+			selectedName(e) {
+				this.form1.name = e.value[0].name
+				this.form1.id = e.value[0].id
+				this.showName = false
 			},
 			submitCart() {
 				if (!this.carName) return uni.showToast({
@@ -612,12 +650,17 @@
 			},
 			setinDate(e) {
 				this.form1.starttime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM');
-				this.maxTime = getDaysAfterDate(uni.$u.timeFormat(e.value, 'yyyy-mm-dd'), this.day)
+				// this.maxTime = getDaysAfterDate(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'), this.day)
+				this.maxTime = this.form1.starttime
+				console.log(this.form1.starttime);
 				this.show4 = false
 			},
 			setoutDate(e) {
 				this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM');
 				this.show5 = false
+			},
+			formatTimeStamp(date) {
+			    return Date.parse(new Date(`${date}`)) || Date.parse(new Date(`${date.replace(/-/g,'/')}`))
 			},
 			// 鏌ヨ鐢ㄦ埛
 			getUser() {
@@ -1109,10 +1152,17 @@
 			padding: 0 30rpx;
 			box-sizing: border-box;
 			background-color: #ffffff;
-
+			.empty{
+				width: 750rpx;
+				height: 20rpx;
+				background-color: #f7f7f7;
+				margin: 0 -30rpx;
+			}
 			.list_item {
 				width: 100%;
-				height: 98rpx;
+				// min-height: 98rpx;
+				padding: 30rpx 0;
+				box-sizing: border-box;
 				display: flex;
 				align-items: center;
 				justify-content: space-between;
@@ -1170,8 +1220,6 @@
 			padding: 30rpx;
 			box-sizing: border-box;
 			background-color: #ffffff;
-			margin-top: 20rpx;
-
 			.cate_head {
 				font-size: 32rpx;
 				font-family: PingFangSC, PingFang SC;

--
Gitblit v1.9.3