feat(shipping-notice): 添加货代履约策略管理功能,支持策略创建、发布及版本控制,增强订单冻结和预约管理逻辑

This commit is contained in:
hugo committed 2026-07-23 12:06:34 +08:00
1 parent abd8fc1e16
commit d62f5107b2
82 files changed
+4914 -514

No files matched your search

@@ -126,6 +126,18 @@ const statusLabel = computed(() => {
<div v-if="match.matchedFields?.length" class="mt-1 text-xs text-muted">
{{ t('chat.shippingNoticeDuplicateMatchFields', { fields: match.matchedFields.join(', ') }) }}
</div>
<div v-if="match.reservationDifferences?.length" class="mt-2 space-y-1 border-t border-default pt-2 text-xs">
<p class="font-medium text-amber-700">{{ t('chat.shippingNoticeRevisionDifferences') }}</p>
<p v-for="difference in match.reservationDifferences" :key="difference.reservationId">
{{ t('chat.shippingNoticeRevisionDifference', {
reservation: difference.reservationId,
previousPart: difference.previous.partNumber,
previousQty: difference.previous.qty,
proposedPart: difference.proposed.partNumber,
proposedQty: difference.proposed.qty,
}) }}
</p>
</div>
</div>
<div class="mt-4 space-y-2">
@@ -151,6 +151,17 @@ export function mapServerCandidate(remote: ShippingNoticeCandidateResponse): Shi
matchType: item.match_type,
matchedFields: listSafe(item.matched_fields),
createdAt: item.created_at,
reservationDifferences: (item.reservation_differences || []).map((difference) => ({
reservationId: difference.reservation_id,
previous: {
partNumber: difference.previous.part_number,
qty: difference.previous.qty,
},
proposed: {
partNumber: difference.proposed.part_number,
qty: difference.proposed.qty,
},
})),
})),
allowedActions: (remote.duplicate.allowed_actions || []) as ShippingDuplicateAction[],
}
@@ -716,6 +716,11 @@ export interface ShippingDuplicateMatch {
matched_fields: string[];
lifecycle?: string;
created_at?: string;
reservation_differences?: Array<{
reservation_id: string;
previous: { part_number: string; qty: string };
proposed: { part_number: string; qty: string };
}>;
}
export interface ShippingDuplicateResult {
@@ -52,6 +52,11 @@ export interface ShippingDuplicateMatch {
matchType: string;
matchedFields: string[];
createdAt?: string;
reservationDifferences?: Array<{
reservationId: string;
previous: { partNumber: string; qty: string };
proposed: { partNumber: string; qty: string };
}>;
}
export interface ShippingDuplicateResult {