桌台更新

This commit is contained in:
YeMingfei666 2024-10-08 10:48:06 +08:00
parent f5ac091bfe
commit 0fda4ec9fc
3 changed files with 24 additions and 3 deletions

View File

@ -76,6 +76,7 @@
import {
$table
} from '@/http/yskApi/table.js'
import infoBox from '@/commons/utils/infoBox.js'
const status = $status
const emits = defineEmits(['more','update'])
@ -170,6 +171,7 @@
status: "idle",
qrcode: item.tableId,
}).then(res=>{
infoBox.showToast('清台成功')
emits('update')
})
}

View File

@ -4,14 +4,14 @@
<view class="u-flex u-flex-1 u-row-between">
<view class="u-flex u-p-t-30 u-p-b-30 u-flex-1 u-row-center" @tap="showsTimesToggle">
<text class="u-m-r-12">{{times.list[times.active]}}</text>
<image src="/pageInvoicing/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
<image src="/pageTable/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
mode="">
</image>
</view>
<view class="u-flex u-p-t-30 u-p-b-30 u-flex-1 u-row-center" @tap="showstatusToggle">
<text class="u-m-r-12"
:class="{'color-main':status.active!=0}">{{status.list[status.active].label }}</text>
<image src="/pageInvoicing/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
<image src="/pageTable/static/images/icon-arrow-down-fill.svg" class="icon-arrow-down-fill"
mode="">
</image>
</view>
@ -109,6 +109,7 @@
onBeforeUnmount,
watch
} from 'vue';
import infoBox from '@/commons/utils/infoBox.js'
const refMoreSheet = ref(null)
const actionSheet = reactive({
list: ['结账', '清台','增减菜','换台','打印订单','历史订单'],
@ -124,13 +125,30 @@
async function actionSheetClick(index) {
console.log(index);
const item=actionSheet.selTable
//
// refTableShow()
if (index == 0) {
return
}
if (index == 1) {
return
//
return uni.showModal({
title: '提示',
content: '确定要清台:' + item.name + '',
success(res) {
if (res.confirm) {
$table.update({
...item,
status: "idle",
qrcode: item.tableId,
}).then(res=>{
infoBox.showToast('清台成功')
tableUpdate()
})
}
}
})
}
if (index == 2) {
return

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8.42" height="4.945" viewBox="0 0 8.42 4.945"><defs><style>.a{fill:#333;}</style></defs><path class="a" d="M230.634,368.187a.7.7,0,0,0-.513-.187l-7,.047a.7.7,0,0,0-.513.187.676.676,0,0,0,0,.979l3.5,3.5c.047.047.14.093.187.14l.047.047a.731.731,0,0,0,.746-.14l3.5-3.546A.735.735,0,0,0,230.634,368.187Z" transform="translate(-222.4 -368)"/></svg>

After

Width:  |  Height:  |  Size: 390 B