重启后仍能跳过协同出方案,未成交可同一句带原因;海陆有价卡改为直接生成报价单。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-23 18:45:28 +08:00
co-authored by Cursor
parent 378bb892b3
commit 84207bb4e5
18 changed files with 414 additions and 32 deletions
@@ -89,6 +89,9 @@ class SeaTextInquiryFlow(AirTextInquiryFlow):
reply=reply,
card_meta=inbound_raw,
)
oral_lost = self.try_deal_oral(sess, text, reply, inbound_raw)
if oral_lost:
return oral_lost
# 未成交后下一句任意文字即原因,不能先抽字段当成新询价。
if (
sess
@@ -389,6 +392,11 @@ class SeaTextInquiryFlow(AirTextInquiryFlow):
sess = super()._session_from_ledger(sender_id=sender_id, view=view)
if sess.business_line in {"SEA", "LAND"} and sess.phase == "wait_collab":
sess.allowed = (copy.BTN_PULL_COLLAB, copy.BTN_SKIP_COLLAB)
if sess.business_line in {"SEA", "LAND"} and sess.phase == "wait_adopt":
# 陆运/海运未出文件时主账也可能收成方案卡;手机上拉群/跳过协同仍有效。
keep = tuple(sess.allowed or ())
head = (copy.BTN_PULL_COLLAB, copy.BTN_SKIP_COLLAB)
sess.allowed = tuple(dict.fromkeys(head + keep))
if sess.business_line in {"SEA", "LAND"} and sess.phase == "tms_miss":
sess.allowed = (copy.BTN_PULL_COLLAB,)
sess.collab_chat_id = str(view.get("collab_chat_id") or "")