fix: 拆包扫码未匹配商品时不阻断,按未识别商品登记空stock_id和条码
This commit is contained in:
parent
2a1efd296f
commit
3494d6b2a7
@ -989,7 +989,8 @@ async function handleBarcodeQuickAdd(fromScan = false) {
|
||||
.map((row) => mapStockPickerItem(row))
|
||||
.filter((item: any) => item?.item_id)
|
||||
if (matched.length === 0) {
|
||||
ElMessage.warning('未找到匹配的商品')
|
||||
// 扫描条码未匹配到系统商品:不阻断,按未识别商品登记(stock_id 为空,条码仅作记录)
|
||||
await quickAddDetail(null)
|
||||
} else if (matched.length === 1) {
|
||||
syncStoreFromStockItem(matched[0])
|
||||
await quickAddDetail(matched[0])
|
||||
@ -1075,7 +1076,7 @@ async function quickAddDetail(item: any) {
|
||||
detailBarcode.value = ''
|
||||
if (scannedBarcode) lastScannedBarcode.value = scannedBarcode
|
||||
void pushOsdText()
|
||||
ElMessage.success('明细添加成功')
|
||||
ElMessage.success(stockId == null ? '未找到匹配商品,已按未识别商品登记' : '明细添加成功')
|
||||
loadDetailList()
|
||||
focusTarget.value = 'barcode'
|
||||
nextTick(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user