diff --git a/pages/restaurant/order/orders-settlement/orders-settlement.vue b/pages/restaurant/order/orders-settlement/orders-settlement.vue
index 8c50da8..5d0cfa4 100644
--- a/pages/restaurant/order/orders-settlement/orders-settlement.vue
+++ b/pages/restaurant/order/orders-settlement/orders-settlement.vue
@@ -107,7 +107,7 @@
-->
实际付款:
- ¥{{computedTotal.real_pay_price}}
+ ¥{{realPayment}}
积分:
@@ -284,7 +284,8 @@
use_broker: false,
hasAssigned: false, // 标志变量
- YingPrice: 0 // 应付
+ YingPrice: 0 ,// 应付
+ realPayment: 0, // 实际付款
};
},
onLoad() {
@@ -351,20 +352,6 @@
};
// 获取余额
console.log('初始化', newobj);
-
- // 好像是查询补贴卡的
- // conWalletInfoAPI().then(res => {
- // this['amount'] = res['data']['amount'];
- // // this['amount'] = 4076;
- // this['FormInfor']['brand_id'] = this['BrandInfor']['brand_id'];
- // this['FormInfor']['restaurant_id'] = this['GetShopInfor']['restaurant_id'];
- // this['FormInfor']['restaurant_name'] = this['GetShopInfor']['restaurant_name'];
- // this['FormInfor']['lat'] = this['GetShopInfor']['latitude'];
- // this['FormInfor']['lng'] = this['GetShopInfor']['longitude'];
- // this['FormInfor']['restaurant_address'] = this['GetShopInfor']['restaurant_address'];
- // this['FormInfor']['products'] = products;
- // console.log(this['FormInfor'], 'FormInfor')
- // })
// 计算点餐金额
this['FormInfor']['use_coin'] = this.use_coin? 1 : 0;
@@ -385,10 +372,12 @@
// 是否使用券
isCoin() {
this.use_coin = !this.use_coin;
+ this.getCart();
},
isBroker() {
this.use_broker = !this.use_broker;
+ this.getCart();
},
/**
@@ -501,8 +490,7 @@
// 保存当前点击商品的指定数据,用于计算金额(新值)
current['newvalue'] = current['is_deduction'];
}, 500, true)
-
- },
+ }
}
}
diff --git a/static/js/mixin/restaurantmixins.js b/static/js/mixin/restaurantmixins.js
index 21adf41..bb8e276 100644
--- a/static/js/mixin/restaurantmixins.js
+++ b/static/js/mixin/restaurantmixins.js
@@ -311,18 +311,13 @@ const restaurantmixins = {
// 佣金计算
computedOfflineOrder(this.FormInfor).then(res => {
this.loading = false;
- this.computedTotal = res.data;
- if (!res.data.used_broker) {
- this.use_broker = false
- };
- if (!res.data.used_coin) {
- this.use_coin = false
- }
+ this.realPayment = res.data.real_pay_price;
/*
* 仅赋值一次
*/
if (this.hasAssigned) return;
+ this.computedTotal = res.data;
this.YingPrice = res.data.real_pay_price;
this.hasAssigned = true;