fix: 代客下单修改未找到的商品不再删除
This commit is contained in:
parent
3b4d140134
commit
26c10de00b
|
|
@ -606,7 +606,7 @@ export const useCartsStore = defineStore("carts", () => {
|
|||
v[key] = skuData[key];
|
||||
});
|
||||
} else {
|
||||
del({ id: v.id })
|
||||
// del({ id: v.id })
|
||||
return false
|
||||
}
|
||||
return !v.is_gift
|
||||
|
|
@ -636,10 +636,13 @@ export const useCartsStore = defineStore("carts", () => {
|
|||
return ElMessage.warning(msg.message || '该商品已存在')
|
||||
}
|
||||
const skuData = getProductDetails({ product_id: msg.data.product_id, sku_id: msg.data.sku_id })
|
||||
if (skuData) {
|
||||
const newGoods = { ...skuData, ...msg.data }
|
||||
console.log('newGoods', newGoods)
|
||||
list.value.push(newGoods)
|
||||
return ElMessage.success(msg.message || '添加成功')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (msg.operate_type === "manage_edit") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue