bug: 🐛 校验条形码
Some checks failed
Release / lint (push) Successful in 42s
Release / Release (push) Has been cancelled

This commit is contained in:
my_ong 2025-03-19 16:36:50 +08:00
parent 88795fe559
commit cdaa6797fa
3 changed files with 11 additions and 4 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -12,7 +12,7 @@
</div>
<div v-show="current === 1" class="step-2">
<scan-form ref="scanFormRef" :total-value="totalValue"></scan-form>
<scan-form ref="scanFormRef" :total-value="totalValue" :apply-type="myType"></scan-form>
</div>
<div v-show="current === 2" class="step-3">
<apply-confirm ref="applyConfirmRef" :table-data="conformData"></apply-confirm>
@ -56,7 +56,7 @@
const loading = ref(false) // loading
const items = [{ title: '录入申请' }, { title: '扫码点货' }, { title: '人工确认' }]
const myType = ref('') //
/**
* 点击下一步
*/
@ -71,6 +71,8 @@
totalValue.value += item.quantity
}
})
const applyForm = applyFormRef.value.getApplyForm() //
myType.value = applyForm.type //
}
if (scanFormRef.value && current.value === 1) {
// step2step2

View File

@ -65,6 +65,11 @@
required: false,
default: 0,
},
applyType: {
type: String,
required: false,
default: '',
},
})
//
@ -177,9 +182,9 @@
return
}
//
const code = sn.slice(0, 6)
const code = sn.slice(0, 4)
const materialInfo = materialMapCache.value.get(code)
if (!materialInfo) {
if (!materialInfo && props.applyType != 'PURCHASE_RECEIPT') {
value.value = ''
message.warning('【' + sn + '】条形码不合法,请重新扫码', 5)
return