fix: 修改优化转桌功能

This commit is contained in:
2025-03-18 10:20:42 +08:00
parent 90dc61dee8
commit cefabae276
3 changed files with 88 additions and 30 deletions

View File

@@ -327,15 +327,17 @@ export const useCartsStore = defineStore("carts", () => {
// 换桌
function changeTable(newVal: string | number) {
if (table_code.value) {
sendMessage('rottable', {
new_table_code: newVal,
table_code: table_code.value
});
} else {
table_code.value = `${newVal}`;
}
table_code.value = `${newVal}`;
}
//转桌
function rotTable(newVal: string | number, cart_id = []) {
sendMessage('rottable', {
new_table_code: newVal,
table_code: table_code.value,
cart_id
});
}
function del(data: any) {
sendMessage('del', { id: data.id });
@@ -684,7 +686,8 @@ export const useCartsStore = defineStore("carts", () => {
selCart, totalNumber,
changeSelCart, payMoney,
clear, yiyouhui, giftList,
changeTable
changeTable,
rotTable
};
});