feat: 查看物流展示

This commit is contained in:
2026-08-06 15:39:41 +08:00
parent 497babbc3d
commit b8bcd46f1d
5 changed files with 124 additions and 8 deletions
+39 -2
View File
@@ -106,11 +106,16 @@
:status="Number(state.orderInfo.status)"
:disableDelayShipment="isPickUpOrder || !isAiStoreOrder"
:hasDelayedItems="hasDelayedItems"
:logisticsId="state.orderInfo.logisticsId"
:logisticsNo="state.orderInfo.logisticsNo"
:deliveryTime="state.orderInfo.deliveryTime"
:hasLogistics="hasLogistics"
@delay="delayShipment"
@now="nowShipment"
@confirm="confirmReceiveOrder"
@pay="goPay"
@cancel="cancelAiOrder"
@express="goExpressLog"
/>
<card_orderBan
v-else
@@ -229,14 +234,34 @@
return records.some((record) => Number(record?.status) === 1);
});
const hasLogistics = computed(() => {
const info = state.orderInfo || {};
if (Number(info.logisticsId) > 0) return true;
if (info.logisticsNo && String(info.logisticsNo).trim()) return true;
if (info.deliveryTime) return true;
const items = Array.isArray(info.items) ? info.items : [];
for (const item of items) {
if (Number(item?.logisticsId) > 0) return true;
if (item?.logisticsNo && String(item.logisticsNo).trim()) return true;
if (item?.deliveryTime) return true;
const subItems = Array.isArray(item?.items) ? item.items : [];
for (const sub of subItems) {
if (Number(sub?.logisticsId) > 0) return true;
if (sub?.logisticsNo && String(sub.logisticsNo).trim()) return true;
if (sub?.deliveryTime) return true;
}
}
return false;
});
const showBottomBar = computed(() => {
if (!isAiActionOrder.value) return true;
const status = Number(state.orderInfo?.status);
if ([0, 20].includes(status)) return true;
if ([0, 15, 20].includes(status)) return true;
if (!isAiStoreOrder.value) return false;
if (isPickUpOrder.value) return false;
if (hasDelayedItems.value) return true;
return [10, 50, 70].includes(status);
return [10, 15, 50, 70].includes(status);
});
const resolvePickUpStoreId = (data = {}) => {
@@ -444,6 +469,18 @@
});
};
const goExpressLog = () => {
const id = resolveAiOrderId(state.orderInfo);
if (!id) {
uni.showToast({
title: '订单信息异常',
icon: 'none',
});
return;
}
sheep.$router.go('/pages/order/express/log', { id });
};
const cancelAiOrder = () => {
const id = resolveAiOrderId(state.orderInfo);
if (!id) return;