diff --git a/components/b-rx-commodity-item/b-rx-commodity-item.vue b/components/b-rx-commodity-item/b-rx-commodity-item.vue
index 57ae944..5766ea1 100644
--- a/components/b-rx-commodity-item/b-rx-commodity-item.vue
+++ b/components/b-rx-commodity-item/b-rx-commodity-item.vue
@@ -37,21 +37,19 @@
¥{{RetainDecimalPoint(item['adj_pay'] * (item['num']?item['num']:item['amount']))}}
-->
-
- ¥{{item['pay_price']}}
+
+ ¥{{item.pay_price}}
-
- ¥{{item['bt_price'] * (item['num']?item['num']:item['amount'])}}
- ¥{{item['pay_price'] * (item['num']?item['num']:item['amount'])}}
+
+ ¥{{(item.bt_price * (item.num || item.amount))}}
+ ¥{{(item.pay_price * (item.num || item.amount))}}
-
+
- ¥{{item['bt_price'] * (item['num']?item['num']:item['amount'])}}
- (+{{item['add_price']}})
+ ¥{{ toFixed((item.bt_price + item.add_price) * (item.num || item.amount)) }}
- ¥{{item['adj_pay'] * (item['num']?item['num']:item['amount'])}}
- (+{{item['add_price']}})
+ ¥{{item.adj_pay * (item.num ? item.num : item.amount).toFixed(2)}}
@@ -75,6 +73,12 @@
return {
};
+ },
+ methods: {
+ toFixed(value) {
+ if (!value) return '0.00'
+ return parseFloat(value).toFixed(2)
+ }
}
}
@@ -152,7 +156,7 @@
.quantity {
flex: 1;
display: flex;
- justify-content: space-between;
+ justify-content: end;
font-size: 30rpx;
color: #3A6FE7;
.num {
diff --git a/manifest.json b/manifest.json
index 0c9ebdd..c54fa7f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,5 +1,5 @@
{
- "name" : "消费补贴卡",
+ "name" : "在线点餐",
"appid" : "__UNI__A669A40",
"description" : "",
"versionName" : "1.0.1",
diff --git a/pages/restaurant/order/orders-settlement/orders-settlement.vue b/pages/restaurant/order/orders-settlement/orders-settlement.vue
index 96130dd..0d2cf67 100644
--- a/pages/restaurant/order/orders-settlement/orders-settlement.vue
+++ b/pages/restaurant/order/orders-settlement/orders-settlement.vue
@@ -87,8 +87,8 @@
- 抵用券
- (¥{{ computedTotal.coin_balance }} )
+ 抵用券:
+ (¥{{ computedTotal.coin_balance? computedTotal.coin_balance:'0.00' }} )
@@ -166,15 +166,15 @@
抵用券抵扣
- -
- {{computedTotal.used_coin}}
+ -
+ {{ZeroData.used_coin}}
余额抵扣
- -
- {{computedTotal.used_broker}}
+ -
+ {{ZeroData.used_broker}}
@@ -182,12 +182,12 @@
实付
-
- 获得:{{computedTotal.integral}} 积分
+
+ 获得:{{ZeroData.integral}} 积分
- ¥{{computedTotal.real_pay_price}}
+ ¥{{realPayment}}
@@ -348,8 +348,10 @@
// 修改数据格式
item['pay_price'] = item['product_price'];
- // 星巴克计算补贴
- item['bt_price'] = item['bt_price'];
+ // if (this['BrandInfor']['brand_id'] == 10) {
+ // // 星巴克计算补贴
+ // }
+ item['bt_price'] = Number(item['bt_price']);
products.push(item);
this['shoptotalnum'] += item['num'];
@@ -397,7 +399,7 @@
}
// 判断如果是0元购提示弹窗
- if (this.computedTotal.real_pay_price == 0) {
+ if (this.realPayment == 0) {
this['zeroshow'] = true
} else {
this['show'] = true;
@@ -452,6 +454,13 @@
shop: this.BrandInfor.brand_name,
id: this.BrandInfor.brand_id,
},
+ amountInfo: {
+ actualpayment: this.YingPrice, // 支付总额
+ paymoney: this.realPayment, // 实际支付
+ coin_balance: this.ZeroData.used_coin, // 抵用券抵扣
+ broker_balance: this.ZeroData.used_broker // 余额抵扣
+ },
+
payData: from,
HeadersData: this.GetShopInfor,
shopInfo: from.products,
diff --git a/static/js/mixin/PayMixin.js b/static/js/mixin/PayMixin.js
index ce49927..fa4912d 100644
--- a/static/js/mixin/PayMixin.js
+++ b/static/js/mixin/PayMixin.js
@@ -28,6 +28,7 @@ class Payment {
shopInfo,
computedTotal,
GetShopInfor,
+ amountInfo,
return_url,
payData,
HeadersData,
@@ -56,6 +57,7 @@ class Payment {
data: OrderData,
shopInfo: shopInfo,
GetShopInfor: GetShopInfor,
+ amountInfo: amountInfo,
token: store.getters.GetToken,
payData: data.payData,
HeadersData: data.HeadersData
diff --git a/static/js/mixin/restaurantmixins.js b/static/js/mixin/restaurantmixins.js
index bb8e276..5e80122 100644
--- a/static/js/mixin/restaurantmixins.js
+++ b/static/js/mixin/restaurantmixins.js
@@ -311,7 +311,10 @@ const restaurantmixins = {
// 佣金计算
computedOfflineOrder(this.FormInfor).then(res => {
this.loading = false;
+
+ // 0元购弹窗数据
this.realPayment = res.data.real_pay_price;
+ this.ZeroData = res.data;
/*
* 仅赋值一次