feat(shipping-notice): 实现滚动履约功能,优化发货通知流程与代码清理

清理废弃的ShippingCase相关代码与依赖,统一使用ShippingNotice直接关联客户数据。调整库存网关依赖规则,支持仅对库存满足或已人工放行的订单行生成发货Excel,实现滚动履约逻辑。
This commit is contained in:
hugo committed 2026-08-26 02:47:07 +08:00
1 parent 7cfd5d167e
commit 1e5aedb9ed
235 files changed
+11394 -9613

No files matched your search

@@ -34,6 +34,7 @@ const ACTION_CODE_TO_INTENT: Record<string, ShippingProcessingActionIntent> = {
adjudicate_duplicate: 'adjudicate_duplicate',
open_inventory_match_review: 'open_inventory_match_review',
open_shortage_review: 'open_shortage_review',
reload_inventory_result: 'reload_inventory_result',
retry_inventory_preparation: 'retry_inventory_preparation',
retry_inventory_matching: 'retry_inventory_matching',
reparse_batch: 'reparse_batch',
@@ -85,6 +86,7 @@ const ACTION_CODE_TO_INTENT: Record<string, ShippingProcessingActionIntent> = {
const AUTOMATING_STATUSES = new Set(['processing', 'automating', 'queued']);
/** 需要在聊天/右侧展示精确恢复动作文案的正式 action_code。 */
const RECOVERY_ACTION_CODES = new Set([
'reload_inventory_result',
'retry_inventory_preparation', 'retry_inventory_matching', 'retry_parse',
'retry_failed_documents', 'retry_failed_attachments', 'retry_freight_upload_rpa',
'retry_order_extraction', 'retry_layout_parsing', 'rematerialize_document',
@@ -129,6 +131,7 @@ const INTERNAL_INVENTORY_ACTION_CODES = new Set([
export function inventoryActionLabelKey(code: string | null | undefined): string | null {
const normalized = String(code || '').trim().toLowerCase();
const keyByCode: Record<string, string> = {
reload_inventory_result: 'workspace.shippingNotice.processGate.inventoryActions.reloadInventoryResult',
retry_inventory_preparation: 'workspace.shippingNotice.processGate.inventoryActions.retryInventoryPreparation',
retry_inventory_matching: 'workspace.shippingNotice.processGate.inventoryActions.retryInventoryMatching',
open_inventory_match_review: 'workspace.shippingNotice.processGate.inventoryActions.openInventoryMatchReview',