From 2ae60f81bbef5b2de4a9cc3e90bbedf19e8e4446 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 07 三月 2024 10:24:00 +0800
Subject: [PATCH] mrshi
---
h5/pages/visitorApplication/visitorApplication.vue | 67 +++++++++++++++++++++++++--------
1 files changed, 51 insertions(+), 16 deletions(-)
diff --git a/h5/pages/visitorApplication/visitorApplication.vue b/h5/pages/visitorApplication/visitorApplication.vue
index fdca622..4b65e9c 100644
--- a/h5/pages/visitorApplication/visitorApplication.vue
+++ b/h5/pages/visitorApplication/visitorApplication.vue
@@ -53,14 +53,23 @@
<view class="list_item">
<view class="list_item_label">
<text>鎷滆浜嬬敱</text>
- <text></text>
+ <text>*</text>
</view>
<view class="list_item_content">
<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>
@@ -211,7 +220,7 @@
<text>*</text>
</view>
<view class="adduser_list_item_ipt">
- <input type="text" v-model="withUserList.idcardNo" placeholder-style="color: #999999;font-size: 28rpx;" placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�" />
+ <input type="text" v-model="withUserList.idcardNo" maxlength="18" placeholder-style="color: #999999;font-size: 28rpx;" placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�" />
</view>
</view>
<view class="adduser_list_item">
@@ -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,9 +335,15 @@
this.getUserValid()
},
methods: {
+ closeMJ() {
+ this.show = false
+ this.columns.forEach(item => {
+ item.active = false
+ })
+ },
submit() {
if (!this.form1.receptMemberId) return uni.showToast({
- title: '琚浜轰笉鑳戒负绌�',
+ title: '璇峰~鍐欐湁鏁堢殑璁块棶浜�',
icon: 'none'
})
if (!this.form1.starttime) return uni.showToast({
@@ -347,14 +362,22 @@
title: '鎷滆浜嬬敱涓嶈兘涓虹┖',
icon: 'none'
})
+ // this.form1.starttime = this.form1.starttime + ':00'
+ // this.form1.endtime = this.form1.endtime + ':00'
+ let data = JSON.parse(JSON.stringify(this.form1))
+ data.starttime = data.starttime + ':00'
+ data.endtime = data.endtime + ':00'
this.$u.api.createFk({
...this.form,
- ...this.form1,
+ ...data,
openid: this.$store.state.openId,
withUserList: this.personnel
}).then(res => {
if (res.code === 200) {
console.log(res)
+ uni.reLaunch({
+ url: `/pages/appointmentDetails/appointmentDetails?id=${res.data}`
+ })
}
})
},
@@ -381,6 +404,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 +417,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 +524,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 +693,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 +735,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