feat(shipping-notice): 支持已确认订单改绑客户并重冻结快照

- 客户识别面板两态化:已识别折叠为摘要条 +「修改客户」入口,前端管控复用编辑窗头级谓词
- 新增 rebind_confirmed_customer 链路:守卫→更新 resolution 行→审计→手动重冻结,改后重新生成 Excel
- 守卫保证仅在无发货通知/Excel 产物时可改,匹配与门禁零触碰、无失效连锁
- 路由引擎/建单资格/编辑窗服务同步适配,errors 补充改绑错误码四语言
- 同步客户面板测试、确认对话框与四语言文案,落设计与实施计划文档
This commit is contained in:
hugo committed 2026-10-13 21:13:58 +08:00
1 parent 4a726fe8b2
commit 6ac2effac3
30 files changed
+1913 -93

No files matched your search

@@ -1162,6 +1162,13 @@ def _build_stage_context(
}
def _build_edit_window(task: ShippingNotice) -> dict[str, Any]:
"""二期编辑窗(D10)谓词:header/lines 可编辑矩阵,工作台以此隐藏/禁用出单入口。"""
from app.services.shipping_notice import order_edit_window_service as order_edit_window
return order_edit_window.editable_scope(task)
def build_task_ui_state(
task: ShippingNotice,
*,
@@ -1269,6 +1276,10 @@ def build_task_ui_state(
)
if include_stage_context else None
)
edit_window = (
_build_edit_window(task)
if include_stage_context else None
)
reason = None
if isinstance(process_gate, dict) and process_gate.get("blocking_reason_code"):
reason = {
@@ -1290,6 +1301,9 @@ def build_task_ui_state(
"actions": actions,
# 仅正式详情按需返回的工作面只读事实;不产生状态、权限或动作。
**({'stage_context': stage_context} if stage_context is not None else {}),
# 二期编辑窗门控矩阵(无 Export Artifact 且无活动 Attempt 才可编辑);
# 波次出单工具条与字段编辑守卫的数据源,禁止再次静默丢失。
**({'edit_window': edit_window} if edit_window is not None else {}),
"reason": reason,
# OT 与 Notice 字段不完全同构:禁止硬读 Notice 专属列。
"lifecycle_status": getattr(task, "lifecycle_status", None) or getattr(task, "status", None),