master
lion 3 years ago
commit 94b780fbc4

@ -2,5 +2,5 @@
ENV = 'production' ENV = 'production'
# base api # base api
VUE_APP_BASE_API = https://starter.ali251.langye.net VUE_APP_BASE_API = https://bd-fangke.ali251.langye.net
VUE_APP_UPLOAD_API =https://starter.ali251.langye.net/api/admin/upload-file VUE_APP_UPLOAD_API = https://bd-fangke.ali251.langye.net/api/admin/upload-file

@ -0,0 +1,309 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="拜访记录" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;align-items: center;" class="selector">
<div style="margin-right: 10px;">关键词</div>
<el-input size="mini" placeholder="请输入关键词" v-model="select.keyword"
style="width: 160px;margin-right: 10px;"></el-input>
<div style="margin-right: 10px;">状态</div>
<el-select v-model="select.audit_status" clearable placeholder="请选择">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<div style="margin:0 10px;">起始时间</div>
<el-date-picker v-model="selectRange" @change="selectRangeM" value-format="yyyy-MM-dd" type="daterange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
<el-button @click="getList" slot="reference" size="medium" type="primary" style="margin-left: 10px">查询
</el-button>
</div>
</slot>
</lx-header>
</div>
<xy-table :table-item="table" :list="data" :total="total" @tableHeight="tableHeight" :height="tableHeights"
@pageSizeChange="e => {select.rows = e;select.page = 1;getList()}"
@pageIndexChange="e => {select.page = e;getList()}">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="220" header-align="center">
<template slot-scope="scope">
<i-button v-if="scope.row.audit_status==1" style="margin-right:6px" type="primary" size="small" @click="showVisitForm(scope.row,1)"
>
进入核验扫码
</i-button>
<i-button v-if="scope.row.audit_status==3" style="margin-right:6px" type="primary" size="small" @click="showVisitForm(scope.row,2)"
>
离开核验扫码
</i-button>
</template>
</el-table-column>
</template>
</xy-table>
<showVisit ref="showVisit" @refresh='getList'></showVisit>
<!-- 选择门岗人员 -->
<el-dialog
title="请先选择门岗人员"
:visible.sync="gateShow"
width="60%"
:close-on-click-modal='false'
:show-close='false' >
<el-radio-group v-model="gateAdminId">
<el-radio v-for="item in gateData" :label="item.id" border>{{item.name}}</el-radio>
</el-radio-group>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmGate"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import showVisit from '@/views/visit/component/showVisit'
import {
getList,
getUserList
} from '@/api/gate'
export default {
components: {
showVisit
},
data() {
return {
gateShow:true,
gateAdminId:'',
gateData:[],
visible: false,
tableHeights: 0,
select: {
page: 1,
rows: 10,
keyword: "",
audit_status: "",
start_date: "",
end_date: "",
is_export: 0
},
selectRange: [],
statusList: [{
id: -1,
value: '待学习'
},
{
id: 0,
value: '待审核'
},
{
id: 1,
value: '通过(待进厂)'
},
{
id: 2,
value: '驳回'
},
{
id: 3,
value: '已进厂'
},
{
id: 4,
value: '已离厂'
}
],
total: 0,
data: [],
table: [{
label: '序号',
type: "index",
fixed: "left",
width: 80
},
{
label: '姓名',
sortable: false,
prop: 'name',
fixed: "left",
width: 120
},
{
label: '类型',
sortable: false,
prop: 'type_text',
width: 120
},
{
label: '状态',
sortable: false,
prop: 'audit_status_text',
width: 120
},
{
label: '是否随访',
sortable: false,
prop: 'follw_people',
width: 80,
formatter: (cell, data, value) => {
return value ? '是' : '否'
}
},
{
label: '预约时间',
sortable: false,
prop: 'date',
width: 120
},
{
label: '证件类型',
sortable: false,
prop: 'credent',
width: 120,
formatter: (cell, data, value) => {
return value == 1 ? '身份证' : '护照'
},
},
{
label: '证件号',
sortable: false,
prop: 'idcard',
width: 180
},
{
label: '手机号',
sortable: false,
prop: 'mobile',
width: 120
},
{
label: '单位名称',
sortable: false,
prop: 'company_name',
width: 180
},
{
label: '开始时间',
sortable: false,
prop: 'start_date',
width: 180
},
{
label: '结束时间',
sortable: false,
prop: 'end_date',
width: 180
},
{
label: '创建时间',
sortable: false,
prop: 'created_at',
width: 180
},
{
label: '创建人',
sortable: false,
prop: 'admin_id',
width: 120
}
]
}
},
computed: {},
mounted() {
},
created() {
this.getUserList()
this.getToday()
this.getList()
},
methods: {
getToday() {
let now = new Date()
let nowDay = this.$moment(now).format("YYYY-MM-DD")
this.select.start_date = nowDay
this.select.end_date = nowDay
this.selectRange = [nowDay, nowDay]
},
async getList() {
let res = await getList(this.select)
this.data = res.data
this.total = res.total
},
async getUserList() {
let res = await getUserList()
this.gateData = res
},
confirmGate(){
if(!this.gateAdminId){
this.$successMessage("请先选择门岗",'','warning')
return
}
this.gateShow = false
},
selectRangeM(val) {
console.log(val)
if (val) {
this.select.start_date = val[0]
this.select.end_date = val[1]
} else {
this.select.start_date = ""
this.select.end_date = ""
}
},
tableHeight(val) {
this.$nextTick(function() {
this.tableHeights = val + 25 + 50
})
},
showVisitForm(row,type) {
this.$refs['showVisit'].form = row
this.$refs['showVisit'].formDataType = 'coderecord'
this.$refs['showVisit'].codeType = type
this.$refs['showVisit'].gateAdminId=this.gateAdminId
this.$refs['showVisit'].isShow = true
}
},
}
</script>
<style scoped lang="scss">
//::v-deep .el-button + .el-button{
// margin-left: 0 !important;
//}
::v-deep .el-button {
padding: 5px 8px !important;
}
.selector {
::v-deep .el-input--suffix .el-input__inner {
height: 28px;
}
::v-deep .el-select .el-input .el-select__caret {
line-height: 28px;
}
::v-deep .el-range-editor.el-input__inner {
height: 28px;
width: 250px
}
::v-deep .el-date-editor .el-range__icon {
line-height: 21px;
}
::v-deep .el-date-editor .el-range-separator {
line-height: 21px;
}
::v-deep .el-date-editor .el-range__close-icon {
line-height: 21px;
}
}
</style>

