{% extends "base.html" %} {% block title %}首页 - 学生课程管理系统{% endblock %} {% block content %}

{{ greeting }},{{ current_user.real_name or current_user.username }} 👋

欢迎回到教培课程管理系统,以下是今日运营概览

{{ total_students }}

在读学员

{{ total_courses }}

启用课程

{{ total_classes }}

进行中班级

¥{{ "%.0f"|format(month_recharge) }}

{% if period_label %}{{ period_label }} 充值{% else %}本月充值{% endif %}

充值趋势
近6个月充值金额
本月 ¥{{ "%.0f"|format(month_recharge) }}
{% for item in monthly_chart %}
{% set h = (item.amount / chart_max * 130)|int if chart_max else 8 %}
{{ item.label }}
{% endfor %}
课时预警{% if period_label %} ({{ period_label }}){% endif %}
{% if low_hours_accounts %} {% for acc, remain, disp in low_hours_accounts %}
{{ acc.student.name[:1] if acc.student else '?' }}

{{ acc.student.name if acc.student else '-' }}

{{ acc.course.course_code or acc.course.name if acc.course else '' }} · 剩余 {{ "%.0f"|format(remain) }} 节

≤5节
{% endfor %} {% else %}

暂无预警学员

{% endif %}
最近充值
{% if recent_recharges %} {% for r in recent_recharges[:6] %}
{{ r.student.name[:1] if r.student else '?' }}

{{ r.student.name if r.student else '-' }}

充值到账 · 正课{{ r.normal_hours|int }}节

¥{{ r.amount }}
{% endfor %} {% else %}

数据来自 Excel 课时表
查看学员余额 →

{% endif %}
最近消课
{% if recent_consumptions %} {% for c in recent_consumptions[:6] %}
{{ c.student.name[:1] if c.student else '?' }}

{{ c.student.name if c.student else '-' }}

{{ c.consume_date }} · {{ c.hours_consumed|int }} 课时

-{{ c.hours_consumed|int }}节
{% endfor %} {% else %}

暂无消课记录

{% endif %}
{% endblock %}