Commit e44e599e by luoqi

ui: S3 步骤展示改"已完成 N 次",字典分子分母不直观

旧版 "1/3 步骤" 含义 = 命中字典 step 种类数 / 字典总 step 种类
   杨光宗 27 根管 3 次 actual 同 subtype → 字典只 hit 1 种 "根管" → 1/3
   客服看 1/3 像"差 2 步"误导,实际 minSteps=1 已满足,临床完成

新版:
  s3Reached 满足   → "已完成 N 次"(N=actual.length,直观)
  s3Reached 不满足 + multi-step(种植 minSteps=2) → "X/Y 步骤(进行中)"
  s3Reached 不满足 + single-step → "N 次治疗"

验证:
  杨光宗 K04 根管(3 次 actual): "根管 · 已完成 3 次"
  杨光宗 K03 充填(1 次 actual): "充填 · 已完成 1 次"
  路遥 K05 牙周(2 次刮治):      "刮治 · 已完成 2 次"
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
parent fd7ab151
...@@ -932,11 +932,18 @@ function buildStageNodes(opts: { ...@@ -932,11 +932,18 @@ function buildStageNodes(opts: {
? matchedSteps.matched.map(shortLabel).join(' → ') ? matchedSteps.matched.map(shortLabel).join(' → ')
: shortSubtype(s3LastActual); : shortSubtype(s3LastActual);
n.title = titleSteps || '治疗'; n.title = titleSteps || '治疗';
// detail:进度 + 总金额(if available) // detail:进度展示(W4 末改进 — 优先显示真实次数,字典分子分母对客服不直观)
// - s3Reached 满足:显示 "已完成 N 次"(N=actual treatment 次数)— 直观,跟次数对应
// - s3Reached 不满足 + multi-step(如种植 minSteps=2 只做了植入):显示"X/Y 步骤(进行中)" 提示缺
// - 单 step 类(periodontic/restorative minSteps=1)→ 一律走"次数"分支
// 杨光宗 27 根管 3 次 actual:旧版"1/3 步骤"误导(像"差 2 步"),新版"已完成 3 次" 准确
const totalCents = sumAmountCents(actuals); const totalCents = sumAmountCents(actuals);
const progress = milestone && milestone.steps.length > 1 const isMultiStep = !!milestone && milestone.minSteps > 1;
? `${matchedSteps.matched.length}/${milestone.steps.length} 步骤` const progress = s3Reached
: `${actuals.length} 次治疗`; ? `已完成 ${actuals.length} `
: isMultiStep
? `${matchedSteps.matched.length}/${milestone!.steps.length} 步骤(进行中)`
: `${actuals.length} 次治疗`;
n.detail = totalCents > 0 ? `${progress} · ${formatYuan(totalCents)}` : progress; n.detail = totalCents > 0 ? `${progress} · ${formatYuan(totalCents)}` : progress;
n.doctor = resolveDoctorName(s3LastActual, doctorMap); n.doctor = resolveDoctorName(s3LastActual, doctorMap);
n.at = fmt(s3LastActual.occurredAt); n.at = fmt(s3LastActual.occurredAt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment