|
|
|
|
@ -18,6 +18,39 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:end_date>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>结束日期:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-date-picker style="width:300px" v-model="form.end_date" value-format="yyyy-MM-dd" type="date"
|
|
|
|
|
placeholder="选择结束日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:time>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>到访时间:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-time-picker
|
|
|
|
|
v-model="form.time"
|
|
|
|
|
format="HH:mm"
|
|
|
|
|
value-format="HH:mm"
|
|
|
|
|
:picker-options="{
|
|
|
|
|
start: '08:30',
|
|
|
|
|
step: '00:30',
|
|
|
|
|
end: '17:00'
|
|
|
|
|
}"
|
|
|
|
|
placeholder="选择到访时间">
|
|
|
|
|
</el-time-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:visit_time_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
@ -73,9 +106,9 @@
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
车辆类型:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-radio-group v-model="form.plate" style="width:300px">
|
|
|
|
|
<el-radio v-for="item in parkAreaList" :key="item.value" :label="item.value">{{item.value}}</el-radio>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-radio-group v-model="form.plate" style="width:300px">
|
|
|
|
|
<el-radio v-for="item in parkAreaList" :key="item.value" :label="item.value">{{item.value}}</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
<!-- <el-input v-model="form.plate" placeholder="请输入车牌号"></el-input> -->
|
|
|
|
|
</div>
|
|
|
|
|
@ -150,75 +183,75 @@
|
|
|
|
|
<el-input v-model="form.company_name" placeholder="请输入单位名称"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:cda v-if="visitType==1&&visitAreaText=='生产区'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>CDA编号:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.cda" placeholder="请输入CDA编号(如无注明原因)"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- <template v-slot:cars v-if="visitType==3">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>到访车辆:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div v-for="(item,index) in form.cars">
|
|
|
|
|
<el-input v-model="form.cars[index]" placeholder="请输入到访车辆"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
<template v-slot:cars v-if="visitType==3">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>到访车辆:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<Button type="primary" icon="md-add" style="margin-bottom: 10px"
|
|
|
|
|
@click="carsList.push({car:''})">新增到访车辆</Button>
|
|
|
|
|
<xy-table style="width: 620px" :height="180" :is-page="false" :list="carsList"
|
|
|
|
|
:table-item="carTable">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="操作" width="90" header-align="center" align="center">
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<Button size="small" type="primary" ghost
|
|
|
|
|
@click="carsList.splice(scope.$index, 1)">删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:carsno v-else>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>到访车辆:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<Button type="primary" icon="md-add" style="margin-bottom: 10px"
|
|
|
|
|
@click="carsList.push({car:''})">新增到访车辆</Button>
|
|
|
|
|
<xy-table style="width: 620px" :height="180" :is-page="false" :list="carsList"
|
|
|
|
|
:table-item="carTable">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="操作" width="90" header-align="center" align="center">
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<Button size="small" type="primary" ghost
|
|
|
|
|
@click="carsList.splice(scope.$index, 1)">删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:cda v-if="visitType==1&&visitAreaText=='生产区'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>CDA编号:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.cda" placeholder="请输入CDA编号(如无注明原因)"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
<!-- <template v-slot:cars v-if="visitType==3">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>到访车辆:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div v-for="(item,index) in form.cars">
|
|
|
|
|
<el-input v-model="form.cars[index]" placeholder="请输入到访车辆"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
<template v-slot:cars v-if="visitType==3">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>到访车辆:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<Button type="primary" icon="md-add" style="margin-bottom: 10px"
|
|
|
|
|
@click="carsList.push({car:''})">新增到访车辆</Button>
|
|
|
|
|
<xy-table style="width: 620px" :height="180" :is-page="false" :list="carsList"
|
|
|
|
|
:table-item="carTable">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="操作" width="90" header-align="center" align="center">
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<Button size="small" type="primary" ghost
|
|
|
|
|
@click="carsList.splice(scope.$index, 1)">删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:carsno v-else>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>到访车辆:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<Button type="primary" icon="md-add" style="margin-bottom: 10px"
|
|
|
|
|
@click="carsList.push({car:''})">新增到访车辆</Button>
|
|
|
|
|
<xy-table style="width: 620px" :height="180" :is-page="false" :list="carsList"
|
|
|
|
|
:table-item="carTable">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="操作" width="90" header-align="center" align="center">
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<Button size="small" type="primary" ghost
|
|
|
|
|
@click="carsList.splice(scope.$index, 1)">删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:follw_people v-if="visitType==1||visitType==2">
|
|
|
|
|
@ -245,7 +278,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:long_time>
|
|
|
|
|
<!-- <template v-slot:long_time>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>长访客申请:
|
|
|
|
|
@ -261,7 +294,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
<template v-slot:visitorinfos v-if="visitType==1||visitType==2">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -283,31 +316,31 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:visitorinfos1 v-if="visitAreaText=='生产区'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-content" style="width:400px">
|
|
|
|
|
陪同人信息:
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:accompany_id v-if="visitAreaText=='生产区'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>人员:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select filterable v-model="form.accompany_id" @change='changeAdmin' placeholder="请选择" style="width:100%">
|
|
|
|
|
<el-option v-for="item in adminList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:visitorinfos1 v-if="visitAreaText=='生产区'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-content" style="width:400px">
|
|
|
|
|
陪同人信息:
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:accompany_id v-if="visitAreaText=='生产区'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>人员:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select filterable v-model="form.accompany_id" @change='changeAdmin' placeholder="请选择" style="width:100%">
|
|
|
|
|
<el-option v-for="item in adminList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
<template v-slot:accept_goods_admin_id v-if="visitType==3">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<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 class="xy-table-item-content">
|
|
|
|
|
<el-select filterable v-model="form.accept_goods_admin_id" @change='changeGoods' placeholder="请选择" style="width:100%">
|
|
|
|
|
@ -350,12 +383,14 @@
|
|
|
|
|
type: 'add',
|
|
|
|
|
id: '',
|
|
|
|
|
visitType: "",
|
|
|
|
|
typeName: '',
|
|
|
|
|
typeName: '',
|
|
|
|
|
visitAreaText:"",
|
|
|
|
|
form: {
|
|
|
|
|
// type: 1,
|
|
|
|
|
visitinfo: "",
|
|
|
|
|
date: "",
|
|
|
|
|
end_date:'',
|
|
|
|
|
time:'',
|
|
|
|
|
visit_time_id: "",
|
|
|
|
|
visit_area_id: "",
|
|
|
|
|
workRange: "",
|
|
|
|
|
@ -367,24 +402,24 @@
|
|
|
|
|
mobile: "",
|
|
|
|
|
credent: 1,
|
|
|
|
|
idcard: "",
|
|
|
|
|
company_name: "",
|
|
|
|
|
cda:'',
|
|
|
|
|
cars: [],
|
|
|
|
|
company_name: "",
|
|
|
|
|
// cda:'',
|
|
|
|
|
cars: [],
|
|
|
|
|
carsno:[],
|
|
|
|
|
follw_people: [],
|
|
|
|
|
long_time: 0,
|
|
|
|
|
long_time: 0,
|
|
|
|
|
longrange: "",
|
|
|
|
|
visitorinfos: "",
|
|
|
|
|
accpet_department_id: "",
|
|
|
|
|
accept_admin_id: "",
|
|
|
|
|
visitorinfos1:'',
|
|
|
|
|
visitorinfos: "",
|
|
|
|
|
accpet_department_id: "",
|
|
|
|
|
accept_admin_id: "",
|
|
|
|
|
visitorinfos1:'',
|
|
|
|
|
accompany_id:'',
|
|
|
|
|
accept_goods_admin_id: ""
|
|
|
|
|
},
|
|
|
|
|
followList:[],
|
|
|
|
|
followList:[],
|
|
|
|
|
carsList:[],
|
|
|
|
|
visitTimeList: [],
|
|
|
|
|
visitAreaList: [],
|
|
|
|
|
visitAreaList: [],
|
|
|
|
|
parkAreaList: [],
|
|
|
|
|
reasonList: [],
|
|
|
|
|
credentList: [{
|
|
|
|
|
@ -406,17 +441,17 @@
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
departmentList: [],
|
|
|
|
|
adminList: [],
|
|
|
|
|
carTable:[{
|
|
|
|
|
label: "车牌号",
|
|
|
|
|
prop: "car",
|
|
|
|
|
// width: 200,
|
|
|
|
|
customFn: (row, scope) => {
|
|
|
|
|
return (<el-input type="text" placeholder = "请填写车牌号"
|
|
|
|
|
v-model={row.car}>
|
|
|
|
|
</el-input>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
adminList: [],
|
|
|
|
|
carTable:[{
|
|
|
|
|
label: "车牌号",
|
|
|
|
|
prop: "car",
|
|
|
|
|
// width: 200,
|
|
|
|
|
customFn: (row, scope) => {
|
|
|
|
|
return (<el-input type="text" placeholder = "请填写车牌号"
|
|
|
|
|
v-model={row.car}>
|
|
|
|
|
</el-input>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}],
|
|
|
|
|
followTable: [{
|
|
|
|
|
label: "姓名",
|
|
|
|
|
@ -497,10 +532,10 @@
|
|
|
|
|
visit_area_id: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择到访区域'
|
|
|
|
|
}],
|
|
|
|
|
plate: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择停车区域'
|
|
|
|
|
}],
|
|
|
|
|
plate: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择停车区域'
|
|
|
|
|
}],
|
|
|
|
|
name: [{
|
|
|
|
|
required: true,
|
|
|
|
|
@ -514,31 +549,31 @@
|
|
|
|
|
pattern: /^[1][3-9][\d]{9}/,
|
|
|
|
|
message: "手机号格式错误",
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
company_name: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入单位名称'
|
|
|
|
|
}],
|
|
|
|
|
cda:[{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入CDA编号'
|
|
|
|
|
}],
|
|
|
|
|
cars: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入车牌号'
|
|
|
|
|
}],
|
|
|
|
|
accompany_id: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择陪同人'
|
|
|
|
|
}],
|
|
|
|
|
accept_admin_id: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选被访人'
|
|
|
|
|
}],
|
|
|
|
|
accept_goods_admin_id: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择收货人'
|
|
|
|
|
}]
|
|
|
|
|
],
|
|
|
|
|
company_name: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入单位名称'
|
|
|
|
|
}],
|
|
|
|
|
// cda:[{
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: '请输入CDA编号'
|
|
|
|
|
// }],
|
|
|
|
|
// cars: [{
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: '请输入车牌号'
|
|
|
|
|
// }],
|
|
|
|
|
// accompany_id: [{
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: '请选择陪同人'
|
|
|
|
|
// }],
|
|
|
|
|
accept_admin_id: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选被访人'
|
|
|
|
|
}],
|
|
|
|
|
accept_goods_admin_id: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择被访人'
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
@ -579,39 +614,41 @@
|
|
|
|
|
const res = await show({
|
|
|
|
|
id: this.id
|
|
|
|
|
})
|
|
|
|
|
this.form = {
|
|
|
|
|
visitinfo: "",
|
|
|
|
|
date: res?.date,
|
|
|
|
|
visit_time_id: res?.visit_time_id,
|
|
|
|
|
visit_area_id: res?.visit_area_id,
|
|
|
|
|
workRange: res.work_start_time?[res.work_start_time,res.work_end_time]:"",
|
|
|
|
|
reason: res?.reason,
|
|
|
|
|
plate: res?.plate,
|
|
|
|
|
remark: res?.remark,
|
|
|
|
|
visitorinfo: "",
|
|
|
|
|
name: res?.name,
|
|
|
|
|
mobile: res?.mobile,
|
|
|
|
|
credent: res?.credent,
|
|
|
|
|
idcard: res?.idcard,
|
|
|
|
|
company_name: res?.company_name,
|
|
|
|
|
cda:res?.cda,
|
|
|
|
|
cars:[],
|
|
|
|
|
carsno: [],
|
|
|
|
|
follw_people: res?.follw_people,
|
|
|
|
|
long_time: res?.long_time,
|
|
|
|
|
longrange: res.start_date?[res.start_date,res.end_date]:"",
|
|
|
|
|
visitorinfos: "",
|
|
|
|
|
accpet_department_id: res?.accpet_department_id,
|
|
|
|
|
accept_admin_id: res?.accept_admin_id,
|
|
|
|
|
visitorinfos1:'',
|
|
|
|
|
accompany_id:res?.accompany_id,
|
|
|
|
|
accept_goods_admin_id: res?parseInt(res.accept_goods_admin_id):''
|
|
|
|
|
}
|
|
|
|
|
this.followList = res?.follw_people
|
|
|
|
|
for(var k of res?.cars){
|
|
|
|
|
this.carsList.push({car:k})
|
|
|
|
|
}
|
|
|
|
|
this.visitAreaText = res?.visit_area.name
|
|
|
|
|
this.form = {
|
|
|
|
|
visitinfo: "",
|
|
|
|
|
date: res?.date,
|
|
|
|
|
end_date: res?.end_date,
|
|
|
|
|
time:res?.time,
|
|
|
|
|
visit_time_id: res?.visit_time_id,
|
|
|
|
|
visit_area_id: res?.visit_area_id,
|
|
|
|
|
workRange: res.work_start_time?[res.work_start_time,res.work_end_time]:"",
|
|
|
|
|
reason: res?.reason,
|
|
|
|
|
plate: res?.plate,
|
|
|
|
|
remark: res?.remark,
|
|
|
|
|
visitorinfo: "",
|
|
|
|
|
name: res?.name,
|
|
|
|
|
mobile: res?.mobile,
|
|
|
|
|
credent: res?.credent,
|
|
|
|
|
idcard: res?.idcard,
|
|
|
|
|
company_name: res?.company_name,
|
|
|
|
|
// cda:res?.cda,
|
|
|
|
|
cars:[],
|
|
|
|
|
carsno: [],
|
|
|
|
|
follw_people: res?.follw_people,
|
|
|
|
|
long_time: res?.long_time,
|
|
|
|
|
longrange: res.start_date?[res.start_date,res.end_date]:"",
|
|
|
|
|
visitorinfos: "",
|
|
|
|
|
accpet_department_id: res?.accpet_department_id,
|
|
|
|
|
accept_admin_id: res?.accept_admin_id,
|
|
|
|
|
visitorinfos1:'',
|
|
|
|
|
accompany_id:res?.accompany_id,
|
|
|
|
|
accept_goods_admin_id: res?parseInt(res.accept_goods_admin_id):''
|
|
|
|
|
}
|
|
|
|
|
this.followList = res?.follw_people
|
|
|
|
|
for(var k of res?.cars){
|
|
|
|
|
this.carsList.push({car:k})
|
|
|
|
|
}
|
|
|
|
|
this.visitAreaText = res?.visit_area.name
|
|
|
|
|
console.log(this.followList,this.carsList)
|
|
|
|
|
},
|
|
|
|
|
async getLabel() {
|
|
|
|
|
@ -625,100 +662,101 @@
|
|
|
|
|
const reason = await getparameter({
|
|
|
|
|
number: "reasonList",
|
|
|
|
|
});
|
|
|
|
|
this.reasonList = reason?.detail;
|
|
|
|
|
const park = await getparameter({
|
|
|
|
|
number: "parkArea",
|
|
|
|
|
});
|
|
|
|
|
this.reasonList = reason?.detail;
|
|
|
|
|
const park = await getparameter({
|
|
|
|
|
number: "parkArea",
|
|
|
|
|
});
|
|
|
|
|
this.parkAreaList = park?.detail;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
changeVisitArea(val){
|
|
|
|
|
console.log(val)
|
|
|
|
|
this.visitAreaList.map(item=>{
|
|
|
|
|
if(item.id==val){
|
|
|
|
|
this.visitAreaText = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log(this.visitAreaText)
|
|
|
|
|
},
|
|
|
|
|
changelongrange(val){
|
|
|
|
|
this.form.start_date = val[0]
|
|
|
|
|
this.form.end_date = val[1]
|
|
|
|
|
},
|
|
|
|
|
changeworkrange(val){
|
|
|
|
|
this.form.work_start_time = val[0]
|
|
|
|
|
this.form.work_end_time = val[1]
|
|
|
|
|
},
|
|
|
|
|
changeAdmin(item){
|
|
|
|
|
if(item){
|
|
|
|
|
this.adminList.map(e=>{
|
|
|
|
|
if(e.id==item){
|
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeAdmin1(item){
|
|
|
|
|
if(item){
|
|
|
|
|
this.adminList.map(e=>{
|
|
|
|
|
if(e.id==item){
|
|
|
|
|
this.form.accept_admin_id = e.id
|
|
|
|
|
this.form.accpet_department_id = e.department_id
|
|
|
|
|
if(this.visitAreaText=='非生产区'){
|
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeGoods(item){
|
|
|
|
|
if(item){
|
|
|
|
|
this.adminList.map(e=>{
|
|
|
|
|
if(e.id==item){
|
|
|
|
|
this.form.accept_admin_id = e.id
|
|
|
|
|
this.form.accept_goods_admin_id = e.id
|
|
|
|
|
},
|
|
|
|
|
changeVisitArea(val){
|
|
|
|
|
console.log(val)
|
|
|
|
|
this.visitAreaList.map(item=>{
|
|
|
|
|
if(item.id==val){
|
|
|
|
|
this.visitAreaText = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log(this.visitAreaText)
|
|
|
|
|
},
|
|
|
|
|
changelongrange(val){
|
|
|
|
|
this.form.start_date = val[0]
|
|
|
|
|
this.form.end_date = val[1]
|
|
|
|
|
},
|
|
|
|
|
changeworkrange(val){
|
|
|
|
|
this.form.work_start_time = val[0]
|
|
|
|
|
this.form.work_end_time = val[1]
|
|
|
|
|
},
|
|
|
|
|
changeAdmin(item){
|
|
|
|
|
if(item){
|
|
|
|
|
this.adminList.map(e=>{
|
|
|
|
|
if(e.id==item){
|
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeAdmin1(item){
|
|
|
|
|
if(item){
|
|
|
|
|
this.adminList.map(e=>{
|
|
|
|
|
if(e.id==item){
|
|
|
|
|
this.form.accept_admin_id = e.id
|
|
|
|
|
this.form.accpet_department_id = e.department_id
|
|
|
|
|
if(this.visitAreaText=='非生产区'){
|
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
|
// if(this.visitAreaText=='非生产区'){
|
|
|
|
|
// this.form.accompany_id = e.id
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeGoods(item){
|
|
|
|
|
if(item){
|
|
|
|
|
this.adminList.map(e=>{
|
|
|
|
|
if(e.id==item){
|
|
|
|
|
this.form.accept_admin_id = e.id
|
|
|
|
|
this.form.accept_goods_admin_id = e.id
|
|
|
|
|
this.form.accpet_department_id = e.department_id
|
|
|
|
|
if(this.visitAreaText=='非生产区'){
|
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
let that = this
|
|
|
|
|
if(that.form.credent==1){
|
|
|
|
|
const regtest = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
|
|
|
if(!regtest.test(that.form.idcard)){
|
|
|
|
|
this.$successMessage('身份证格式错误', '','warning')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(that.form.credent==2){
|
|
|
|
|
const regtest = /^([a-zA-z]|[0-9]){5,17}$/
|
|
|
|
|
if(!regtest.test(that.form.idcard)){
|
|
|
|
|
this.$successMessage('护照格式错误', '','warning')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
that.form.follw_people = that.followList
|
|
|
|
|
let _car = []
|
|
|
|
|
for(var k of that.carsList){
|
|
|
|
|
_car.push(k.car)
|
|
|
|
|
}
|
|
|
|
|
this.form.cars = _car
|
|
|
|
|
console.log("this.form.cars",this.form.cars)
|
|
|
|
|
// return
|
|
|
|
|
if(this.visitType==3){
|
|
|
|
|
this.form.accept_admin_id = this.form.accept_goods_admin_id
|
|
|
|
|
let that = this
|
|
|
|
|
if(that.form.credent==1){
|
|
|
|
|
const regtest = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
|
|
|
if(!regtest.test(that.form.idcard)){
|
|
|
|
|
this.$successMessage('身份证格式错误', '','warning')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(that.form.credent==2){
|
|
|
|
|
const regtest = /^([a-zA-z]|[0-9]){5,17}$/
|
|
|
|
|
if(!regtest.test(that.form.idcard)){
|
|
|
|
|
this.$successMessage('护照格式错误', '','warning')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
that.form.follw_people = that.followList
|
|
|
|
|
let _car = []
|
|
|
|
|
for(var k of that.carsList){
|
|
|
|
|
_car.push(k.car)
|
|
|
|
|
}
|
|
|
|
|
this.form.cars = _car
|
|
|
|
|
console.log("this.form.cars",this.form.cars)
|
|
|
|
|
// return
|
|
|
|
|
if(this.visitType==3){
|
|
|
|
|
this.form.accept_admin_id = this.form.accept_goods_admin_id
|
|
|
|
|
}
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
this.form.id = this.id
|
|
|
|
|
}else{
|
|
|
|
|
this.form.id = ""
|
|
|
|
|
}else{
|
|
|
|
|
this.form.id = ""
|
|
|
|
|
}
|
|
|
|
|
// return
|
|
|
|
|
save({
|
|
|
|
|
@ -732,9 +770,9 @@
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
isShow(newVal) {
|
|
|
|
|
if (newVal) {
|
|
|
|
|
console.log("this.visitType",this.visitType)
|
|
|
|
|
this.form.type = this.visitType
|
|
|
|
|
if (newVal) {
|
|
|
|
|
console.log("this.visitType",this.visitType)
|
|
|
|
|
this.form.type = this.visitType
|
|
|
|
|
this.form.audit_status = 1
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
@ -743,15 +781,15 @@
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.type = ''
|
|
|
|
|
this.visitType = 1
|
|
|
|
|
this.followList = []
|
|
|
|
|
this.carsList = []
|
|
|
|
|
this.followList = []
|
|
|
|
|
this.carsList = []
|
|
|
|
|
this.visitAreaText=''
|
|
|
|
|
this.$refs['dialog'].reset()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
visitType(val) {
|
|
|
|
|
if (val) {
|
|
|
|
|
this.typeName = val == 1 ? '普通访客' : (val == 2 ? '施工访客' : (val == 3 ? '物流车辆' : ''))
|
|
|
|
|
this.typeName = val == 1 ? '普通访客' : (val == 2 ? '施工人员' : (val == 3 ? '物流司机' : ''))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -775,11 +813,11 @@
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 4px;
|
|
|
|
|
right: 4px;
|
|
|
|
|
}
|
|
|
|
|
.carsitem{
|
|
|
|
|
width:450px;margin-bottom:10px;margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
.carsitem Button{
|
|
|
|
|
margin-left:10px
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
.carsitem{
|
|
|
|
|
width:450px;margin-bottom:10px;margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
.carsitem Button{
|
|
|
|
|
margin-left:10px
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|