修复socket信息弹窗问题,修复菜品状态未上菜超市显示问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view
|
<view
|
||||||
class="login-wrapper u-flex u-row-right"
|
class="login-wrapper u-flex u-row-right"
|
||||||
style="background-image: url('/static/login/bg.png')"
|
style="background-image: url('/static/login/bg.png');background-size: cover;"
|
||||||
>
|
>
|
||||||
<view class="u-flex u-row-right" style="padding-right: 266rpx">
|
<view class="u-flex u-row-right" style="padding-right: 266rpx">
|
||||||
<view>
|
<view>
|
||||||
|
|||||||
@@ -523,7 +523,11 @@ function onMessage() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.status == 0 && msg.type != "time_discount") {
|
if (
|
||||||
|
msg.status == 0 &&
|
||||||
|
msg.type != "time_discount"
|
||||||
|
) {
|
||||||
|
console.log("msg", msg);
|
||||||
infoBox.showToast(msg.msg || "添加失败");
|
infoBox.showToast(msg.msg || "添加失败");
|
||||||
data.isGoodsAdd = true;
|
data.isGoodsAdd = true;
|
||||||
// 如果是商品库存不足起售数量
|
// 如果是商品库存不足起售数量
|
||||||
@@ -642,6 +646,9 @@ async function getHistoryOrderDetail() {
|
|||||||
if (shopInfo.registerType == "before") {
|
if (shopInfo.registerType == "before") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(!data.table.tableCode){
|
||||||
|
return;
|
||||||
|
}
|
||||||
data.historyOrder = [];
|
data.historyOrder = [];
|
||||||
let res = await getHistoryOrder({
|
let res = await getHistoryOrder({
|
||||||
tableCode: data.table.tableCode,
|
tableCode: data.table.tableCode,
|
||||||
@@ -2011,6 +2018,9 @@ async function getLimit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getTableDetail() {
|
async function getTableDetail() {
|
||||||
|
if(!data.table.tableCode){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let res = await $returnTableDetail({
|
let res = await $returnTableDetail({
|
||||||
tableCode: data.table.tableCode,
|
tableCode: data.table.tableCode,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,7 +24,11 @@
|
|||||||
>包
|
>包
|
||||||
<view class="badge">{{ item.packNumber }}</view>
|
<view class="badge">{{ item.packNumber }}</view>
|
||||||
</text>
|
</text>
|
||||||
<template v-if="item.subStatus &&cartStore.shopInfo.registerType=='after'">
|
<template
|
||||||
|
v-if="
|
||||||
|
item.subStatus && cartStore.shopInfo.registerType == 'after'
|
||||||
|
"
|
||||||
|
>
|
||||||
<text
|
<text
|
||||||
class="status"
|
class="status"
|
||||||
:class="[
|
:class="[
|
||||||
@@ -111,13 +115,16 @@ const timer = setInterval(() => {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
//超时时间
|
//超时时间
|
||||||
const maxTime = cartStore.shopInfo.serveTime*60*1000;
|
const maxTime = cartStore.shopInfo.serveTime * 60 * 1000;
|
||||||
|
|
||||||
function returnStatusClass(item) {
|
function returnStatusClass(item) {
|
||||||
if (item.subStatus == "DELIVERED") {
|
if (item.subStatus == "DELIVERED") {
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
if (item.subStatus == "READY_TO_SERVE") {
|
if (
|
||||||
|
item.subStatus == "READY_TO_SERVE" &&
|
||||||
|
returnSubStatusText(item) != "已超时"
|
||||||
|
) {
|
||||||
return "warning";
|
return "warning";
|
||||||
}
|
}
|
||||||
if (item.subStatus == "SENT_OUT") {
|
if (item.subStatus == "SENT_OUT") {
|
||||||
@@ -133,7 +140,7 @@ function returnSubStatusText(item) {
|
|||||||
return "待起菜";
|
return "待起菜";
|
||||||
}
|
}
|
||||||
if (item.subStatus == "READY_TO_SERVE") {
|
if (item.subStatus == "READY_TO_SERVE") {
|
||||||
if (item.startOrderTime&&cartStore.shopInfo.isServeTimeControl) {
|
if (item.startOrderTime && cartStore.shopInfo.isServeTimeControl) {
|
||||||
const maxWaitTime = dayjs(item.startOrderTime).add(
|
const maxWaitTime = dayjs(item.startOrderTime).add(
|
||||||
maxTime,
|
maxTime,
|
||||||
"millisecond"
|
"millisecond"
|
||||||
@@ -265,7 +272,7 @@ function itemClick(item) {
|
|||||||
.badge {
|
.badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
$height:32rpx;
|
$height: 32rpx;
|
||||||
line-height: $height;
|
line-height: $height;
|
||||||
height: $height;
|
height: $height;
|
||||||
top: calc(-#{$height} / 2);
|
top: calc(-#{$height} / 2);
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ export const useCartStore = defineStore("cart", {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (msg.status == 0) {
|
if (msg.status == 0&&msg.type!="time_discount") {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "添加失败",
|
title: "添加失败",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
|
|||||||
Reference in New Issue
Block a user