k94314517
2024-05-10 0df3c99a23b6774c39abf16af51cf20bbfefc8a5
h5/pages/visitorApplication/visitorApplication.vue
@@ -2,7 +2,7 @@
   <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>
@@ -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,6 +61,7 @@
               <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>
@@ -58,6 +69,24 @@
            </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">
               <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">
@@ -108,7 +137,6 @@
         v-if="form1.starttime"
         :show="show5"
         :minDate="formatTimeStamp(form1.starttime)"
         :maxDate="formatTimeStamp(maxTime)"
         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) {
@@ -371,6 +406,9 @@
         },
         closeInput() {
            this.$refs.keyboard.close()
         },
         constructionChange(e) {
            console.log(e.detail.value);
         },
         uploadImg(file) {
            this.$refs.cropper.close()
@@ -526,11 +564,6 @@
            }
            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({
@@ -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,7 +650,9 @@
         },
         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) {
@@ -1112,7 +1152,12 @@
         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%;
            // min-height: 98rpx;
@@ -1175,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;