代客下单部分逻辑处理优化,订单管理退款退菜结账跳转功能问题处理
This commit is contained in:
@@ -1525,7 +1525,8 @@ export default {
|
||||
);
|
||||
},
|
||||
title() {
|
||||
return this.table ? "代客下单" + `(${this.table.name})` : "代客下单";
|
||||
// return this.table ? "代客下单" + `(${this.table.name})` : "代客下单";
|
||||
return '代客下单'
|
||||
},
|
||||
allGiftMoney() {
|
||||
const nowprice = this.order.list
|
||||
@@ -1623,11 +1624,9 @@ export default {
|
||||
const oldackFee = returnPackFee(this.order.old.list);
|
||||
const packFee = nowPackFee + oldackFee;
|
||||
const returnStatus = ["return", "refunding", "refund"];
|
||||
console.log(this.order.seatFee);
|
||||
const seatFee =
|
||||
this.order.seatFee.totalAmount *
|
||||
(returnStatus.includes(this.order.seatFee.status) ? 0 : 1);
|
||||
console.log(nowPackFee, oldackFee, packFee, seatFee);
|
||||
return (
|
||||
(oldPrice + price + +packFee + seatFee) *
|
||||
this.createOrder.discount
|
||||
@@ -1708,9 +1707,16 @@ export default {
|
||||
}
|
||||
},
|
||||
table(newval, oldval) {
|
||||
this.setPostPay();
|
||||
this.setUseType();
|
||||
if(oldval.tableId&&newval.tableId){
|
||||
this.perpole = 1;
|
||||
this.isCreateOrder = false;
|
||||
}
|
||||
if(this.key=='isJieZhang'){
|
||||
this.isCreateOrder = false;
|
||||
this.key=''
|
||||
}
|
||||
if (newval && newval.tableId) {
|
||||
this.createOrder.data.amount = 0;
|
||||
this.createOrder.data.id = "";
|
||||
@@ -2034,6 +2040,8 @@ export default {
|
||||
//munchies 先付 restaurant 后付
|
||||
this.postPay = this.shopInfo.registerType == "munchies" ? false : true;
|
||||
}
|
||||
console.log('this.postPay')
|
||||
console.log(this.postPay)
|
||||
},
|
||||
//获取店铺信息
|
||||
async getShopInfo() {
|
||||
@@ -2069,6 +2077,7 @@ export default {
|
||||
},
|
||||
//台桌变化时重新获取取餐号、购物车数据,如果是正在结账状态,创建订单到待支付页面
|
||||
async onTableChange() {
|
||||
const perpole=this.perpole || ''
|
||||
const tableRes = await $returnTableDetail({
|
||||
tableId: this.table.tableId,
|
||||
});
|
||||
@@ -2085,7 +2094,6 @@ export default {
|
||||
this.table.status == "idle" &&
|
||||
!this.shopInfo.isTableFee
|
||||
) {
|
||||
this.perpole = 1;
|
||||
await this.changePerpole();
|
||||
}
|
||||
//设置就餐类型
|
||||
@@ -2102,6 +2110,7 @@ export default {
|
||||
}
|
||||
this.getCacheOrder();
|
||||
console.log(this.isCreateOrder);
|
||||
this.perpole=perpole||this.perpole
|
||||
if (!this.shopInfo.isTableFee && this.table.tableId && this.perpole > 0) {
|
||||
//不免餐位费
|
||||
await this.changePerpole();
|
||||
@@ -3130,9 +3139,9 @@ export default {
|
||||
this.order.seatFee = seatFee
|
||||
? {
|
||||
...seatFee,
|
||||
totalNumber: seatFee.num,
|
||||
number: seatFee.num,
|
||||
name: seatFee.productName,
|
||||
totalNumber: seatFee.num||seatFee.number,
|
||||
num: seatFee.number,
|
||||
name: seatFee.name|| seatFee.productName,
|
||||
totalAmount: seatFee.priceAmount || seatFee.totalAmount,
|
||||
}
|
||||
: this.order.seatFee;
|
||||
@@ -3329,6 +3338,7 @@ export default {
|
||||
key = params.key,
|
||||
perpoleNumber = params.num || "";
|
||||
this.key = key;
|
||||
this.perpole = perpoleNumber;
|
||||
|
||||
const shopId = localStorage.getItem("shopId");
|
||||
const shopInfo = await tbShopInfo(shopId);
|
||||
@@ -3361,7 +3371,6 @@ export default {
|
||||
console.log(params);
|
||||
|
||||
if (key == "isJieZhang") {
|
||||
this.perpole = perpoleNumber;
|
||||
this.table = params.tableId ? { name: item.name } : "";
|
||||
if (params.orderId) {
|
||||
const orderRes = await this.getOrderData(params);
|
||||
@@ -3395,7 +3404,6 @@ export default {
|
||||
}
|
||||
|
||||
|
||||
this.perpole = perpoleNumber;
|
||||
this.table = params.tableId ? item : "";
|
||||
},
|
||||
async getOrderData(params) {
|
||||
|
||||
Reference in New Issue
Block a user