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