更新订单列表详情,更新商品管理,更新代客下单
This commit is contained in:
@@ -2,7 +2,18 @@
|
||||
<view class="u-wrap">
|
||||
|
||||
<view class="top bg-fff w-full">
|
||||
<view class="u-flex u-row-between choose-user" @tap="chooseUser">
|
||||
<view class="u-flex u-row-between choose-user" @tap="chooseTable">
|
||||
<view>
|
||||
<view v-if="!data.table.tableId">选择桌台</view>
|
||||
<view class="u-flex" v-else>
|
||||
<view class="u-m-l-20">{{data.table.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<uni-icons type="right" size="20" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="u-flex u-row-between choose-user" @tap="chooseUser">
|
||||
<view>
|
||||
<view v-if="!data.vipUser.id">选择用户</view>
|
||||
<view class="u-flex" v-else>
|
||||
@@ -20,7 +31,7 @@
|
||||
<view class="u-flex">
|
||||
<uni-icons type="right" size="20" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="search u-flex u-col-center ">
|
||||
<view class="u-flex-1">
|
||||
<uni-search-bar bgColor="#F9F9F9" cancelButton="none" placeholder="搜索店内商品" @confirm="search"
|
||||
@@ -86,6 +97,7 @@
|
||||
<script setup>
|
||||
import _ from 'lodash';
|
||||
import * as Api from '@/http/yskApi/Instead.js'
|
||||
import {$table} from '@/http/yskApi/table.js'
|
||||
import {
|
||||
$tbShopCategory
|
||||
} from '@/http/yskApi/goods.js'
|
||||
@@ -107,12 +119,15 @@
|
||||
computed,
|
||||
reactive,
|
||||
ref,
|
||||
nextTick
|
||||
nextTick,
|
||||
watch
|
||||
} from 'vue';
|
||||
import myCar from './components/car'
|
||||
import go from '@/commons/utils/go.js';
|
||||
import infoBox from '@/commons/utils/infoBox.js';
|
||||
import {getNowCart} from '@/pagesCreateOrder/util.js'
|
||||
import {
|
||||
getNowCart
|
||||
} from '@/pagesCreateOrder/util.js'
|
||||
const cars = reactive([])
|
||||
const data = reactive({
|
||||
scrollTop: 0, //tab标题的滚动条位置
|
||||
@@ -294,16 +309,23 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//获取台桌信息
|
||||
async function getTableInfo(){
|
||||
const res=await $table.get({qrcode:data.table.tableId})
|
||||
console.log(res);
|
||||
if(res&&res.content[0]){
|
||||
// data.table=res.content[0]
|
||||
}
|
||||
}
|
||||
async function init() {
|
||||
getTableInfo()
|
||||
const {
|
||||
masterId
|
||||
} = await getMasterId()
|
||||
data.masterId = masterId
|
||||
const cartRes = await getCart()
|
||||
cars.length = 0
|
||||
const cartArr =getNowCart(cartRes.records)
|
||||
const cartArr = getNowCart(cartRes.records)
|
||||
for (let i in cartArr) {
|
||||
cars.push(cartArr[i])
|
||||
}
|
||||
@@ -351,13 +373,27 @@
|
||||
let searchValue = ref('')
|
||||
|
||||
function search() {
|
||||
|
||||
console.log(searchValue.value);
|
||||
console.log(data.tabbar );
|
||||
}
|
||||
|
||||
function chooseUser() {
|
||||
go.to('PAGES_CHOOSE_USER')
|
||||
}
|
||||
|
||||
function chooseTable() {
|
||||
go.to('PAGES_CHOOSE_TABLE', {
|
||||
...data.table
|
||||
})
|
||||
}
|
||||
|
||||
function watchChooseTable() {
|
||||
uni.$off('choose-table')
|
||||
uni.$on('choose-table', (tableData) => {
|
||||
data.table = tableData
|
||||
})
|
||||
}
|
||||
|
||||
function toLinshi() {
|
||||
go.to('PAGES_ADD_TEMP_CUISINE')
|
||||
}
|
||||
@@ -499,7 +535,7 @@
|
||||
prve[i] = matchArr
|
||||
.filter((v) => v.specSnap.match(i))
|
||||
.every((v) => {
|
||||
return util.isCanBuy(v)
|
||||
return !util.isCanBuy(v)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -801,9 +837,14 @@
|
||||
setUser()
|
||||
})
|
||||
}
|
||||
watch(()=>data.table.tableId,(newval)=>{
|
||||
console.log(newval);
|
||||
init()
|
||||
})
|
||||
onBeforeUnmount(() => {})
|
||||
onShow(() => {
|
||||
watchChooseuser()
|
||||
// watchChooseuser()
|
||||
watchChooseTable()
|
||||
})
|
||||
onLoad((opt) => {
|
||||
console.log(opt)
|
||||
|
||||
Reference in New Issue
Block a user