|
@@ -3,7 +3,7 @@
|
|
<!-- 运费信息 -->
|
|
<!-- 运费信息 -->
|
|
<view class="invoice-freight">
|
|
<view class="invoice-freight">
|
|
<view class="freight-main">
|
|
<view class="freight-main">
|
|
- <view class="freight-left">运费<text class="tips" v-if="freightData.postageFlag == 1">运费可选择到付哟~</text></view>
|
|
|
|
|
|
+ <view class="freight-left">运费<text class="tips" v-if="freightData.postageFlag == 1 && vipFlag!=1">运费可选择到付哟~</text></view>
|
|
<view class="freight-right" >
|
|
<view class="freight-right" >
|
|
<view class="freight-text">{{freightText}}</view>
|
|
<view class="freight-text">{{freightText}}</view>
|
|
<view class="select" v-if="freightData.postageFlag == 1" @click.stop="selectFreight">
|
|
<view class="select" v-if="freightData.postageFlag == 1" @click.stop="selectFreight">
|
|
@@ -32,7 +32,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
export default{
|
|
export default{
|
|
- name:"freight",
|
|
|
|
|
|
+ name:'freight',
|
|
props:{
|
|
props:{
|
|
freightData:{
|
|
freightData:{
|
|
type:Object
|
|
type:Object
|
|
@@ -51,7 +51,7 @@
|
|
userBeans:0,
|
|
userBeans:0,
|
|
deductionBeans:0,
|
|
deductionBeans:0,
|
|
freightBeansMoney:0,
|
|
freightBeansMoney:0,
|
|
-
|
|
|
|
|
|
+ vipFlag:0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -61,8 +61,10 @@
|
|
|
|
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
- initData(res) {
|
|
|
|
- this.infoData = res;
|
|
|
|
|
|
+ async initData(res) {
|
|
|
|
+ const userInfo = await this.$api.getStorage()
|
|
|
|
+ this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
|
|
|
|
+ this.infoData = res
|
|
switch(res.postageFlag){
|
|
switch(res.postageFlag){
|
|
case 0:
|
|
case 0:
|
|
this.freightText = '包邮'
|
|
this.freightText = '包邮'
|
|
@@ -108,7 +110,8 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
selectFreight (){//切换运费
|
|
selectFreight (){//切换运费
|
|
- let self = this,value;
|
|
|
|
|
|
+ if(this.vipFlag==1){ return }
|
|
|
|
+ let self = this
|
|
uni.showActionSheet({
|
|
uni.showActionSheet({
|
|
itemList: self.optionList,
|
|
itemList: self.optionList,
|
|
success: function (res) {
|
|
success: function (res) {
|
|
@@ -150,19 +153,19 @@
|
|
postageFlag :self.postageFlag,
|
|
postageFlag :self.postageFlag,
|
|
freightBeansMoney: self.freightBeansMoney
|
|
freightBeansMoney: self.freightBeansMoney
|
|
}
|
|
}
|
|
- self.$emit('confirmFreight',obj);
|
|
|
|
|
|
+ self.$emit('confirmFreight',obj)
|
|
},
|
|
},
|
|
fail: function (res) {
|
|
fail: function (res) {
|
|
- console.log(res.errMsg);
|
|
|
|
|
|
+ console.log(res.errMsg)
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
checkedBalabce(){//勾选使用采美豆抵扣
|
|
checkedBalabce(){//勾选使用采美豆抵扣
|
|
this.ischecked = !this.ischecked
|
|
this.ischecked = !this.ischecked
|
|
- this.$emit('confirmFreightBeans',this.ischecked);
|
|
|
|
|
|
+ this.$emit('confirmFreightBeans',this.ischecked)
|
|
},
|
|
},
|
|
orderPriceToFixed (value){
|
|
orderPriceToFixed (value){
|
|
- let price ='';
|
|
|
|
|
|
+ let price =''
|
|
if(value == '到付'){
|
|
if(value == '到付'){
|
|
price = value
|
|
price = value
|
|
}else{
|
|
}else{
|
|
@@ -175,7 +178,7 @@
|
|
this.selectClass = ''
|
|
this.selectClass = ''
|
|
},
|
|
},
|
|
showTip(){
|
|
showTip(){
|
|
- this.$emit('showFreightAlert');
|
|
|
|
|
|
+ this.$emit('showFreightAlert')
|
|
},
|
|
},
|
|
}
|
|
}
|
|
}
|
|
}
|