fix: 修改代客下单添加时增加商品类型,修改激活码列表信息展示
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
:showOrder="showOrder"
|
||||
:goodsList="carts.goods"
|
||||
:oldOrder="oldOrder"
|
||||
:dinerType="diners.sel"
|
||||
:perpole="perpole"
|
||||
:remark="remark"
|
||||
:table="table"
|
||||
@@ -442,7 +443,6 @@ async function createOrder(key) {
|
||||
refOrder.value.nowPayClick("cash");
|
||||
});
|
||||
}
|
||||
// oldOrder.value = res;
|
||||
}
|
||||
} catch (error) {
|
||||
loading.close();
|
||||
@@ -470,11 +470,15 @@ function taocanShow(item) {
|
||||
const refChangeWeight = ref();
|
||||
function changeWeightConfirm(goods, number) {
|
||||
console.log(goods, number);
|
||||
addCarts({
|
||||
product_id: goods.id,
|
||||
sku_id: goods.skuList[0].id,
|
||||
number,
|
||||
});
|
||||
addCarts(
|
||||
{
|
||||
product_id: goods.id,
|
||||
sku_id: goods.skuList[0].id,
|
||||
number,
|
||||
product_type: goods.type,
|
||||
},
|
||||
true
|
||||
);
|
||||
}
|
||||
function showWeight(item) {
|
||||
console.log(item);
|
||||
@@ -642,6 +646,7 @@ function goodsClick(item) {
|
||||
product_id: item.id,
|
||||
sku_id: item.skuList[0].id,
|
||||
number: item.skuList[0].suitNum || 1,
|
||||
product_type: item.type,
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -664,6 +669,7 @@ function goodsClick(item) {
|
||||
sku_id: item.skuList[0].id || -888,
|
||||
product_id: item.id,
|
||||
number: item.skuList[0].suitNum || 1,
|
||||
product_type: item.type,
|
||||
};
|
||||
addCarts(sendmsg);
|
||||
return;
|
||||
@@ -694,7 +700,11 @@ function clearCarts() {
|
||||
carts.clear();
|
||||
});
|
||||
}
|
||||
function addCarts(item) {
|
||||
function addCarts(item, isWeight = false) {
|
||||
if (isWeight) {
|
||||
carts.add({ pack_number: diners.sel ? 1 : 0, ...item });
|
||||
return;
|
||||
}
|
||||
carts.add({ pack_number: diners.sel ? item.number : 0, ...item });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user