feat(web): 增加参数即时估价与显式免费编辑

估价请求统一使用 350ms 防抖、AbortController 和请求序号,区分免费、计算中、价格不可用与失败状态,并展示候选冻结上限。价格未就绪时阻止生产提交。\n\n计价规则编辑器新增显式免费开关和 9 位价格步进。\n\n验证:Web 88 项测试和生产构建通过。
This commit is contained in:
2026-07-20 23:22:50 +08:00
parent 5114686c35
commit 7cea21f765
5 changed files with 193 additions and 21 deletions
@@ -225,6 +225,7 @@ function ruleToInput(rule: PricingRule): PricingRuleInput {
resourceType: rule.resourceType,
unit: rule.unit,
basePrice: rule.basePrice,
isFree: rule.isFree,
currency: rule.currency,
baseWeight: rule.baseWeight ?? {},
dynamicWeight: rule.dynamicWeight ?? {},
@@ -234,6 +235,8 @@ function ruleToInput(rule: PricingRule): PricingRuleInput {
priority: rule.priority,
status: rule.status,
metadata: rule.metadata ?? {},
effectiveFrom: rule.effectiveFrom,
effectiveTo: rule.effectiveTo,
};
}