角色业务范围收紧工单与模板;报价日期不当费用;未选舱不迁已报价;另开一票可清违禁 hold

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-10-15 21:00:01 +08:00
co-authored by Cursor
parent a0c705683f
commit 277cdc1c28
39 changed files with 2083 additions and 217 deletions
+7 -2
View File
@@ -931,12 +931,13 @@ def apply_product_quote(
sess.collab_facts = merged
line = str(view.get("business_line") or view.get("businessLine") or "").strip().upper()
base = _current_quote(view, sess)
baseline_ccy = _quote_currency_hint(base)
quote = extract_product_quote(
text,
injected=injected_quote,
business_line=line,
transport_mode="陆运" if line == "LAND" else ("海运" if line == "SEA" else ""),
baseline_currency=_quote_currency_hint(base),
baseline_currency=baseline_ccy,
)
if not quote:
logger.info("产品报价未识别 wo=%s text=%s", no, (text or "")[:200])
@@ -1644,9 +1645,13 @@ def _merged_total(
总销售价:有 TMS 原合计就按改价差额加减,不能只加产品改的那几行。
美元行已含在 TMS 人民币合计里,不擅自换汇;只调整和合计同币种的差额。
产品正文已点币种(如 RMB→CNY)时,表头跟产品,禁止 TMS HKD 再盖回去(WO040)。
"""
src = dict(base or {})
header_ccy = str(src.get("currency") or incoming.get("currency") or "").strip()
# 产品显式币种优先:否则「1RMB/KG」合并后表头仍停在 TMS HKD。
header_ccy = str(incoming.get("currency") or src.get("currency") or "").strip()
if header_ccy.upper() == "RMB":
header_ccy = "CNY"
base_total = _parse_fee_amount(src.get("total"))
if base_total is not None:
total_ccy = (header_ccy or "CNY").upper()