销售侧汇总统一叫费用合计,并认准空运费的金额。

企微跳转改为账号密码登录,报价卡上的费用按原金额改回;航线按单价数量金额报价时不再记成海运费。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-24 11:15:33 +08:00
co-authored by Cursor
parent 84207bb4e5
commit 4dfd756bcf
24 changed files with 778 additions and 150 deletions
@@ -11,6 +11,7 @@ from __future__ import annotations
import html
from typing import Any
from agent.channel.h5.wecom_close import wecom_auto_close_script
from agent.schema.air_route_options import (
option_fee_lines,
option_total,
@@ -226,10 +227,11 @@ def render_air_route_page(payload: dict[str, Any]) -> str:
def render_air_route_ok() -> str:
"""选定成功。"""
"""选定成功:短暂展示后关企微 H5。"""
return _wrap(
"已选定",
"<div class='msg'><h1>已选定</h1><p>请回企微查看价格明细。</p></div>",
"<div class='msg'><h1>已选定</h1><p>正在返回企微,请查看价格明细。</p></div>",
auto_close=True,
)
@@ -272,12 +274,13 @@ def _option_card(index: int, option: dict[str, Any], quote: dict[str, Any], fact
)
def _wrap(title: str, body: str) -> str:
"""整页壳:标题、viewport、共用样式。"""
def _wrap(title: str, body: str, *, auto_close: bool = False) -> str:
"""整页壳:标题、viewport、共用样式。成功页可挂企微关窗脚本。"""
closer = wecom_auto_close_script() if auto_close else ""
return (
"<!doctype html><html lang='zh-CN'><head><meta charset='utf-8' />"
"<meta name='viewport' content='width=device-width, initial-scale=1' />"
f"<title>{html.escape(title)}</title>"
f"<style>{_PAGE_CSS}</style></head><body>"
f"{body}</body></html>"
f"{body}{closer}</body></html>"
)