fix(scheduling): use current year mileage for consistent data display
- Add currentYearMileage to SchedulingVehicleInfo (backend + frontend) - Compute completionRate as currentYearMileage/yearTarget (year-based) instead of using overall completion_rate from DB - Display "本年已跑" instead of "累计" in detail modal - Fix reason text to show year completion rate Before: 累计 4.6万, 考核 3.0万, 完成率 12.1% (mismatched periods) After: 本年已跑 8.3万, 考核 3.0万, 完成率 275% (consistent year-based) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -85,8 +85,8 @@ export default function SuggestionDetail({ suggestion: s, onClose, onNotifySucce
|
||||
<div className="flex items-center gap-3 text-[10px] text-slate-500 flex-wrap">
|
||||
<span>{v.targetName}</span>
|
||||
<span className="text-slate-300">|</span>
|
||||
<span>累计 <span className="text-slate-700 font-bold">{fmtKm(v.totalMileage)}</span> km</span>
|
||||
<span>考核 <span className="text-slate-700 font-bold">{fmtKm(v.yearTarget)}</span> km</span>
|
||||
<span>本年已跑 <span className="text-slate-700 font-bold">{fmtKm(v.currentYearMileage)}</span> km</span>
|
||||
<span>本年考核 <span className="text-slate-700 font-bold">{fmtKm(v.yearTarget)}</span> km</span>
|
||||
<span><MapPin size={9} className="inline -mt-px" /> {v.region}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-3 text-[10px] text-slate-500 mt-1">
|
||||
|
||||
Reference in New Issue
Block a user