|
|
|
@ -431,7 +431,7 @@ |
|
|
|
<view class="qu-left"> |
|
|
|
{{item.receiverAddress != null ? item.receiverAddress : ''}} |
|
|
|
</view> |
|
|
|
<view class="qu-right"> |
|
|
|
<view class="qu-right" v-if="shouldShowReceiverPhoneIcon(item)"> |
|
|
|
<img @tap.stop="makeCall(item.receiverPhone)" |
|
|
|
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png" |
|
|
|
alt="" style="width: 55rpx;height: 55rpx;" /> |
|
|
|
@ -452,6 +452,14 @@ |
|
|
|
v-if="item.deliveryFeeMarketplace > 0">(包含¥{{item.deliveryFeeMarketplace}}平台奖励佣金)</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="delivery-time-warning" v-if="isNearMustFinishTime(item)"> |
|
|
|
<view class="delivery-time-warning-text"> |
|
|
|
{{getMustFinishWarningText(item)}} |
|
|
|
</view> |
|
|
|
<img v-if="item.receiverPhone" @tap.stop="makeCall(item.receiverPhone)" |
|
|
|
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png" |
|
|
|
alt="" class="delivery-time-warning-phone" /> |
|
|
|
</view> |
|
|
|
<view class="beizhu" v-if="item.remark != null && item.remark != ''"> |
|
|
|
备注:{{item.remark}} |
|
|
|
</view> |
|
|
|
@ -784,6 +792,8 @@ |
|
|
|
putshopArea: [], |
|
|
|
totalPages: 1, |
|
|
|
deliveryQueryVersion: 0, |
|
|
|
deliveryNowTime: Date.now(), |
|
|
|
deliveryTimer: null, |
|
|
|
swipeOrderLowPerf: false, |
|
|
|
swipeOrderDefaultStyle: { |
|
|
|
progress: 'transform: translate3d(0, 0, 0) scaleX(0); transition: transform 0.14s ease-out;', |
|
|
|
@ -895,6 +905,7 @@ |
|
|
|
this.getDelivery(); |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
this.startDeliveryTimeTimer() |
|
|
|
if (option && option.tabIndex !== undefined) { |
|
|
|
const tabIndex = Number(option.tabIndex) |
|
|
|
if (!isNaN(tabIndex) && tabIndex > 0) { |
|
|
|
@ -1193,6 +1204,47 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
shouldShowReceiverPhoneIcon(item) { |
|
|
|
return !!(item && item.workerId) |
|
|
|
}, |
|
|
|
parseDeliveryTime(value) { |
|
|
|
if (!value) return NaN |
|
|
|
if (typeof value === 'number') { |
|
|
|
return String(value).length === 10 ? value * 1000 : value |
|
|
|
} |
|
|
|
const timeText = String(value).trim() |
|
|
|
if (!timeText) return NaN |
|
|
|
const nativeParsedTime = new Date(timeText).getTime() |
|
|
|
if (!isNaN(nativeParsedTime)) return nativeParsedTime |
|
|
|
const timeOnlyMatch = timeText.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/) |
|
|
|
if (timeOnlyMatch) { |
|
|
|
const currentDate = new Date(this.deliveryNowTime || Date.now()) |
|
|
|
currentDate.setHours(Number(timeOnlyMatch[1]), Number(timeOnlyMatch[2]), Number(timeOnlyMatch[3] || 0), 0) |
|
|
|
return currentDate.getTime() |
|
|
|
} |
|
|
|
const parsedTime = new Date(timeText.replace(/-/g, '/')).getTime() |
|
|
|
return parsedTime |
|
|
|
}, |
|
|
|
isNearMustFinishTime(item) { |
|
|
|
if (!item || !item.mustFinishTime) return false |
|
|
|
const mustFinishTime = this.parseDeliveryTime(item.mustFinishTime) |
|
|
|
if (isNaN(mustFinishTime)) return false |
|
|
|
return mustFinishTime - this.deliveryNowTime <= 10 * 60 * 1000 |
|
|
|
}, |
|
|
|
getMustFinishWarningText(item) { |
|
|
|
const mustFinishTime = this.parseDeliveryTime(item && item.mustFinishTime) |
|
|
|
if (!isNaN(mustFinishTime) && this.deliveryNowTime > mustFinishTime) { |
|
|
|
return '已超过用户要求送达时间,为避免纠纷,建议和用户沟通是否继续接单配送' |
|
|
|
} |
|
|
|
return '已经临近用户要求送达时间,为避免纠纷,建议和用户沟通是否继续接单配送。' |
|
|
|
}, |
|
|
|
startDeliveryTimeTimer() { |
|
|
|
this.deliveryNowTime = Date.now() |
|
|
|
if (this.deliveryTimer) return |
|
|
|
this.deliveryTimer = setInterval(() => { |
|
|
|
this.deliveryNowTime = Date.now() |
|
|
|
}, 60 * 1000) |
|
|
|
}, |
|
|
|
isSwipeOrderActive(item, index) { |
|
|
|
if (!item) return false |
|
|
|
return this.swipeOrder.id === item.id && this.swipeOrder.index === index && this.swipeOrder.progress > 0 |
|
|
|
@ -2123,7 +2175,6 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.order-notice-wrap { |
|
|
|
// background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 255, 250, 0.72) 100%); |
|
|
|
position: relative; |
|
|
|
top:10rpx; |
|
|
|
z-index: 3; |
|
|
|
@ -2138,7 +2189,7 @@ |
|
|
|
border: 1px solid rgba(255, 255, 255, 0.82); |
|
|
|
background: |
|
|
|
radial-gradient(circle at 88% 8%, rgba(166, 255, 234, 0.24) 0, rgba(166, 255, 234, 0) 130rpx), |
|
|
|
linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(247, 255, 251, 0.76)); |
|
|
|
linear-gradient(135deg, #ffffff, #f7fffb); |
|
|
|
box-shadow: 0 20rpx 46rpx rgba(0, 35, 28, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.68); |
|
|
|
z-index: 99; |
|
|
|
position: absolute; |
|
|
|
@ -4055,6 +4106,33 @@ |
|
|
|
color: rgba(255, 57, 57, 1); |
|
|
|
} |
|
|
|
|
|
|
|
.delivery-time-warning { |
|
|
|
width: 95%; |
|
|
|
margin: 20rpx auto 0; |
|
|
|
padding: 18rpx 20rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: space-between; |
|
|
|
background: rgba(255, 117, 88, 0.08); |
|
|
|
border: 1px solid rgba(255, 117, 88, 0.18); |
|
|
|
border-radius: 20rpx; |
|
|
|
color: rgba(255, 57, 57, 1); |
|
|
|
font-size: 24rpx; |
|
|
|
line-height: 36rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.delivery-time-warning-text { |
|
|
|
flex: 1; |
|
|
|
padding-right: 18rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.delivery-time-warning-phone { |
|
|
|
width: 55rpx; |
|
|
|
height: 55rpx; |
|
|
|
flex-shrink: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.title-sort { |
|
|
|
height: 100rpx; |
|
|
|
display: flex; |
|
|
|
|