feat(cost): 落地决策 191-195(清单量联动缩放、手工改价跳过、重解析跳过、对比框状态保持)

This commit is contained in:
lianjianwei2024
2026-10-25 11:11:05 +08:00
parent ac28658889
commit b904f01e1c
10 changed files with 347 additions and 49 deletions

View File

@@ -185,11 +185,11 @@ def test_norm_qty_gcl_formula(server):
con.commit(); con.close()
r = edit("GCL")
assert r["ok"] is True and abs(r["quantity"] - 5.03) < 1e-9, r
# 纯数字四则(决策90):不带 GCL 也合法,公式原文落 qty_expr(Quantity 置空)
# 纯数字四则(决策 194,2026-10-25 主人定):实际量口径——8÷单位前缀(t=1)=8 落数,公式列清空
r = edit("5+3")
assert r["ok"] is True and r["quantity"] == 8 and r["expr"] == "5+3", r
assert row()[0] is None and row()[1] == "5+3"
# 纯数字照旧(不受公式分支影响)
assert r["ok"] is True and r["quantity"] == 8, r
assert row()[0] == 8 and row()[1] is None
# 纯数字=实际量(决策 194):Unit t 前缀 1 → 存 1.5(同尺实例:单位 10m3 输入 20 → 存 2 显 2)
r = edit("1.5")
assert r["ok"] is True and r["quantity"] == 1.5, r
# 非法输入一概拒绝