修复:

代客下单支付完订单号未将购物车置空
未将台桌置空
This commit is contained in:
YeMingfei666 2024-10-10 17:09:35 +08:00
parent 35d5dc3d32
commit 8361ec77ec
2 changed files with 69 additions and 56 deletions

View File

@ -145,10 +145,12 @@
content
} = await $table.get(query)
tables.hasAjax = true
content = content.filter(v => v.status == 'idle')
content = content.filter(v =>{
return v.status == 'idle'||(v.status=='using')
})
console.log(content );
tables.list = content
tables.selIndex = content.findIndex(v => v.tableId == option.tableId)
console.log(tables.selIndex );
tables.originList = content
}
async function getArea() {

View File

@ -35,8 +35,7 @@
<view class="search u-flex u-col-center ">
<view class="u-flex-1">
<uni-search-bar bgColor="#F9F9F9" cancelButton="none" placeholder="搜索店内商品" @confirm="search"
@clear="clearSearch"
v-model="searchValue">
@clear="clearSearch" v-model="searchValue">
</uni-search-bar>
</view>
<view class="u-flex">
@ -46,8 +45,8 @@
</view>
<template v-if="!isSearch">
<view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="data.scrollTop"
:scroll-into-view="data.itemId">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view"
:scroll-top="data.scrollTop" :scroll-into-view="data.itemId">
<view v-for="(item,index) in data.tabbar" :key="index" class="u-tab-item"
:class="[data.current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
<text class="u-line-1">{{item.name}}</text>
@ -67,7 +66,8 @@
<view style="height: 24px;"></view>
</template>
</view>
<view class="class-item" :id="'item' + index" v-for="(item , index) in data.tabbar" :key="index">
<view class="class-item" :id="'item' + index" v-for="(item , index) in data.tabbar"
:key="index">
<view class="item-title">
<text>{{item.name}}</text>
</view>
@ -97,8 +97,8 @@
</template>
<view class="bottom w-full">
<my-car :isCreateOrderToDetail="isCreateOrderToDetail" @updateNumber="carsNumberChange" :user="data.vipUser" :masterId="data.masterId" :table="data.table"
:data="cars" @clear="onClearCart"></my-car>
<my-car :isCreateOrderToDetail="isCreateOrderToDetail" @updateNumber="carsNumberChange" :user="data.vipUser"
:masterId="data.masterId" :table="data.table" :data="cars" @clear="onClearCart"></my-car>
</view>
<!-- 选择规格 -->
@ -113,7 +113,9 @@
<script setup>
import _ from 'lodash';
import * as Api from '@/http/yskApi/Instead.js'
import {$table} from '@/http/yskApi/table.js'
import {
$table
} from '@/http/yskApi/table.js'
import {
$tbShopCategory
} from '@/http/yskApi/goods.js'
@ -134,7 +136,8 @@
computed,
reactive,
ref,
nextTick,getCurrentInstance ,
nextTick,
getCurrentInstance,
watch
} from 'vue';
import myCar from './components/car'
@ -354,7 +357,9 @@
//
async function getTableInfo() {
const res=await $table.get({qrcode:data.table.tableId})
const res = await $table.get({
qrcode: data.table.tableId
})
console.log(res);
if (res && res.content[0]) {
// data.table=res.content[0]
@ -424,11 +429,13 @@
let searchValue = ref('')
let isSearch = ref(false)
function search() {
// isSearch.value=true
console.log(searchValue.value);
console.log(data.tabbar);
}
function clearSearch() {
// isSearch.value=false
}
@ -918,7 +925,11 @@
function watchUpdate() {
uni.$off('update:createOrderIndex')
uni.$on('update:createOrderIndex', (data) => {
uni.$on('update:createOrderIndex', () => {
data.table = {
tableId: ""
}
cars.length = 0
console.log('update:createOrderIndex');
init()
})