员工岗位可重新启用;调价认空运航线;会话存档跳号补拉;陆运报价按车型列回填

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-10-28 19:48:47 +08:00
co-authored by Cursor
parent 2b528758b4
commit 56ba8e93b5
62 changed files with 2960 additions and 793 deletions
+13 -1
View File
@@ -87,7 +87,10 @@ def _reply_apply_messages(result, reply) -> None:
def _emit_private_card(flow: Any, sess: Any, reply) -> None:
"""新价格明细卡:海运/陆运带拉群,空运只带跳过协同。"""
"""新价格明细卡:海运/陆运带拉群,空运只带跳过协同。
空运货物信息用工单 facts(起运地/品名等);不传会整段变成「-」。
"""
line = (sess.business_line or "").upper()
no = sess.work_order_no
quote = dict(sess.quote or {})
@@ -95,6 +98,7 @@ def _emit_private_card(flow: Any, sess: Any, reply) -> None:
quote["business_line"] = line
first = getattr(sess, "first_or_same", "first") or "first"
history = getattr(sess, "history_work_order_no", "") or ""
facts = {str(k): str(v) for k, v in dict(getattr(sess, "facts", None) or {}).items()}
if line in {"SEA", "LAND"} and hasattr(flow, "_emit_sea_hit"):
sess.allowed = (copy.BTN_PULL_COLLAB, copy.BTN_SKIP_COLLAB)
flow._emit_sea_hit(
@@ -114,6 +118,7 @@ def _emit_private_card(flow: Any, sess: Any, reply) -> None:
reply,
work_order_no=no,
quote=quote,
facts=facts,
first_or_same=first,
history_work_order_no=history,
status="已报价",
@@ -210,6 +215,13 @@ def try_private_adjust(
sess.quote = persist
sess.status = "已报价"
sess.phase = "wait_collab"
# 必须先写回允许点的按钮再存书签。若等 emit 后再改 allowed,
# Worker 重启后会读到空 allowed,销售点「生成报价单」会被静默丢掉。
line = (str(getattr(sess, "business_line", "") or "")).upper()
if line in {"SEA", "LAND"}:
sess.allowed = (copy.BTN_PULL_COLLAB, copy.BTN_SKIP_COLLAB)
else:
sess.allowed = (copy.BTN_SKIP_COLLAB,)
sess.wait_version += 1
flow._save(sess)
_emit_private_card(flow, sess, reply)