陆运多条线路按段展示 TMS 费用名和时效,选定后再写回该条成本。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-22 18:28:29 +08:00
co-authored by Cursor
parent e769eb9c1d
commit 49faa35f47
23 changed files with 2323 additions and 55 deletions
+18 -3
View File
@@ -144,9 +144,24 @@ class HttpLedger:
quote: dict[str, Any],
to_status: str = "",
) -> dict[str, Any]:
# 有价时主账 query 已写快照并迁「已报价」;此处只做幂等确认,避免二次假写入。
_ = (work_order_no, quote, to_status)
return {"ok": True, "quote_version": 1, "status": to_status or "已报价"}
"""
覆盖本单最新 TMS 快照。选定陆运线路后必须走这里,才能把该条成本写回工单。
空报价不打主账,避免把查价结果抹掉。
"""
no = (work_order_no or "").strip()
src = dict(quote or {})
if not no or not src:
return {"ok": True, "quote_version": 1, "status": to_status or "已报价"}
out = self._post(
"/inquiry/agent/ticket/replaceTmsQuote",
{"workOrderNo": no, "quote": src, "toStatus": to_status},
idem=f"tms-quote:{no}:{src.get('total') or ''}:{src.get('route_line') or ''}",
)
if out.get("ok") is False:
return out
out.setdefault("ok", True)
out.setdefault("status", to_status or "已报价")
return out
def render_quote(
self,