更新桌台列表页面
This commit is contained in:
parent
2ce6ad9d8a
commit
6bfc38a3df
|
|
@ -108,7 +108,19 @@
|
|||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
|
||||
<view class="border-bottom u-p-b-10">
|
||||
<uni-forms-item required label="" name="types">
|
||||
<template #label>
|
||||
<view class="u-text-left">
|
||||
<text class="color-333 u-font-28">清台管理</text>
|
||||
<!-- <text class="color-red">*</text> -->
|
||||
</view>
|
||||
</template>
|
||||
<view class="u-flex-1">
|
||||
<my-tabs @change="autoClearsChange" :list="autoClears.list" v-model="form.autoClear"></my-tabs>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<template v-if="tabs.sel==1">
|
||||
<view class=" u-p-b-10">
|
||||
<uni-forms-item required label="" >
|
||||
|
|
@ -169,6 +181,13 @@
|
|||
list:['低消','计时'],
|
||||
sel:1
|
||||
})
|
||||
//清台管理
|
||||
const autoClears=reactive({
|
||||
list:['手动清台','自动清台']
|
||||
})
|
||||
function autoClearsChange(i){
|
||||
form.autoClearsChange=i
|
||||
}
|
||||
const status = reactive({
|
||||
list:objToArrary($status),
|
||||
sel: '',
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
<my-action-sheet @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list"
|
||||
<my-action-sheet :active="4" @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list"
|
||||
:title="actionSheet.title">
|
||||
<template #title>
|
||||
<view class="color-999 u-p-30 u-text-center border-bottom">桌号:{{actionSheet.title}}</view>
|
||||
|
|
@ -101,6 +101,7 @@
|
|||
import addTable from './components/add-table'
|
||||
import myActionSheet from '@/components/my-components/my-action-sheet';
|
||||
import tableItem from './components/table-item'
|
||||
import * as $fun from './util.js'
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
|
|
@ -109,7 +110,7 @@
|
|||
} from 'vue';
|
||||
const refMoreSheet = ref(null)
|
||||
const actionSheet = reactive({
|
||||
list: ['编辑', '历史订单'],
|
||||
list: ['结账', '清台','增减菜','换台','打印订单','历史订单'],
|
||||
title: '',
|
||||
selTable: ''
|
||||
})
|
||||
|
|
@ -119,11 +120,27 @@
|
|||
actionSheet.selTable = table
|
||||
refMoreSheet.value.open()
|
||||
}
|
||||
|
||||
function actionSheetClick(index) {
|
||||
|
||||
async function actionSheetClick(index) {
|
||||
console.log(index);
|
||||
//编辑
|
||||
// refTableShow()
|
||||
if (index == 0) {
|
||||
refTableShow()
|
||||
return
|
||||
}
|
||||
if (index == 1) {
|
||||
return
|
||||
}
|
||||
if (index == 2) {
|
||||
return
|
||||
}
|
||||
if (index == 3) {
|
||||
return
|
||||
}
|
||||
if (index == 4) {
|
||||
//打印订单
|
||||
const res=await $fun.printOrder(actionSheet.selTable.tableId)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
import * as Api from '@/http/yskApi/Instead.js'
|
||||
import go from '@/commons/utils/go.js'
|
||||
//打印订单
|
||||
export function printOrder(tableId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要打印订单吗?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
Api.$printOrder({
|
||||
tableId
|
||||
}).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
//去支付页面
|
||||
export function toPay(options) {
|
||||
go.to('PAGES_CRESATE_ORDER_PAY', {
|
||||
tableId: options.tableId,
|
||||
tableName: options.name,
|
||||
masterId: options.masterId,
|
||||
orderId: orderDetail.info.id,
|
||||
discount: 1
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue