|
@@ -2,12 +2,27 @@
|
|
|
<view class="freight-template" @click.stop="discard">
|
|
|
<!-- 运费信息 -->
|
|
|
<view class="invoice-freight">
|
|
|
- <view class="freight-left">运费<text class="tips" v-if="freightData.freePostFlag == 1">运费可选择到付哟~</text></view>
|
|
|
- <view class="freight-right" >
|
|
|
- <view class="freight-text">{{freightText}}</view>
|
|
|
- <view class="select" v-if="freightData.freePostFlag == 1" @click.stop="selectFreight">
|
|
|
- <text class="select-text">{{orderPriceToFixed(freightMoney)}}</text>
|
|
|
- <text class="iconfont icon-xiayibu"></text>
|
|
|
+ <view class="freight-main">
|
|
|
+ <view class="freight-left">运费<text class="tips" v-if="freightData.freePostFlag == 1">运费可选择到付哟~</text></view>
|
|
|
+ <view class="freight-right" >
|
|
|
+ <view class="freight-text">{{freightText}}</view>
|
|
|
+ <view class="select" v-if="freightData.freePostFlag == 1" @click.stop="selectFreight">
|
|
|
+ <text class="select-text">{{orderPriceToFixed(freightMoney)}}</text>
|
|
|
+ <text class="iconfont icon-xiayibu"></text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="freight-bean" v-if="freePostFlag == 1">
|
|
|
+ <view class="bean-le">可用{{ freightMoney*100 }}采美豆抵用{{ freightMoney }}元运费</view>
|
|
|
+ <view class="bean-ri">
|
|
|
+ <view class="checkbox-box">
|
|
|
+ <button class="checkbox iconfont"
|
|
|
+ hover-class="btn-hover"
|
|
|
+ @click.stop="checkedBalabce"
|
|
|
+ :class="[ischecked ?'icon-yixuanze':'icon-weixuanze']"
|
|
|
+ >
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -30,6 +45,7 @@
|
|
|
isShowOption:false,
|
|
|
optionList:['到付'],
|
|
|
freePostFlag:'',
|
|
|
+ ischecked:false
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -46,14 +62,17 @@
|
|
|
case 0:
|
|
|
this.freightText = '包邮'
|
|
|
this.freightData.freight = 0
|
|
|
+ this.freePostFlag = res.freePostFlag
|
|
|
break
|
|
|
case 1:
|
|
|
this.freightText = ''
|
|
|
this.freightMoney = res.freight
|
|
|
+ this.freePostFlag = res.freePostFlag
|
|
|
this.optionList.unshift(this.orderPriceToFixed(this.freightMoney))
|
|
|
break
|
|
|
case -1:
|
|
|
this.freightText = '到付'
|
|
|
+ this.freePostFlag = res.freePostFlag
|
|
|
this.freightData.freight = 0
|
|
|
break
|
|
|
}
|
|
@@ -80,6 +99,25 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ checkedBalabce(){//勾选使用余额
|
|
|
+ this.ischecked = !this.ischecked
|
|
|
+ if(this.userMoney > 0){
|
|
|
+ this.ischecked = !this.ischecked
|
|
|
+ if(this.ischecked){
|
|
|
+ this.balanceDeductionFlag =1
|
|
|
+ this.attributePallPrice()
|
|
|
+ }else{
|
|
|
+ if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
|
|
|
+ this.payAllPrice = this.allPrice+parseInt(this.freightData.freight)
|
|
|
+ }else{
|
|
|
+ this.payAllPrice = this.allPrice
|
|
|
+ }
|
|
|
+ this.balanceDeductionFlag = 2
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return
|
|
|
+ }
|
|
|
+ },
|
|
|
orderPriceToFixed (value){
|
|
|
let price ='';
|
|
|
if(value == '到付'){
|
|
@@ -108,61 +146,101 @@
|
|
|
float: left;
|
|
|
margin-top: 24rpx;
|
|
|
.invoice-freight{
|
|
|
- width: 702rpx;
|
|
|
- padding: 0 24rpx;
|
|
|
- height: 86rpx;
|
|
|
- line-height: 86rpx;
|
|
|
- font-size: $font-size-28;
|
|
|
- color: $text-color;
|
|
|
- background: #FFFFFF;
|
|
|
- float: left;
|
|
|
- font-weight: bold;
|
|
|
- .freight-left{
|
|
|
+ width: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 10rpx 24rpx;
|
|
|
+ .freight-main{
|
|
|
+ width: 100%;
|
|
|
+ height: 78rpx;
|
|
|
+ line-height: 78rpx;
|
|
|
+ font-size: $font-size-28;
|
|
|
+ color: $text-color;
|
|
|
+ background: #FFFFFF;
|
|
|
float: left;
|
|
|
- .tips{
|
|
|
- font-size: $font-size-24;
|
|
|
- color: $color-system;
|
|
|
- font-weight: normal;
|
|
|
- margin-left: 20rpx;
|
|
|
- }
|
|
|
- .icon-yunfeishuoming{
|
|
|
- height: 100%;
|
|
|
- padding:15rpx;
|
|
|
- color: $color-system;
|
|
|
- font-weight: normal;
|
|
|
- }
|
|
|
- }
|
|
|
- .freight-right{
|
|
|
- float: right;
|
|
|
- color: #2A81FF;
|
|
|
- position: relative;
|
|
|
- .freight-text{
|
|
|
+ font-weight: bold;
|
|
|
+ .freight-left{
|
|
|
float: left;
|
|
|
+ .tips{
|
|
|
+ font-size: $font-size-24;
|
|
|
+ color: $color-system;
|
|
|
+ font-weight: normal;
|
|
|
+ margin-left: 20rpx;
|
|
|
+ }
|
|
|
+ .icon-yunfeishuoming{
|
|
|
+ height: 100%;
|
|
|
+ padding:15rpx;
|
|
|
+ color: $color-system;
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
}
|
|
|
- .select{
|
|
|
+ .freight-right{
|
|
|
float: right;
|
|
|
- height: 60rpx;
|
|
|
- padding: 0 20rpx;
|
|
|
- margin-top: 14rpx;
|
|
|
- line-height: 60rpx;
|
|
|
color: #2A81FF;
|
|
|
- font-weight: normal;
|
|
|
position: relative;
|
|
|
- .select-text{
|
|
|
- display: inline-block;
|
|
|
+ .freight-text{
|
|
|
float: left;
|
|
|
- margin-right: 30rpx;
|
|
|
}
|
|
|
- .iconfont{
|
|
|
- width: 60rpx;
|
|
|
+ .select{
|
|
|
+ float: right;
|
|
|
height: 60rpx;
|
|
|
+ padding: 0 20rpx;
|
|
|
+ margin-top: 14rpx;
|
|
|
line-height: 60rpx;
|
|
|
- text-align: right;
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- top: 0;
|
|
|
- font-size: $font-size-28;
|
|
|
color: #2A81FF;
|
|
|
+ font-weight: normal;
|
|
|
+ position: relative;
|
|
|
+ .select-text{
|
|
|
+ display: inline-block;
|
|
|
+ float: left;
|
|
|
+ margin-right: 30rpx;
|
|
|
+ }
|
|
|
+ .iconfont{
|
|
|
+ width: 60rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ text-align: right;
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ font-size: $font-size-28;
|
|
|
+ color: #2A81FF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .freight-bean{
|
|
|
+ width: 100%;
|
|
|
+ height: 58rpx;
|
|
|
+ line-height: 58rpx;
|
|
|
+ float: left;
|
|
|
+ .bean-le{
|
|
|
+ float: left;
|
|
|
+ color: #666666;
|
|
|
+ font-size: $font-size-26;
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
+ .bean-ri{
|
|
|
+ float: right;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .checkbox-box{
|
|
|
+ display: flex;
|
|
|
+ width: 60rpx;
|
|
|
+ float: left;
|
|
|
+ height: 100%;
|
|
|
+ font-size: $font-size-26;
|
|
|
+ margin-top: 8rpx;
|
|
|
+ .checkbox{
|
|
|
+ width: 40rpx;
|
|
|
+ text-align: right;
|
|
|
+ box-sizing: border-box;
|
|
|
+ text-align: center;
|
|
|
+ text-decoration: none;
|
|
|
+ border-radius: 0;
|
|
|
+ -webkit-tap-highlight-color: transparent;
|
|
|
+ overflow: hidden;
|
|
|
+ color: $color-system;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|