台桌列表增加清台弹窗

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

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;