zhaohuanhuan 4 месяцев назад
Родитель
Сommit
40deb53ca1
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/views/inbound/putaway/task/index.vue

+ 2 - 2
src/views/inbound/putaway/task/index.vue

@@ -302,7 +302,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 {
@@ -315,7 +315,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])