审核 核销

master
lion 3 years ago
parent 62aa7268c2
commit ecd6eaddac

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

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

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

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

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

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

@ -131,7 +131,7 @@
<template v-slot:idcard>
<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.idcard" placeholder="请输入证件号码"></el-input>
@ -141,7 +141,7 @@
<template v-slot:company_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.company_name" placeholder="请输入单位名称"></el-input>
@ -226,7 +226,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>人员
</div>
<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>
</el-select>
@ -239,7 +239,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>收货人
</div>
<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>
</el-select>
@ -421,7 +421,18 @@
pattern: /^[1][3-9][\d]{9}/,
message: "手机号格式错误",
}
],
],
idcard: [{
required: true,
message: '请输入身份证号'
},{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: '身份证格式错误'
}],
company_name: [{
required: true,
message: '请输入单位名称'
}],
},
pickerOptions: {
shortcuts: [{

@ -1,6 +1,18 @@
<template>
<div>
<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>
<div style="width:600px">
拜访信息
@ -207,7 +219,7 @@
审核
</div>
</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">
<div class="xy-table-item">
<div class="xy-table-item-label">状态
@ -220,21 +232,6 @@
</div>
</div>
</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">
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -245,18 +242,16 @@
</div>
</div>
</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 v-slot:codeForm v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label">
核销码
</div>
<div class="xy-table-item-content">
<el-input v-model="codeForm.code" ref="codeInput" placeholder="请输入核销码或扫码" style="width:300px"></el-input>
</div>
</div>
</template>
<template v-slot:footerContent>
<div>
@ -290,7 +285,8 @@ import Cookies from 'js-cookie'
id: '',
userId: '',
formDataType: '',
formData: {
formData: {
codeForm: {},
visitinfo: "",
date: "",
visit_time_id: "",
@ -315,12 +311,14 @@ import Cookies from 'js-cookie'
accept_goods_admin_id: "",
checkRecord: '',
checkForm: {},
codeForm: {}
checkForm: {},
checkText:''
},
form: {},
checkForm: {}, //
checkForm: {
status:1
}, //
codeForm: {}, //
codeType: '',
gateAdminId: '',
@ -345,10 +343,7 @@ import Cookies from 'js-cookie'
width: 200
}
],
statusList: [{
id: 0,
value: "待审核"
},
statusList: [
{
id: 1,
value: "通过"
@ -358,6 +353,17 @@ import Cookies from 'js-cookie'
value: "驳回"
},
],
checkLevel:[{
id:1,
value:'请等待一级审核完成'
},{
id:2,
value:'请等待二级审核完成'
},{
id:3,
value:'请等待三级审核完成'
}],
checkText:'',
isCheck:false
}
},
@ -371,15 +377,25 @@ import Cookies from 'js-cookie'
let that = this
if (this.formDataType == 'checkrecord') {
this.checkForm.visit_id = this.form.id
for (let item of that.form.audit) {
console.log('item', item.audit_admin_id)
if (item.audit_admin_id == that.userId) {
console.log(item.audit_admin_id == that.userId)
that.checkForm.level = item.level
that.checkForm.id = item.id
that.checkForm.audit_admin_id = item.audit_admin_id
that.isCheck = true
return
for (let item of that.form.audit) {
if(item.status==0){
if (item.audit_admin_id == that.userId) {
that.checkForm.level = item.level
that.checkForm.id = item.id
that.checkForm.audit_admin_id = item.audit_admin_id
that.isCheck = true
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