79 lines
4.3 KiB
HTML
79 lines
4.3 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-arrow-left-right"></i> 转课记录</h4>
|
|
<a href="{{ url_for('transfer_add') }}" class="btn btn-primary"><i class="bi bi-plus-circle"></i> 申请转课</a>
|
|
{% if current_user.has_permission('transfer_export') %}<a href="{{ url_for('transfer_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>
|
|
<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.created_at.strftime('%Y-%m-%d') }}</td>
|
|
<td>
|
|
{% if r.transfer_class_type == 'class_transfer' %}
|
|
<span class="badge bg-primary">班级转课</span>
|
|
{% elif r.transfer_class_type == 'upgrade' %}
|
|
<span class="badge bg-success">升阶</span>
|
|
{% elif r.transfer_class_type == 'course_transfer' %}
|
|
<span class="badge bg-info">换课</span>
|
|
{% else %}
|
|
<span class="badge bg-secondary">转赠</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ students[r.from_student_id].name if students.get(r.from_student_id) else '-' }}</td>
|
|
<td>{{ courses[r.from_course_id].name if courses.get(r.from_course_id) else '-' }}</td>
|
|
<td>{{ classes[r.from_class_id].name if r.from_class_id and classes.get(r.from_class_id) else '-' }}</td>
|
|
<td>{{ classes[r.to_class_id].name if r.to_class_id and classes.get(r.to_class_id) else '-' }}</td>
|
|
<td>{{ teachers[r.from_teacher_id].name if r.from_teacher_id and teachers.get(r.from_teacher_id) else '-' }}</td>
|
|
<td>{{ teachers[r.to_teacher_id].name if r.to_teacher_id and teachers.get(r.to_teacher_id) else '-' }}</td>
|
|
<td>
|
|
{% if r.price_change_type == 'price_changed' %}
|
|
<span class="badge bg-warning">有变更</span>
|
|
{% else %}
|
|
<span class="badge bg-secondary">无变更</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ '¥%.2f'|format(r.original_unit_price) if r.original_unit_price else '-' }}</td>
|
|
<td>{{ '¥%.2f'|format(r.new_unit_price) if r.new_unit_price else '-' }}</td>
|
|
<td>{{ r.transfer_hours }}</td>
|
|
<td>{{ r.price_change_reason or '-' }}</td>
|
|
<td>{{ r.effective_date.strftime('%Y-%m-%d') if r.effective_date else '-' }}</td>
|
|
<td>{{ r.remark or '-' }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% if not records %}
|
|
<tr><td colspan="16" class="text-center text-muted">暂无转课记录</td></tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|