代客下单更新
This commit is contained in:
@@ -76,6 +76,9 @@
|
||||
return []
|
||||
}
|
||||
},
|
||||
isCreateOrderToDetail:{
|
||||
type:Boolean,default:false
|
||||
},
|
||||
user:{
|
||||
type: Object,
|
||||
default: () => {
|
||||
@@ -123,7 +126,7 @@
|
||||
const {tableId,name,maxCapacity,status,type}=props.table
|
||||
go.to('PAGES_CONFIRM_ORDER',{
|
||||
masterId:props.masterId,type,
|
||||
tableId,name,maxCapacity,status
|
||||
tableId,name,maxCapacity,status,isCreateOrderToDetail:props.isCreateOrderToDetail
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
</template>
|
||||
|
||||
<view class="bottom w-full">
|
||||
<my-car @updateNumber="carsNumberChange" :user="data.vipUser" :masterId="data.masterId" :table="data.table"
|
||||
<my-car :isCreateOrderToDetail="isCreateOrderToDetail" @updateNumber="carsNumberChange" :user="data.vipUser" :masterId="data.masterId" :table="data.table"
|
||||
:data="cars" @clear="onClearCart"></my-car>
|
||||
</view>
|
||||
|
||||
@@ -913,16 +913,29 @@
|
||||
init()
|
||||
})
|
||||
onBeforeUnmount(() => {})
|
||||
|
||||
function watchUpdate() {
|
||||
uni.$off('update:createOrderIndex')
|
||||
uni.$on('update:createOrderIndex', (data) => {
|
||||
console.log('update:createOrderIndex');
|
||||
init()
|
||||
})
|
||||
}
|
||||
onShow(() => {
|
||||
// watchChooseuser()
|
||||
watchChooseTable()
|
||||
watchUpdate()
|
||||
})
|
||||
let isCreateOrderToDetail=ref(false)
|
||||
onLoad((opt) => {
|
||||
console.log(opt)
|
||||
Object.assign(data.table, opt)
|
||||
if(opt.useType){
|
||||
uni.setStorageSync('useType',opt.useType)
|
||||
}
|
||||
if(JSON.stringify(opt)=='{}'){
|
||||
isCreateOrderToDetail.value=true
|
||||
}
|
||||
// if (!opt.tableId) {
|
||||
// infoBox.showErrorToast('暂不支持不选择桌台下载,请从桌台点餐')
|
||||
// return setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user