|
|
@@ -37,6 +37,20 @@
|
|
|
</view>
|
|
|
<view class="select-item_box" v-if="form.sendType == 2">
|
|
|
<view v-if="openIntraCity == 1" class="delivery-section">
|
|
|
+ <!-- 客户地址 -->
|
|
|
+ <view class="select-item_box" style="display: flex; align-items: center; border-bottom:1upx solid #eee; margin-bottom:3upx;">
|
|
|
+ <view class="title">客户地址</view>
|
|
|
+ <view class="address-box">
|
|
|
+ <view v-if="$util.isEmpty(custom.long) || $util.isEmpty(custom.lat) || $util.isEmpty(custom.address)" class="addr-main" style="color: red; font-size: 11upx;">
|
|
|
+ 客户地址不完善,请修改
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <view class="addr-main">{{ custom.address }}</view>
|
|
|
+ <view class="addr-sub">{{ custom.showAddress }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 跑腿平台报价列表 -->
|
|
|
<view class="select-item_box" v-if="deliveryQuotes.length > 0">
|
|
|
<!-- <view class="title">选择跑腿</view> -->
|
|
|
@@ -313,6 +327,10 @@ export default {
|
|
|
type: Number,
|
|
|
default: 0
|
|
|
},
|
|
|
+ custom:{
|
|
|
+ type:Object,
|
|
|
+ default:()=>{}
|
|
|
+ },
|
|
|
customId:{
|
|
|
type:Number,
|
|
|
default:0
|
|
|
@@ -346,6 +364,9 @@ export default {
|
|
|
price = parseFloat(price.toFixed(2))
|
|
|
}
|
|
|
return Number(price)
|
|
|
+ },
|
|
|
+ isAddressInvalid() {
|
|
|
+ return this.$util.isEmpty(this.custom.long) || this.$util.isEmpty(this.custom.lat) || this.$util.isEmpty(this.custom.address)
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
|
@@ -398,6 +419,9 @@ export default {
|
|
|
|
|
|
this.weightDebounceTimer = setTimeout(() => {
|
|
|
if (newVal && Number(newVal) > 0 && this.form.sendType == 2) {
|
|
|
+ if (this.isAddressInvalid) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.getDeliveryQuotes();
|
|
|
}
|
|
|
}, 1000);
|
|
|
@@ -408,6 +432,9 @@ export default {
|
|
|
this.clearDeliveryList();
|
|
|
}
|
|
|
if (this.form.sendType == 2) {
|
|
|
+ if (this.isAddressInvalid) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.getDeliveryQuotes();
|
|
|
}
|
|
|
},
|
|
|
@@ -418,6 +445,9 @@ export default {
|
|
|
this.clearDeliveryList();
|
|
|
}
|
|
|
if (this.form.sendType == 2) {
|
|
|
+ if (this.isAddressInvalid) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.getDeliveryQuotes();
|
|
|
}
|
|
|
},
|
|
|
@@ -453,7 +483,6 @@ export default {
|
|
|
if(Number(this.balance)>Number(this.form.modifyPrice)){
|
|
|
this.changeHasPay(4)
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
confirmDiff(){
|
|
|
@@ -547,6 +576,11 @@ export default {
|
|
|
this.$msg('请先选择客户');
|
|
|
return false;
|
|
|
}
|
|
|
+ if (this.isAddressInvalid) {
|
|
|
+ this.$msg('客户地址不完善,无法发跑腿');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
quickOrderAllDeliveryQuotes({
|
|
|
totalPrice: this.allPrice,
|
|
|
weight: this.form.weight || 1,
|
|
|
@@ -979,4 +1013,21 @@ export default {
|
|
|
color: #3385FF;
|
|
|
margin-left: 5upx;
|
|
|
}
|
|
|
+.address-box {
|
|
|
+ flex: 1;
|
|
|
+ text-align: center;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .addr-main {
|
|
|
+ font-size: 10upx;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ .addr-sub {
|
|
|
+ font-size: 8upx;
|
|
|
+ color: #999;
|
|
|
+ margin-top: 2upx;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|