master
lion 3 years ago
parent d378008ab8
commit d56033e0da

@ -207,7 +207,7 @@
审核
</div>
</template>
<template v-slot:checkForm v-if="formDataType=='checkrecord'">
<template v-slot:checkForm v-if="formDataType=='checkrecord'&&isCheck">
<el-form-item prop='checkForm.status' style="margin-bottom:20px">
<div class="xy-table-item">
<div class="xy-table-item-label">状态
@ -220,7 +220,7 @@
</div>
</div>
</el-form-item>
<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-label">审核
</div>
@ -234,7 +234,7 @@
</span>
</div>
</div>
</el-form-item>
</el-form-item> -->
<el-form-item prop='checkForm.reason' style="margin-bottom:20px">
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -247,7 +247,7 @@
</el-form-item>
</template>
<template v-slot:codeForm>
<template v-slot:codeForm v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label">
核销码
@ -261,7 +261,7 @@
<template v-slot:footerContent>
<div>
<Button ghost type="primary" @click="reset"></Button>
<Button v-if="formDataType=='checkrecord'" type="primary" @click="checkSubmit"></Button>
<Button v-if="formDataType=='checkrecord'&&isCheck" type="primary" @click="checkSubmit"></Button>
<Button v-if="formDataType=='coderecord'" type="primary" @click="codeSubmit"></Button>
</div>
</template>
@ -278,13 +278,18 @@
import {
cancelCode
} from "@/api/gate"
import {
getInfo
} from '@/api/user.js'
import Cookies from 'js-cookie'
export default {
components: {},
data() {
return {
isShow: false,
id: '',
formDataType:'',
userId: '',
formDataType: '',
formData: {
visitinfo: "",
date: "",
@ -309,17 +314,17 @@
accept_admin_id: "",
accept_goods_admin_id: "",
checkRecord:'',
checkForm:{},
codeForm:{}
checkRecord: '',
checkForm: {},
codeForm: {}
},
form: {},
checkForm:{},//
codeForm:{},//
codeType:'',
gateAdminId:'',
check_admin_name:"",
checkForm: {}, //
codeForm: {}, //
codeType: '',
gateAdminId: '',
check_admin_name: "",
followTable: [{
label: "姓名",
prop: "name",
@ -353,18 +358,36 @@
value: "驳回"
},
],
isCheck:false
}
},
created() {
// this.getVisitTime()
this.getUserId()
},
watch: {
isShow(newVal) {
if (newVal) {
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
}
}
}
if (this.formDataType == 'coderecord') {
this.codeForm.type = parseInt(this.codeType)
this.codeForm.admin_id = parseInt(this.gateAdminId)
if(this.formDataType=='coderecord'){
this.$nextTick(() => {
this.$refs.codeInput.focus()
})
@ -375,27 +398,31 @@
}
},
methods: {
selectLevel(val){
this.form.audit.map(item=>{
if(item.level==val){
selectLevel(val) {
this.form.audit.map(item => {
if (item.level == val) {
this.checkForm.level = item.level
this.checkForm.id = item.id
this.checkForm.audit_admin_id = item.audit_admin_id
this.check_admin_name = item.audit_admin?item.audit_admin.name:''
this.check_admin_name = item.audit_admin ? item.audit_admin.name : ''
}
})
},
reset(){
this.formDataType=''
async getUserId() {
const res = await getInfo()
this.userId = res.id
},
reset() {
this.formDataType = ''
this.checkForm = {}
this.check_admin_name = ''
this.codeForm={}
this.codeForm = {}
this.codeType = ''
this.gateAdminId=''
this.gateAdminId = ''
this.isShow = false
this.$refs['dialog'].reset()
},
checkSubmit(){
checkSubmit() {
console.log(this.checkForm)
// return
let that = this
@ -408,7 +435,7 @@
this.$emit('refresh')
})
},
codeSubmit(){
codeSubmit() {
let that = this
console.log(this.codeForm)
cancelCode({

Loading…
Cancel
Save