审核 核销

master
lion 3 years ago
parent 62aa7268c2
commit ecd6eaddac

@ -2,7 +2,7 @@ import request from "@/utils/request";
export function getList(params){ export function getList(params){
return request({ return request({
url:'/api/admin/study/index', url:'/api/admin/config/index',
method:'get', method:'get',
params params
}) })
@ -11,7 +11,7 @@ export function getList(params){
export function show(params){ export function show(params){
return request({ return request({
method:'get', method:'get',
url:'/api/admin/study/show', url:'/api/admin/config/show',
params params
}) })
} }
@ -19,15 +19,7 @@ export function show(params){
export function save(data){ export function save(data){
return request({ return request({
method:'post', method:'post',
url:'/api/admin/study/save', url:'/api/admin/config/save',
data
})
}
export function store(data){
return request({
method:'post',
url:'/api/admin/study/store',
data data
}) })
} }
@ -35,7 +27,7 @@ export function store(data){
export function destroy(data){ export function destroy(data){
return request({ return request({
method:'post', method:'post',
url:'/api/admin/study/destroy', url:'/api/admin/config/destroy',
data data
}) })
} }

@ -8,10 +8,11 @@ export function save(data) {
}) })
} }
export function listuser() { export function listuser(params) {
return request({ return request({
url: '/api/admin/admin', url: '/api/admin/admin',
method: 'get' method: 'get',
params
}) })
} }

