更新修复未调用选取桌台接口

This commit is contained in:
YeMingfei666 2024-10-25 15:25:16 +08:00
parent 709036c050
commit ca827999b8
1 changed files with 23 additions and 17 deletions

View File

@ -2096,12 +2096,13 @@ export default {
} }
}, },
async changeTable(item) { async changeTable(item) {
console.log(this.table);
if (this.table || this.order.list.length <= 0) { if (this.table || this.order.list.length <= 0) {
this.table = item; this.table = item;
this.tableShow = false; this.tableShow = false;
return return;
} }
if(item.status!='idle'){ if (item.status != "idle") {
return this.$message.error("该台桌已在使用中"); return this.$message.error("该台桌已在使用中");
} }
const res = await $returnTableDetail({ const res = await $returnTableDetail({
@ -2122,13 +2123,12 @@ export default {
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
}
await $choseTable({ await $choseTable({
masterId: this.masterId, masterId: this.masterId,
tableId: item.tableId, tableId: item.tableId,
isClear: res1 == "confirm" ? true : false, isClear: res1 == "confirm" ? true : false,
}); });
}
this.table = item; this.table = item;
this.tableShow = false; this.tableShow = false;
}, },
@ -2146,8 +2146,6 @@ export default {
}, },
payTypeItemClick(item, order) { payTypeItemClick(item, order) {
order = order ? order : this.createOrder.data; order = order ? order : this.createOrder.data;
console.log('--------order------')
console.log(order)
if (item.payType == "vipPay") { if (item.payType == "vipPay") {
return this.refChooseUserOpen(); return this.refChooseUserOpen();
} }
@ -2157,7 +2155,10 @@ export default {
} }
if (item.payType == "scanCode") { if (item.payType == "scanCode") {
// //
return this.refToggle("refWxScanCode", true, {orderId:order.id,payAmount: (this.createOrder.data.amount * order.discount).toFixed(2)}); return this.refToggle("refWxScanCode", true, {
orderId: order.id,
payAmount: (this.createOrder.data.amount * order.discount).toFixed(2),
});
} }
}, },
ChangeDiscount(discount) { ChangeDiscount(discount) {
@ -2291,7 +2292,12 @@ export default {
return this.refChooseUserOpen(); return this.refChooseUserOpen();
} }
if (this.order.payType == "scanCode") { if (this.order.payType == "scanCode") {
return this.refToggle("refWxScanCode", true, {orderId:this.createOrder.data.id,payAmount: (this.createOrder.data.amount * this.createOrder.discount).toFixed(2)}); return this.refToggle("refWxScanCode", true, {
orderId: this.createOrder.data.id,
payAmount: (
this.createOrder.data.amount * this.createOrder.discount
).toFixed(2),
});
} }
if (this.order.payType == "deposit") { if (this.order.payType == "deposit") {
return this.refToggle("refScanCode", true); return this.refToggle("refScanCode", true);