From eb7522c222acd6f06135208f01b68b823a1d129d Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 30 Aug 2024 16:59:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=B0=E6=A1=8C=E7=8A=B6?= =?UTF-8?q?=E6=80=81=EF=BC=8C=E5=BC=80=E5=8F=B0=E4=B8=AD=E6=97=B6=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=B1=95=E7=A4=BA=E5=8A=A0=E8=8F=9C=E5=92=8C=E7=BB=93?= =?UTF-8?q?=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/table/table_list.vue | 73 +++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 23 deletions(-) diff --git a/src/views/table/table_list.vue b/src/views/table/table_list.vue index 08e5cf4..894320e 100644 --- a/src/views/table/table_list.vue +++ b/src/views/table/table_list.vue @@ -50,9 +50,13 @@
- {{ status[item.status]?status[item.status].label:'' }} + {{ status[item.status] ? status[item.status].label : "" }}
@@ -67,12 +71,24 @@ 客座次数:{{ item.maxCapacity }}人
- 点餐 + +
@@ -133,17 +149,17 @@ export default { total: 0, tableList: [], status: { - pending:{ - label: "挂单中", - type: "#E6A23C", + pending: { + label: "挂单中", + type: "#E6A23C", }, - using:{ - label: "开台中", - type: "#E6A23C", + using: { + label: "开台中", + type: "#E6A23C", }, - paying:{ - label: "结算中", - type: "#E6A23C", + paying: { + label: "结算中", + type: "#E6A23C", }, idle: { label: "空闲", @@ -172,11 +188,13 @@ export default { this.tbShopAreaGet(); }, methods: { - onDiancanClose(){ - this.tbShopTableGet() + onDiancanClose() { + this.tbShopTableGet(); }, - diancanShow(item) { - this.$refs.dianan.open(item); + diancanShow(item,key) { + //key isAddGoods 加菜 + //key isPayOrder结账 + this.$refs.dianan.open(item,key); }, tabClick() { this.tbShopTableGet(); @@ -209,7 +227,14 @@ export default { areaId: this.tabVlaue, }); console.log(content); - this.tableList = content; + this.tableList=content + // this.tableList = content.sort((a,b)=>{ + // if(a.status=='idle'&&b.status!='idle'){ + // return 1 + // }else if(a.status!='idle'&&b.status=='idle'){ + // return -1 + // } + // }); this.total = total; setTimeout(() => { this.loading = false; @@ -259,7 +284,9 @@ export default { .item { border: 1px solid #ddd; - + display: flex; + flex-direction: column; + justify-content: space-between; .top { padding: 20px;