修复socket信息弹窗问题,修复菜品状态未上菜超市显示问题

This commit is contained in:
2025-12-01 13:47:56 +08:00
parent d2ba7af340
commit 2c2a87ab19
4 changed files with 25 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
<template>
<view
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>

View File

@@ -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 || "添加失败");
data.isGoodsAdd = true;
// 如果是商品库存不足起售数量
@@ -642,6 +646,9 @@ async function getHistoryOrderDetail() {
if (shopInfo.registerType == "before") {
return;
}
if(!data.table.tableCode){
return;
}
data.historyOrder = [];
let res = await getHistoryOrder({
tableCode: data.table.tableCode,
@@ -2011,6 +2018,9 @@ async function getLimit() {
}
async function getTableDetail() {
if(!data.table.tableCode){
return;
}
let res = await $returnTableDetail({
tableCode: data.table.tableCode,
});

View File

@@ -24,7 +24,11 @@
>
<view class="badge">{{ item.packNumber }}</view>
</text>
<template v-if="item.subStatus &&cartStore.shopInfo.registerType=='after'">
<template
v-if="
item.subStatus && cartStore.shopInfo.registerType == 'after'
"
>
<text
class="status"
:class="[
@@ -117,7 +121,10 @@ function returnStatusClass(item) {
if (item.subStatus == "DELIVERED") {
return "success";
}
if (item.subStatus == "READY_TO_SERVE") {
if (
item.subStatus == "READY_TO_SERVE" &&
returnSubStatusText(item) != "已超时"
) {
return "warning";
}
if (item.subStatus == "SENT_OUT") {

View File

@@ -188,7 +188,7 @@ export const useCartStore = defineStore("cart", {
})
);
}
if (msg.status == 0) {
if (msg.status == 0&&msg.type!="time_discount") {
uni.showToast({
title: "添加失败",
icon: "none",