修改:下单页面积分抵扣显示内容及使用方式修改,区分为平台积分和商户积分两种使用方式。

This commit is contained in:
wuhui_zzw 2023-11-09 08:59:49 +08:00
parent 931594573e
commit 4edc1e0fee
1 changed files with 94 additions and 13 deletions

View File

@ -134,6 +134,16 @@
</view>
</view>
</view>
<view class="boxs" v-if="item.order.total_integral > 0">
<view class='item acea-row row-between-wrapper' v-if="item.order.use_mer_integral > 0">
<view>本商户积分抵扣</view>
<view class='discount'>使用{{item.order.use_mer_integral}}积分抵扣{{item.order.use_mer_integral_price}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="item.order.use_platform_integral > 0">
<view>平台积分抵扣</view>
<view class='discount'>使用{{item.order.use_platform_integral}}积分抵扣{{item.order.use_platform_integral_price}}</view>
</view>
</view>
<view class='item acea-row row-between-wrapper' v-if='shippingType==0 && item.isTake == 0 && order_model == 0'>
<view>快递费用 <text
v-if="item.list[0].productPresell && item.list[0].productPresell.presell_type == 2">(尾款阶段</text>
@ -325,17 +335,38 @@
<view>店铺优惠金额</view>
<view class='money'>-{{coupon_price}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="open_integral && userInfo.integral>0 && order_type == 0">
<view class='item acea-row row-between-wrapper integral-switch-content' v-if="open_integral && userInfo.integral > 0 && order_type == 0 && is_has_integral_use > 0">
<view>积分抵扣</view>
<view class='money'>
<view class="integral-switch-list">
<view class="integral-s-l-box" v-if="hold_mer_integral > 0" @click="changeIntegral('mer')">
<view v-if="!use_mer_integral">持有相关商户积分<text class="pColor">{{hold_mer_integral}}</text></view>
<view v-else>
使用了<text class="pColor">{{order_use_mer_integral}}</text>个商户积分共抵扣<text class="pColor">{{order_use_mer_integral_price}}</text>
</view>
<view class="checkbox integral_checked">
<view class="iconfont icon-weixuanzhong" v-if="!use_mer_integral"></view>
<view class='iconfont icon-xuanzhong1' v-else></view>
</view>
</view>
<view class="integral-s-l-box" v-if="hold_platform_integral > 0" @click="changeIntegral('platform')">
<view v-if="!use_platform_integral">持有平台积分<text class="pColor">{{hold_platform_integral}}</text></view>
<view v-else>
使用了<text class="pColor">{{order_use_platform_integral}}</text>个平台积分共抵扣<text class="pColor">{{order_use_platform_integral_price}}</text>
</view>
<view class="checkbox integral_checked">
<view class="iconfont icon-weixuanzhong" v-if="!use_platform_integral"></view>
<view class='iconfont icon-xuanzhong1' v-else></view>
</view>
</view>
</view>
<!--<view class='money'>
<text v-if="!use_integral">当前积分<text class="pColor">{{userInfo.integral}}</text></text>
<text v-else>使用了{{integral_count}}个积分抵扣<text
class="pColor">{{integral_price}}</text></text>
<text v-else>使用了{{integral_count}}个积分抵扣<text class="pColor">{{integral_price}}</text></text>
<view class="checkbox integral_checked" @click="changeIntegral">
<view class="iconfont icon-weixuanzhong" v-if="!use_integral"></view>
<view class='iconfont icon-xuanzhong1' v-else></view>
</view>
</view>
</view>-->
</view>
<view class='item acea-row row-between-wrapper'
v-if="!seckillId && order_type != 3 && order_type != 4 && enabledPlatformCoupon">
@ -563,8 +594,17 @@
priceGroup: {},
animated: false,
totalPrice: 0,
use_integral: false,
pagesUrl: "",
// use_integral: false,
use_mer_integral: false,// 使
use_platform_integral: false,// 使
order_use_mer_integral: 0,// 使
order_use_mer_integral_price: 0,//
order_use_platform_integral: 0,// 使
order_use_platform_integral_price: 0,//
hold_mer_integral: 0,//
hold_platform_integral: 0,//
is_has_integral_use: 0,
pagesUrl: "",
orderKey: "",
offlinePostage: "",
isAuto: false, //
@ -712,8 +752,11 @@
changeIsAgree: function(e) {
this.isAgree = !this.isAgree;
},
changeIntegral: function(e) {
this.use_integral = !this.use_integral;
changeIntegral: function(type) {
console.log("--------- 变更类型 ---------------",type);
// this.use_integral = !this.use_integral;
if(type === 'mer') this.use_mer_integral = !this.use_mer_integral;
if(type === 'platform') this.use_platform_integral = !this.use_platform_integral;
this.getConfirm(this.addressId);
},
showPresellAgree(){
@ -973,8 +1016,10 @@
address_id: address_id,
takes: that.take,
use_coupon: that.subCoupon,
use_integral: that.use_integral
}).then(res => {
// use_integral: that.use_integral,
use_mer_integral: that.use_mer_integral,
use_platform_integral: that.use_platform_integral,
}).then(res => {
//
that.is_take = false
res.data.order.forEach(el => {
@ -1011,7 +1056,16 @@
that.$set(that, 'integral_count', res.data.order_total_integral);
that.$set(that, 'integral_price', res.data.order_total_integral_price);
that.$set(that, 'open_integral', res.data.openIntegral);
that.$set(that, 'use_integral', res.data.useIntegral);
// that.$set(that, 'use_integral', res.data.useIntegral);
that.$set(that, 'use_mer_integral', res.data.useMerIntegral);
that.$set(that, 'use_platform_integral', res.data.usePlatformIntegral);
that.$set(that, 'order_use_mer_integral', res.data.order_use_mer_integral);
that.$set(that, 'order_use_mer_integral_price', res.data.order_use_mer_integral_price);
that.$set(that, 'order_use_platform_integral', res.data.order_use_platform_integral);
that.$set(that, 'order_use_platform_integral_price', res.data.order_use_platform_integral_price);
that.$set(that, 'hold_mer_integral', res.data.hold_mer_integral);
that.$set(that, 'hold_platform_integral', res.data.hold_platform_integral);
that.$set(that, 'is_has_integral_use', res.data.is_has_integral_use);
that.$set(that, 'order_extend', (that.order_extend && that.order_extend.length>0) ? that.order_extend : res.data.order_extend);
that.totalPrice = res.data.order_price
that.orderStatus = res.data.status
@ -1473,7 +1527,9 @@
order_type: this.order_type,
key: this.order_key,
takes: this.take,
use_integral: this.use_integral,
// use_integral: this.use_integral,
use_mer_integral: this.use_mer_integral,
use_platform_integral: this.use_platform_integral,
receipt_data: this.invoiceData,
extend: this.extend,
post: this.post,
@ -1600,6 +1656,31 @@
</script>
<style lang="scss" scoped>
.integral-switch-content{
.integral-switch-list{
width: 100% !important;
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-end;
.integral-s-l-box{
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
width: 100% !important;
font-size: 26rpx;
color: #868686;
padding: 20rpx;
}
}
}
/deep/checkbox .uni-checkbox-input.uni-checkbox-input-checked,
/deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: 1px solid var(--view-theme)!important;