46 lines
2.4 KiB
HTML
46 lines
2.4 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-pause-circle"></i> 停课保号记录</h4>
|
||
|
|
<a href="{{ url_for('stop_add') }}" class="btn btn-primary"><i class="bi bi-plus-circle"></i> 申请停课</a>
|
||
|
|
{% if current_user.has_permission('stop_export') %}<a href="{{ url_for('stop_export') }}" class="btn btn-success"><i class="bi bi-file-earmark-excel"></i> 导出</a>{% endif %}
|
||
|
|
</div>
|
||
|
|
<div class="card shadow-sm">
|
||
|
|
<div class="card-body">
|
||
|
|
<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></tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{% for r in records %}
|
||
|
|
<tr>
|
||
|
|
<td>{{ r.id }}</td>
|
||
|
|
<td><a href="{{ url_for('student_detail', id=r.student_id) }}">{{ r.student.name }}</a></td>
|
||
|
|
<td>{{ r.course.name }}</td>
|
||
|
|
<td>{{ r.start_date }}</td>
|
||
|
|
<td>{{ r.end_date }}</td>
|
||
|
|
<td>
|
||
|
|
{% if r.status == 1 %}<span class="badge bg-warning">停课中</span>
|
||
|
|
{% elif r.status == 2 %}<span class="badge bg-success">已复课</span>
|
||
|
|
{% else %}<span class="badge bg-secondary">已取消</span>{% endif %}
|
||
|
|
</td>
|
||
|
|
<td>{{ r.reason or '-' }}</td>
|
||
|
|
<td>
|
||
|
|
{% if r.status == 1 %}
|
||
|
|
<a href="{{ url_for('stop_resume', record_id=r.id) }}" class="btn btn-sm btn-success" onclick="return confirm('确定恢复上课?')"><i class="bi bi-play-circle"></i> 复课</a>
|
||
|
|
{% endif %}
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
{% if not records %}
|
||
|
|
<tr><td colspan="8" class="text-center text-muted">暂无停课记录</td></tr>
|
||
|
|
{% endif %}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|