master
lion 5 months ago
parent ab6ba477c2
commit 3bb857e528

@ -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){

Loading…
Cancel
Save