Fix(订单):预计送达时间不显示问题
This commit is contained in:
@@ -30,20 +30,19 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- <view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因:{{ orderInfo.refundRejectReason }}</view> -->
|
<!-- <view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因:{{ orderInfo.refundRejectReason }}</view> -->
|
||||||
<view v-if="orderInfo.deliveryId !== null && (orderInfo._status._type == -1 || orderInfo._status._type == -2 || orderInfo._status._type == 4 || orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1))">
|
<view v-if="orderInfo.deliveryId !== null && (orderInfo._status._type == -1 || orderInfo._status._type == -2 || orderInfo._status._type == 4 || orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1))">
|
||||||
<view v-if="index < 2 || showMoreDeliver" v-for="(delivery, index) in orderInfo.deliveryInfo" :key="index" class="v12-radius-20 v12-white v12-pa-3 v12-mt-4">
|
<view
|
||||||
|
v-for="(delivery, index) in orderInfo.deliveryInfo"
|
||||||
|
:key="index"
|
||||||
|
:class="{
|
||||||
|
'order-deliver-item-show': index < 2 || showMoreDeliver
|
||||||
|
}"
|
||||||
|
class="v12-radius-20 v12-white v12-pa-3 v12-mt-4"
|
||||||
|
>
|
||||||
<view class="v12-align-center">
|
<view class="v12-align-center">
|
||||||
<text class="v12-secondary-dark-text v12-font-28">{{ delivery.deliveryName }}:{{ delivery.deliveryId }}</text>
|
<text class="v12-secondary-dark-text v12-font-28">{{ delivery.deliveryName }}:{{ delivery.deliveryId }}</text>
|
||||||
<text class="v12-font-22 v12-px-2 v12-py-1 v12-ml-1 v12-primary-text v12-primary-border v12-radius-40" @click="copyClipboard(delivery.deliveryId)">
|
<text class="v12-font-22 v12-px-2 v12-py-1 v12-ml-1 v12-primary-text v12-primary-border v12-radius-40" @click="copyClipboard(delivery.deliveryId)">
|
||||||
复制
|
复制
|
||||||
</text>
|
</text>
|
||||||
<view
|
|
||||||
class="v12-font-26 time-box"
|
|
||||||
:style="{
|
|
||||||
color: '#297EE0;',
|
|
||||||
}">
|
|
||||||
<image :src="webUrl+'/orderIcon/787.png'" class="time-bg"></image>
|
|
||||||
{{ orderInfo._status._type === 2 ? getDay(orderInfo.orderId, delivery) : '' }} {{ delivery.estimatedTime || '' }}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-mt-2 v12-justify-between" @click="goLogistics(orderInfo, index)">
|
<view class="v12-mt-2 v12-justify-between" @click="goLogistics(orderInfo, index)">
|
||||||
<view class="v12-align-center">
|
<view class="v12-align-center">
|
||||||
@@ -56,8 +55,18 @@
|
|||||||
<uni-icons type="right" size="20" color="#707070"></uni-icons>
|
<uni-icons type="right" size="20" color="#707070"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-mt-2">
|
<view class="v12-mt-2 time-wrap">
|
||||||
<text class="v12-dark-text v12-font-24">{{ logistics[index] && logistics[index].Traces && logistics[index].Traces.length > 0 ? logistics[index] && logistics[index].Traces[logistics[index].Traces.length - 1].acceptTime : '' }}</text>
|
<text class="v12-dark-text v12-font-24">{{ logistics[index] && logistics[index].Traces && logistics[index].Traces.length > 0 ? logistics[index] && logistics[index].Traces[logistics[index].Traces.length - 1].acceptTime : '' }}</text>
|
||||||
|
<view
|
||||||
|
v-if="delivery.estimatedTime"
|
||||||
|
:style="{
|
||||||
|
color: '#297EE0;',
|
||||||
|
}"
|
||||||
|
class="v12-font-26 time-box"
|
||||||
|
>
|
||||||
|
<image :src="webUrl+'/orderIcon/787.png'" class="time-bg"></image>
|
||||||
|
{{ delivery.estimatedTime }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-center v12-mt-3" v-if="orderInfo.deliveryInfo.length > 2">
|
<view class="v12-justify-center v12-mt-3" v-if="orderInfo.deliveryInfo.length > 2">
|
||||||
@@ -554,7 +563,7 @@ export default {
|
|||||||
pageKeyId: Object.freeze('userOrderInfo'),
|
pageKeyId: Object.freeze('userOrderInfo'),
|
||||||
logistics: {},
|
logistics: {},
|
||||||
isGift: false,
|
isGift: false,
|
||||||
loading: false
|
loading: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -620,16 +629,17 @@ export default {
|
|||||||
title: '您已催促成功,商家正在抓紧备货'
|
title: '您已催促成功,商家正在抓紧备货'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDay(id, delivery) {
|
// 获取预计送达时间
|
||||||
|
getDay(delivery, index) {
|
||||||
const params = {
|
const params = {
|
||||||
orderId: id,
|
orderId: this.orderInfo.orderId,
|
||||||
deliveryId: delivery.deliveryId,
|
deliveryId: delivery.deliveryId,
|
||||||
deliverySn: delivery.deliverySn
|
deliverySn: delivery.deliverySn
|
||||||
}
|
}
|
||||||
orderExpectedArrivalTime(params).then(res => {
|
orderExpectedArrivalTime(params).then(res => {
|
||||||
if(res.success) {
|
if(res.success) {
|
||||||
// this.orderInfo.expectedArrivalTime = res.data
|
this.orderInfo.deliveryInfo[index].estimatedTime = res.data.deliveryTime || ''
|
||||||
delivery.estimatedTime = res.data.deliveryTime || ''
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -734,14 +744,6 @@ export default {
|
|||||||
query: { id: cart.unique }
|
query: { id: cart.unique }
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goOrderDetails(order) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/order/OrderDetails/index",
|
|
||||||
query: {
|
|
||||||
id: order.orderId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goRoom(order) {
|
goRoom(order) {
|
||||||
const params = {
|
const params = {
|
||||||
goodsId: order.cartInfo[0].productId,
|
goodsId: order.cartInfo[0].productId,
|
||||||
@@ -1021,7 +1023,11 @@ export default {
|
|||||||
const orderInfo = this.orderInfo
|
const orderInfo = this.orderInfo
|
||||||
if(orderInfo._status._type == -1 || orderInfo._status._type == -2 || orderInfo._status._type == 4 || orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)) {
|
if(orderInfo._status._type == -1 || orderInfo._status._type == -2 || orderInfo._status._type == 4 || orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)) {
|
||||||
for(let i = 0; i < orderInfo.deliveryInfo.length; i++) {
|
for(let i = 0; i < orderInfo.deliveryInfo.length; i++) {
|
||||||
|
orderInfo.deliveryInfo[i].estimatedTime = ''
|
||||||
this.getExpressInfo(orderInfo.deliveryInfo[i], i)
|
this.getExpressInfo(orderInfo.deliveryInfo[i], i)
|
||||||
|
if (orderInfo._status._type === 2) {
|
||||||
|
this.getDay(orderInfo.deliveryInfo[i], i)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1299,4 +1305,12 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
.order-deliver-item-show {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.time-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user