|
|
|
@ -30,26 +30,26 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:time>
|
|
|
|
<template v-slot:time>
|
|
|
|
<div class="xy-table-item">
|
|
|
|
<div class="xy-table-item">
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>到访时间:
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>到访时间:
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
<el-time-picker
|
|
|
|
<el-time-picker
|
|
|
|
v-model="form.time"
|
|
|
|
v-model="form.time"
|
|
|
|
format="HH:mm"
|
|
|
|
format="HH:mm"
|
|
|
|
value-format="HH:mm"
|
|
|
|
value-format="HH:mm"
|
|
|
|
:picker-options="{
|
|
|
|
:picker-options="{
|
|
|
|
start: '08:30',
|
|
|
|
start: '08:30',
|
|
|
|
step: '00:30',
|
|
|
|
step: '00:30',
|
|
|
|
end: '17:00'
|
|
|
|
end: '17:00'
|
|
|
|
}"
|
|
|
|
}"
|
|
|
|
placeholder="选择到访时间">
|
|
|
|
placeholder="选择到访时间">
|
|
|
|
</el-time-picker>
|
|
|
|
</el-time-picker>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template v-slot:visit_time_id>
|
|
|
|
<template v-slot:visit_time_id>
|
|
|
|
<div class="xy-table-item">
|
|
|
|
<div class="xy-table-item">
|
|
|
|
@ -167,7 +167,7 @@
|
|
|
|
<template v-slot:idcard>
|
|
|
|
<template v-slot:idcard>
|
|
|
|
<div class="xy-table-item">
|
|
|
|
<div class="xy-table-item">
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>证件号码:
|
|
|
|
<span v-if="visitType==2||visitType==3" style="color: red;font-weight: 600;padding-right: 4px;">*</span>证件号码:
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
<el-input v-model="form.idcard" placeholder="请输入证件号码"></el-input>
|
|
|
|
<el-input v-model="form.idcard" placeholder="请输入证件号码"></el-input>
|
|
|
|
@ -389,7 +389,7 @@
|
|
|
|
// type: 1,
|
|
|
|
// type: 1,
|
|
|
|
visitinfo: "",
|
|
|
|
visitinfo: "",
|
|
|
|
date: "",
|
|
|
|
date: "",
|
|
|
|
end_date:'',
|
|
|
|
end_date:'',
|
|
|
|
time:'',
|
|
|
|
time:'',
|
|
|
|
visit_time_id: "",
|
|
|
|
visit_time_id: "",
|
|
|
|
visit_area_id: "",
|
|
|
|
visit_area_id: "",
|
|
|
|
@ -617,7 +617,7 @@
|
|
|
|
this.form = {
|
|
|
|
this.form = {
|
|
|
|
visitinfo: "",
|
|
|
|
visitinfo: "",
|
|
|
|
date: res?.date,
|
|
|
|
date: res?.date,
|
|
|
|
end_date: res?.end_date,
|
|
|
|
end_date: res?.end_date,
|
|
|
|
time:res?.time,
|
|
|
|
time:res?.time,
|
|
|
|
visit_time_id: res?.visit_time_id,
|
|
|
|
visit_time_id: res?.visit_time_id,
|
|
|
|
visit_area_id: res?.visit_area_id,
|
|
|
|
visit_area_id: res?.visit_area_id,
|
|
|
|
@ -701,7 +701,7 @@
|
|
|
|
this.adminList.map(e=>{
|
|
|
|
this.adminList.map(e=>{
|
|
|
|
if(e.id==item){
|
|
|
|
if(e.id==item){
|
|
|
|
this.form.accept_admin_id = e.id
|
|
|
|
this.form.accept_admin_id = e.id
|
|
|
|
this.form.accpet_department_id = e.department_id
|
|
|
|
this.form.accpet_department_id = e.department_id
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
// if(this.visitAreaText=='非生产区'){
|
|
|
|
// if(this.visitAreaText=='非生产区'){
|
|
|
|
// this.form.accompany_id = e.id
|
|
|
|
// this.form.accompany_id = e.id
|
|
|
|
@ -728,17 +728,27 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
submit() {
|
|
|
|
submit() {
|
|
|
|
let that = this
|
|
|
|
let that = this
|
|
|
|
if(that.form.credent==1){
|
|
|
|
const isIdcardRequired = that.visitType == 2 || that.visitType == 3
|
|
|
|
|
|
|
|
const hasIdcard = !!that.form.idcard
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 施工人员、物流司机必须填写证件号
|
|
|
|
|
|
|
|
if (isIdcardRequired && !hasIdcard) {
|
|
|
|
|
|
|
|
this.$successMessage('证件号码不能为空', '', 'warning')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 只要填写了证件号就进行格式校验(普通访客、施工、物流统一生效)
|
|
|
|
|
|
|
|
if (hasIdcard && that.form.credent == 1) {
|
|
|
|
const regtest = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
|
|
const regtest = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
|
|
if(!regtest.test(that.form.idcard)){
|
|
|
|
if (!regtest.test(that.form.idcard)) {
|
|
|
|
this.$successMessage('身份证格式错误', '','warning')
|
|
|
|
this.$successMessage('身份证格式错误', '', 'warning')
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(that.form.credent==2){
|
|
|
|
if (hasIdcard && that.form.credent == 2) {
|
|
|
|
const regtest = /^([a-zA-z]|[0-9]){5,17}$/
|
|
|
|
const regtest = /^([a-zA-z]|[0-9]){5,17}$/
|
|
|
|
if(!regtest.test(that.form.idcard)){
|
|
|
|
if (!regtest.test(that.form.idcard)) {
|
|
|
|
this.$successMessage('护照格式错误', '','warning')
|
|
|
|
this.$successMessage('护照格式错误', '', 'warning')
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|