@ -1,47 +1,14 @@
<template> <template>
<div style="padding: 0 20px"> <div>
<div ref="lxHeader"> <div :style="{height:clientHeight+'px'}" class="gatewrap">
<lx-header icon="md-apps" text="拜访记录" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <div class="gatecode">
<slot> 核销码<el-input clearable ref='codeInput' size="mini" placeholder="请输入核销码或扫码" v-model="select.code"
<div style="display: flex;align-items: center;" class="selector"> style="width: 160px;margin-right: 10px;"></el-input>
<div style="margin-right: 10px;">关键词</div> <el-button type="primary" @click='getList'>查询</el-button>
</div>
<el-input size="mini" placeholder="请输入关键词" v-model="select.keyword" </div>
style="width: 160px;margin-right: 10px;"></el-input>
<div style="margin-right: 10px;">状态</div> <showVisit ref="showVisit" @refresh='clearCode'></showVisit>
<el-select v-model="select.audit_status" clearable placeholder="请选择">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<div style="margin:0 10px;">起始时间</div>
<el-date-picker v-model="selectRange" @change="selectRangeM" value-format="yyyy-MM-dd" type="daterange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
<el-button @click="getList" slot="reference" size="medium" type="primary" style="margin-left: 10px">查询
</el-button>
</div>
</slot>
</lx-header>
</div>
<xy-table :table-item="table" :list="data" :total="total" @tableHeight="tableHeight" :height="tableHeights"
@pageSizeChange="e => {select.rows = e;select.page = 1;getList()}"
@pageIndexChange="e => {select.page = e;getList()}">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="220" header-align="center">
<template slot-scope="scope">
<i-button v-if="scope.row.audit_status==1" style="margin-right:6px" type="primary" size="small" @click="showVisitForm(scope.row,1)"
>
进入核验扫码
</i-button>
<i-button v-if="scope.row.audit_status==3" style="margin-right:6px" type="primary" size="small" @click="showVisitForm(scope.row,2)"
>
离开核验扫码
</i-button>
</template>
</el-table-column>
</template>
</xy-table>
<showVisit ref="showVisit" @refresh='getList'></showVisit>
<!-- 选择门岗人员 --> <!-- 选择门岗人员 -->
<el-dialog <el-dialog
@ -72,11 +39,10 @@
}, },
data() { data() {
return { return {
gateShow:true, clientHeight:0,
gateShow:false,
gateAdminId:'', gateAdminId:'',
gateData:[], gateData:[],
visible: false,
tableHeights: 0,
select: { select: {
page: 1, page: 1,
rows: 10, rows: 10,
@ -84,130 +50,11 @@
audit_status: "", audit_status: "",
start_date: "", start_date: "",
end_date: "", end_date: "",
is_export: 0 is_export: 0,
code:""
}, },
selectRange: [],
statusList: [{
id: -1,
value: '待学习'
},
{
id: 0,
value: '待审核'
},
{
id: 1,
value: '通过(待进厂)'
},
{
id: 2,
value: '驳回'
},
{
id: 3,
value: '已进厂'
},
{
id: 4,
value: '已离厂'
}
],
total: 0,
data: [], data: [],
table: [{
label: '序号',
type: "index",
fixed: "left",
width: 80
},
{
label: '姓名',
sortable: false,
prop: 'name',
fixed: "left",
width: 120
},
{
label: '类型',
sortable: false,
prop: 'type_text',
width: 120
},
{
label: '状态',
sortable: false,
prop: 'audit_status_text',
width: 120
},
{
label: '是否随访',
sortable: false,
prop: 'follw_people',
width: 80,
formatter: (cell, data, value) => {
return value ? '是' : '否'
}
},
{
label: '预约时间',
sortable: false,
prop: 'date',
width: 120
},
{
label: '证件类型',
sortable: false,
prop: 'credent',
width: 120,
formatter: (cell, data, value) => {
return value == 1 ? '身份证' : '护照'
},
},
{
label: '证件号',
sortable: false,
prop: 'idcard',
width: 180
},
{
label: '手机号',
sortable: false,
prop: 'mobile',
width: 120
},
{
label: '单位名称',
sortable: false,
prop: 'company_name',
width: 180
},
{
label: '开始时间',
sortable: false,
prop: 'start_date',
width: 180
},
{
label: '结束时间',
sortable: false,
prop: 'end_date',
width: 180
},
{
label: '创建时间',
sortable: false,
prop: 'created_at',
width: 180
},
{
label: '创建人',
sortable: false,
prop: 'admin_id',
width: 120
}
]
} }
}, },
computed: {}, computed: {},
@ -215,27 +62,40 @@
}, },
created() { created() {
this.getUserList() this.init()
this.getToday() this.getUserList()
this.getList() // this.getList()
}, },
methods: { methods: {
getToday() { init(){
let now = new Date() let clientHeight = document.documentElement.clientHeight;
let nowDay = this.$moment(now).format("YYYY-MM-DD") this.clientHeight = clientHeight
this.select.start_date = nowDay this.$nextTick(() => {
this.select.end_date = nowDay this.$refs.codeInput.focus()
this.selectRange = [nowDay, nowDay] })
},
clearCode(){
this.select.code = ''
this.$nextTick(() => {
this.$refs.codeInput.focus()
})
}, },
async getList() { async getList() {
let res = await getList(this.select) let res = await getList(this.select)
this.data = res.data this.data = res.data
this.total = res.total if(this.data.length>0){
this.$refs['showVisit'].form = this.data[0]
this.$refs['showVisit'].formDataType = 'coderecord'
this.$refs['showVisit'].gateAdminId=this.gateAdminId
this.$refs['showVisit'].isShow = true
}else{
this.$successMessage("未查询到记录",'','warning')
}
}, },
async getUserList() { async getUserList() {
let res = await getUserList() let res = await getUserList()
this.gateData = res this.gateData = res
this.gateShow = true
}, },
confirmGate(){ confirmGate(){
if(!this.gateAdminId){ if(!this.gateAdminId){
@ -243,21 +103,6 @@
return return
} }
this.gateShow = false this.gateShow = false
},
selectRangeM(val) {
console.log(val)
if (val) {
this.select.start_date = val[0]
this.select.end_date = val[1]
} else {
this.select.start_date = ""
this.select.end_date = ""
}
},
tableHeight(val) {
this.$nextTick(function() {
this.tableHeights = val + 25 + 50
})
}, },
showVisitForm(row,type) { showVisitForm(row,type) {
this.$refs['showVisit'].form = row this.$refs['showVisit'].form = row
@ -272,38 +117,32 @@
} }
</script> </script>
<style scoped lang="scss"> <style scoped>
//::v-deep .el-button + .el-button{ .gatewrap{
// margin-left: 0 !important; background-color: #fff;
//} position: relative;
::v-deep .el-button { }
padding: 5px 8px !important; .gatecode{
} font-size: 32px;
position: absolute;
.selector { top:50%;
::v-deep .el-input--suffix .el-input__inner { left:50%;
height: 28px; transform: translate(-50%,-50%);
} width: 100%;
text-align: center;
::v-deep .el-select .el-input .el-select__caret { }
line-height: 28px; /deep/ .el-input{
} width: 350px!important;
}
::v-deep .el-range-editor.el-input__inner { /deep/ .el-input__inner{
height: 28px; font-size: 32px;
width: 250px height: 45px;
} width: 350px;
}
::v-deep .el-date-editor .el-range__icon { /deep/ .el-button{
line-height: 21px; vertical-align: top;
} height: 45px;
width: 90px;
::v-deep .el-date-editor .el-range-separator { border: none;
line-height: 21px;
}
::v-deep .el-date-editor .el-range__close-icon {
line-height: 21px;
}
} }
</style> </style>

@ -21,6 +21,13 @@
</el-table-column> </el-table-column>
<el-table-column prop="name" label="角色名称" width="180"> <el-table-column prop="name" label="角色名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="allow_level" align="center" label="数据权限" width="180">
<template slot-scope="scope">
<el-tag v-if="scope.row.allow_level==0"></el-tag>
<el-tag v-else-if="scope.row.allow_level==1">部门</el-tag>
<el-tag v-else-if="scope.row.allow_level==2">私有</el-tag>
</template>
</el-table-column>
<el-table-column prop="address" label="说明"> <el-table-column prop="address" label="说明">
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="300"> <el-table-column fixed="right" label="操作" width="300">
@ -37,8 +44,15 @@
<el-form-item label="角色名称" prop="name"> <el-form-item label="角色名称" prop="name">
<el-input v-model="form.name" autocomplete="off"></el-input> <el-input v-model="form.name" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="数据权限" prop="allow_level">
<el-radio-group v-model="form.allow_level">
<el-radio :label="0">所有</el-radio>
<el-radio :label="1">部门</el-radio>
<el-radio :label="2">私有</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
<el-input v-model="form.sortnumber" autocomplete="off"></el-input> <el-input v-model="form.sortnumber" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
@ -103,7 +117,8 @@
form: { form: {
name: "", name: "",
id: "", id: "",
sortnumber: "0" sortnumber: "0",
allow_level:0
}, },
userdata: [], userdata: [],
filterMethod(query, item) { filterMethod(query, item) {
@ -125,7 +140,7 @@
setForm: { setForm: {
name: "", name: "",
ids: [], ids: [],
role_id:"" role_id: ""
} }
} }
}, },
@ -160,7 +175,7 @@
this.setForm.role_id = ""; this.setForm.role_id = "";
this.setForm.ids = []; this.setForm.ids = [];
this.setForm.name = obj.name; this.setForm.name = obj.name;
this.setForm.role_id=obj.id; this.setForm.role_id = obj.id;
if (obj.admin) { if (obj.admin) {
for (var m of obj.admin) { for (var m of obj.admin) {
this.setForm.ids.push(m.id); this.setForm.ids.push(m.id);

@ -152,34 +152,35 @@
</div> </div>
</template> </template>
<template v-slot:cars v-if="visitType==1||visitType==2"> <!-- <template v-slot:cars v-if="visitType==3">
<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">
<Button type="primary" icon="md-add" style="margin-bottom: 10px" <div v-for="(item,index) in form.cars">
@click="form.cars.push('')">新增车辆</Button>
<div class='carsitem' v-for="(item,index) in form.cars">
<el-input v-model="form.cars[index]" placeholder="请输入到访车辆"></el-input> <el-input v-model="form.cars[index]" placeholder="请输入到访车辆"></el-input>
<Button size="small" type="primary" ghost @click="form.cars.splice(index,1)"></Button>
</div> </div>
</div> </div>
</div> </div>
</template> </template> -->
<template v-slot:cars v-if="visitType==3"> <template v-slot:cars>
<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">
<div v-for="(item,index) in form.cars"> <Button type="primary" icon="md-add" style="margin-bottom: 10px"
@click="form.cars.push('')">新增车辆</Button>
<div class='carsitem' v-for="(item,index) in form.cars">
<el-input v-model="form.cars[index]" placeholder="请输入到访车辆"></el-input> <el-input v-model="form.cars[index]" placeholder="请输入到访车辆"></el-input>
<Button size="small" type="primary" ghost @click="form.cars.splice(index,1)"></Button>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<template v-slot:follw_people v-if="visitType==1||visitType==2"> <template v-slot:follw_people v-if="visitType==1||visitType==2">
<div class="xy-table-item"> <div class="xy-table-item">
@ -242,14 +243,14 @@
</div> </div>
</div> </div>
</template> --> </template> -->
<template v-slot:accept_admin_id> <template v-slot:accept_admin_id v-if="visitType==1||visitType==2">
<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-select filterable v-model="form.accept_admin_id" placeholder="请选择" style="width:100%"> <el-select filterable v-model="form.accept_admin_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 v-for="item in adminList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -261,7 +262,7 @@
<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-select filterable v-model="form.accept_goods_admin_id" placeholder="请选择" style="width:100%"> <el-select filterable v-model="form.accept_goods_admin_id" @change='changeGoods' placeholder="请选择" style="width:100%">
<el-option v-for="item in adminList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in adminList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@ -300,7 +301,7 @@
isShow: false, isShow: false,
type: 'add', type: 'add',
id: '', id: '',
visitType: 1, visitType: "",
typeName: '', typeName: '',
form: { form: {
// type: 1, // type: 1,
@ -351,7 +352,18 @@
}, },
], ],
departmentList: [], departmentList: [],
adminList: [], adminList: [],
carTable:[{
label: "车牌号",
prop: "car",
// width: 200,
customFn: (row, scope) => {
return (<el-input type="text" placeholder = "请填写车牌号"
v-model={row.car}>
</el-input>
)
}
}],
followTable: [{ followTable: [{
label: "姓名", label: "姓名",
prop: "name", prop: "name",
@ -549,9 +561,37 @@
changeworkrange(val){ changeworkrange(val){
this.form.work_start_time = val[0] this.form.work_start_time = val[0]
this.form.work_end_time = val[1] this.form.work_end_time = val[1]
},
changeAdmin(item){
if(item){
this.adminList.map(e=>{
if(e.id==item){
console.log(e)
this.form.accept_admin_id = e.id
this.form.accpet_department_id = e.department_id
}
})
}
},
changeGoods(item){
if(item){
this.adminList.map(e=>{
if(e.id==item){
console.log(e)
this.form.accept_admin_id = e.id
this.form.accept_goods_admin_id = e.id
this.form.accpet_department_id = e.department_id
}
})
}
}, },
submit() { submit() {
let that = this let that = this
if(this.visitType==3){
this.form.accept_admin_id = this.form.accept_goods_admin_id
}
if (this.type === 'editor') { if (this.type === 'editor') {
this.form.id = this.id this.form.id = this.id
}else{ }else{

@ -1,26 +1,63 @@
<template> <template>
<div> <div>
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" type="form" :title="`${form.type_text}`" :form="formData"> <xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" type="form" :title="`${form.type_text}`"
<template v-slot:logs> :form="formData">
<el-timeline :reverse="true"> <template v-slot:logs>
<el-timeline-item <el-timeline :reverse="true">
v-for="(item, index) in form.logs" <el-timeline-item v-for="(item, index) in form.logs" :key="index" :timestamp="item.created_at">
:key="index" {{item.remark}}
:timestamp="item.created_at"> </el-timeline-item>
{{item.remark}} </el-timeline>
</el-timeline-item> </template>
</el-timeline>
<template v-slot:checkcode v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-size: 32px;width: 230px!important;">
核销码
</div>
<div class="xy-table-item-content">
<div style="font-size: 32px;padding: 25px;width:400px">
{{form.code}}
</div>
</div>
</div>
</template>
<template v-slot:codeType v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-size: 32px;width: 280px!important;">
核销类型
</div>
<div class="xy-table-item-content">
<div style="font-size: 32px;padding: 25px;width:400px">
<el-radio-group v-model="codeForm.type">
<el-radio :label="item.id" v-for="item in codeTypeList">{{item.value}}</el-radio>
</el-radio-group>
</div>
</div>
</div>
</template>
<template v-slot:person_no v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-size: 32px;width: 230px!important;">
入场牌
</div>
<div class="xy-table-item-content">
<el-input style="font-size: 32px;padding: 25px;width:400px" v-model="codeForm.person_no" placeholder="请输入入场牌"></el-input>
</div>
</div>
</template>
<template v-slot:car_no v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-size: 32px;width: 230px!important;">
停车牌
</div>
<div class="xy-table-item-content">
<el-input style="font-size: 32px;padding: 25px;width:400px" v-model="codeForm.car_no" placeholder="请输入停车牌"></el-input>
</div>
</div>
</template> </template>
<template v-slot:codeForm v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-size: 32px;width: 230px!important;">
核销码
</div>
<div class="xy-table-item-content">
<el-input style="font-size: 32px;padding: 25px;width:400px" v-model="codeForm.code" ref="codeInput" placeholder="请输入核销码或扫码"></el-input>
</div>
</div>
</template>
<template v-slot:visitinfo> <template v-slot:visitinfo>
<div style="width:600px"> <div style="width:600px">
拜访信息 拜访信息
@ -250,14 +287,14 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
</template>
<template v-slot:checkText v-if="form.audit_status==0&&!isCheck">
<div class="checkforms dbitem" style="padding:30rpx">
{{checkText}}
</div>
</template> </template>
<template v-slot:checkText v-if="form.audit_status==0&&!isCheck">
<div class="checkforms dbitem" style="padding:30rpx">
{{checkText}}
</div>
</template>
@ -277,17 +314,17 @@
<script> <script>
import { import {
save save
} from "@/api/visit/check.js" } from "@/api/visit/check.js"
import { import {
show show
} from "@/api/visit/record.js" } from "@/api/visit/record.js"
import { import {
cancelCode cancelCode
} from "@/api/gate" } from "@/api/gate"
import { import {
getInfo getInfo
} from '@/api/user.js' } from '@/api/user.js'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
export default { export default {
components: {}, components: {},
data() { data() {
@ -296,8 +333,12 @@ import Cookies from 'js-cookie'
id: '', id: '',
userId: '', userId: '',
formDataType: '', formDataType: '',
formData: { formData: {
codeForm: {}, checkcode: '',
codeType:"",
car_no: '',
person_no: '',
visitinfo: "", visitinfo: "",
date: "", date: "",
visit_time_id: "", visit_time_id: "",
@ -322,16 +363,26 @@ import Cookies from 'js-cookie'
accept_goods_admin_id: "", accept_goods_admin_id: "",
checkRecord: '', checkRecord: '',
checkForm: {}, checkForm: {},
checkText:'' checkText: ''
}, },
form: {}, form: {},
checkForm: { checkForm: {
status:1 status: 1
}, // }, //
codeForm: {}, // codeForm: {
codeType: '', type:1,
car_no:'',
person_no:''
}, //
codeTypeList:[{
id:1,
value:'入场'
},{
id:2,
value:'离场'
}],
gateAdminId: '', gateAdminId: '',
check_admin_name: "", check_admin_name: "",
followTable: [{ followTable: [{
@ -346,11 +397,11 @@ import Cookies from 'js-cookie'
}, },
{ {
label: "证件类型", label: "证件类型",
// width: 180, // width: 180,
prop:'credent', prop: 'credent',
width: 200, width: 200,
formatter(cell,data,val){ formatter(cell, data, val) {
return val==1?'身份证':'护照' return val == 1 ? '身份证' : '护照'
} }
}, { }, {
label: "证件号码", label: "证件号码",
@ -358,8 +409,7 @@ import Cookies from 'js-cookie'
width: 200 width: 200
} }
], ],
statusList: [ statusList: [{
{
id: 1, id: 1,
value: "通过" value: "通过"
}, },
@ -367,19 +417,19 @@ import Cookies from 'js-cookie'
id: 2, id: 2,
value: "驳回" value: "驳回"
}, },
], ],
checkLevel:[{ checkLevel: [{
id:1, id: 1,
value:'请等待一级审核完成' value: '请等待一级审核完成'
},{ }, {
id:2, id: 2,
value:'请等待二级审核完成' value: '请等待二级审核完成'
},{ }, {
id:3, id: 3,
value:'请等待三级审核完成' value: '请等待三级审核完成'
}], }],
checkText:'', checkText: '',
isCheck:false isCheck: false
} }
}, },
created() { created() {
@ -395,12 +445,9 @@ import Cookies from 'js-cookie'
this.getDetail() this.getDetail()
} }
if (this.formDataType == 'coderecord') { if (this.formDataType == 'coderecord') {
this.codeForm.type = parseInt(this.codeType) this.codeForm.code = parseInt(this.form.code)
this.codeForm.admin_id = parseInt(this.gateAdminId) this.codeForm.admin_id = parseInt(this.gateAdminId)
this.$nextTick(() => {
this.$refs.codeInput.focus()
})
} }
} else { } else {
this.reset() this.reset()
@ -421,38 +468,38 @@ import Cookies from 'js-cookie'
async getUserId() { async getUserId() {
const res = await getInfo() const res = await getInfo()
this.userId = res.id this.userId = res.id
}, },
async getDetail() { async getDetail() {
const res = await show({ const res = await show({
id: this.id id: this.id
}) })
let that = this let that = this
this.form = res this.form = res
for (let item of that.form.audit) { for (let item of that.form.audit) {
if(item.status==0){ if (item.status == 0) {
if (item.audit_admin_id == that.userId) { if (item.audit_admin_id == that.userId) {
that.checkForm.level = item.level that.checkForm.level = item.level
that.checkForm.id = item.id that.checkForm.id = item.id
that.checkForm.audit_admin_id = item.audit_admin_id that.checkForm.audit_admin_id = item.audit_admin_id
that.isCheck = true that.isCheck = true
return return
}else{ } else {
that.checkLevel.map(item1=>{ that.checkLevel.map(item1 => {
if(item.level==item1.id){ if (item.level == item1.id) {
that.checkText = item1.value that.checkText = item1.value
} }
}) })
that.isCheck = false that.isCheck = false
return return
} }
}else{ } else {
that.isCheck = false that.isCheck = false
} }
} }
}, },
reset() { reset() {
this.id='' this.id = ''
this.formDataType = '' this.formDataType = ''
this.checkForm = {} this.checkForm = {}
this.check_admin_name = '' this.check_admin_name = ''
@ -492,7 +539,7 @@ import Cookies from 'js-cookie'
} }
</script> </script>
<style scoped lang="scss"> <style scoped>
.xy-table-item-label { .xy-table-item-label {
width: 180px !important; width: 180px !important;
} }
@ -507,5 +554,11 @@ import Cookies from 'js-cookie'
position: absolute; position: absolute;
top: 4px; top: 4px;
right: 4px; right: 4px;
}
/deep/ .el-radio__input{
vertical-align: super;
}
/deep/ .el-radio__label{
font-size: 32px;
} }
</style> </style>

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: '/admin/', publicPath: '/admin/',
outputDir: '/Users/liuxiangyu/Work/s-szbd/code/szbd-visitor-service/public/admin', outputDir: '/Users/mac/Documents/朗业/2023/b-bd智能访客系统/szbd',
assetsDir: 'static', assetsDir: 'static',
css: { css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项 loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save