56 lines
2.9 KiB
HTML
56 lines
2.9 KiB
HTML
|
|
{% extends "base.html" %}
|
||
|
|
{% block title %}消课记录 - 学生课程管理系统{% endblock %}
|
||
|
|
{% block content %}
|
||
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||
|
|
<h4><i class="bi bi-journal-check"></i> 消课记录</h4>
|
||
|
|
<div>
|
||
|
|
<a href="{{ url_for('consumption_add') }}" class="btn btn-primary"><i class="bi bi-plus-circle"></i> 单个消课</a>
|
||
|
|
<a href="{{ url_for('consumption_batch') }}" class="btn btn-info"><i class="bi bi-collection"></i> 批量消课</a>
|
||
|
|
{% if current_user.has_permission('consumption_export') %}<a href="{{ url_for('consumption_export') }}" class="btn btn-success"><i class="bi bi-file-earmark-excel"></i> 导出</a>{% endif %}
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="card shadow-sm">
|
||
|
|
<div class="card-body">
|
||
|
|
<form method="GET" class="row g-2 mb-3">
|
||
|
|
<div class="col-md-4">
|
||
|
|
<input type="text" class="form-control" name="keyword" value="{{ keyword }}" placeholder="搜索学员姓名">
|
||
|
|
</div>
|
||
|
|
<div class="col-md-2">
|
||
|
|
<button type="submit" class="btn btn-outline-primary"><i class="bi bi-search"></i></button>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table class="table table-hover table-bordered">
|
||
|
|
<thead class="table-light">
|
||
|
|
<tr><th>ID</th><th>日期</th><th>学员</th><th>课程</th><th>消课课时</th><th>正课消耗</th><th>赠课消耗</th><th>类型</th><th>操作人</th><th>备注</th></tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{% for r in records %}
|
||
|
|
<tr>
|
||
|
|
<td>{{ r.id }}</td>
|
||
|
|
<td>{{ r.consume_date }}</td>
|
||
|
|
<td><a href="{{ url_for('student_detail', id=r.student_id) }}">{{ r.student.name }}</a></td>
|
||
|
|
<td>{{ r.course.name }}</td>
|
||
|
|
<td>{{ r.hours_consumed }}</td>
|
||
|
|
<td>{{ r.normal_consumed }}</td>
|
||
|
|
<td>{{ r.gifted_consumed }}</td>
|
||
|
|
<td>
|
||
|
|
{% if r.consume_type == 'trial' %}<span class="badge bg-secondary">试听</span>
|
||
|
|
{% elif r.consume_type == 'normal' %}<span class="badge bg-primary">正课</span>
|
||
|
|
{% else %}<span class="badge bg-warning">混合</span>{% endif %}
|
||
|
|
{% if r.is_makeup %}<span class="badge bg-info">补录</span>{% endif %}
|
||
|
|
</td>
|
||
|
|
<td>{{ r.operator.real_name }}</td>
|
||
|
|
<td>{{ r.remark or '-' }}</td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
{% if not records %}
|
||
|
|
<tr><td colspan="10" class="text-center text-muted">暂无消课记录</td></tr>
|
||
|
|
{% endif %}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|