修改拣货模块,条码显示

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