From bf8d85d5f83c2036fb4239d764d33e99c1b62bd3 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 31 五月 2024 14:53:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/visitorApplication/visitorApplication.vue | 194 +++++++++++++++++++++++++++---------------------
1 files changed, 109 insertions(+), 85 deletions(-)
diff --git a/h5/pages/visitorApplication/visitorApplication.vue b/h5/pages/visitorApplication/visitorApplication.vue
index ecc0b4f..6478aba 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.receptMemberName ? '#000000' : ''}">{{form1.receptMemberName ? form1.receptMemberName : '璇烽�夋嫨'}}</text>
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
</view>
</view>
<view class="list_item">
@@ -40,24 +50,43 @@
<u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
</view>
</view>
- <view class="list_item" v-if="accessControl === '1'" @click="show = true">
+ <!-- <view class="list_item" v-if="accessControl === '1'" @click="show = true">
<view class="list_item_label">
<text>璁块棶闂ㄧ</text>
<text>*</text>
</view>
- <!-- @click="show6 = true" -->
<view class="list_item_content">
<text :style="{color: form1.doorSelectName ? '#000000' : ''}">{{form1.doorSelectName ? form1.doorSelectName : '璇烽�夋嫨'}}</text>
<u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
</view>
- </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" @click="showReason = true">
+ <text :style="{color: form1.reason ? '#000000' : ''}">{{form1.reason ? form1.reason : '璇烽�夋嫨鎷滆浜嬬敱'}}</text>
+ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+ </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.reason" placeholder="璇疯緭鍏ユ潵璁夸簨鐢憋紝鎮ㄦ潵鍋氫粈涔堢殑" placeholder-style="color: #999999;" />
+ <switch color="#4e99a9" style="transform:scale(0.8)" @change="constructionChange" />
+ </view>
+ </view>
+ <view v-if="form1.type == '1'" class="list_item">
+ <view class="list_item_label">
+ <text>鏂藉伐鍐呭</text>
+ <!-- <text>*</text> -->
+ </view>
+ <view class="list_item_content">
+ <input type="text" v-model="form1.constructionReason" placeholder="璇疯緭鍏ユ柦宸ュ唴瀹�" placeholder-style="color: #999999;" />
</view>
</view>
<view class="list_item">
@@ -71,29 +100,9 @@
</view>
</view>
</view>
- <!-- <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">
- <text>{{item}}</text>
- <u-icon name="close" color="#999999" size="20" @click="deleCars(index)"></u-icon>
- </view>
- </view>
- <view class="cate_add" @click="show2 = true">+娣诲姞杞﹁締</view>
- </view> -->
- <view class="cate">
- <view class="cate_head">闅忚浜哄憳淇℃伅</view>
- <view class="cate_list">
- <view class="cate_list_item" v-for="(item,index) in personnel" :key="index">
- <text>{{item.name}}</text>
- <u-icon name="close" color="#999999" size="20" @click="deleUser(index)"></u-icon>
- </view>
- </view>
- <view class="cate_add" @click="show3 = true">+娣诲姞闅忚浜哄憳</view>
- </view>
<view class="zw"></view>
<view class="footer">
- <view class="footer_btn" @click="submit">鎻愪氦</view>
+ <view class="footer_btn" @click="onSubmit">鎻愪氦</view>
</view>
<!-- 鍏ュ満鏃堕棿 -->
<u-datetime-picker
@@ -101,17 +110,16 @@
:minDate="new Date().getTime()"
mode="datetime"
@cancel="show4 = false"
- @confirm="setinDate"
+ @confirm="setstarttime"
></u-datetime-picker>
<!-- 绂诲満鏃堕棿 -->
<u-datetime-picker
v-if="form1.starttime"
:show="show5"
:minDate="formatTimeStamp(form1.starttime)"
- :maxDate="formatTimeStamp(maxTime)"
mode="datetime"
@cancel="show5 = false"
- @confirm="setoutDate"
+ @confirm="setendtime"
></u-datetime-picker>
<!-- 闂ㄧ -->
<u-popup :show="show" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom" @close="closeMJ">
@@ -283,6 +291,8 @@
</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="VisitPoeple" @confirm="selectedName" @cancel="showName = false"></u-picker>
+ <u-picker keyName="title" :show="showReason" :columns="VisitReason" @confirm="selectedReason" @cancel="showReason = 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>
@@ -294,12 +304,19 @@
import keyboardInput from "@/components/keyboard-input/keyboard-input.vue";
import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue';
import { getDaysAfterDate } from '@/utils/utils.js'
+ import {
+ getVisitedMember,
+ getSystemDictData,
+ getVisitedVisitReason,
+ createFk
+ } from '@/api'
export default {
data() {
return {
photoSrc: '',
type: '',
inputType: '',
+ showName: false,
show: false,
show1: false,
show2: false,
@@ -308,8 +325,13 @@
show5: false,
show6: false,
show7: false,
+ showReason: false,
fileList: [],
- columns1: [[{name: '韬唤璇�', id: 0}, {name: '娓境璇佷欢', id: 1},{name: '鎶ょ収', id: 2}]],
+ columns1: [
+ [{name: '韬唤璇�', id: 0}, {name: '娓境璇佷欢', id: 1},{name: '鎶ょ収', id: 2}],
+ ],
+ VisitReason: [],
+ VisitPoeple: [],
columns: [],
cars: [],
day: null,
@@ -326,7 +348,8 @@
doors: '',
doorSelectName: '',
reason: '',
- carNos: ''
+ carNos: '',
+ type: 0
},
withUserList: {
name: '',
@@ -351,9 +374,10 @@
if (options.data) {
this.form = JSON.parse(options.data)
}
- this.getvisit()
- this.getVisit1()
- this.getUserValid()
+ // this.getvisit()
+ // this.getVisit1()
+ // this.getUserValid()
+ this.getUser()
},
methods: {
openInput(type) {
@@ -372,11 +396,16 @@
closeInput() {
this.$refs.keyboard.close()
},
+ constructionChange(e) {
+ console.log(e.detail.value);
+ this.form1.type = Number(e.detail.value)
+ console.log(this.form1.type);
+ },
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: {
@@ -398,7 +427,7 @@
item.active = false
})
},
- submit() {
+ onSubmit() {
if (!this.form1.receptMemberId) return uni.showToast({
title: '璇峰~鍐欐湁鏁堢殑璁块棶浜�',
icon: 'none'
@@ -424,7 +453,7 @@
let data = JSON.parse(JSON.stringify(this.form1))
data.starttime = data.starttime + ':00'
data.endtime = data.endtime + ':00'
- this.$u.api.createFk({
+ createFk({
...this.form,
...data,
openid: this.$store.state.openId,
@@ -451,7 +480,7 @@
}
})
// 璧峰鏃堕棿鏃堕暱
- this.$u.api.getSystemDictData({
+ getSystemDictData({
dictCode: 'VISIT_CONFIG',
label: 'VALIDATE_VISIT'
}).then(res => {
@@ -526,15 +555,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 +588,17 @@
this.withUserList.idcardType = e.value[0].id
this.withUserList.idcardTypeName = e.value[0].name
this.show6 = false
+ },
+ selectedName(e) {
+ this.form1.receptMemberName = e.value[0].name
+ this.form1.receptMemberId = e.value[0].id
+ this.form1.receptMemberDepartment = e.value[0].companyId
+ this.showName = false
+ },
+ selectedReason(e) {
+ this.form1.reason = e.value[0].title
+ console.log(e.value[0].title);
+ this.showReason = false
},
submitCart() {
if (!this.carName) return uni.showToast({
@@ -610,12 +645,14 @@
})
this.show5 = true
},
- setinDate(e) {
+ setstarttime(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) {
+ setendtime(e) {
this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM');
this.show5 = false
},
@@ -624,34 +661,16 @@
},
// 鏌ヨ鐢ㄦ埛
getUser() {
- if (this.verify === '0') {
- if (this.form1.phone1) {
- this.$u.api.getVisitedMember({
- mobile: this.form1.phone1
- }).then(res => {
- if (res.code === 200) {
- this.form1.receptMemberId = res.data.id
- this.form1.receptMemberName = res.data.name
- }
- })
- }
- } else {
- if (this.form1.phone1 && this.form1.receptMemberName) {
- this.$u.api.getVisitedMember({
- mobile: this.form1.phone1,
- name: this.form1.receptMemberName
- }).then(res => {
- if (res.code === 200) {
- this.form1.receptMemberId = res.data.id
- this.form1.receptMemberName = res.data.name
- }
- })
- }
- }
+ getVisitedMember().then(res => {
+ this.VisitPoeple = [res.data || []]
+ })
+ getVisitedVisitReason({}).then(res => {
+ this.VisitReason = [res.data || []]
+ })
},
// 琚嫓璁夸汉淇℃伅鏍¢獙鏂瑰紡锛�0鎵嬫満鍙峰崟鐙牎楠� 1鎵嬫満鍙峰拰濮撳悕缁勫悎鏍¢獙锛�
getUserValid() {
- this.$u.api.getSystemDictData({
+ getSystemDictData({
dictCode: 'SYSTEM',
label: 'BEVISITED_USER_VALID'
}).then(res => {
@@ -662,7 +681,7 @@
},
// 鑾峰彇鏄惁闇�瑕侀�夋嫨闂ㄧ/闂ㄧ鍒楄〃
getvisit() {
- this.$u.api.getSystemDictData({
+ getSystemDictData({
dictCode: 'SYSTEM',
label: 'SELECT_DOORS_VISIT_REQUIRED'
}).then(res => {
@@ -861,7 +880,7 @@
align-items: center;
justify-content: space-between;
.t {
- background: #025EEF !important;
+ background: #4d99a9 !important;
color: #ffffff !important;
}
.adduser_footer_item {
@@ -870,11 +889,11 @@
line-height: 88rpx;
text-align: center;
border-radius: 44rpx;
- border: 1rpx solid #025EEF;
+ border: 1rpx solid #4d99a9;
font-size: 32rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
- color: #025EEF;
+ color: #4d99a9;
margin-right: 18rpx;
&:last-child {
margin: 0 !important;
@@ -918,7 +937,7 @@
justify-content: space-between;
margin-top: 60rpx;
.t {
- background: #025EEF !important;
+ background: #4d99a9 !important;
color: #ffffff !important;
}
.addcar_footer_item {
@@ -1112,10 +1131,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;
@@ -1173,8 +1199,6 @@
padding: 30rpx;
box-sizing: border-box;
background-color: #ffffff;
- margin-top: 20rpx;
-
.cate_head {
font-size: 32rpx;
font-family: PingFangSC, PingFang SC;
@@ -1222,12 +1246,12 @@
justify-content: center;
background: rgba(2, 94, 239, 0);
border-radius: 25rpx;
- border: 1rpx solid #025EEF;
+ border: 1rpx solid #4c99a8;
font-size: 22rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
margin-top: 20rpx;
- color: #025EEF;
+ color: #4c99a8;
margin: 0 auto;
}
}
@@ -1251,7 +1275,7 @@
height: 88rpx;
line-height: 88rpx;
text-align: center;
- background: #025EEF;
+ background: #4c99a8;
border-radius: 44rpx;
font-size: 32rpx;
font-weight: 500;
--
Gitblit v1.9.3