guoyujie
3 天以前 3d9e0ec1c1e457ed3fd2b334cf4c4dd66c10eead
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
@@ -82,13 +82,14 @@
          for (const group of list.value) {
            // 遍历每组中的数据(替换 j)
            for (const item of group.data) {
              console.log(item)
              const { quantity, newList } = item;
              // 跳过 quantity 为 0 或无效的情况
              console.log(quantity)
              if (!quantity || quantity <= 0) continue;
              // 处理 newList:确保是数组,不足时用空对象兜底
              const safeNewList = Array.isArray(newList) ? newList : [];
              // 循环 quantity 次,添加数据到 lastList
              for (let k = 0; k < quantity; k++) {
                // 深拷贝 item,避免重复引用(关键!)