bug: 🐛 校验条形码
This commit is contained in:
parent
88795fe559
commit
cdaa6797fa
@ -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) {
|
||||
// 再step2中点击下一步的时候,就去获取step2中的表单数据
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user