@ -166,6 +166,7 @@
placeholder="请选择审核人" placeholder="请选择审核人"
style="width: 140px" style="width: 140px"
value={row.admin_name} value={row.admin_name}
filterable
on={{ on={{
["change"]: (e) => (row.admin_name = e.name,row.admin_id = e.id), ["change"]: (e) => (row.admin_name = e.name,row.admin_id = e.id),
}} }}
@ -195,7 +196,7 @@
methods: { methods: {
async getUser(){ async getUser(){
const res = await listCommonuser() const res = await listCommonuser({page:1,page_size:999})
this.checkAdmin = res.data this.checkAdmin = res.data
}, },
async getDetail() { async getDetail() {

@ -15,6 +15,7 @@
:table-item="table" :table-item="table"
:list="data" :list="data"
:total="total" :total="total"
:auths="['edit','delete']"
@pageSizeChange="e => {select.rows = e;select.page = 1;getList()}" @pageSizeChange="e => {select.rows = e;select.page = 1;getList()}"
@pageIndexChange="e => {select.page = e;getList()}" @pageIndexChange="e => {select.page = e;getList()}"
@delete="deleteStudy" @delete="deleteStudy"
@ -26,7 +27,7 @@
<script> <script>
import {getList} from '@/api/resource/bd.js' import {getList,destroy} from '@/api/resource/bd.js'
import addBd from '@/views/resource/component/addBd' import addBd from '@/views/resource/component/addBd'
export default { export default {
components: { components: {
@ -42,19 +43,19 @@ export default {
data:[], data:[],
table:[ table:[
{ {
label:'访客开放时间', label:'详情名称',
sortable:false, sortable:false,
prop:'start_time' prop:'name'
}, },
{ {
label:'随访人员最大数量', label:'详情编码',
sortable:false, sortable:false,
prop:'end_time', prop:'key',
}, },
{ {
label:'单次预约可进车辆数量', label:'详情内容',
sortable:false, sortable:false,
prop:'end_time', prop:'value',
} }
] ]
} }

@ -2,7 +2,39 @@
<div> <div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增详情' : '编辑详情'" :form="form" <xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增详情' : '编辑详情'" :form="form"
:rules="rules" @submit="submit"> :rules="rules" @submit="submit">
<template v-slot:studyName> <template v-slot:name>
<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-input v-model="form.name" placeholder="请输入详情名称" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:key>
<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-input v-model="form.key" placeholder="请输入详情编码" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:value>
<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-input :autosize="{minRows:2}" type="textarea" v-model="form.value" placeholder="请输入详情内容" clearable
style="width: 300px;"></el-input>
<!-- <el-input v-model="form.value" placeholder="请输入详情内容" clearable style="width: 300px;"></el-input> -->
</div>
</div>
</template>
<!-- <template v-slot:studyName>
<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>访客开放时间
@ -64,7 +96,7 @@
style="width: 300px;"></el-input> style="width: 300px;"></el-input>
</div> </div>
</div> </div>
</template> </template> -->
</xy-dialog> </xy-dialog>
@ -75,7 +107,6 @@
<script> <script>
import { import {
store,
show, show,
save save
} from "@/api/resource/bd.js" } from "@/api/resource/bd.js"
@ -88,15 +119,23 @@
id: '', id: '',
form: { form: {
studyName:"", name:"",
studyName1:"", key:"",
studyName2:"", value:''
recommend:"",
recommend1:"",
recommend2:""
}, },
rules:{ rules:{
name:[{
required: true,
message: '请输入详情名称'
}],
key:[{
required: true,
message: '请输入详情编码'
}],
value:[{
required: true,
message: '请输入详情内容'
}]
} }
} }
}, },
@ -115,28 +154,19 @@
}, },
submit() { submit() {
if (this.type === 'add') { let that = this
console.log(this.form)
// return
store({
}).then(res => {
this.$successMessage('add', '时段')
this.isShow = false
this.$emit('refresh')
})
return
}
if (this.type === 'editor') { if (this.type === 'editor') {
save({ this.form.id = this.id
id: this.id, }else{
this.form.id = ""
}).then(res => {
this.$successMessage('editor', '时段')
this.isShow = false
this.$emit('refresh')
})
} }
save({
...that.form
}).then(res => {
this.$successMessage(this.type, '详情')
this.isShow = false
this.$emit('refresh')
})
} }
}, },
watch: { watch: {

@ -209,7 +209,10 @@
}, },
load() { load() {
var that = this; var that = this;
listuser().then(response => { listuser({
page:1,
page_size:99
}).then(response => {
var data = response.data; var data = response.data;
var _rolelist = []; var _rolelist = [];
for (var m of data) { for (var m of data) {

@ -131,7 +131,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>证件号码
</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>
@ -141,7 +141,7 @@
<template v-slot:company_name> <template v-slot:company_name>
<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>单位名称
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-input v-model="form.company_name" placeholder="请输入单位名称"></el-input> <el-input v-model="form.company_name" placeholder="请输入单位名称"></el-input>
@ -226,7 +226,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 v-model="form.accept_admin_id" placeholder="请选择" style="width:100%"> <el-select filterable v-model="form.accept_admin_id" 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>
@ -239,7 +239,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 v-model="form.accept_goods_admin_id" placeholder="请选择" style="width:100%"> <el-select filterable v-model="form.accept_goods_admin_id" 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>
@ -422,6 +422,17 @@
message: "手机号格式错误", message: "手机号格式错误",
} }
], ],
idcard: [{
required: true,
message: '请输入身份证号'
},{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: '身份证格式错误'
}],
company_name: [{
required: true,
message: '请输入单位名称'
}],
}, },
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{

@ -1,6 +1,18 @@
<template> <template>
<div> <div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="`${form.type_text}`" :form="formData"> <xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="`${form.type_text}`" :form="formData">
<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:300px" 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">
拜访信息 拜访信息
@ -207,7 +219,7 @@
审核 审核
</div> </div>
</template> </template>
<template v-slot:checkForm v-if="formDataType=='checkrecord'&&isCheck"> <template v-slot:checkForm v-if="form.audit_status==0&&isCheck">
<el-form-item prop='checkForm.status' style="margin-bottom:20px"> <el-form-item prop='checkForm.status' style="margin-bottom:20px">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">状态 <div class="xy-table-item-label">状态
@ -220,21 +232,6 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<!-- <el-form-item prop='checkForm.status' style="margin-bottom:20px">
<div class="xy-table-item">
<div class="xy-table-item-label">审核
</div>
<div class="xy-table-item-content">
<el-select v-model="checkForm.level" @change="selectLevel" placeholder="请选择" style="width:200px;margin-right:10px">
<el-option v-for="(item,index) in form.visit_area.audit_admin" :key="item.level" :label="item.type_name" :value="item.level">
</el-option>
</el-select>
<span>
{{check_admin_name}}
</span>
</div>
</div>
</el-form-item> -->
<el-form-item prop='checkForm.reason' style="margin-bottom:20px"> <el-form-item prop='checkForm.reason' style="margin-bottom:20px">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -247,17 +244,15 @@
</el-form-item> </el-form-item>
</template> </template>
<template v-slot:codeForm v-if="formDataType=='coderecord'"> <template v-slot:checkText v-if="form.audit_status==0&&!isCheck">
<div class="xy-table-item"> <div class="checkforms dbitem" style="padding:30rpx">
<div class="xy-table-item-label"> {{checkText}}
核销码
</div>
<div class="xy-table-item-content">
<el-input v-model="codeForm.code" ref="codeInput" placeholder="请输入核销码或扫码" style="width:300px"></el-input>
</div>
</div> </div>
</template> </template>
<template v-slot:footerContent> <template v-slot:footerContent>
<div> <div>
<Button ghost type="primary" @click="reset"></Button> <Button ghost type="primary" @click="reset"></Button>
@ -291,6 +286,7 @@ import Cookies from 'js-cookie'
userId: '', userId: '',
formDataType: '', formDataType: '',
formData: { formData: {
codeForm: {},
visitinfo: "", visitinfo: "",
date: "", date: "",
visit_time_id: "", visit_time_id: "",
@ -316,11 +312,13 @@ import Cookies from 'js-cookie'
checkRecord: '', checkRecord: '',
checkForm: {}, checkForm: {},
codeForm: {} checkText:''
}, },
form: {}, form: {},
checkForm: {}, // checkForm: {
status:1
}, //
codeForm: {}, // codeForm: {}, //
codeType: '', codeType: '',
gateAdminId: '', gateAdminId: '',
@ -345,10 +343,7 @@ import Cookies from 'js-cookie'
width: 200 width: 200
} }
], ],
statusList: [{ statusList: [
id: 0,
value: "待审核"
},
{ {
id: 1, id: 1,
value: "通过" value: "通过"
@ -358,6 +353,17 @@ import Cookies from 'js-cookie'
value: "驳回" value: "驳回"
}, },
], ],
checkLevel:[{
id:1,
value:'请等待一级审核完成'
},{
id:2,
value:'请等待二级审核完成'
},{
id:3,
value:'请等待三级审核完成'
}],
checkText:'',
isCheck:false isCheck:false
} }
}, },
@ -372,14 +378,24 @@ import Cookies from 'js-cookie'
if (this.formDataType == 'checkrecord') { if (this.formDataType == 'checkrecord') {
this.checkForm.visit_id = this.form.id this.checkForm.visit_id = this.form.id
for (let item of that.form.audit) { for (let item of that.form.audit) {
console.log('item', item.audit_admin_id) if(item.status==0){
if (item.audit_admin_id == that.userId) { if (item.audit_admin_id == that.userId) {
console.log(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{
that.checkLevel.map(item1=>{
if(item.level==item1.id){
that.checkText = item1.value
}
})
that.isCheck = false
return
}
}else{
that.isCheck = false
} }
} }

Loading…
Cancel
Save