Commit 3fd5ee2d authored by your yuchenglong's avatar your yuchenglong

update:商品库添加

parent d4ce8781
...@@ -491,17 +491,18 @@ export default { ...@@ -491,17 +491,18 @@ export default {
if (this.comTableData.length == 0) { if (this.comTableData.length == 0) {
this.comTableData.push(...this.multipleSelection); this.comTableData.push(...this.multipleSelection);
} else { } else {
for (var i in this.comTableData) { this.multipleSelection.forEach((item) => {
for(var j in this.multipleSelection) let num = 0;
if ( this.comTableData.some((val) => {
this.comTableData[i].goods_sku_id != num++;
this.multipleSelection[j].goods_sku_id if (val.goods_sku_id === item.goods_sku_id) {
) { val.goods_sku_id = item.goods_sku_id;
continue; return true;
} else { } else if (num === this.comTableData.length) {
this.comTableData.push(this.multipleSelection[j]); this.comTableData.push(Object.assign({}, item));
} }
} });
});
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment