fix: 修改优化转桌功能
This commit is contained in:
@@ -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
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user