修改拣货模块,条码显示

This commit is contained in:
zm2000 2026-06-23 21:01:47 +08:00
parent df7ba01211
commit aabf9a217d

View File

@ -998,8 +998,8 @@
return; return;
} }
const scanBarcode = this.normalizeBarcodeText(scanText); const scanBarcode = this.normalizeBarcodeText(scanText);
const currentBarcode = this.normalizeBarcodeText(this.selectedItemBarcode); const currentBarcodes = (this.selectedItemBarcode || '').split(/[,,、\s]+/).map(b => this.normalizeBarcodeText(b)).filter(b => b);
if (scanBarcode && currentBarcode && scanBarcode === currentBarcode) { if (scanBarcode && currentBarcodes.length > 0 && currentBarcodes.includes(scanBarcode)) {
this.triggerBarcodeMatchedHighlight(this.selectedPickItem); this.triggerBarcodeMatchedHighlight(this.selectedPickItem);
this.submitWavePickTaskIntermediate(); this.submitWavePickTaskIntermediate();
return; return;
@ -1634,10 +1634,13 @@
id: stockId id: stockId
}); });
const list = this.extractBarcodeListFromResponse(response); const list = this.extractBarcodeListFromResponse(response);
const firstBarcode = this.resolveBarcodeFromEntry(list[0]); const allBarcodes = (list || [])
this.$set(this.itemBarcodeCache, barcodeKey, firstBarcode || ''); .map(entry => this.resolveBarcodeFromEntry(entry))
.filter(b => b);
const joinedBarcodes = allBarcodes.join(',');
this.$set(this.itemBarcodeCache, barcodeKey, joinedBarcodes || '');
if (this.getSelectedItemBarcodeKey(this.selectedPickItem) === barcodeKey) { if (this.getSelectedItemBarcodeKey(this.selectedPickItem) === barcodeKey) {
this.selectedItemBarcode = firstBarcode || ''; this.selectedItemBarcode = joinedBarcodes || '';
} }
} catch (error) { } catch (error) {
this.$set(this.itemBarcodeCache, barcodeKey, ''); this.$set(this.itemBarcodeCache, barcodeKey, '');