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

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

@ -1929,10 +1929,10 @@ export default {
if (!canJiesuan) {
return;
}
const order= await this.returnCreateOrderData();
const order = await this.returnCreateOrderData();
console.log(this.createOrder.data);
this.order.payType = "scanCode";
this.payTypeItemClick({ payType: "scanCode",order });
this.payTypeItemClick({ payType: "scanCode", order });
this.payBeforeClear();
},
async changeOrderUseType(useType) {
@ -2096,12 +2096,13 @@ export default {
}
},
async changeTable(item) {
if(this.table||this.order.list.length<=0){
console.log(this.table);
if (this.table || this.order.list.length <= 0) {
this.table = item;
this.tableShow = false;
return
return;
}
if(item.status!='idle'){
if (item.status != "idle") {
return this.$message.error("该台桌已在使用中");
}
const res = await $returnTableDetail({
@ -2122,13 +2123,12 @@ export default {
} catch (e) {
console.log(e);
}
await $choseTable({
masterId: this.masterId,
tableId: item.tableId,
isClear: res1 == "confirm" ? true : false,
});
}
await $choseTable({
masterId: this.masterId,
tableId: item.tableId,
isClear: res1 == "confirm" ? true : false,
});
this.table = item;
this.tableShow = false;
},
@ -2144,10 +2144,8 @@ export default {
}
this.pays();
},
payTypeItemClick(item,order) {
order=order?order:this.createOrder.data;
console.log('--------order------')
console.log(order)
payTypeItemClick(item, order) {
order = order ? order : this.createOrder.data;
if (item.payType == "vipPay") {
return this.refChooseUserOpen();
}
@ -2157,7 +2155,10 @@ export default {
}
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) {
@ -2291,7 +2292,12 @@ export default {
return this.refChooseUserOpen();
}
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") {
return this.refToggle("refScanCode", true);