fix: 修复历史订单切换就餐模式,修改代客下单就餐类型根据店铺信息做限制,修改店铺配置至少勾选一种就餐模式
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
<template>
|
||||
<div class="flex order-item u-m-b-14 relative" :class="[isActive]" @click="itemClick">
|
||||
<div class="absolute status-box">
|
||||
<span class="pack" v-if="item.pack_number * 1 > 0">
|
||||
包
|
||||
<span class="number">{{ item.pack_number * 1 }}</span>
|
||||
</span>
|
||||
<span class="pack" v-if="isOld && dinerType == 1">
|
||||
包
|
||||
<span class="number">{{ item.product_type == "weight" ? 1 : item.num * 1 }}</span>
|
||||
</span>
|
||||
<template v-if="isOld">
|
||||
<span class="pack" v-if="dinerType == 1">
|
||||
包
|
||||
<span class="number">{{ item.product_type == "weight" ? 1 : item.num * 1 }}</span>
|
||||
</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="pack" v-if="item.pack_number * 1 > 0">
|
||||
包
|
||||
<span class="number">{{ item.pack_number * 1 }}</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<span class="da" v-if="item.is_print || item.is_print === null">打</span>
|
||||
<span class="isWaitCall" v-if="item.is_wait_call">等</span>
|
||||
<span class="tui" v-if="item.returnNum">
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
<el-button
|
||||
:class="{ active: index == diners.sel }"
|
||||
v-for="(item, index) in diners.list"
|
||||
:disabled="dinerDisabled(item, index)"
|
||||
@click="changeDinersSel(index)"
|
||||
:key="index"
|
||||
>
|
||||
@@ -308,7 +309,7 @@ async function refReturnCartConfirm(e) {
|
||||
});
|
||||
ElMessage({
|
||||
type: res ? "success" : "error",
|
||||
text: res ? "退菜成功" : "操作失败",
|
||||
message: res ? "退菜成功" : "操作失败",
|
||||
});
|
||||
if (res) {
|
||||
// 获取历史订单数据
|
||||
@@ -578,7 +579,7 @@ const diners = reactive({
|
||||
{ label: "堂食", value: 1 },
|
||||
{ label: "自取", value: 2 },
|
||||
],
|
||||
sel: 0,
|
||||
sel: shopUser.userInfo.eatModel.includes("dine-in") ? 0 : 1,
|
||||
});
|
||||
|
||||
function changeDinersSel(index) {
|
||||
@@ -593,6 +594,14 @@ watch(
|
||||
}
|
||||
);
|
||||
|
||||
function dinerDisabled(item, index) {
|
||||
if (index == 0) {
|
||||
return !shopUser.userInfo.eatModel.includes("dine-in");
|
||||
}
|
||||
if (index == 1) {
|
||||
return !shopUser.userInfo.eatModel.includes("take-out");
|
||||
}
|
||||
}
|
||||
// 商品分类
|
||||
const category = reactive({
|
||||
list: [],
|
||||
@@ -717,7 +726,7 @@ watch(
|
||||
function init() {
|
||||
getTableList();
|
||||
getCategoryList();
|
||||
carts.init({ table_code: table.tableCode });
|
||||
carts.init({ table_code: table.tableCode }, oldOrder.value);
|
||||
}
|
||||
|
||||
onBeforeRouteLeave(() => {
|
||||
|
||||
Reference in New Issue
Block a user