|
@@ -76,7 +76,7 @@
|
|
|
<view v-if="form.transType == 2 || form.transType == 3">
|
|
<view v-if="form.transType == 2 || form.transType == 3">
|
|
|
<text style="color:red;width:100%;font-weight:bold;">提货自理</text>
|
|
<text style="color:red;width:100%;font-weight:bold;">提货自理</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view>
|
|
|
|
|
|
|
+ <view v-if="form.transType != 5">
|
|
|
<text style="color:#3385FF;width:100%;font-weight:bold;">运费预收,根据实际产生物流费用,多退少补。如有退款则原路退回。</text>
|
|
<text style="color:#3385FF;width:100%;font-weight:bold;">运费预收,根据实际产生物流费用,多退少补。如有退款则原路退回。</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -344,8 +344,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.needAddPackCost = false
|
|
this.needAddPackCost = false
|
|
|
if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
|
|
if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
|
|
|
- //不是同城配送的,不是到店自取的,才算打包费
|
|
|
|
|
- if(this.form.transType != 4 && this.form.transType != 5){
|
|
|
|
|
|
|
+ //不是同城配送的,不是到店自取的,并且不是第一次下单,才算打包费
|
|
|
|
|
+ if(this.form.transType != 4 && this.form.transType != 5 && this.ghsInfo.needAddPackFreight == 1){
|
|
|
//昆明发全国
|
|
//昆明发全国
|
|
|
this.needAddPackCost = true
|
|
this.needAddPackCost = true
|
|
|
price = price + this.form.packCost
|
|
price = price + this.form.packCost
|
|
@@ -377,43 +377,48 @@ export default {
|
|
|
let that = this
|
|
let that = this
|
|
|
this.form.transType = num
|
|
this.form.transType = num
|
|
|
this.form.sendCost = 0
|
|
this.form.sendCost = 0
|
|
|
- if(this.getDictionariesInfo.transCost && !this.$util.isEmpty(this.getDictionariesInfo.transCost)){
|
|
|
|
|
- let weight = this.allCountFun.weight ? Number(this.allCountFun.weight) : 0
|
|
|
|
|
- let totalNum = this.allCountFun.bigLength ? Number(this.allCountFun.bigLength) : 0
|
|
|
|
|
- for (const ele of this.getDictionariesInfo.transCost) {
|
|
|
|
|
- if(ele.sign == num){
|
|
|
|
|
- if(num == 2){
|
|
|
|
|
- //冷链物流
|
|
|
|
|
- let llOption = ele.option ? ele.option : ''
|
|
|
|
|
- if(!this.$util.isEmpty(llOption)){
|
|
|
|
|
-
|
|
|
|
|
- let long = llOption.length
|
|
|
|
|
- let bigInfo = llOption[long-1]
|
|
|
|
|
- let bigNum = bigInfo.num
|
|
|
|
|
- let bigAmount = bigInfo.amount
|
|
|
|
|
- let bs = parseInt(totalNum/bigNum)
|
|
|
|
|
- if(bs > 0){
|
|
|
|
|
- this.form.sendCost = this.form.sendCost + (bs*bigAmount)
|
|
|
|
|
- this.form.sendCost = parseFloat(this.form.sendCost.toFixed(2))
|
|
|
|
|
- totalNum = totalNum - (bs*bigNum)
|
|
|
|
|
- totalNum = parseFloat(totalNum.toFixed(2))
|
|
|
|
|
- }
|
|
|
|
|
- for (const ele of llOption){
|
|
|
|
|
- if(Number(ele.num) >= Number(totalNum)){
|
|
|
|
|
- this.form.sendCost = Number(this.form.sendCost)+Number(ele.amount)
|
|
|
|
|
- break
|
|
|
|
|
|
|
+ //第二次下单不算打包费和运费
|
|
|
|
|
+ if(this.ghsInfo.needAddPackFreight == 0){
|
|
|
|
|
+ this.form.sendCost = 0
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if(this.getDictionariesInfo.transCost && !this.$util.isEmpty(this.getDictionariesInfo.transCost)){
|
|
|
|
|
+ let weight = this.allCountFun.weight ? Number(this.allCountFun.weight) : 0
|
|
|
|
|
+ let totalNum = this.allCountFun.bigLength ? Number(this.allCountFun.bigLength) : 0
|
|
|
|
|
+ for (const ele of this.getDictionariesInfo.transCost) {
|
|
|
|
|
+ if(ele.sign == num){
|
|
|
|
|
+ if(num == 2){
|
|
|
|
|
+ //冷链物流
|
|
|
|
|
+ let llOption = ele.option ? ele.option : ''
|
|
|
|
|
+ if(!this.$util.isEmpty(llOption)){
|
|
|
|
|
+
|
|
|
|
|
+ let long = llOption.length
|
|
|
|
|
+ let bigInfo = llOption[long-1]
|
|
|
|
|
+ let bigNum = bigInfo.num
|
|
|
|
|
+ let bigAmount = bigInfo.amount
|
|
|
|
|
+ let bs = parseInt(totalNum/bigNum)
|
|
|
|
|
+ if(bs > 0){
|
|
|
|
|
+ this.form.sendCost = this.form.sendCost + (bs*bigAmount)
|
|
|
|
|
+ this.form.sendCost = parseFloat(this.form.sendCost.toFixed(2))
|
|
|
|
|
+ totalNum = totalNum - (bs*bigNum)
|
|
|
|
|
+ totalNum = parseFloat(totalNum.toFixed(2))
|
|
|
|
|
+ }
|
|
|
|
|
+ for (const ele of llOption){
|
|
|
|
|
+ if(Number(ele.num) >= Number(totalNum)){
|
|
|
|
|
+ this.form.sendCost = Number(this.form.sendCost)+Number(ele.amount)
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //其它物流
|
|
|
|
|
+ let perKiloCost = ele.perKiloCost?Number(ele.perKiloCost):0
|
|
|
|
|
+ let sendCost = weight*perKiloCost
|
|
|
|
|
+ sendCost = parseFloat(sendCost.toFixed(2))
|
|
|
|
|
+ this.form.sendCost = sendCost
|
|
|
}
|
|
}
|
|
|
- }else{
|
|
|
|
|
- //其它物流
|
|
|
|
|
- let perKiloCost = ele.perKiloCost?Number(ele.perKiloCost):0
|
|
|
|
|
- let sendCost = weight*perKiloCost
|
|
|
|
|
- sendCost = parseFloat(sendCost.toFixed(2))
|
|
|
|
|
- this.form.sendCost = sendCost
|
|
|
|
|
|
|
+ break
|
|
|
}
|
|
}
|
|
|
- break
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|