|
@@ -48,13 +48,24 @@
|
|
|
<view class="operate-view" @click="gobackEvent">
|
|
<view class="operate-view" @click="gobackEvent">
|
|
|
<text class="iconfont icongouwuche"></text>返回列表
|
|
<text class="iconfont icongouwuche"></text>返回列表
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="describe-view">共{{ allCountFun.bigLength }}扎,合计 ¥<text class="price">{{ allPriceFun }}</text></view>
|
|
|
|
|
|
|
+ <view class="describe-view">
|
|
|
|
|
+ <text class="price">共{{ allCountFun.bigLength }}扎,{{ allCountFun.weight }}公斤,合计 ¥{{ allPriceFun }}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="module-com input-line-wrap">
|
|
<view class="module-com input-line-wrap">
|
|
|
|
|
|
|
|
|
|
+<block v-if="ghsInfo.pfLevel && ghsInfo.pfLevel == 1">
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeTransType(0)">德邦空运</button>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeTransType(1)">顺丰空运</button>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeTransType(2)">冷链物流</button>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeTransType(3)">航空物流</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+</block>
|
|
|
|
|
+<block v-else>
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
<button v-if="ghsInfo.shopId != 4608" class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:30upx;" @click="changeSendType(0)">送货上门</button>
|
|
<button v-if="ghsInfo.shopId != 4608" class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:30upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
<button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(1)">自取</button>
|
|
<button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(1)">自取</button>
|
|
@@ -102,22 +113,6 @@
|
|
|
</view>
|
|
</view>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="form.sendType == 2" @click="modifyAddress">
|
|
|
|
|
- <view class="tui-title">收花地址</view>
|
|
|
|
|
- <view v-if="!$util.isEmpty(shopInfo.lat) && !$util.isEmpty(shopInfo.long)">
|
|
|
|
|
- <view><text>{{shopInfo.fullAddress}}</text></view>
|
|
|
|
|
- <view><text>{{shopInfo.showAddress}}</text></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-else>
|
|
|
|
|
- <view><text style="color:#CCCCCC;">请完善门店地址</text></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 2 && Number(form.sendCost)>0">
|
|
|
|
|
- <view class="tui-title">运费</view>
|
|
|
|
|
- <text style="color: #3385FF">¥{{ form.sendCost }}</text>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
<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>
|
|
@@ -133,6 +128,23 @@
|
|
|
</picker>
|
|
</picker>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
</block>
|
|
</block>
|
|
|
|
|
+</block>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="displayAddress == true" @click="modifyAddress">
|
|
|
|
|
+ <view class="tui-title">收花地址</view>
|
|
|
|
|
+ <view v-if="!$util.isEmpty(shopInfo.lat) && !$util.isEmpty(shopInfo.long)">
|
|
|
|
|
+ <view><text>{{shopInfo.fullAddress}}</text></view>
|
|
|
|
|
+ <view><text>{{shopInfo.showAddress}}</text></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-else>
|
|
|
|
|
+ <view><text style="color:#CCCCCC;">请完善门店地址</text></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost == true">
|
|
|
|
|
+ <view class="tui-title">运费</view>
|
|
|
|
|
+ <text style="color: #3385FF">¥{{ form.sendCost }}</text>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="needAddPackCost == true">
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="needAddPackCost == true">
|
|
|
<view class="tui-title">包装费</view>
|
|
<view class="tui-title">包装费</view>
|
|
@@ -228,6 +240,7 @@ export default {
|
|
|
receiveLong: "",
|
|
receiveLong: "",
|
|
|
receiveLat: "",
|
|
receiveLat: "",
|
|
|
sendType: 0,
|
|
sendType: 0,
|
|
|
|
|
+ transType:0,
|
|
|
sendSide: "2",
|
|
sendSide: "2",
|
|
|
sendDate: "",
|
|
sendDate: "",
|
|
|
sendTimeWant: "",
|
|
sendTimeWant: "",
|
|
@@ -263,6 +276,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
this.getGhsData(this.option.id)
|
|
this.getGhsData(this.option.id)
|
|
|
|
|
+ this.changeTransType(0)
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
|
|
if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
|
|
@@ -277,21 +291,46 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
- ...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|
|
|
|
|
|
|
+ ...mapGetters(["getMerchantInfo", "getLoginInfo","getDictionariesInfo"]),
|
|
|
|
|
+ displayAddress(){
|
|
|
|
|
+ if(this.form.sendType == 2){
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ return false
|
|
|
|
|
+ },
|
|
|
|
|
+ displaySendCost(){
|
|
|
|
|
+ if(this.form.sendType == 2){
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ return false
|
|
|
|
|
+ },
|
|
|
modifyPrice(){
|
|
modifyPrice(){
|
|
|
let allPrice = this.allPrice.toFixed(2)
|
|
let allPrice = this.allPrice.toFixed(2)
|
|
|
allPrice = Number(allPrice)
|
|
allPrice = Number(allPrice)
|
|
|
let price = allPrice
|
|
let price = allPrice
|
|
|
|
|
|
|
|
- if(this.form.sendType == 2){
|
|
|
|
|
|
|
+ if(this.displaySendCost == true){
|
|
|
price = price + this.form.sendCost
|
|
price = price + this.form.sendCost
|
|
|
}
|
|
}
|
|
|
this.needAddPackCost = false
|
|
this.needAddPackCost = false
|
|
|
- if(this.form.sendType == 4){
|
|
|
|
|
- //设置了订单金额低200需要付包装费,当前只付一次
|
|
|
|
|
- if(Number(this.lackExpend) > 0 && allPrice < Number(this.lackExpend)){
|
|
|
|
|
- price = price + this.form.packCost
|
|
|
|
|
- this.needAddPackCost = true
|
|
|
|
|
|
|
+ if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
|
|
|
|
|
+ //昆明发全国
|
|
|
|
|
+ this.needAddPackCost = true
|
|
|
|
|
+ price = price + this.form.packCost
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //同城配送
|
|
|
|
|
+ if(this.form.sendType == 4){
|
|
|
|
|
+ //设置了订单金额低200需要付包装费,当前只付一次
|
|
|
|
|
+ if(Number(this.lackExpend) > 0 && allPrice < Number(this.lackExpend)){
|
|
|
|
|
+ price = price + this.form.packCost
|
|
|
|
|
+ this.needAddPackCost = true
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
price = Number(price)
|
|
price = Number(price)
|
|
@@ -307,6 +346,34 @@ export default {
|
|
|
this.form.wlId = this.wlSelData.id
|
|
this.form.wlId = this.wlSelData.id
|
|
|
this.form.wlName = this.wlSelData.name
|
|
this.form.wlName = this.wlSelData.name
|
|
|
},
|
|
},
|
|
|
|
|
+ changeTransType(num){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.form.transType = num
|
|
|
|
|
+ if(this.getDictionariesInfo.transCost && !this.$util.isEmpty(this.getDictionariesInfo.transCost)){
|
|
|
|
|
+ let weight = this.allCountFun.weight ? Number(this.allCountFun.weight) : 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)){
|
|
|
|
|
+ for (const llEle of llOption) {
|
|
|
|
|
+ if(Number(llEle.num)>=weight){
|
|
|
|
|
+ this.form.sendCost = llEle.amount?llEle.amount:0
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ let perKiloCost = ele.perKiloCost?Number(ele.perKiloCost):0
|
|
|
|
|
+ let sendCost = weight*perKiloCost
|
|
|
|
|
+ sendCost = parseFloat(sendCost.toFixed(2))
|
|
|
|
|
+ this.form.sendCost = sendCost
|
|
|
|
|
+ }
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
changeSendType(num){
|
|
changeSendType(num){
|
|
|
this.form.sendType = num
|
|
this.form.sendType = num
|
|
|
if(num == 2){
|
|
if(num == 2){
|
|
@@ -489,7 +556,23 @@ export default {
|
|
|
let that = this
|
|
let that = this
|
|
|
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
|
|
|
|
|
|
|
+ if(that.ghsInfo.pfLevel && that.ghsInfo.pfLevel == 1){
|
|
|
|
|
+ //昆明发货到全国
|
|
|
|
|
+ let packCost = 0
|
|
|
|
|
+ let weight = this.allCountFun.weight ? this.allCountFun.weight : 0
|
|
|
|
|
+ if (that.getDictionariesInfo.kmPackCost && !this.$util.isEmpty(that.getDictionariesInfo.kmPackCost)){
|
|
|
|
|
+ for (const ele of that.getDictionariesInfo.kmPackCost) {
|
|
|
|
|
+ let flagWeight = ele.num?ele.num:0
|
|
|
|
|
+ if(Number(flagWeight)>=Number(weight)){
|
|
|
|
|
+ that.form.packCost = ele.amount?parseFloat(Number(ele.amount)):0
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //同城配送
|
|
|
|
|
+ that.form.packCost = res.data.packCost?parseFloat(res.data.packCost):0
|
|
|
|
|
+ }
|
|
|
that.lackExpend = res.data.lackExpend?parseFloat(res.data.lackExpend):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 : ''
|
|
|
|
|
|
|
@@ -543,6 +626,7 @@ export default {
|
|
|
sendTimeWant:this.sendTimeWant,
|
|
sendTimeWant:this.sendTimeWant,
|
|
|
sendCost:this.form.sendCost,
|
|
sendCost:this.form.sendCost,
|
|
|
sendType:this.form.sendType,
|
|
sendType:this.form.sendType,
|
|
|
|
|
+ transType:this.form.transType,
|
|
|
remark:this.remark,
|
|
remark:this.remark,
|
|
|
product:JSON.stringify(product),
|
|
product:JSON.stringify(product),
|
|
|
ghsId:this.ghsInfo.id,
|
|
ghsId:this.ghsInfo.id,
|
|
@@ -769,13 +853,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
.describe-view {
|
|
.describe-view {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
-
|
|
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
color: #333;
|
|
color: #333;
|
|
|
font-size: 24upx;
|
|
font-size: 24upx;
|
|
|
.price {
|
|
.price {
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
- font-size: 36upx;
|
|
|
|
|
|
|
+ font-size: 30upx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|