台桌列表增加清台弹窗

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

@@ -1407,6 +1407,9 @@ export default {
} }
}, },
"vipUser.id": async function (val) { "vipUser.id": async function (val) {
if(!this.table.tableId){
return
}
let masterId = this.order.masterId; let masterId = this.order.masterId;
if (!masterId) { if (!masterId) {
const res = await this.getMasterId(); const res = await this.getMasterId();
@@ -1822,6 +1825,9 @@ export default {
// 获取取餐号 // 获取取餐号
getMasterId() { getMasterId() {
// if(!this.table.tableId){
// return this.$message.error("请选择桌台");
// }
return $getMasterId({ return $getMasterId({
tableId: this.table.tableId, tableId: this.table.tableId,
vipUserId: this.vipUser.id, vipUserId: this.vipUser.id,
@@ -2417,7 +2423,6 @@ export default {
// this.goods.list = []; // this.goods.list = [];
this.loading = false; this.loading = false;
this.table = ""; this.table = "";
this.order.masterId = "";
this.order.list = []; this.order.list = [];
this.order.query.page = 1; this.order.query.page = 1;
this.goods.total = 0; this.goods.total = 0;
@@ -2435,6 +2440,7 @@ export default {
this.createOrder.code = ""; this.createOrder.code = "";
this.note.content = ""; this.note.content = "";
this.vipUser = { id: "" }; this.vipUser = { id: "" };
this.order.masterId = "";
this.allPack = false; this.allPack = false;
this.note.content = ""; this.note.content = "";
this.isPrverOrder = false; this.isPrverOrder = false;

View File

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