|
|
@@ -319,7 +319,7 @@ const setBarcode = (code, type) => {
|
|
|
//根据条码批次分组数据
|
|
|
const groupedData = (data) => {
|
|
|
return data.reduce((acc, item) => {
|
|
|
- const key = `(${item.barcode}、${item.barcodeAs}、${item.sku})-${item.lotNumber}`
|
|
|
+ const key = `{${item.barcode}、${item.barcodeAs}、${item.sku}}-${item.lotNumber}`
|
|
|
if (acc[key]) {
|
|
|
acc[key].push(item)
|
|
|
} else {
|
|
|
@@ -332,7 +332,7 @@ const groupedData = (data) => {
|
|
|
const matchingBarcodeItem = (data, barcode) => {
|
|
|
const matchingItems = []
|
|
|
for (const key in data) {
|
|
|
- const barcodeList = key.match(/\((.*?)\)/)[1].split('、')
|
|
|
+ const barcodeList = key.match(/\{(.*?)\}/)[1].split('、')
|
|
|
if (data.hasOwnProperty(key)) {
|
|
|
if (barcodeList.some(item => barcodeToUpperCase(item) === barcodeToUpperCase(barcode))) {
|
|
|
matchingItems.push(data[key])
|