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,12 +278,17 @@
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: '',
userId: '',
formDataType: '', formDataType: '',
formData: { formData: {
visitinfo: "", visitinfo: "",
@ -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()
}) })
@ -385,6 +408,10 @@
} }
}) })
}, },
async getUserId() {
const res = await getInfo()
this.userId = res.id
},
reset() { reset() {
this.formDataType = '' this.formDataType = ''
this.checkForm = {} this.checkForm = {}

Loading…
Cancel
Save