|  |  |  | 
|---|
|  |  |  | <view class="cell"> | 
|---|
|  |  |  | <view class="title"><b>*</b>姓名</view> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <input class="input" @focus="showKeyboard = true" @blur="showKeyboard = false" placeholder-style="color: #999999;" maxlength="30" v-model="visitorData.name" placeholder="请输入您的真实姓名" /> | 
|---|
|  |  |  | <input class="input" @focus="showKeyboard = true" @blur="showKeyboard = false" | 
|---|
|  |  |  | placeholder-style="color: #999999;" maxlength="30" v-model="visitorData.name" placeholder="请输入您的真实姓名" /> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="cell"> | 
|---|
|  |  |  | <view class="title"><b>*</b>手机号</view> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <input type="number" @focus="showKeyboard = true" @blur="showKeyboard = false" class="input" maxlength="11" placeholder-style="color: #999999;" v-model="visitorData.phone" placeholder="请输入您的手机号" /> | 
|---|
|  |  |  | <input type="number" @focus="showKeyboard = true" @blur="showKeyboard = false" class="input" maxlength="11" | 
|---|
|  |  |  | placeholder-style="color: #999999;" v-model="visitorData.phone" placeholder="请输入您的手机号" /> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="cell"> | 
|---|
|  |  |  | <view class="title"><b>*</b>证件类型</view> | 
|---|
|  |  |  | <view class="content" @click="show = true"> | 
|---|
|  |  |  | <text :style="{color: visitorData.idcardTypeName ? '#000000' : ''}">{{visitorData.idcardTypeName ? visitorData.idcardTypeName : '请选择'}}</text> | 
|---|
|  |  |  | <text | 
|---|
|  |  |  | :style="{color: visitorData.idcardTypeName ? '#000000' : ''}">{{visitorData.idcardTypeName ? visitorData.idcardTypeName : '请选择'}}</text> | 
|---|
|  |  |  | <u-icon name="arrow-right" color="#CCCCCC" size="16" class="ml6"></u-icon> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="cell"> | 
|---|
|  |  |  | <view class="title"><b>*</b>证件号码</view> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <input class="input" maxlength="18" @focus="showKeyboard = true" @blur="showKeyboard = false" placeholder-style="color: #999999;" v-model="visitorData.idcardNo" placeholder="请输入您的证件号码" /> | 
|---|
|  |  |  | <input class="input" maxlength="18" @focus="showKeyboard = true" @blur="showKeyboard = false" | 
|---|
|  |  |  | placeholder-style="color: #999999;" v-model="visitorData.idcardNo" placeholder="请输入您的证件号码" /> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="empty"></view> | 
|---|
|  |  |  | <view class="cell"> | 
|---|
|  |  |  | <view class="title"><b>*</b>公司名称</view> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <input class="input" maxlength="50" @focus="showKeyboard = true" @blur="showKeyboard = false" placeholder-style="color: #999999;" v-model="visitorData.companyName" placeholder="请输入您的公司名称" /> | 
|---|
|  |  |  | <input class="input" maxlength="50" @focus="showKeyboard = true" @blur="showKeyboard = false" | 
|---|
|  |  |  | placeholder-style="color: #999999;" v-model="visitorData.companyName" placeholder="请输入您的公司名称" /> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="cell"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- <tly-picture-cut ref="tlyPictureCut" :pictureSrc="photoSrc" @createImg="uploadImg"></tly-picture-cut> --> | 
|---|
|  |  |  | <u-picker :show="show" :columns="columns" keyName="name" @cancel="show = false" @confirm="confirm"></u-picker> | 
|---|
|  |  |  | <qf-image-cropper ref="cropper" :width="280" :height="280" :radius="0" fileType="jpg" @crop="uploadImg"></qf-image-cropper> | 
|---|
|  |  |  | <qf-image-cropper ref="cropper" :width="280" :height="280" :radius="0" fileType="jpg" | 
|---|
|  |  |  | @crop="uploadImg"></qf-image-cropper> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import tlyPictureCut from "@/components/tly-picture-cut/tlyPictureCut.vue"; | 
|---|
|  |  |  | import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue'; | 
|---|
|  |  |  | import { mapState } from 'vuex' | 
|---|
|  |  |  | import { uploadAvatar } from "@/utils/config" | 
|---|
|  |  |  | import { getSystemDictData, visitorSub } from '@/api' | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | mapState | 
|---|
|  |  |  | } from 'vuex' | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | uploadAvatar | 
|---|
|  |  |  | } from "@/utils/config" | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | getSystemDictData, | 
|---|
|  |  |  | visitorSub | 
|---|
|  |  |  | } from '@/api' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | 
|---|
|  |  |  | showKeyboard: false, | 
|---|
|  |  |  | visit: '', | 
|---|
|  |  |  | type: '', | 
|---|
|  |  |  | columns: [[{name: '身份证', id: 0}, {name: '港澳证件', id: 1},{name: '护照', id: 2}]], | 
|---|
|  |  |  | columns: [ | 
|---|
|  |  |  | [{ | 
|---|
|  |  |  | name: '身份证', | 
|---|
|  |  |  | id: 0 | 
|---|
|  |  |  | }, { | 
|---|
|  |  |  | name: '港澳证件', | 
|---|
|  |  |  | id: 1 | 
|---|
|  |  |  | }, { | 
|---|
|  |  |  | name: '护照', | 
|---|
|  |  |  | id: 2 | 
|---|
|  |  |  | }] | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | fileList: [], | 
|---|
|  |  |  | visitorData: { | 
|---|
|  |  |  | userAnswerId: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | components: { tlyPictureCut, QfImageCropper }, | 
|---|
|  |  |  | components: { | 
|---|
|  |  |  | tlyPictureCut, | 
|---|
|  |  |  | QfImageCropper | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onLoad(option) { | 
|---|
|  |  |  | const visitorData = uni.getStorageSync('visitorData') | 
|---|
|  |  |  | const visitorData = uni.getStorageSync('member') | 
|---|
|  |  |  | if (visitorData.faceImg) { | 
|---|
|  |  |  | visitorData.faceImgUrl = visitorData.prefixUrl + visitorData.faceImg | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(visitorData && visitorData.name){ | 
|---|
|  |  |  | this.visitorData = visitorData | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.visitorData.companyName = visitorData.visitCompanyName | 
|---|
|  |  |  | this.visitorData.idcardNo = visitorData.idcardDecode | 
|---|
|  |  |  | if (this.visitorData.idcardType === 0) { | 
|---|
|  |  |  | this.visitorData.idcardTypeName = '身份证' | 
|---|
|  |  |  | } else if (this.visitorData.idcardType === 1) { | 
|---|
|  |  |  | this.visitorData.idcardTypeName = '港澳证件' | 
|---|
|  |  |  | } else if (this.visitorData.idcardType === 2) { | 
|---|
|  |  |  | this.visitorData.idcardTypeName = '护照' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.visitorData.imgurl) { | 
|---|
|  |  |  | this.visitorData.imgurlUrl = this.visitorData.prefixUrl + this.visitorData.imgurl | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // if (this.member ) { | 
|---|
|  |  |  | //    this.visitorData.name = this.member.name | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | submit() { | 
|---|
|  |  |  | const { visitorData } = this | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | visitorData | 
|---|
|  |  |  | } = this | 
|---|
|  |  |  | if (!this.visitorData.name) return uni.showToast({ | 
|---|
|  |  |  | title: '姓名不能为空', | 
|---|
|  |  |  | icon: 'none' | 
|---|
|  |  |  | 
|---|
|  |  |  | uploadImg(file) { | 
|---|
|  |  |  | var that = this | 
|---|
|  |  |  | that.$refs.cropper.close() | 
|---|
|  |  |  | uni.showLoading({ title: '上传中', mask: true }); | 
|---|
|  |  |  | uni.showLoading({ | 
|---|
|  |  |  | title: '上传中', | 
|---|
|  |  |  | mask: true | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | uni.uploadFile({ | 
|---|
|  |  |  | url: uploadAvatar, | 
|---|
|  |  |  | filePath: file.tempFilePath, | 
|---|
|  |  |  | 
|---|
|  |  |  | //    that.$refs.tlyPictureCut.showPop(); | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | if (type === 'imgurl') { | 
|---|
|  |  |  | uni.showLoading({ title: '上传中', mask: true }); | 
|---|
|  |  |  | uni.showLoading({ | 
|---|
|  |  |  | title: '上传中', | 
|---|
|  |  |  | mask: true | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | uni.uploadFile({ | 
|---|
|  |  |  | url: uploadAvatar, | 
|---|
|  |  |  | filePath: chooseImageRes.tempFilePaths[0], | 
|---|
|  |  |  | 
|---|
|  |  |  | page { | 
|---|
|  |  |  | background-color: #F7F7F7 !important; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .u-upload__button { | 
|---|
|  |  |  | margin: 0 !important; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_uplaod { | 
|---|
|  |  |  | width: 120rpx; | 
|---|
|  |  |  | height: 120rpx; | 
|---|
|  |  |  | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | overflow: hidden; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_uplaod image { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .empty{ | 
|---|
|  |  |  | width: 750rpx; | 
|---|
|  |  |  | height: 20rpx; | 
|---|
|  |  |  | margin: 0 -30rpx; | 
|---|
|  |  |  | background-color: #f7f7f7;; | 
|---|
|  |  |  | background-color: #f7f7f7; | 
|---|
|  |  |  | ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .title { | 
|---|
|  |  |  | font-size: 30rpx; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | 
|---|
|  |  |  | .title1 { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | flex-direction: column; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .title1_a { | 
|---|
|  |  |  | font-size: 30rpx !important; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | margin-bottom: 20rpx; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | b { | 
|---|
|  |  |  | color: #E42D2D; | 
|---|
|  |  |  | margin-right: 4rpx; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .title1_b { | 
|---|
|  |  |  | font-size: 24rpx !important; | 
|---|
|  |  |  | font-weight: 400; | 
|---|