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

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

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
+17 -7
View File
@@ -239,9 +239,9 @@ class LandRouteOptionsTests(unittest.TestCase):
self.assertGreater(eta1, fee1)
self.assertLess(eta1, od2)
self.assertGreater(eta2, fee2)
self.assertIn("总成本价:CNY 17100", text)
valid = text.find("报价有效期:", text.find("总成本价:"))
self.assertGreater(valid, text.find("总成本价:"))
self.assertIn("费用合计:CNY 17100", text)
valid = text.find("报价有效期:", text.find("费用合计:"))
self.assertGreater(valid, text.find("费用合计:"))
def test_land_detail_and_group_use_selected_route_valid_until(self) -> None:
"""选定广西这条后:私聊明细和群 TMS 段同一套正文,不摊开没选的线路。"""
@@ -312,9 +312,9 @@ class LandRouteOptionsTests(unittest.TestCase):
self.assertIn("运输费:CNY 7500.00", detail)
self.assertIn("广西壮族自治区 → 胡志明", detail)
self.assertIn("运输费:CNY 12500.00", detail)
self.assertIn("总成本价:CNY 20000", detail)
self.assertIn("费用合计:CNY 20000", detail)
self.assertIn("报价有效期:2026-10-31", detail)
self.assertGreater(detail.find("报价有效期:"), detail.find("总成本价:"))
self.assertGreater(detail.find("报价有效期:"), detail.find("费用合计:"))
self.assertNotIn("9600", detail)
self.assertNotIn("时效:N+3 / N+3", detail)
brief = copy.sea_group_brief(
@@ -342,12 +342,12 @@ class LandRouteOptionsTests(unittest.TestCase):
self.assertIn("上海-广西壮族自治区-胡志明", tms_block)
self.assertIn("上海 → 广西壮族自治区", tms_block)
self.assertIn("运输费:CNY 12500.00", tms_block)
self.assertIn("总成本价:CNY 20000", tms_block)
self.assertIn("费用合计:CNY 20000", tms_block)
self.assertIn("报价有效期:2026-10-31", tms_block)
self.assertNotIn("TMS标准报价", tms_block)
self.assertNotIn("价格明细", tms_block)
self.assertNotIn("9600", tms_block)
self.assertNotIn("总成本价:-", tms_block)
self.assertNotIn("费用合计:-", tms_block)
self.assertNotIn("时效:-", tms_block)
self.assertNotIn("时效:N+3 / N+3", tms_block)
self.assertIn("请产品人员回复“确认报价”确定采用TMS报价。", brief)
@@ -653,6 +653,16 @@ class LandRouteOptionsTests(unittest.TestCase):
self.assertEqual(seqs, {1})
self.assertTrue(any("报价方案" in x or "生成Excel" in x for x in replies[-3:]))
def test_ok_page_auto_closes_wecom_h5(self) -> None:
from agent.channel.h5.land_route_page import expired_land_route_page, render_land_route_ok
ok = render_land_route_ok()
dead = expired_land_route_page()
self.assertIn("closeWindow", ok)
self.assertIn("wecom-jssdk", ok)
self.assertIn("jsapi-signature", ok)
self.assertNotIn("closeWindow", dead)
if __name__ == "__main__":
unittest.main()