代客下单更新
This commit is contained in:
@@ -523,6 +523,7 @@
|
|||||||
}
|
}
|
||||||
// updateChoseCount()
|
// updateChoseCount()
|
||||||
const res = await Api.$createOrder(par)
|
const res = await Api.$createOrder(par)
|
||||||
|
uni.$emit('update:createOrderIndex')
|
||||||
console.log($shop.value);
|
console.log($shop.value);
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if ($shop.value.registerType == 'munchies') {
|
if ($shop.value.registerType == 'munchies') {
|
||||||
@@ -534,11 +535,14 @@
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
//后付
|
//后付
|
||||||
if (option.isCreateOrderToDetail) {
|
console.log(option.isCreateOrderToDetail);
|
||||||
|
if (option.isCreateOrderToDetail!='0') {
|
||||||
|
console.log('PAGES_ORDER_DETAIL');
|
||||||
go.to('PAGES_ORDER_DETAIL', {
|
go.to('PAGES_ORDER_DETAIL', {
|
||||||
id: res.id
|
id: res.id
|
||||||
},'redirect')
|
},'redirect')
|
||||||
} else {
|
} else {
|
||||||
|
console.log('back');
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 2
|
delta: 2
|
||||||
})
|
})
|
||||||
@@ -584,9 +588,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
console.log('opt');
|
|
||||||
console.log(opt);
|
|
||||||
Object.assign(option, opt)
|
Object.assign(option, opt)
|
||||||
|
console.log(option,);
|
||||||
if (opt) {
|
if (opt) {
|
||||||
table.value = {
|
table.value = {
|
||||||
tableId: opt.tableId,
|
tableId: opt.tableId,
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
const {tableId,name,maxCapacity,status,type}=props.table
|
const {tableId,name,maxCapacity,status,type}=props.table
|
||||||
go.to('PAGES_CONFIRM_ORDER',{
|
go.to('PAGES_CONFIRM_ORDER',{
|
||||||
masterId:props.masterId,type,
|
masterId:props.masterId,type,
|
||||||
tableId,name,maxCapacity,status,isCreateOrderToDetail:props.isCreateOrderToDetail
|
tableId,name,maxCapacity,status,isCreateOrderToDetail:props.isCreateOrderToDetail?1:0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<view class="u-wrap">
|
<view class="u-wrap">
|
||||||
|
|
||||||
<view class="top bg-fff w-full">
|
<view class="top bg-fff w-full">
|
||||||
|
<template v-if="option.type!='add'">
|
||||||
<view class="u-flex u-row-between choose-user" @tap="chooseTable">
|
<view class="u-flex u-row-between choose-user" @tap="chooseTable">
|
||||||
<view>
|
<view>
|
||||||
<view v-if="!data.table.tableId">选择桌台</view>
|
<view v-if="!data.table.tableId">选择桌台</view>
|
||||||
@@ -13,6 +14,8 @@
|
|||||||
<uni-icons type="right" size="20" color="#999"></uni-icons>
|
<uni-icons type="right" size="20" color="#999"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- <view class="u-flex u-row-between choose-user" @tap="chooseUser">
|
<!-- <view class="u-flex u-row-between choose-user" @tap="chooseUser">
|
||||||
<view>
|
<view>
|
||||||
<view v-if="!data.vipUser.id">选择用户</view>
|
<view v-if="!data.vipUser.id">选择用户</view>
|
||||||
@@ -374,8 +377,8 @@
|
|||||||
await clearCart()
|
await clearCart()
|
||||||
cars.length = 0
|
cars.length = 0
|
||||||
for (let i in data.tabbar) {
|
for (let i in data.tabbar) {
|
||||||
for (let k in data.tabbar[i].fgoods) {
|
for (let k in data.tabbar[i].foods) {
|
||||||
data.tabbar[i].fgoods[k].chooseNumber = 0
|
data.tabbar[i].foods[k].chooseNumber = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -997,12 +1000,17 @@
|
|||||||
watchUpdate()
|
watchUpdate()
|
||||||
})
|
})
|
||||||
let isCreateOrderToDetail = ref(false)
|
let isCreateOrderToDetail = ref(false)
|
||||||
|
let option={type:''}
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
console.log(opt)
|
console.log(opt)
|
||||||
|
option=opt
|
||||||
Object.assign(data.table, opt)
|
Object.assign(data.table, opt)
|
||||||
if (opt.useType) {
|
if (opt.useType) {
|
||||||
uni.setStorageSync('useType', opt.useType)
|
uni.setStorageSync('useType', opt.useType)
|
||||||
}
|
}
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title:(opt&&opt.type=='add')?'顾客加菜':'代客下单'
|
||||||
|
})
|
||||||
if (JSON.stringify(opt) == '{}') {
|
if (JSON.stringify(opt) == '{}') {
|
||||||
isCreateOrderToDetail.value = true
|
isCreateOrderToDetail.value = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user