master
lion 3 years ago
parent 73b2c3bef3
commit fb10904398

@ -1,210 +0,0 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增长期访客记录' : '编辑长期访客记录'" :form="form"
:rules="rules" @submit="submit">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
姓名
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" placeholder="请输入姓名"></el-input>
</div>
</div>
</template>
<template v-slot:mobile>
<div class="xy-table-item">
<div class="xy-table-item-label">
联系电话
</div>
<div class="xy-table-item-content">
<el-input v-model="form.mobile" placeholder="请输入联系电话"
></el-input>
</div>
</div>
</template>
<template v-slot:credent>
<div class="xy-table-item">
<div class="xy-table-item-label">证件类型
</div>
<div class="xy-table-item-content">
<el-select v-model="form.credent" placeholder="请选择" style="width:100%">
<el-option
v-for="item in credentList"
:key="item.id"
:label="item.value"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:idcard>
<div class="xy-table-item">
<div class="xy-table-item-label">
证件号码
</div>
<div class="xy-table-item-content">
<el-input v-model="form.idcard" placeholder="请输入证件号码"
></el-input>
</div>
</div>
</template>
<template v-slot:company_name>
<div class="xy-table-item">
<div class="xy-table-item-label">
单位名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.company_name" placeholder="请输入单位名称"
></el-input>
</div>
</div>
</template>
<template v-slot:status>
<div class="xy-table-item">
<div class="xy-table-item-label">状态
</div>
<div class="xy-table-item-content">
<el-select v-model="form.status" placeholder="请选择" style="width:100%">
<el-option
v-for="item in statusList"
:key="item.id"
:label="item.value"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
store,
show,
save
} from "@/api/visit/record.js"
import pickerOptions from "@/utils/common.js"
export default {
components: {},
data() {
return {
isShow: false,
type: 'add',
id: '',
form: {
name:"",
mobile:"",
credent:1,
idcard:"",
company_name:"",
start_date:"",
end_date:"",
status:1
},
credentList:[
{
id:1,
value:"身份证"
},
{
id:2,
value:"护照"
},
],
statusList:[
{
id:1,
value:"启用"
},
{
id:2,
value:"禁用"
},
],
rules:{
},
}
},
created() {
},
methods: {
async getDetail() {
const res = await show({
id: this.id
})
this.form = {
}
},
submit() {
if (this.type === 'add') {
console.log(this.form)
// return
store({
}).then(res => {
this.$successMessage('add', '长期访客')
this.isShow = false
this.$emit('refresh')
})
return
}
if (this.type === 'editor') {
save({
id: this.id,
}).then(res => {
this.$successMessage('editor', '长期访客')
this.isShow = false
this.$emit('refresh')
})
}
}
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
}
} else {
this.id = ''
this.type = ''
this.$refs['dialog'].reset()
}
}
}
}
</script>
<style scoped lang="scss">
.xy-table-item-label {
width: 180px!important;
}
.xy-table-item-content{
width:100%
}
.img__delete {
transform: scale(0.8, 0.8);
position: absolute;
top: 4px;
right: 4px;
}
</style>

