From ddc5181bb8d3499fbcb3bb890820ef5e418b345e Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Wed, 17 Jun 2026 16:42:37 +0800
Subject: [PATCH] 1
---
package1/buyFood/buyFood.vue | 23 +++++++++++++---
package1/order/orderDetail.vue | 49 ++++++++++++++++++++++++++++++++--
2 files changed, 66 insertions(+), 6 deletions(-)
diff --git a/package1/buyFood/buyFood.vue b/package1/buyFood/buyFood.vue
index 3a6dac2..2b3e1c4 100644
--- a/package1/buyFood/buyFood.vue
+++ b/package1/buyFood/buyFood.vue
@@ -710,14 +710,22 @@
}
},
deliveryDurationMinutes() {
+ const transferDuration = Number(this.shopItem.transferDeliveryDuration);
+ const transferTime = this.shopItem.supportTransferDelivery == 1 && !isNaN(transferDuration) && transferDuration > 0 ? transferDuration : 0;
+ const cookingTime = Number(this.shopItem.shopTakeaway && this.shopItem.shopTakeaway.cookingTime ? this.shopItem.shopTakeaway.cookingTime : 0);
+ const validCookingTime = isNaN(cookingTime) || cookingTime < 0 ? 0 : cookingTime;
if (this.selected === 'shopDelivery') {
const selfDeliveryDuration = Number(this.shopItem.shopDeliveryDuration);
- const cookingTime = Number(this.shopItem.shopTakeaway && this.shopItem.shopTakeaway.cookingTime ? this.shopItem.shopTakeaway.cookingTime : 0);
- const validCookingTime = isNaN(cookingTime) || cookingTime < 0 ? 0 : cookingTime;
- return isNaN(selfDeliveryDuration) || selfDeliveryDuration <= 0 ? validCookingTime + 30 : validCookingTime + selfDeliveryDuration;
+ const baseTime = isNaN(selfDeliveryDuration) || selfDeliveryDuration <= 0 ? validCookingTime + 30 : validCookingTime + selfDeliveryDuration;
+ return baseTime + transferTime;
+ }
+ const baseValue = Number(this.shopItem.groupDeliveryBaseTime);
+ if (!isNaN(baseValue) && baseValue > 0) {
+ return baseValue + transferTime;
}
const value = Number(this.shopItem.groupDeliveryTime);
- return isNaN(value) || value < 25 ? 30 : value;
+ const baseTime = isNaN(value) ? validCookingTime + 30 : (this.shopItem.groupDeliveryTimeIncludesTransfer == 1 ? Math.max(0, value - transferTime) : value);
+ return baseTime + transferTime;
},
supportShopDelivery() {
return this.shopItem && this.shopItem.supportShopDelivery == 1 && this.shopItem.workerId;
@@ -1207,6 +1215,13 @@
payload.addressId = this.formData.address ? this.formData.address.id : null;
payload.getAreaId = this.shopItem.shopArea || null;
payload.putAreaId = this.formData.address ? this.formData.address.areaId : null;
+ if (this.shopItem.supportTransferDelivery == 1) {
+ payload.transferDelivery = 1;
+ payload.transferAddressId = this.shopItem.transferAddressId;
+ payload.transferAddressName = this.shopItem.transferAddressName;
+ } else {
+ payload.transferDelivery = 0;
+ }
}
payload.userCouponId = this.selectedCoupon ? this.selectedCoupon.id : null;
diff --git a/package1/order/orderDetail.vue b/package1/order/orderDetail.vue
index 4c12122..1532867 100644
--- a/package1/order/orderDetail.vue
+++ b/package1/order/orderDetail.vue
@@ -133,9 +133,11 @@
待支付
{{orderDetail.shopDelivery == 1 ? '等待商家配送接单' : '等待配送员接单'}}
- {{orderDetail.shopDelivery == 1 ? '商家配送已接单' : '配送员已接单'}}
+ {{orderDetail.shopDelivery == 1 ? '商家配送已接单' : '配送员已接单'}}
+ 等待商家送达中转点
+ 待配送员取货
待消费
- 配送员已取货
+ {{orderDetail.deliveryInfo && orderDetail.deliveryInfo.transferDelivery == 1 ? '中转配送中' : '配送员已取货'}}
订单已完成
等待同意退款
订单已取消
@@ -468,6 +470,29 @@
商家自配送
+
+
+ 中转配送
+
+
+ {{orderDetail.deliveryInfo.transferAddressName || orderDetail.transferAddressName}}
+
+
+
+
+ 送达中转点
+
+
+ {{orderDetail.deliveryInfo.transferArriveTime ? formatTimeText(orderDetail.deliveryInfo.transferArriveTime) : '未送达'}}
+
+
+
+ 中转图片
+
+
@@ -907,6 +932,26 @@
},
methods: {
+ formatTimeText(value) {
+ if (!value) return '';
+ if (value == '尽快送达') return '尽快送达';
+ const date = new Date(value);
+ if (isNaN(date.getTime())) return '';
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ const day = String(date.getDate()).padStart(2, '0');
+ const hour = String(date.getHours()).padStart(2, '0');
+ const minute = String(date.getMinutes()).padStart(2, '0');
+ const second = String(date.getSeconds()).padStart(2, '0');
+ return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+ },
+ previewImage(url) {
+ if (!url) return;
+ uni.previewImage({
+ current: url,
+ urls: [url]
+ });
+ },
isRefundPending(item) {
return item && (item.status == 0 || item.status == 3);
},