ll
liukangdong
2025-02-24 b94daf4ea357eafce26f37a1f0a799d55cbfa1a4
h5/pages/visitorApplication/visitorApplication.vue
@@ -7,7 +7,7 @@
          <text>*</text>
          <text>被访人</text>
        </view>
        <view class="list_item_content" @click="showName = true">
            <view class="list_item_content" @click="selName">
          <text :style="{ color: form1.receptMemberName ? '#000000' : '' }">{{
            form1.receptMemberName ? form1.receptMemberName : "请选择"
          }}</text>
@@ -67,11 +67,7 @@
          <text>是否施工作业</text>
        </view>
        <view class="list_item_content">
          <switch
            color="#4e99a9"
            style="transform: scale(0.8)"
            @change="constructionChange"
          />
               <switch color="#4e99a9" style="transform: scale(0.8)" @change="constructionChange" />
        </view>
      </view>
      <view v-if="form1.type == '1'" class="list_item">
@@ -81,12 +77,8 @@
          <!-- <text>*</text> -->
        </view>
        <view class="list_item_content">
          <input
            type="text"
            v-model="form1.constructionReason"
            placeholder="请输入施工内容"
            placeholder-style="color: #999999;"
          />
               <input type="text" v-model="form1.constructionReason" placeholder="请输入施工内容"
                  placeholder-style="color: #999999;" />
        </view>
      </view>
      <view class="list_item">
@@ -106,52 +98,21 @@
      <view class="footer_btn" @click="onSubmit">提交</view>
    </view>
    <!-- 入园时间 -->
    <u-datetime-picker
      :show="show4"
      :minDate="new Date().getTime()"
      mode="datetime"
      @cancel="show4 = false"
      @confirm="setstarttime"
    ></u-datetime-picker>
      <u-datetime-picker :show="show4" :minDate="new Date().getTime()" mode="datetime" :formatter="formatter"
         @cancel="show4 = false" @confirm="setstarttime"></u-datetime-picker>
    <!-- 离园时间 -->
    <u-datetime-picker
      v-if="form1.starttime"
      :show="show5"
      :minDate="formatTimeStamp(form1.starttime)"
      :maxDate="formatTimeStamp(form1.starttime.slice(0,10) + ' 23:59')"
      mode="datetime"
      @cancel="show5 = false"
      @confirm="setendtime"
    ></u-datetime-picker>
      <u-datetime-picker v-if="form1.starttime" :show="show5" :formatter="formatter"
         :minDate="formatTimeStamp(form1.starttime)" :maxDate="formatTimeStamp(form1.starttime.slice(0,10) + ' 23:59')"
         mode="datetime" @cancel="show5 = false" @confirm="setendtime"></u-datetime-picker>
    <!-- 门禁 -->
    <u-popup
      :show="show"
      :round="10"
      :safeAreaInsetBottom="true"
      :closeable="true"
      mode="bottom"
      @close="closeMJ"
    >
      <u-popup :show="show" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom" @close="closeMJ">
      <view class="menjin">
        <view class="respondent-title"> 选择门禁 </view>
        <scroll-view scroll-y class="list">
          <view
            class="list_item"
            v-for="(item, index) in columns"
            :key="index"
            @click="seleMJ(index)"
          >
               <view class="list_item" v-for="(item, index) in columns" :key="index" @click="seleMJ(index)">
            <text>{{ item.name }}</text>
            <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>
                  <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">
@@ -161,14 +122,8 @@
      </view>
    </u-popup>
    <!-- 选择随行人员 -->
    <u-popup
      :show="show1"
      :round="10"
      :safeAreaInsetBottom="true"
      :closeable="true"
      mode="bottom"
      @close="show1 = false"
    >
      <u-popup :show="show1" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom"
         @close="show1 = false">
      <view class="popup-content">
        <view class="respondent-title"> 选择随行人员 </view>
        <view class="search-box">
