审核 核销

master
lion 3 years ago
parent ecd6eaddac
commit 1e44e4da9c

@ -1,138 +1,254 @@
<template> <template>
<div style="padding: 0 20px"> <div style="padding: 0 20px">
<div ref="lxHeader"> <div ref="lxHeader">
<lx-header icon="md-apps" text="长期访客管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <lx-header icon="md-apps" text="拜访记录管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot> <slot>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;" class="selector">
<div style="margin-right: 10px;">关键词</div> <div style="margin-right: 10px;">关键词</div>
<el-input size="mini" placeholder="请输入关键词" v-model="select.keyword" style="width: 160px;margin-right: 10px;"></el-input> <el-input size="mini" placeholder="请输入关键词" v-model="select.keyword"
<el-button @click="getList" slot="reference" size="medium" type="primary" style="margin-left: 10px">查询</el-button> style="width: 160px;margin-right: 10px;"></el-input>
<el-button @click="visible=false,$refs['addLong'].isShow = true,$refs['addLong'].type = 'add'" size="medium" type="primary" style="margin-left: 10px">新增</el-button> <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">
</div> </el-option>
</slot> </el-select>
</lx-header> <div style="margin:0 10px;">起始时间</div>
</div> <el-date-picker v-model="selectRange" @change="selectRanges" value-format="yyyy-MM-dd" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期">
<xy-table </el-date-picker>
:table-item="table" <el-button @click="getList" slot="reference" size="medium" type="primary" style="margin-left: 10px">查询
:list="data" </el-button>
:total="total" <el-button @click="downloadExel" slot="reference" size="medium" type="primary" style="margin-left: 10px">导出
@pageSizeChange="e => {select.rows = e;select.page = 1;getList()}" </el-button>
@pageIndexChange="e => {select.page = e;getList()}"
@delete="deleteStudy" </div>
@editor="editorStudy"> </slot>
</xy-table> </lx-header>
<addLong ref="addLong" @refresh="getList"></addLong> </div>
</div>
</template> <xy-table :table-item="table" :list="data" :total="total"
@pageSizeChange="e => {select.rows = e;select.page = 1;getList()}"
<script> @pageIndexChange="e => {select.page = e;getList()}">
</xy-table>
import {getList} from '@/api/visit/record.js' </div>
import addLong from '@/views/visit/component/addLong' </template>
export default {
components: { <script>
addLong import {
}, getList
data() { } from '@/api/visit/record.js'
return { import {
select:{ download
page:1, } from '@/utils/downloadRequest'
rows:10, export default {
keyword:"" components: {
},
data() {
return {
select: {
page: 1,
rows: 10,
keyword: "",
audit_status: "",
start_date: "",
end_date: "",
is_export: 0,
long_time:1
},
selectRange: [],
statusList: [{
id: -1,
value: '待学习'
},
{
id: 0,
value: '待审核'
},
{
id: 1,
value: '通过(待进厂)'
},
{
id: 2,
value: '驳回'
},
{
id: 3,
value: '已进厂'
},
{
id: 4,
value: '已离厂'
},{
id: 5,
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() {
this.getList()
},
methods: {
async getList() {
let res = await getList(this.select)
console.log(res)
this.data = res.data
this.total = res.total
}, },
total:0, selectRanges(val){
data:[], if(val){
table:[ this.select.start_date = val[0]
{ this.select.end_date = val[1]
label:'姓名', }else{
sortable:false, this.select.start_date = ''
prop:'start_time', this.select.end_date = ''
fixed:"left",
align:"left"
},
{
label:'证件类型',
sortable:false,
prop:'end_time',
},
{
label:'证件号',
sortable:false,
prop:'end_time',
},
{
label:'状态',
sortable:false,
prop:'end_time',
},
{
label:'单位名称',
sortable:false,
prop:'end_time',
},
{
label:'手机号',
sortable:false,
prop:'end_time',
},
{
label:'开始时间',
sortable:false,
prop:'end_time',
},
{
label:'结束时间',
sortable:false,
prop:'end_time',
},
{
label:'创建时间',
sortable:false,
prop:'end_time',
},
{
label:'创建人',
sortable:false,
prop:'end_time',
} }
] },
} downloadExel() {
}, this.select.is_export = 1
computed: {}, download(
mounted() { '/api/admin/visit/index',
// this.getList() 'get', {
}, ...this.select
methods: { },
async getList(){ '拜访记录列表.xlsx')
let res = await getList(this.select) this.select.is_export = 0
console.log(res) }
this.data = res.data },
this.total = res.total }
}, </script>
deleteStudy(row){
destroy({id:row.id}).then(res => { <style scoped lang="scss">
this.$successMessage('destroy','长期访客') //::v-deep .el-button + .el-button{
this.getList() // margin-left: 0 !important;
}) //}
}, ::v-deep .el-button {
editorStudy(row){ padding: 5px 8px !important;
this.$refs['addLong'].id = row.id }
this.$refs['addLong'].type = 'editor'
this.$refs['addLong'].isShow = true .selector {
} ::v-deep .el-input--suffix .el-input__inner {
}, height: 28px;
} }
</script>
::v-deep .el-select .el-input .el-select__caret {
<style scoped lang="scss"> line-height: 28px;
//::v-deep .el-button + .el-button{ }
// margin-left: 0 !important;
//} ::v-deep .el-range-editor.el-input__inner {
::v-deep .el-button{ height: 28px;
padding: 5px 8px !important; 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> </style>

Loading…
Cancel
Save