fix: 代客下单增加转台功能,修复临时菜价格展示问题,增加就餐类型切换为打包时,加菜默认为打包
This commit is contained in:
@@ -32,8 +32,9 @@ const controls = ref([
|
||||
{ label: "赠送", key: "is_gift", disabled: false, per: "gift" },
|
||||
{ label: "打包", key: "is_pack", disabled: false, per: "pack" },
|
||||
{ label: "删除", key: "del", disabled: false, per: "del" },
|
||||
{ label: "存单", key: "", disabled: false, per: "save" },
|
||||
{ label: "取单", key: "", disabled: false },
|
||||
{ label: "转桌", key: "rottable", disabled: false, per: "rottable" },
|
||||
// { label: "存单", key: "", disabled: false, per: "save" },
|
||||
// { label: "取单", key: "", disabled: false },
|
||||
{ label: "单品备注", key: "one-note", disabled: false, per: "one-note" },
|
||||
{ label: "整单备注", key: "all-note", disabled: false, per: "all-note" },
|
||||
{ label: "退菜", key: "return", disabled: false, per: "return" },
|
||||
@@ -43,7 +44,7 @@ const controls = ref([
|
||||
// { label: "整单等叫", key: "", disabled: false, per: "all-wating" },
|
||||
]);
|
||||
|
||||
const emits = defineEmits(["noteClick", "changePriceClick", "packClick", "return"]);
|
||||
const emits = defineEmits(["noteClick", "changePriceClick", "packClick", "return", "rottable"]);
|
||||
function controlsClick(item) {
|
||||
switch (item.key) {
|
||||
case "is_gift":
|
||||
@@ -68,6 +69,9 @@ function controlsClick(item) {
|
||||
case "one-note":
|
||||
emits("noteClick", true);
|
||||
break;
|
||||
case "rottable":
|
||||
emits("rottable", carts.selCart);
|
||||
break;
|
||||
case "all-note":
|
||||
emits("noteClick", false);
|
||||
break;
|
||||
@@ -82,18 +86,26 @@ function controlsClick(item) {
|
||||
}
|
||||
}
|
||||
const perList = computed(() => {
|
||||
// if (!carts.oldOrder.id) {
|
||||
// return ["all-wating", "all-note", "rottable"];
|
||||
// }
|
||||
let arr = [];
|
||||
if (!carts.selCart.id) {
|
||||
return ["all-wating", "all-note"];
|
||||
arr = ["all-wating", "all-note"];
|
||||
}
|
||||
if (carts.isCanSelectGroup) {
|
||||
return ["all-wating", "all-note", "del", "pack", "gift", "print", "one-note"];
|
||||
arr = ["all-wating", "all-note", "del", "pack", "gift", "print", "one-note"];
|
||||
}
|
||||
if (carts.selCart.id) {
|
||||
if (carts.isOldOrder) {
|
||||
return ["return"];
|
||||
arr = ["return"];
|
||||
}
|
||||
return ["cart", "del", "pack", "gift", "save", "one-note", "print", "all-note", "all-wating"];
|
||||
arr = ["cart", "del", "pack", "gift", "save", "one-note", "print", "all-note", "all-wating"];
|
||||
}
|
||||
if (carts.oldOrder.id) {
|
||||
arr.push("rottable");
|
||||
}
|
||||
return arr;
|
||||
});
|
||||
const canEdit = computed(() => {
|
||||
return !perList.value.includes("cart");
|
||||
|
||||
Reference in New Issue
Block a user