@@ -177,13 +132,10 @@
              <image src="@/static/ic_search@2x.png" mode="widthFix"></image>
              <input type="text" placeholder="搜索姓名/手机号" />
            </view>
            <text
              @click="
                  <text @click="
                show1 = false;
                show3 = true;
              "
              >新增</text
            >
              ">新增</text>
          </view>
          <view class="search-box-total">共0条数据</view>
        </view>
@@ -212,14 +164,8 @@
      </view>
    </u-popup>
    <!-- 车辆 -->
    <u-popup
      :show="show2"
      :round="10"
      :safeAreaInsetBottom="true"
      :closeable="true"
      mode="bottom"
      @close="show2 = false"
    >
      <u-popup :show="show2" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom"
         @close="show2 = false">
      <view class="addcar">
        <view class="addcar_head">添加车辆</view>
        <view class="addcar_ipt">
@@ -232,14 +178,8 @@
      </view>
    </u-popup>
    <!-- 添加随行人员 -->
    <u-popup
      :show="show3"
      :round="10"
      :safeAreaInsetBottom="true"
      :closeable="true"
      mode="bottom"
      @close="show3 = false"
    >
      <u-popup :show="show3" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom"
         @close="show3 = false">
      <view class="adduser">
        <view class="adduser_head">随行人员</view>
        <view class="adduser_list">
@@ -249,12 +189,8 @@
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt">
              <input
                type="text"
                v-model="withUserList.name"
                placeholder-style="color: #999999;font-size: 28rpx;"
                placeholder="请输入真实姓名"
              />
                     <input type="text" v-model="withUserList.name" placeholder-style="color: #999999;font-size: 28rpx;"
                        placeholder="请输入真实姓名" />
            </view>
          </view>
          <view class="adduser_list_item">
@@ -263,13 +199,8 @@
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt">
              <input
                type="number"
                v-model="withUserList.phone"
                maxlength="11"
                placeholder-style="color: #999999;font-size: 28rpx;"
                placeholder="请输入手机号"
              />
                     <input type="number" v-model="withUserList.phone" maxlength="11"
                        placeholder-style="color: #999999;font-size: 28rpx;" placeholder="请输入手机号" />
            </view>
          </view>
          <view class="adduser_list_item">
@@ -278,14 +209,11 @@
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt" @click="show6 = true">
              <text
                :style="{ color: withUserList.idcardTypeName ? '#000000' : '' }"
                >{{
                     <text :style="{ color: withUserList.idcardTypeName ? '#000000' : '' }">{{
                  withUserList.idcardTypeName
                    ? withUserList.idcardTypeName
                    : "请选择"
                }}</text
              >
                }}</text>
              <u-icon name="arrow-right" color="#CCCCCC" size="16"></u-icon>
            </view>
          </view>
@@ -295,13 +223,8 @@
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt">
              <input
                type="text"
                v-model="withUserList.idcardNo"
                maxlength="18"
                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">
@@ -310,12 +233,8 @@
              <text>公司</text>
            </view>
            <view class="adduser_list_item_ipt">
              <input
                type="text"
                v-model="withUserList.companyName"
                placeholder-style="color: #999999;font-size: 28rpx;"
                placeholder="请输入公司名称"
              />
                     <input type="text" v-model="withUserList.companyName" placeholder-style="color: #999999;font-size: 28rpx;"
                        placeholder="请输入公司名称" />
            </view>
          </view>
          <view class="adduser_list_item">
@@ -333,28 +252,14 @@
          <view class="adduser_list_item">
            <view class="adduser_list_item_label1">
              <text class="cc">人脸照片<b>*</b></text>
              <text class="aa"
                >1、请提供五官清晰,人脸居中的正面人脸免冠照片;</text
              >
                     <text class="aa">1、请提供五官清晰,人脸居中的正面人脸免冠照片;</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"
              >
                <u-icon
                  name="plus"
                  color="rgb(153, 153, 153)"
                  size="28"
                ></u-icon>
                     <view class="adduser_list_item_ipt1_upload" @click="upload('faceImg')" v-if="!withUserList.faceImgUrl">
                        <u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon>
              </view>
              <view
                class="adduser_list_item_ipt1_upload"
                @click="upload('faceImg')"
                v-else
              >
                     <view class="adduser_list_item_ipt1_upload" @click="upload('faceImg')" v-else>
                <image :src="withUserList.faceImgUrl" mode="widthFix"></image>
              </view>
            </view>
