diff --git a/components/b-nx-sku-popup/b-nx-sku-popup.vue b/components/b-nx-sku-popup/b-nx-sku-popup.vue
index 721b6a2..a888ba6 100644
--- a/components/b-nx-sku-popup/b-nx-sku-popup.vue
+++ b/components/b-nx-sku-popup/b-nx-sku-popup.vue
@@ -250,17 +250,16 @@
});
}catch(e){
//TODO handle the exception
- }
-
- let price = +this['Infos']['pay_price'] + skupay;
+ }
+ console.log(this['Infos'])
+ let price = +this['Infos']['price'] + skupay;
// 加价价格
// this['skuinfor']['add_price'] = skupay;
// 实际价格
// this['skuinfor']['adj_pay'] = price;
// 加价价格
- // this.$set(this['skuinfor'], 'adj_pay', price);
- this.$set(this['skuinfor'], 'adj_pay', product_price);
+ this.$set(this['skuinfor'], 'adj_pay', price);
// 实际价格
this.$set(this['skuinfor'], 'add_price', skupay);
// 计算价格之后匹配文字
@@ -377,7 +376,9 @@
};
// 设置提交数据
this.$set(this['skuinfor'],'sku',`${this['Infos']['sku']}/${this['Infos']['accessories']}`);
- this.$set(this['skuinfor'],'sku_code',`${this['Infos']['code']}|${_ACCCODE}`);
+ this.$set(this['skuinfor'],'sku_code',`${this['Infos']['code']}|${_ACCCODE}`);
+
+ console.log('111111111')
},
}
}
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 ef134c3..a4958da 100644
--- a/components/b-rx-commodity-item/b-rx-commodity-item.vue
+++ b/components/b-rx-commodity-item/b-rx-commodity-item.vue
@@ -37,7 +37,7 @@
¥{{item['pay_price']}}
- ¥{{item['user_price'] * (item['num']?item['num']:item['amount'])}}
+ ¥{{item['bt_price'] * (item['num']?item['num']:item['amount'])}}
¥{{item['pay_price'] * (item['num']?item['num']:item['amount'])}}
diff --git a/pages/restaurant/order/orders-settlement/orders-settlement.vue b/pages/restaurant/order/orders-settlement/orders-settlement.vue
index c10d16d..bc488be 100644
--- a/pages/restaurant/order/orders-settlement/orders-settlement.vue
+++ b/pages/restaurant/order/orders-settlement/orders-settlement.vue
@@ -51,7 +51,7 @@
-
+
@@ -78,19 +78,19 @@
- 抵用券
- ( 余额:¥{{ computedTotal.broker_balance }} )
+ 余额:
+ (¥{{ computedTotal.broker_balance }} )
-
+
- 余额
- ( 余额:¥{{ computedTotal.coin_balance }} )
+ 抵用券
+ (¥{{ computedTotal.coin_balance }} )
-
+
@@ -124,7 +124,6 @@
-
@@ -165,11 +164,11 @@
抵用券
- {{computedTotal.broker_balance}}
+ {{computedTotal.used_broker}}
余额
- {{computedTotal.coin_balance}}
+ {{computedTotal.used_coin}}
@@ -269,8 +268,8 @@
shoptotalnum: 0,
computedTotal: {},
- use_coin: 0,
- use_broker: 0,
+ use_coin: false,
+ use_broker: false,
};
},
@@ -362,11 +361,13 @@
// 是否使用券
isCoin() {
this.use_coin = !this.use_coin;
+ if (this.use_broker) this.use_broker = false;
this.getCart()
},
isBroker() {
this.use_broker = !this.use_broker;
+ if (this.use_coin) this.use_coin = false;
this.getCart()
},
@@ -752,7 +753,7 @@
// 商品样式
.Commodity-Item {
- margin-bottom: 20rpx;
+ // margin-bottom: 20rpx;
padding: 32rpx 0;
// 抵扣区域样式
diff --git a/pages/restaurant/order/orders-settlement/settlement.vue b/pages/restaurant/order/orders-settlement/settlement.vue
index 5796de2..06059fe 100644
--- a/pages/restaurant/order/orders-settlement/settlement.vue
+++ b/pages/restaurant/order/orders-settlement/settlement.vue
@@ -13,7 +13,7 @@
- 餐品详情.
+ 餐品详情
@@ -33,13 +33,13 @@
您余额不足,实际可抵扣¥{{_amount(item['already_deduction_amount'])}}
-->
-
-
+ -->
-
-
+ -->
@@ -93,8 +93,8 @@
- 抵用券
- ( 余额:¥{{ computedTotal.broker_balance }} )
+ 余额:
+ (¥{{ computedTotal.broker_balance }} )
@@ -102,8 +102,8 @@
- 余额
- ( 余额:¥{{ computedTotal.coin_balance }} )
+ 抵用券
+ (¥{{ computedTotal.coin_balance }} )
@@ -130,7 +130,48 @@
-
+
+
+
+
+
+
+
+
+ 抵用券
+ {{computedTotal.used_broker}}
+
+
+ 余额
+ {{computedTotal.used_coin}}
+
+
+
+
+ 实付
+
+
+ 获得:{{computedTotal.integral}} 积分
+
+
+
+ ¥{{computedTotal.real_pay_price}}
+
+
+
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
@@ -152,7 +193,8 @@
mixins: [mixin, restaurantmixins, calculationamountmixin],
data() {
return {
- show: true,
+ show: true,
+ zeroshow: false,
FormInfor: {
// 品牌id
brand_id: 0,
@@ -304,54 +346,53 @@
})
return
};
- console.log(FormInfor['products'], 'products');
- if (typeof FormInfor['products'] == 'object') {
- FormInfor['products'] = JSON.stringify(FormInfor['products'])
- }
- uni.showLoading({
- title: '加载中...'
- });
- console.log(FormInfor, 'FormInfor');
- // return
- // createOrderNewAPI(FormInfor).then(res => {
- // uni.hideLoading();
- // this.$Payment.H5_Payment({
- // pay_price: res['data']['pay_price'],
- // order_sn: res['data']['order_sn'],
- // type: res['data']['type'],
- // openid: res['data']['openid'],
- // return_url: `/pages/restaurant/order/order-status/order-status?order_sn=${res['data']['order_sn']}`
- // });
- // // 支付
- // // this.payment({
- // // order_sn:res['data']['order_sn'],
- // // type:res['data']['type'],
- // // // 仅微信环境下存在参数
- // // money:res['data']['money'],
- // // redirect_url:`/pages/restaurant/order/order-status/order-status`
- // // });
- // })
+ // 判断如果是0元购提示弹窗
+ if (this.computedTotal.real_pay_price == 0) {
+ this['zeroshow'] = true
+ } else {
+ this.confirmClick();
+ }
+ },
+
+ confirmClick() {
+ let FormInfor = JSON.parse(JSON.stringify(self['FormInfor']))
+ if (typeof FormInfor['products'] == 'object') {
+ FormInfor['products'] = JSON.stringify(FormInfor['products'])
+ }
+ uni.showLoading({
+ title: '加载中...'
+ });
FormInfor.phone = FormInfor.phone_number;
FormInfor.products = JSON.parse(FormInfor.products)
createFoodOrder(FormInfor).then(res => {
uni.hideLoading();
- this.$Payment.H5TOWX_Payment({
- pay_price: res['data']['pay_price'],
- order_sn: res['data']['order_sn'],
- type: res['data']['type'],
- openid: res['data']['openid'],
- return_url: `/pages/restaurant/order/order-status/order-status?order_sn=${res['data']['order_sn']}`
- });
- })
- },
-
+ let redirect_url = '/pages/restaurant/order/order-details/details';
+ uni.hideLoading();
+
+ if (res.data.is_zero_pay) {
+ uni.showLoading({ title: '支付成功, 跳转订单页' });
+ setTimeout(() => {
+ wx.miniProgram.navigateTo({
+ url: `/pages/goods/order_list/index`
+ });
+ }, 1000)
+ } else {
+ this.$Payment.H5TOWX_Payment({
+ datas: res['data'],
+ shopInfo: FormInfor.products,
+ return_url:`/pages/restaurant/order/order-details/details?order_sn=${res.data.order_sn}`
+ });
+ }
+ })
+ },
+
/**
* @商品是否优惠
* */
ischoiceDiscount(index) {
- let current = this['FormInfor']['products'][index];
+ // let current = this['FormInfor']['products'][index];
// 当前余额为0并且用户准备勾选补贴选项则直接打断
// JIN
// if (this['amount'] == 0 && !current['is_deduction']) {
@@ -362,7 +403,7 @@
// return
// }
// 状态取反
- current['is_deduction'] = current['is_deduction'] ? 0 : 1;
+ // current['is_deduction'] = current['is_deduction'] ? 0 : 1;
},
}
}
@@ -932,5 +973,56 @@
align-items: center;
background-color: #ffffff;
padding: 32rpx;
+ }
+
+ .confirmButton {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .replace {
+ border: 1rpx solid #000;
+ color: #000;
+ }
+
+ .confirm {
+ background: #00AF66;
+ color: #ffffff;
+ }
+
+ .btn {
+ width: 230rpx;
+ height: 86rpx;
+ font-size: 30rpx;
+ line-height: 86rpx;
+ text-align: center;
+ border-radius: 43rpx;
+ }
+ }
+
+ .zero-content {
+ display: flex;
+ flex-direction: column;
+ width: 500rpx;
+ font-size: 28rpx;
+ .item {
+ width: 500rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 30rpx;
+ }
+ .know {
+ border-top: 1rpx solid gray;
+ padding-top: 40rpx;
+ width: 500rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ }
+ .blod {
+ font-size: 32rpx;
+ font-weight: bold;
+ }
}