|
@@ -92,6 +92,17 @@
|
|
|
</checkbox-group>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class='item acea-row row-between-wrapper'>
|
|
|
+ <view>复投积分抵扣</view>
|
|
|
+ <view class='discount acea-row row-middle'>
|
|
|
+ <view> {{useReorderIntegral ? "剩余积分":"当前积分"}}
|
|
|
+ <text class='num font-color'>{{reorder_integral || 0}}</text>
|
|
|
+ </view>
|
|
|
+ <checkbox-group @change="ChangeReorderIntegral">
|
|
|
+ <checkbox :disabled="reorder_integral<=0 && !useReorderIntegral" :checked='useReorderIntegral ? true : false' />
|
|
|
+ </checkbox-group>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view v-if="invoice_func || special_invoice" class='item acea-row row-between-wrapper' @tap="goInvoice">
|
|
|
<view>开具发票</view>
|
|
|
<view class='discount'>
|
|
@@ -316,6 +327,10 @@
|
|
|
<view>积分抵扣:</view>
|
|
|
<view class='money'>-¥{{parseFloat(integral_price).toFixed(2)}}</view>
|
|
|
</view>
|
|
|
+ <view class='item acea-row row-between-wrapper' v-if="reorder_deduction_price > 0">
|
|
|
+ <view>复投积分抵扣:</view>
|
|
|
+ <view class='money'>-¥{{parseFloat(reorder_deduction_price).toFixed(2)}}</view>
|
|
|
+ </view>
|
|
|
<view class='item acea-row row-between' v-for="(item,index) in promotions_detail" :key="index"
|
|
|
v-if="parseFloat(item.promotions_price)">
|
|
|
<view>{{item.title}}:</view>
|
|
@@ -515,6 +530,9 @@
|
|
|
useIntegral: false, //是否使用积分
|
|
|
integral_price: 0, //积分抵扣金额
|
|
|
integral: 0,
|
|
|
+ useReorderIntegral:false,//是否使用复投积分
|
|
|
+ reorder_deduction_price: 0, //复投积分抵扣金额
|
|
|
+ reorder_integral:0,
|
|
|
ChangePrice: 0, //使用积分抵扣变动后的金额
|
|
|
formIds: [], //收集formid
|
|
|
status: 0,
|
|
@@ -1006,6 +1024,7 @@
|
|
|
postOrderComputed(this.orderKey, {
|
|
|
addressId: this.addressId,
|
|
|
useIntegral: this.useIntegral ? 1 : 0,
|
|
|
+ useReorderIntegral: this.useReorderIntegral ? 1 : 0,
|
|
|
couponId: this.priceGroup.couponPrice == 0 ? 0 : this.couponId,
|
|
|
shipping_type: this.tableId ? 4 : parseInt(shippingType) + 1,
|
|
|
payType: this.payType
|
|
@@ -1015,10 +1034,14 @@
|
|
|
if (result) {
|
|
|
console.log(result, 'result');
|
|
|
this.totalPrice = result.pay_price;
|
|
|
+ // 积分
|
|
|
this.integral_price = result.deduction_price;
|
|
|
+ this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
|
|
|
this.coupon_price = result.coupon_price;
|
|
|
this.promotions_detail = result.promotions_detail;
|
|
|
- this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
|
|
|
+ // 复投积分
|
|
|
+ this.reorder_deduction_price = result.reorder_deduction_price;
|
|
|
+ this.reorder_integral = this.useReorderIntegral ? result.SurplusReorderIntegral : this.userInfo.reorder_integral;
|
|
|
this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result
|
|
|
.pay_postage);
|
|
|
this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
|
|
@@ -1102,6 +1125,13 @@
|
|
|
this.useIntegral = !this.useIntegral;
|
|
|
this.computedPrice();
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 使用复投积分抵扣
|
|
|
+ */
|
|
|
+ ChangeReorderIntegral: function() {
|
|
|
+ this.useReorderIntegral = !this.useReorderIntegral;
|
|
|
+ this.computedPrice();
|
|
|
+ },
|
|
|
/**
|
|
|
* 选择地址后改变事件
|
|
|
* @param object e
|
|
@@ -1832,6 +1862,7 @@
|
|
|
couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
|
|
|
payType: that.payType,
|
|
|
useIntegral: that.useIntegral,
|
|
|
+ useReorderIntegral:that.useReorderIntegral,
|
|
|
bargainId: that.BargainId,
|
|
|
combinationId: that.combinationId,
|
|
|
discountId: that.discountId,
|