落地销售调价:按自然语言改价并单独记销售价,拉群和后台不再把调后价当成 TMS 原价。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -180,7 +180,8 @@ def send_air_brief_and_sheet(
|
||||
tms = dict(tms_quote) if tms_quote is not None else {}
|
||||
manual = dict(product_quote or {})
|
||||
if tms_quote is None:
|
||||
if view_q and not copy.quote_is_product(view_q):
|
||||
tms = copy.resolve_tms_quote(None, view)
|
||||
if not tms and view_q and copy.quote_is_tms(view_q):
|
||||
tms = view_q
|
||||
if not manual and copy.quote_is_product(override or view_q):
|
||||
manual = override or view_q
|
||||
@@ -389,6 +390,10 @@ def apply_air_quote(
|
||||
_park_air_pending(flow, no, quote, sender_id)
|
||||
send_group_text(client, chat_id, copy.group_ask_tms_or_product())
|
||||
return "wait_tms_choice"
|
||||
from agent.schema.quote_adjust import quote_fee_rows
|
||||
|
||||
if quote_fee_rows(current):
|
||||
quote = merge_quote_fees(current, quote)
|
||||
return _commit_quote(flow, ticket, quote, chat_id, sender_id)
|
||||
|
||||
|
||||
@@ -807,14 +812,11 @@ def _clear_air_pending(flow: Any, work_order_no: str, sender_id: str) -> None:
|
||||
|
||||
|
||||
def _has_tms_quote(quote: dict[str, Any]) -> bool:
|
||||
"""当前价来自 TMS 才要问;已经是航线/产品价不再替用户选。"""
|
||||
"""当前价来自 TMS 才要问;航线/产品/销售调价不再替用户选。"""
|
||||
src = dict(quote or {})
|
||||
label = str(src.get("source_label") or src.get("source") or "")
|
||||
if "航线" in label or "产品" in label:
|
||||
return False
|
||||
if not (src.get("total") or src.get("quoteId") or src.get("quote_id")):
|
||||
return False
|
||||
return "TMS" in label.upper() or "标准报价" in label or bool(src.get("quoteId") or src.get("quote_id"))
|
||||
return copy.quote_is_tms(src)
|
||||
|
||||
|
||||
def _is_product_quote(quote: dict[str, Any]) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user