|  |  |  | 
|---|
|  |  |  | :visible.sync="isShowModal" | 
|---|
|  |  |  | :confirm-working="isWorking" | 
|---|
|  |  |  | @confirm="confirm" | 
|---|
|  |  |  | @close="close" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-form :model="param" ref="paramRef" :rules="rules"> | 
|---|
|  |  |  | <div class="title_tip">访客预约</div> | 
|---|
|  |  |  | <el-form-item label="被访人" prop="startTime"> | 
|---|
|  |  |  | {{ userInfo.realname }} {{ userInfo.company.companyNamePath }} | 
|---|
|  |  |  | {{ userInfo.realname }} <template v-if="userInfo.company && userInfo.company.companyNamePath">{{ userInfo.company.companyNamePath }}</template> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="入园时间" prop="starttime"> | 
|---|
|  |  |  | <el-date-picker | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-form-item label="手机号" prop="phone"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="param.phone" | 
|---|
|  |  |  | maxlength="11" | 
|---|
|  |  |  | placeholder="请输入联系人的手机号" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="入园车辆" prop="carNos"> | 
|---|
|  |  |  | <el-input v-model="param.carNos" placeholder="请输入车牌号"></el-input> | 
|---|
|  |  |  | <el-input v-model.trim="param.carNos" placeholder="请输入车牌号"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="随车人数" prop="memberNum"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="param.memberNum" | 
|---|
|  |  |  | oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 6)" | 
|---|
|  |  |  | placeholder="请输入随车人员总数" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | 
|---|
|  |  |  | import dayjs from 'dayjs' | 
|---|
|  |  |  | import { createVisit, getVisitedVisitReason } from '@/api/business/visits' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'OperaVisitsHkWindow', | 
|---|
|  |  |  | extends: BaseOpera, | 
|---|
|  |  |  | components: { | 
|---|
|  |  |  | GlobalWindow, | 
|---|
|  |  |  | 
|---|
|  |  |  | this.$set(this.param, 'faceImg', file.imgurl) | 
|---|
|  |  |  | this.$set(this.param, 'faceImgUrl', file.imgurlfull) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | close () { | 
|---|
|  |  |  | this.isShowModal = false | 
|---|
|  |  |  | this.$emit('close') | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 同步信息 | 
|---|
|  |  |  | confirm () { | 
|---|
|  |  |  | this.$refs.paramRef.validate((valid) => { | 
|---|
|  |  |  | if (!valid) { | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | const { param } = this | 
|---|
|  |  |  | if(param.carNos){ | 
|---|
|  |  |  | param.carNos = param.carNos.replace(/\s*/g,"") | 
|---|
|  |  |  | param.carNos = param.carNos.replace(/[\r\n]/g, "") | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 调用新建接口 | 
|---|
|  |  |  | this.isWorking = true | 
|---|
|  |  |  | 
|---|
|  |  |  | this.$emit('close') | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(e => { | 
|---|
|  |  |  | this.$tip.apiFailed(e) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .finally(() => { | 
|---|
|  |  |  | this.isWorking = false | 
|---|