优化台桌
This commit is contained in:
@@ -149,6 +149,10 @@ function qingtai() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
diancan
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<template v-if="pageData.tabList.length">
|
||||
<view class="u-flex u-flex-wrap u-row-between">
|
||||
<view class="u-m-b-30" v-for="(item, index) in pageData.tabList" :key="index">
|
||||
<table-item @bind="scanCode" @update="getTable" :areaMap="pageData.areaMap" @more="moreShow(item)" :data="item"></table-item>
|
||||
<table-item ref="tableItemRefs" @bind="scanCode" @update="getTable" :areaMap="pageData.areaMap" @more="moreShow(item, index)" :data="item"></table-item>
|
||||
</view>
|
||||
</view>
|
||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size" @change="pageChange"></my-pagination>
|
||||
@@ -115,7 +115,7 @@ const pageData = reactive({
|
||||
|
||||
const refMoreSheet = ref(null);
|
||||
const actionSheet = reactive({
|
||||
list: ['结账', '清台', '增减菜', '换台', '打印订单', '历史订单', '绑定码牌'],
|
||||
list: ['结账', '清台', '加菜', '换台', '打印订单', '历史订单', '绑定码牌'],
|
||||
title: '',
|
||||
selTable: ''
|
||||
});
|
||||
@@ -182,7 +182,8 @@ function changeAreaSel(item) {
|
||||
* 更多操作打开
|
||||
* @param {Object} table
|
||||
*/
|
||||
function moreShow(table) {
|
||||
function moreShow(table, index) {
|
||||
tableItemRefsIndex.value = index;
|
||||
actionSheet.title = table.name;
|
||||
actionSheet.selTable = table;
|
||||
refMoreSheet.value.open();
|
||||
@@ -197,6 +198,8 @@ function moreShow(table) {
|
||||
* 更多操作选择
|
||||
* @param {Object} index
|
||||
*/
|
||||
const tableItemRefsIndex = ref(0);
|
||||
const tableItemRefs = ref([]);
|
||||
async function actionSheetClick(index) {
|
||||
console.log(index);
|
||||
const item = actionSheet.selTable;
|
||||
@@ -229,7 +232,7 @@ async function actionSheetClick(index) {
|
||||
});
|
||||
}
|
||||
if (index == 2) {
|
||||
return uni.$utils.showToast('待开放,请敬请期待!');
|
||||
tableItemRefs.value[tableItemRefsIndex.value].diancan();
|
||||
}
|
||||
if (index == 3) {
|
||||
return uni.$utils.showToast('待开放,请敬请期待!');
|
||||
|
||||
@@ -6,7 +6,7 @@ export default [{
|
||||
{
|
||||
label: "空闲",
|
||||
type: "idle",
|
||||
color: "#3F9EFF",
|
||||
color: "#187CAA",
|
||||
},
|
||||
{
|
||||
label: "点餐中",
|
||||
|
||||
Reference in New Issue
Block a user