@@ -365,22 +270,10 @@
              <text v-if="visit === '1'">*</text>
            </view>
            <view class="adduser_list_item_ipt">
              <view
                class="adduser_list_item_ipt1_upload"
                @click="upload('imgurl')"
                v-if="!withUserList.imgurlUrl"
              >
                <u-icon
                  name="plus"
                  color="rgb(153, 153, 153)"
                  size="28"
                ></u-icon>
                     <view class="adduser_list_item_ipt1_upload" @click="upload('imgurl')" v-if="!withUserList.imgurlUrl">
                        <u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon>
              </view>
              <view
                class="adduser_list_item_ipt1_upload"
                @click="upload('imgurl')"
                v-else
              >
                     <view class="adduser_list_item_ipt1_upload" @click="upload('imgurl')" v-else>
                <image :src="withUserList.imgurlUrl" mode="widthFix"></image>
              </view>
            </view>
@@ -392,36 +285,14 @@
        </view>
      </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>
      <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>
      <qf-image-cropper ref="cropper" :width="280" :height="280" :radius="30" @crop="uploadImg"></qf-image-cropper>
  </view>
</template>
@@ -429,7 +300,9 @@
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'
   import {
      getDaysAfterDate
   } from '@/utils/utils.js'
import {
  getVisitedMember,
  getSystemDictData,
@@ -454,7 +327,16 @@
      showReason: false,
      fileList: [],
      columns1: [
        [{ name: '身份证', id: 0 }, { name: '港澳证件', id: 1 }, { name: '护照', id: 2 }],
               [{
                  name: '身份证',
                  id: 0
               }, {
                  name: '港澳证件',
                  id: 1
               }, {
                  name: '护照',
                  id: 2
               }],
      ],
      VisitReason: [],
      VisitPoeple: [],
@@ -495,7 +377,11 @@
      verify: ''
    }
  },
  components: { tlyPictureCut, keyboardInput, QfImageCropper },
      components: {
         tlyPictureCut,
         keyboardInput,
         QfImageCropper
      },
  onLoad(options) {
    if (options.data) {
      this.form = JSON.parse(options.data)
@@ -505,7 +391,41 @@
    // this.getUserValid()
    this.getUser()
  },
      mounted() {
         this.$eventBus.$on('svisitorAppSel', (option) => {
            // this.$set(this.param, 'checkUserId', option.id)
            // this.$set(this.param, 'applyCheckUserId', option.id)
            // this.$set(this.param, 'checkorName', option.name)
            this.form1.receptMemberName = option.name
            this.form1.receptMemberId = option.id
            this.form1.receptMemberDepartment = option.companyName
         })
      },
  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
         },
         selName() {
            uni.navigateTo({
               url: '/pages/visitorApplication/memberSel'
            })
         },
    openInput(type) {
      this.inputType = type
      this.$refs.keyboard.open()
@@ -529,7 +449,10 @@
    },
    uploadImg(file) {
      this.$refs.cropper.close()
      uni.showLoading({ title: '上传中', mask: true })
            uni.showLoading({
               title: '上传中',
               mask: true
            })
      uni.uploadFile({
        url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`,
        filePath: file.tempFilePath,
@@ -681,7 +604,10 @@
      }
      uni.chooseImage({
        success: (chooseImageRes) => {
          uni.showLoading({ title: '上传中', mask: true })
                  uni.showLoading({
                     title: '上传中',
                     mask: true
                  })
          for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
            uni.uploadFile({
              url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`,
@@ -814,7 +740,9 @@
        if (res.code === 200) {
          this.accessControl = res.data.code
          if (res.data.code === '1') {
            this.$u.api.deviceRoleList({ type: 1 })
                     this.$u.api.deviceRoleList({
                           type: 1
                        })
              .then(device => {
                if (device.code === 200) {
                  if (device.data.length > 0) {
@@ -839,6 +767,7 @@
page {
  background-color: #f7f7f7 !important;
}
.u-upload__button {
  margin: 0 !important;
}
@@ -846,8 +775,10 @@
<style lang="scss" scoped>
.visit {
  width: 100%;
  .menjin {
    width: 100%;
    .respondent-title {
      width: 100%;
      height: 100rpx;
@@ -857,26 +788,31 @@
      font-weight: 600;
      color: #222222;
    }
    .list {
      width: 100%;
      height: 400rpx;
      display: flex;
      flex-direction: column;
      .list_item {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text {
          font-size: 28rpx;
          color: #000000;
        }
        image {
          width: 30rpx;
          height: 30rpx;
        }
      }
    }
    .menjin_footer {
      width: 100%;
      padding: 30rpx;
@@ -884,6 +820,7 @@
      display: flex;
      align-items: center;
      justify-content: space-between;
      .menjin_footer_item {
        flex: 1;
        height: 80rpx;
@@ -895,16 +832,19 @@
        color: #ffffff;
        font-size: 26rpx;
        margin-left: 30rpx;
        &:first-child {
          margin-left: 0 !important;
        }
      }
    }
  }
  .adduser {
    padding: 30rpx;
    width: 100%;
    box-sizing: border-box;
    .adduser_head {
      width: 100%;
      text-align: center;
@@ -913,9 +853,11 @@
      font-weight: 600;
      color: #222222;
    }
    .adduser_list {
      width: 100%;
      margin-top: 40rpx;
      .adduser_list_item {
        width: 100%;
        padding: 24rpx 0;
@@ -924,16 +866,19 @@
        display: flex;
        align-items: center;
        justify-content: space-between;
        .adduser_list_item_label1 {
          flex: 1;
          display: flex;
          flex-direction: column;
          .cc {
            font-size: 30rpx;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            color: #222222;
            margin-bottom: 20rpx;
            b {
              font-size: 30rpx;
              font-family: PingFangSC, PingFang SC;
@@ -941,27 +886,32 @@
              color: #e0312a;
            }
          }
          .aa {
            font-size: 24rpx;
            font-weight: 400;
            color: #999999;
          }
        }
        .adduser_list_item_label {
          flex-shrink: 0;
          display: flex;
          align-items: center;
          font-family: PingFangSC, PingFang SC;
          font-size: 30rpx;
          text {
            &:nth-child(1) {
              color: #e0312a;
            }
            &:nth-child(2) {
              color: #222222;
            }
          }
        }
        .adduser_list_item_ipt {
          flex-shrink: 0;
          text-align: right;
@@ -973,6 +923,7 @@
          display: flex;
          align-items: center;
          justify-content: flex-end;
          .adduser_list_item_ipt1_upload {
            width: 120rpx;
            height: 120rpx;
@@ -981,11 +932,13 @@
            align-items: center;
            justify-content: center;
            overflow: hidden;
            image {
              width: 100%;
              height: 100%;
            }
          }
          text {
            font-size: 28rpx;
            font-family: PingFangSC, PingFang SC;
@@ -995,16 +948,19 @@
        }
      }
    }
    .adduser_footer {
      width: 100%;
      margin-top: 60rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .t {
        background: #4d99a9 !important;
        color: #ffffff !important;
      }
      .adduser_footer_item {
        width: 336rpx;
        height: 88rpx;
@@ -1017,6 +973,7 @@
        font-weight: 400;
        color: #4d99a9;
        margin-right: 18rpx;
        &:last-child {
          margin: 0 !important;
        }
@@ -1028,6 +985,7 @@
    padding: 30rpx;
    width: 100%;
    box-sizing: border-box;
    .addcar_head {
      text-align: center;
      font-size: 32rpx;
@@ -1035,6 +993,7 @@
      font-weight: 600;
      color: #222222;
    }
    .addcar_ipt {
      width: 100%;
      height: 100rpx;
@@ -1043,6 +1002,7 @@
      background: #f7f7f7;
      border-radius: 50rpx;
      margin-top: 60rpx;
      input {
        width: 100%;
        height: 100%;
@@ -1052,16 +1012,19 @@
        text-align: center;
      }
    }
    .addcar_footer {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 60rpx;
      .t {
        background: #4d99a9 !important;
        color: #ffffff !important;
      }
      .addcar_footer_item {
        flex: 1;
        height: 88rpx;
@@ -1073,6 +1036,7 @@
        border-radius: 44rpx;
        border: 1rpx solid #025eef;
        margin-right: 18rpx;
        &:last-child {
          margin-right: 0 !important;
        }
@@ -1085,6 +1049,7 @@
    overflow: hidden;
    display: flex;
    flex-flow: column;
    .respondent-title {
      width: 100%;
      text-align: center;
@@ -1092,14 +1057,17 @@
      font-weight: 600;
      color: #222222;
    }
    .search-box {
      width: 100%;
      margin-top: 40rpx;
      .search-box-top {
        width: 100%;
        height: 68rpx;
        display: flex;
        align-items: center;
        .search-box-top-ipt {
          flex: 1;
          height: 100%;
@@ -1109,12 +1077,14 @@
          border-radius: 4rpx;
          display: flex;
          align-items: center;
          image {
            width: 36rpx;
            height: 36rpx;
            flex-shrink: 0;
            margin-right: 22rpx;
          }
          input {
            flex: 1;
            height: 100%;
@@ -1123,6 +1093,7 @@
            color: #b2b2b2;
          }
        }
        text {
          flex-shrink: 0;
          margin-left: 30rpx;
@@ -1131,6 +1102,7 @@
          color: #025eef;
        }
      }
      .search-box-total {
        font-size: 26rpx;
        font-weight: 400;
@@ -1138,27 +1110,32 @@
        margin-top: 24rpx;
      }
    }
    .list {
      width: 100%;
      height: 800rpx;
      margin-top: 30rpx;
      padding: 0 !important;
      .item {
        width: 100%;
        height: 102rpx;
        display: flex;
        align-items: center;
        border-bottom: 1rpx solid #e5e5e5;
        .item_a {
          flex-shrink: 0;
          width: 36rpx;
          height: 36rpx;
          margin-right: 24rpx;
          image {
            width: 100%;
            height: 100%;
          }
        }
        .item_b {
          flex-shrink: 0;
          width: 80rpx;
@@ -1168,15 +1145,18 @@
          justify-content: center;
          overflow: hidden;
          margin-right: 24rpx;
          image {
            width: 100%;
            height: 100%;
          }
        }
        .item_c {
          flex: 1;
          display: flex;
          align-items: center;
          text {
            &:nth-child(1) {
              font-size: 30rpx;
@@ -1184,6 +1164,7 @@
              font-weight: 400;
              color: #222222;
            }
            &:nth-child(2) {
              font-size: 20rpx;
              font-family: PingFangSC, PingFang SC;
@@ -1198,6 +1179,7 @@
        }
      }
    }
    .footer1 {
      width: 100%;
      height: 100rpx;
@@ -1206,16 +1188,19 @@
      justify-content: space-between;
      padding: 14rpx 0 0 0;
      box-sizing: border-box;
      .footer_left {
        flex: 1;
        display: flex;
        flex-direction: column;
        .footer_left_a {
          font-size: 26rpx;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          color: #333333;
        }
        .footer_left_b {
          font-size: 24rpx;
          font-family: PingFangSC, PingFang SC;
@@ -1223,6 +1208,7 @@
          color: #999999;
        }
      }
      .footer_btn {
        flex-shrink: 0;
        width: 216rpx;
@@ -1252,12 +1238,14 @@
    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;
@@ -1320,6 +1308,7 @@
    padding: 30rpx;
    box-sizing: border-box;
    background-color: #ffffff;
    .cate_head {
      font-size: 32rpx;
      font-family: PingFangSC, PingFang SC;