nidapeng
2024-03-28 e8158d16a13c2ea1f2d8566578137db4394ab610
h5/pages/visitorApplication/visitorApplication.vue
@@ -8,7 +8,7 @@
               <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">
@@ -35,7 +35,7 @@
               <text>离厂时间</text>
               <text>*</text>
            </view>
            <view class="list_item_content" @click="show5 = true">
            <view class="list_item_content" @click="openLC">
               <text :style="{color: form1.endtime ? '#000000' : ''}">{{form1.endtime ? form1.endtime : '请选择'}}</text>
               <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
            </view>
@@ -57,7 +57,7 @@
               <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">
@@ -105,8 +105,10 @@
      ></u-datetime-picker>
      <!-- 离场时间 -->
      <u-datetime-picker
         v-if="form1.starttime"
         :show="show5"
         :minDate="new Date().getTime()"
         :minDate="formatTimeStamp(form1.starttime)"
         :maxDate="formatTimeStamp(maxTime)"
         mode="datetime"
         @cancel="show5 = false"
         @confirm="setoutDate"
@@ -291,6 +293,7 @@
   import tlyPictureCut from "@/components/tly-picture-cut/tlyPictureCut.vue";
   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'
   export default {
      data() {
         return {
@@ -309,6 +312,8 @@
            columns1: [[{name: '身份证', id: 0}, {name: '港澳证件', id: 1},{name: '护照', id: 2}]],
            columns: [],
            cars: [],
            day: null,
            maxTime: '',
            carName: '',
            personnel: [],
            userAnswerId: '',
@@ -443,6 +448,16 @@
            }).then(res => {
               if (res.code === 200) {
                  this.visit = res.data.code
               }
            })
            // 起始时间时长
            this.$u.api.getSystemDictData({
               dictCode: 'VISIT_CONFIG',
               label: 'VALIDATE_VISIT'
            }).then(res => {
               if (res.code === 200) {
                  this.day = Number(res.data.code)
                  // console.log(nextDay('after', true, this.day))
               }
            })
         },
@@ -588,13 +603,24 @@
               }
            })
         },
         openLC() {
            if (!this.form1.starttime) return uni.showToast({
               title: '请先选择入厂时间',
               icon: 'none'
            })
            this.show5 = true
         },
         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.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() {
@@ -1089,7 +1115,9 @@
         .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;