落地空运单聊询价字段与线路选择。

必填核对后再建单;多条线路走 H5 点选;费用只展示该线路 TMS 回包,不套用整单空运费。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-22 15:02:32 +08:00
co-authored by Cursor
parent 8afe909230
commit cfbce2fd69
53 changed files with 3470 additions and 372 deletions
+49 -1
View File
@@ -192,6 +192,30 @@ class MemoryLedger:
{"name": "其他附加费", "amount": "USD 80"},
],
}
if str(facts.get("tms_multi") or "") == "1":
quote["isMulti"] = "2"
quote["airOptions"] = [
{
"originAirportCode": "ZUH",
"transferAirportCode": "COC",
"destinationAirportCode": "CRK",
"salePrice": 183370,
"currency": "CNY",
"departureCharges": [
{"chargeName": "运输费", "currency": "CNY", "unitPrice": 11}
],
},
{
"originAirportCode": "SZX",
"transferAirportCode": "",
"destinationAirportCode": "CRK",
"salePrice": 193370,
"currency": "CNY",
"departureCharges": [
{"chargeName": "运输费", "currency": "CNY", "unitPrice": 12}
],
},
]
return {
"ok": True,
"classification": "HAS_PRICE",
@@ -220,6 +244,28 @@ class MemoryLedger:
"status": ticket.status,
}
def update_facts(self, *, work_order_no: str, facts: dict[str, str]) -> dict[str, Any]:
"""选定线路后写回起运港等询价事实。"""
with self._lock:
ticket = self._tickets.get(work_order_no)
if ticket is None:
return {"ok": False, "error": "ticket_not_found"}
ticket.facts = dict(facts)
return {"ok": True}
def void_quote_files(self, *, work_order_no: str) -> dict[str, Any]:
"""采用后改选:旧报价单不再当本单有效文件。"""
with self._lock:
ticket = self._tickets.get(work_order_no)
if ticket is None:
return {"ok": False, "error": "ticket_not_found"}
ticket.quote_file_ready = False
if ticket.quote:
ticket.quote = dict(ticket.quote)
ticket.quote["quoteFileIssued"] = False
ticket.quote["quoteFileVoided"] = True
return {"ok": True}
def transition(
self,
*,
@@ -359,7 +405,9 @@ class MemoryLedger:
wait_phase = "wait_deal"
elif status == "已报价" and quote:
# 文件已发给销售 → 成交跟进;否则海运协同卡、空运方案卡
if ticket.quote_file_ready or quote.get("quoteFileIssued"):
if quote.get("quoteFileVoided"):
wait_phase = "wait_adopt"
elif ticket.quote_file_ready or quote.get("quoteFileIssued"):
wait_phase = "wait_deal"
elif (ticket.business_line or "").upper() == "SEA":
wait_phase = "wait_collab"