master
lion 3 years ago
parent d378008ab8
commit d56033e0da

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

Loading…
Cancel
Save