台桌列表增加清台弹窗

This commit is contained in:
2024-09-13 15:59:34 +08:00
parent f767d12f4a
commit 0f39d2cde1
2 changed files with 38 additions and 11 deletions

View File

@@ -113,10 +113,14 @@
<span class="tips">客座次数{{ item.maxCapacity }}</span>
</div> -->
<div class="u-font-18 font-600 total-price">
<span class="color-fff" v-if="item.status != 'using'">|</span>
<span v-else>
<span
class="cursor-pointer"
v-if="item.status == 'using'"
@click="diancanShow(item, 'isAddGoods')"
>
¥{{ item.totalAmount || 0 }}{{ item.productNum }}
</span>
<span class="color-fff" v-else>|</span>
</div>
<div class="row btn-group">
<template v-if="item.status == 'idle'">
@@ -205,6 +209,7 @@
<!-- 选择人数 -->
<choose-diners-number
ref="refChooseDinersNumber"
:max="selTable.maxCapacity"
@confirm="chooseDinersNumberConfirm"
></choose-diners-number>
</div>
@@ -258,14 +263,24 @@ export default {
},
methods: {
// 清台
async cleanTableHandle(item) {
const res = await tbShopTable({
...item,
status:'idle',
qrcode: item.tableId,
shopId: localStorage.getItem("shopId"),
},'put');
this.tbShopTableGet();
cleanTableHandle(item) {
this.$confirm("确定要清台:"+item.name, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
tbShopTable(
{
...item,
status: "idle",
qrcode: item.tableId,
shopId: localStorage.getItem("shopId"),
},
"put"
).then((res) => {
this.tbShopTableGet();
});
});
},
tableComman(command, item) {
if (command == "edit") {
@@ -377,6 +392,9 @@ export default {
}
</style>
<style scoped lang="scss">
.cursor-pointer {
cursor: pointer;
}
.opacity-0 {
opacity: 0;
}
@@ -441,6 +459,9 @@ export default {
.total-price {
line-height: 35px;
height: 35px;
&:hover {
text-decoration: underline;
}
}
.new-top {
height: 30px;