From 7298d5354963a88643a543b51b90192dc9fc934c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 九月 2025 18:43:14 +0800
Subject: [PATCH] 最新版本541200007

---
 h5/pages/staff/visitorReport.vue |   97 +++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 75 insertions(+), 22 deletions(-)

diff --git a/h5/pages/staff/visitorReport.vue b/h5/pages/staff/visitorReport.vue
index 75023e8..4431d4e 100644
--- a/h5/pages/staff/visitorReport.vue
+++ b/h5/pages/staff/visitorReport.vue
@@ -6,19 +6,20 @@
           <text>*</text>
           <text>琚浜哄鍚�</text>
         </view>
-        <view class="list_item_content" @click="showName = true">
+        <!-- <view class="list_item_content" @click="showName = true"> -->
+        <view class="list_item_content">
           <text :style="{ color: form1.receptMemberName ? '#000000' : '' }">{{
             form1.receptMemberName
               ? form1.receptMemberName + " " + form1.receptCompanyName
               : "璇烽�夋嫨"
           }}</text>
-          <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+          <!-- <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>
+          <text>鍏ュ洯鏃堕棿</text>
         </view>
         <view class="list_item_content" @click="show4 = true">
           <text :style="{ color: form1.starttime ? '#000000' : '' }">{{
@@ -30,7 +31,7 @@
       <view class="list_item">
         <view class="list_item_label">
           <text>*</text>
-          <text>绂诲巶鏃堕棿</text>
+          <text>绂诲洯鏃堕棿</text>
         </view>
         <view class="list_item_content" @click="openLC">
           <text :style="{ color: form1.endtime ? '#000000' : '' }">{{
@@ -106,36 +107,46 @@
             placeholder-style="color: #999999;"
         /></view>
       </view>
-      <view class="list_item">
+      <view class="list_item" @click="isShowReason = true">
         <view class="list_item_label">
           <text>*</text>
           <text>鏉ヨ浜嬬敱</text>
         </view>
-        <view class="list_item_content"
+				<view class="list_item_content">
+				  <text
+				    class="mr6"
+				    :style="{ color: form1.reason ? '#000000' : '#999999' }"
+				    >{{ form1.reason ? form1.reason : "璇烽�夋嫨" }}</text
+				  >
+				  <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
+				</view>
+        <!-- <view class="list_item_content"
           ><input
             type="text"
             v-model="form1.reason"
             placeholder="璇疯緭鍏ユ潵璁夸簨鐢�"
             placeholder-style="color: #999999;"
-        /></view>
+        /></view> -->
       </view>
     </view>
     <view class="zw"></view>
     <view class="footer"
       ><view class="footer_btn" @click="submit">鎻愪氦</view></view
     >
-    <!-- 鍏ュ満鏃堕棿 -->
+    <!-- 鍏ュ洯鏃堕棿 -->
     <u-datetime-picker
       :show="show4"
       :minDate="new Date().getTime()"
       mode="datetime"
+			:formatter="formatter"
       @cancel="show4 = false"
       @confirm="setinDate"
     ></u-datetime-picker>
-    <!-- 绂诲満鏃堕棿 -->
+    <!-- 绂诲洯鏃堕棿 -->
     <u-datetime-picker
       v-if="form1.starttime"
       :show="show5"
+			:formatter="formatter"
       :minDate="formatTimeStamp(form1.starttime)"
       :maxDate="formatTimeStamp(maxTime)"
       mode="datetime"
@@ -162,6 +173,17 @@
         </view>
       </view>
     </u-popup>
+		<!-- 鏉ヨ鏄敱 -->
+		<u-picker
+		  keyName="title"
+		  :show="isShowReason"
+		  closeOnClickOverlay
+		  :columns="reasonList"
+		  @confirm="reasonSel"
+		  @close="isShowReason = false"
+		  @cancel="isShowReason = false"
+		></u-picker>
+		
     <u-picker
       keyName="name"
       :show="showName"
@@ -188,7 +210,7 @@
 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 { createVisit, getVisitedMember } from '@/api'
+import { createVisit, getVisitedMember, getVisitReason } from '@/api'
 export default {
   data() {
     return {
@@ -200,8 +222,10 @@
       show4: false,
       show5: false,
       show7: false,
+      isShowReason: false,
       showName: false,
       fileList: [],
+			reasonList: [],
       memberList: [[{ name: '韬唤璇�', id: 0 }, { name: '娓境璇佷欢', id: 1 }, { name: '鎶ょ収', id: 2 }]],
       columnsNames: [[{ name: '寮犱笁', id: 0 }, { name: '寮犱笁', id: 1 }, { name: '寮犱笁', id: 2 }]],
       columns: [],
@@ -234,12 +258,30 @@
     const userInfo = uni.getStorageSync('userInfo') || {}
     this.$set(this.form1, 'receptMemberName', userInfo.realname)
     this.$set(this.form1, 'receptMemberId', userInfo.id || '')
-    this.$set(this.form1, 'receptCompanyName', userInfo.company.companyName || '')
+    this.$set(this.form1, 'receptCompanyName', userInfo.company.name || '')
     // this.getvisit()
     // this.getVisit1()
     // this.getUserValid()
   },
   methods: {
+		formatter(type, value) {
+			if (type === 'year') {
+				return `${value}骞碻
+			}
+			if (type === 'month') {
+				return `${value}鏈坄
+			}
+			if (type === 'day') {
+				return `${value}鏃
+			}
+			if (type === 'hour') {
+				return `${value}鏃禶
+			}
+			if (type === 'minute') {
+				return `${value}鍒哷
+			}
+			return value
+		},
     openInput(type) {
       this.inputType = type
       this.$refs.keyboard.open()
@@ -259,10 +301,18 @@
       this.$set(this.form1, 'receptCompanyName', e.value[0].companyName)
       this.showName = false
     },
+		reasonSel(e) {
+			console.log('e',e);
+			this.$set(this.form1, 'reason', e.value[0].title)
+			this.isShowReason = false
+		},
     getUser() {
       getVisitedMember().then(res => {
         this.memberList = [res.data || []]
       })
+			getVisitReason().then(res => {
+				this.reasonList = [res.data || []]
+			})
     },
     closeInput() {
       this.$refs.keyboard.close()
@@ -276,12 +326,12 @@
         })
       if (!this.form1.starttime)
         return uni.showToast({
-          title: '鍏ュ満鏃堕棿涓嶈兘涓虹┖',
+          title: '鍏ュ洯鏃堕棿涓嶈兘涓虹┖',
           icon: 'none'
         })
       if (!this.form1.endtime)
         return uni.showToast({
-          title: '绂诲満鏃堕棿涓嶈兘涓虹┖',
+          title: '绂诲洯鏃堕棿涓嶈兘涓虹┖',
           icon: 'none'
         })
       if (!this.form1.name) return uni.showToast({
@@ -292,6 +342,12 @@
         title: '鎵嬫満鍙蜂笉鑳戒负绌�',
         icon: 'none'
       })
+      var re = /^1[3,4,5,6,7,8,9][0-9]{9}$/;
+		  var result = re.test(this.form1.phone);
+      if (!result) return uni.showToast({
+        title: '鎵嬫満鍙锋牸寮忎笉姝g‘',
+        icon: 'none'
+      }) 
       if (!this.form1.companyName) return uni.showToast({
         title: '鏉ヨ鍗曚綅涓嶈兘涓虹┖',
         icon: 'none'
@@ -385,7 +441,7 @@
     openLC() {
       if (!this.form1.starttime)
         return uni.showToast({
-          title: '璇峰厛閫夋嫨鍏ュ巶鏃堕棿',
+          title: '璇峰厛閫夋嫨鍏ュ洯鏃堕棿',
           icon: 'none'
         })
       this.show5 = true
@@ -445,7 +501,7 @@
   }
 };
 </script>
-<style>
+<style lang="scss">
 page {
   background-color: #f7f7f7 !important;
 }
@@ -465,7 +521,7 @@
       line-height: 100rpx;
       text-align: center;
       font-size: 32rpx;
-      font-weight: 500;
+      font-weight: 600;
       color: #222222;
     }
     .list {
@@ -521,7 +577,7 @@
       text-align: center;
       font-size: 32rpx;
       font-family: PingFangSC, PingFang SC;
-      font-weight: 500;
+      font-weight: 600;
       color: #222222;
     }
     .addcar_ipt {
@@ -646,16 +702,13 @@
     padding: 0 30rpx;
     padding-bottom: env(safe-area-inset-bottom);
     box-sizing: border-box;
-    position: fixed;
-    left: 0;
-    bottom: 68rpx;
-
+		margin-top: 80rpx;
     .footer_btn {
       width: 100%;
       height: 88rpx;
       line-height: 88rpx;
       text-align: center;
-      background: #4e99a9;
+      background: $uni-color-primary;
       border-radius: 44rpx;
       font-size: 32rpx;
       color: #ffffff;

--
Gitblit v1.9.3