From 3bb857e5284f5c917a94710a02fac3a28de0b183 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Fri, 22 May 2026 18:00:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B8=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/visit/component/showVisit.vue | 30 +++++++++++++++++-------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/views/visit/component/showVisit.vue b/src/views/visit/component/showVisit.vue index 29e8f0e..5306f2e 100644 --- a/src/views/visit/component/showVisit.vue +++ b/src/views/visit/component/showVisit.vue @@ -530,16 +530,28 @@ if (this.formDataType == 'coderecord') { this.codeForm.code = this.form.code this.codeForm.admin_id = parseInt(this.gateAdminId) - // 待进厂→入场;生产区陪同签字要求下已进厂→离场;长期访客当日已离场→仍可再次核销入场(新一天或再次进场) - if (Number(this.form.audit_status) === 1) { - this.codeForm.type = 1 - } else if (Number(this.form.audit_status) === 3 && this.form.accept_admin_sign) { - this.codeForm.type = 2 - } else if (Number(this.form.audit_status) === 4 && Number(this.form.long_time) === 1) { - this.codeForm.type = 1 - } else { - this.codeForm.type = 0 + // 长期访客优先用后端的 gate_verify_type(跨日遗留「已进厂」时必须先核进再走离) + const longTerm = Number(this.form.long_time) === 1 + let nextType = 0 + if (longTerm && this.form.gate_verify_type !== undefined && this.form.gate_verify_type !== null && this.form.gate_verify_type !== '') { + const gvt = Number(this.form.gate_verify_type) + if (gvt === 1) { + nextType = 1 + } else if (gvt === 2) { + nextType = this.form.accept_admin_sign ? 2 : 0 + } + } + if (nextType === 0) { + // 待进厂→入场;生产区签字要求下已进厂→离场;长期访客已离场→次日再核销入场 + if (Number(this.form.audit_status) === 1) { + nextType = 1 + } else if (Number(this.form.audit_status) === 3 && this.form.accept_admin_sign) { + nextType = 2 + } else if (Number(this.form.audit_status) === 4 && longTerm) { + nextType = 1 + } } + this.codeForm.type = nextType if(this.codeForm.type==1){ this.codeForm.person_no.push({name:this.form.name,person_no:''}) for(var k of this.form.follw_people){