Merge branch 'ymf' of https://e.coding.net/g-cphe0354/cashier/cashier-web
This commit is contained in:
commit
33da9d8af0
|
|
@ -606,7 +606,7 @@ export const useCartsStore = defineStore("carts", () => {
|
||||||
v[key] = skuData[key];
|
v[key] = skuData[key];
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
del({ id: v.id })
|
// del({ id: v.id })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return !v.is_gift
|
return !v.is_gift
|
||||||
|
|
@ -636,10 +636,13 @@ export const useCartsStore = defineStore("carts", () => {
|
||||||
return ElMessage.warning(msg.message || '该商品已存在')
|
return ElMessage.warning(msg.message || '该商品已存在')
|
||||||
}
|
}
|
||||||
const skuData = getProductDetails({ product_id: msg.data.product_id, sku_id: msg.data.sku_id })
|
const skuData = getProductDetails({ product_id: msg.data.product_id, sku_id: msg.data.sku_id })
|
||||||
const newGoods = { ...skuData, ...msg.data }
|
if (skuData) {
|
||||||
console.log('newGoods', newGoods)
|
const newGoods = { ...skuData, ...msg.data }
|
||||||
list.value.push(newGoods)
|
console.log('newGoods', newGoods)
|
||||||
return ElMessage.success(msg.message || '添加成功')
|
list.value.push(newGoods)
|
||||||
|
return ElMessage.success(msg.message || '添加成功')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (msg.operate_type === "manage_edit") {
|
if (msg.operate_type === "manage_edit") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue