feat: add kuaidi100 logistics sync
This commit is contained in:
@@ -63,6 +63,10 @@ const materialItems = computed(() => detail.value.materials || []);
|
||||
const hasReturnAddress = computed(() => Boolean(detail.value.return_address));
|
||||
const hasReturnLogistics = computed(() => Boolean(detail.value.return_logistics?.tracking_no));
|
||||
const returnReceived = computed(() => detail.value.return_logistics?.tracking_status === "received");
|
||||
const returnLogisticsNodes = computed(() => detail.value.return_logistics?.nodes || []);
|
||||
const returnLogisticsStatusText = computed(
|
||||
() => detail.value.return_logistics?.provider_status_text || detail.value.return_logistics?.tracking_status_text || "",
|
||||
);
|
||||
const canEditReturnAddress = computed(() => detail.value.order_info.can_edit_return_address);
|
||||
|
||||
const heroTagClass = computed(() => {
|
||||
@@ -459,7 +463,7 @@ onShow(fetchDetail);
|
||||
<view v-if="detail.return_logistics" id="return-logistics-card" class="return-logistics-card">
|
||||
<view class="return-logistics-card__top">
|
||||
<view class="return-logistics-card__title">回寄物流</view>
|
||||
<text class="detail-chip">{{ detail.return_logistics.tracking_status_text }}</text>
|
||||
<text class="detail-chip">{{ returnLogisticsStatusText || detail.return_logistics.tracking_status_text }}</text>
|
||||
</view>
|
||||
<view class="report-meta__row">
|
||||
<text class="report-meta__label">快递公司</text>
|
||||
@@ -473,6 +477,27 @@ onShow(fetchDetail);
|
||||
<text class="report-meta__label">最新进展</text>
|
||||
<text class="report-meta__value">{{ detail.return_logistics.latest_desc || "待平台登记回寄运单" }}</text>
|
||||
</view>
|
||||
<view v-if="returnLogisticsStatusText" class="report-meta__row">
|
||||
<text class="report-meta__label">快递状态</text>
|
||||
<text class="report-meta__value">{{ returnLogisticsStatusText }}</text>
|
||||
</view>
|
||||
<view v-if="returnLogisticsNodes.length" class="compact-timeline return-logistics-card__timeline">
|
||||
<view
|
||||
v-for="(item, index) in returnLogisticsNodes"
|
||||
:key="`${item.node_time}-${item.node_desc}`"
|
||||
:class="['compact-timeline__item', index === 0 ? 'compact-timeline__item--current' : '']"
|
||||
>
|
||||
<view class="compact-timeline__rail"></view>
|
||||
<view class="compact-timeline__dot"></view>
|
||||
<view class="compact-timeline__content">
|
||||
<view class="compact-timeline__row">
|
||||
<text class="compact-timeline__title">{{ item.node_desc }}</text>
|
||||
<text class="compact-timeline__time">{{ item.node_time }}</text>
|
||||
</view>
|
||||
<view v-if="item.node_location" class="compact-timeline__desc">{{ item.node_location }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -770,6 +795,10 @@ onShow(fetchDetail);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.return-logistics-card__timeline {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.return-address-card__address,
|
||||
.return-address-sheet__item-address {
|
||||
margin-top: 14rpx;
|
||||
|
||||
Reference in New Issue
Block a user