|
@@ -108,7 +108,7 @@
|
|
|
<block v-if="$util.isEmpty(wlList)">
|
|
<block v-if="$util.isEmpty(wlList)">
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
|
|
|
<view class="tui-title">配送物流</view>
|
|
<view class="tui-title">配送物流</view>
|
|
|
- <input type="text" placeholder="请填写物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
|
|
|
|
|
|
|
+ <input type="text" placeholder="请填选物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
</block>
|
|
</block>
|
|
|
<block v-else>
|
|
<block v-else>
|
|
@@ -120,8 +120,8 @@
|
|
|
</picker>
|
|
</picker>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
</block>
|
|
</block>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="(form.sendType == 2 || form.sendType == 0)&& Number(form.packCost)>0">
|
|
|
|
|
- <view class="tui-title">打包费</view>
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="needAddPackCost == true">
|
|
|
|
|
+ <view class="tui-title">包装费</view>
|
|
|
<text style="color: #3385FF">¥{{ form.packCost }}</text>
|
|
<text style="color: #3385FF">¥{{ form.packCost }}</text>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
@@ -225,6 +225,7 @@ export default {
|
|
|
wlName:'',
|
|
wlName:'',
|
|
|
wlId:0
|
|
wlId:0
|
|
|
},
|
|
},
|
|
|
|
|
+ lackExpend:0,
|
|
|
showCustomer: false,
|
|
showCustomer: false,
|
|
|
today:'',
|
|
today:'',
|
|
|
monthLater:'',
|
|
monthLater:'',
|
|
@@ -242,7 +243,8 @@ export default {
|
|
|
showAddress:''
|
|
showAddress:''
|
|
|
},
|
|
},
|
|
|
wlList:[],
|
|
wlList:[],
|
|
|
- wlSelData: {id:0,name:''}
|
|
|
|
|
|
|
+ wlSelData: {id:0,name:''},
|
|
|
|
|
+ needAddPackCost:false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -264,14 +266,19 @@ export default {
|
|
|
...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|
|
...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|
|
|
modifyPrice(){
|
|
modifyPrice(){
|
|
|
let allPrice = this.allPrice.toFixed(2)
|
|
let allPrice = this.allPrice.toFixed(2)
|
|
|
- let price = Number(allPrice)
|
|
|
|
|
|
|
+ allPrice = Number(allPrice)
|
|
|
|
|
+ let price = allPrice
|
|
|
|
|
|
|
|
if(this.form.sendType == 2){
|
|
if(this.form.sendType == 2){
|
|
|
price = price + this.form.sendCost
|
|
price = price + this.form.sendCost
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if(this.form.sendType == 2 || this.form.sendType == 0){
|
|
|
|
|
- price = price + this.form.packCost
|
|
|
|
|
|
|
+ this.needAddPackCost = false
|
|
|
|
|
+ if(this.form.sendType == 2 || this.form.sendType == 0 || this.form.sendType == 3){
|
|
|
|
|
+ //设置了订单金额低200需要付包装费,当前只付一次
|
|
|
|
|
+ if(Number(this.lackExpend) > 0 && allPrice < Number(this.lackExpend)){
|
|
|
|
|
+ price = price + this.form.packCost
|
|
|
|
|
+ this.needAddPackCost = true
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
price = Number(price)
|
|
price = Number(price)
|
|
|
price = price.toFixed(2)
|
|
price = price.toFixed(2)
|
|
@@ -469,6 +476,7 @@ export default {
|
|
|
getGhsDataApi({id:id}).then(res => {
|
|
getGhsDataApi({id:id}).then(res => {
|
|
|
that.ghsInfo = res.data
|
|
that.ghsInfo = res.data
|
|
|
that.form.packCost = res.data.packCost?parseFloat(res.data.packCost):0
|
|
that.form.packCost = res.data.packCost?parseFloat(res.data.packCost):0
|
|
|
|
|
+ that.lackExpend = res.data.lackExpend?parseFloat(res.data.lackExpend):0
|
|
|
that.form.wlName = res.data.customWlName ? res.data.customWlName : ''
|
|
that.form.wlName = res.data.customWlName ? res.data.customWlName : ''
|
|
|
|
|
|
|
|
//杭州斗南鲜花批发部不需要显示免费配送
|
|
//杭州斗南鲜花批发部不需要显示免费配送
|
|
@@ -505,7 +513,7 @@ export default {
|
|
|
|
|
|
|
|
if(this.form.sendType == 3){
|
|
if(this.form.sendType == 3){
|
|
|
if (this.$util.isEmpty(this.form.wlName)){
|
|
if (this.$util.isEmpty(this.form.wlName)){
|
|
|
- this.$msg('请填写物流')
|
|
|
|
|
|
|
+ this.$msg('请填选物流')
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -514,6 +522,8 @@ export default {
|
|
|
let xj = uni.getStorageSync("ghsColorItem"+this.ghsInfo.id)
|
|
let xj = uni.getStorageSync("ghsColorItem"+this.ghsInfo.id)
|
|
|
|
|
|
|
|
let getType = this.form.sendType == 2 ? 1 : 2
|
|
let getType = this.form.sendType == 2 ? 1 : 2
|
|
|
|
|
+ //用于计划是否要包装费
|
|
|
|
|
+ let itemTotalAmount = this.allPriceFun
|
|
|
let params = {
|
|
let params = {
|
|
|
getType:getType,
|
|
getType:getType,
|
|
|
sendTimeWant:this.sendTimeWant,
|
|
sendTimeWant:this.sendTimeWant,
|
|
@@ -524,7 +534,8 @@ export default {
|
|
|
ghsId:this.ghsInfo.id,
|
|
ghsId:this.ghsInfo.id,
|
|
|
hbId: this.form.hbId,
|
|
hbId: this.form.hbId,
|
|
|
wlName:this.form.wlName,
|
|
wlName:this.form.wlName,
|
|
|
- xj:JSON.stringify(xj)
|
|
|
|
|
|
|
+ xj:JSON.stringify(xj),
|
|
|
|
|
+ itemTotalAmount:itemTotalAmount
|
|
|
}
|
|
}
|
|
|
let self = this;
|
|
let self = this;
|
|
|
self.$util.confirmModal({content:'确认提交?'},() => {
|
|
self.$util.confirmModal({content:'确认提交?'},() => {
|