feat(shipping-notice): 实现滚动履约功能,优化发货通知流程与代码清理
清理废弃的ShippingCase相关代码与依赖,统一使用ShippingNotice直接关联客户数据。调整库存网关依赖规则,支持仅对库存满足或已人工放行的订单行生成发货Excel,实现滚动履约逻辑。
This commit is contained in:
1 parent
7cfd5d167e
commit
1e5aedb9ed
235 files changed
+11394
-9613
No files matched your search
@@ -147,7 +147,6 @@ def resolve_task_ui_state_from_fields(
|
||||
*,
|
||||
review_status: str | None,
|
||||
pending_human_reason: str | None,
|
||||
shipping_case_id: int | None,
|
||||
customer_resolution_status: str | None,
|
||||
order_snapshot_id: int | None,
|
||||
inventory_lines_json: Any,
|
||||
@@ -188,7 +187,7 @@ def resolve_task_ui_state_from_fields(
|
||||
if reason == PH_NOTICE_TEXT_EXTRACTION_FAILED:
|
||||
return _task_ui_state(CP_NOTICE_TEXT_EXTRACTION_FAILED)
|
||||
|
||||
if shipping_case_id is not None and customer_resolution_status != "confirmed":
|
||||
if str(customer_resolution_status or "").strip().lower() in {"pending", "needs_review", "failed", "unresolved"}:
|
||||
return _task_ui_state(CP_CUSTOMER_REVIEW)
|
||||
|
||||
# [STEP 3] 库存、Excel 与上传只能消费冻结快照;冻结由自动推进或任务工作台执行。
|
||||
@@ -254,7 +253,6 @@ def resolve_task_ui_state(task: ShippingNotice) -> TaskUiState:
|
||||
return resolve_task_ui_state_from_fields(
|
||||
review_status=task.review_status,
|
||||
pending_human_reason=task.pending_human_reason,
|
||||
shipping_case_id=task.shipping_case_id,
|
||||
customer_resolution_status=task.customer_resolution_status,
|
||||
order_snapshot_id=task.order_snapshot_id,
|
||||
inventory_lines_json=task.inventory_lines_json,
|
||||
|
||||
Reference in new issue
Block a user