问题修复

This commit is contained in:
2025-11-27 19:01:45 +08:00
parent 3bb09ef0b1
commit fd55c815d3
11 changed files with 83 additions and 42 deletions

View File

@@ -221,7 +221,7 @@
</view>
<view class="u-m-l-20"> 返回 </view>
</view>
<view class="u-flex">
<view class="u-flex" v-if="accountStore.isPayAfter">
<text class="color-333 u-m-r-20"
>上菜方式{{ returnServingStyleName(subStatus) }}</text
>
@@ -577,7 +577,7 @@ function getshopsInfo() {
async function workerConfirm() {
//debugger
// form.workerAccount=18888888888
form.workerAccount=accountStore.staffUserName
if (!form.workerAccount) {
return infoBox.showToast("请输入服务员账号");
}

View File

@@ -284,8 +284,6 @@
ref="surcharge"
title="添加附加费"
></my-surcharge>
<!-- 登录弹窗 -->
<my-login v-model="modal.login" @loginSuccess="loginSuccess"></my-login>
<!-- 称重 -->
<weigh-item
ref="refweighitem"
@@ -310,8 +308,6 @@ import _ from "lodash";
import * as Api from "@/http/yskApi/Instead.js";
import * as limitTimeDiscountApi from "@/http/yskApi/limitTimeDiscount.js";
import {
$table,
$choseTable,
@@ -364,12 +360,11 @@ import { getNowCart } from "@/pagesCreateOrder/util.js";
import yskUtils from "@/lib/index";
provide("yskUtils", yskUtils);
import {useAccountStore} from '@/stores/account'
const accountStore = useAccountStore()
import { useAccountStore } from "@/stores/account";
const accountStore = useAccountStore();
provide("accountStore", accountStore);
import {
$productCategory,
$layoutpage,
@@ -632,6 +627,9 @@ async function getHistoryOrderDetail() {
let res = await getHistoryOrder({
tableCode: data.table.tableCode,
});
if (!res.id) {
return;
}
data.orderInfo = res;
if (res) {
data.historyOrder = Object.entries(data.orderInfo.detailMap).map(
@@ -2040,7 +2038,7 @@ async function getTableDetail() {
tableCode: data.table.tableCode,
});
console.log(res, "getTableDetail");
if(res){
if (res && res.tableCode) {
data.table = res;
}
}

View File

@@ -22,7 +22,7 @@
<text class="status gift" v-if="item.isGift"></text>
<template v-if="item.subStatus">
<text
class="status "
class="status"
:class="[
returnSubStatusText(item) == '已超时' ? 'timeout' : '',
returnStatusClass(item),
@@ -32,21 +32,21 @@
</template>
</view>
</view>
<view class="u-flex" style="gap: 54rpx">
<text>{{ item.num }}</text>
<view class="u-flex u-relative">
<text class="limit-price" v-if="showOldPrice">
<view class="u-flex text-center" style="gap: 54rpx;min-width: 348rpx;">
<text class="u-flex-1">{{ item.num }}</text>
<view class="u-flex u-flex-1 u-relative">
<text class="limit-price" v-if="showOldPrice(item)">
{{ returnPrice(item) }}
</text>
<text
class="origin-price"
:class="[showOldPrice ? 'old-price' : '']"
:class="[showOldPrice(item) ? 'old-price' : '']"
>{{ item.price }}</text
>
</view>
<text>{{
<text class="u-flex-1">{{
BigNumber(item.num).times(returnPrice(item)).toFixed(2)
}}</text>
</view>
@@ -66,7 +66,7 @@ function isSelected(item) {
}
function showOldPrice(item) {
return item.isTimeDiscount ||item.isGift || item.discountSaleAmount * 1 > 0;
return item.isTimeDiscount || item.isGift || item.discountSaleAmount * 1 > 0;
}
const nowTime = ref(new Date().getTime());
@@ -118,8 +118,8 @@ function returnPrice(data) {
if (data.discountSaleAmount * 1 > 0) {
return data.discountSaleAmount;
}
if(data.isGift){
return 0
if (data.isGift) {
return 0;
}
return data.price;
}

View File

@@ -232,7 +232,8 @@ function toPay() {
orderId: cartStore.order.id,
isNowPay: true,
dinnerType: cartStore.currentDinnerType,
});
personCount: cartStore.personCount,
},'redirect');
}
const areaList = ref([]);