@ -1,345 +0,0 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="normal" title="审核记录"
:form="form" :rules="rules" @submit="submit">
<template v-slot:default>
<div>
<div style="width:600px">
拜访信息
</div>
<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">
{{recordform.date}}
</div>
</div>
<template>
<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">
{{form.visit_time?form.visit_time.start_time:''}}{{form.visit_time?form.visit_time.end_time:''}}
</div>
</div>
</template>
<template>
<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">
{{form.visit_area?form.visit_area.name:''}}
</div>
</div>
</template>
<template v-if="visitType==1">
<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">
{{form.reason}}
</div>
</div>
</template>
<template v-if="visitType==2">
<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">
{{form.work_start_time}}{{form.work_end_time}}
</div>
</div>
</template>
<template v-if="visitType==3">
<div class="xy-table-item">
<div class="xy-table-item-label">
车牌号
</div>
<div class="xy-table-item-content">
{{form.plate}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">
备注
</div>
<div class="xy-table-item-content">
{{form.remark}}
</div>
</div>
</template>
<template >
<div class="xy-table-item">
<div class="xy-table-item-content" style="width:400px">
拜访人信息
</div>
</div>
</template>
<template>
<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">
{{form.name}}
</div>
</div>
</template>
<template>
<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">
{{form.mobile}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">证件类型
</div>
<div class="xy-table-item-content">
{{form.credent==1?'身份证':'护照'}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">
证件号码
</div>
<div class="xy-table-item-content">
{{form.idcard}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">
单位名称
</div>
<div class="xy-table-item-content">
{{form.company_name}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">
到访车辆
</div>
<div class="xy-table-item-content">
{{form.cars}}
</div>
</div>
</template>
<template v-if="visitType==1||visitType==2">
<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">
<xy-table style="width: 620px" :height="260" :is-page="false" :list="form.follw_people"
:table-item="followTable">
<template v-slot:btns>
</template>
</xy-table>
</div>
</div>
</template>
<template>
<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" style="width:620px">
{{form.long_time==0?'否':'是'}}
<div v-if="form.long_time==1" style="display: inline-block;vertical-align: middle;margin-left:10px">
{{form.start_date}}{{form.end_date}}
</div>
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-content" style="width:400px">
被访人信息
</div>
</div>
</template>
<template>
<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">
{{form.accept_admin?form.accept_admin.name:''}}
</div>
</div>
</template>
<template 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">
{{form.accept_goods_admin?form.accept_goods_admin.name:''}}
</div>
</div>
</template>
</div>
</template>
<!-- <template v-slot:status>
<div class="xy-table-item">
<div class="xy-table-item-label">状态
</div>
<div class="xy-table-item-content">
<el-select v-model="form.status" placeholder="请选择" style="width:300px">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:level>
<div class="xy-table-item">
<div class="xy-table-item-label">状态
</div>
<div class="xy-table-item-content">
<el-select v-model="form.status" placeholder="请选择" style="width:300px">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:reason>
<div class="xy-table-item">
<div class="xy-table-item-label">
备注
</div>
<div class="xy-table-item-content">
<el-input type="textarea" v-model="form.reason" placeholder="请输入备注" style="width:300px"></el-input>
</div>
</div>
</template> -->
</xy-dialog>
</div>
</template>
<script>
import {
show
} from "@/api/visit/record.js"
import {
save
} from "@/api/visit/check.js"
export default {
components: {},
data() {
return {
isShow: false,
id: '',
recordform:{
},
form: {
visit_id:"",
audit_admin_id:'',
status:"",
reason:"",
level:""
},
statusList: [{
id: 0,
value: "待审核"
},
{
id: 1,
value: "通过"
},
{
id: 2,
value: "驳回"
},
],
rules: {
},
}
},
created() {
},
methods: {
async getDetail() {
const res = await show({
id: this.id
})
this.form.visit_id = res.id
this.recordform = res
},
submit() {
console.log("122333")
return
let that = this
// this.form.id = this.id
save({
...that.form
}).then(res => {
this.$successMessage('审核')
this.isShow = false
this.$emit('refresh')
})
}
},
watch: {
isShow(newVal) {
if (newVal) {
this.getDetail()
} else {
this.id = ''
this.$refs['dialog'].reset()
}
}
}
}
</script>
<style scoped lang="scss">
.xy-table-item-label {
width: 180px !important;
}
.xy-table-item-content {
width: 100%
}
.img__delete {
transform: scale(0.8, 0.8);
position: absolute;
top: 4px;
right: 4px;
}
</style>

@ -72,7 +72,7 @@
<template v-slot:plate v-if="form.type==3">
<div class="xy-table-item">
<div class="xy-table-item-label">
车牌号
停车区域
</div>
<div class="xy-table-item-content">
{{form.plate}}

Loading…
Cancel
Save