Initial commit
This commit is contained in:
49
xuexiao/templates/recharge_activity_list.html
Normal file
49
xuexiao/templates/recharge_activity_list.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{% 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-gift"></i> 充值优惠活动</h4>
|
||||
<a href="{{ url_for('recharge_activity_add') }}" class="btn btn-primary"><i class="bi bi-plus-circle"></i> 新增活动</a>
|
||||
{% if current_user.has_permission('recharge_export') %}<a href="{{ url_for('recharge_activity_export') }}" class="btn btn-success"><i class="bi bi-download"></i> 导出Excel</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for a in activities %}
|
||||
<tr>
|
||||
<td>{{ a.id }}</td>
|
||||
<td>{{ a.name }}</td>
|
||||
<td>¥{{ a.trigger_amount }}</td>
|
||||
<td class="text-danger">+{{ a.gifted_hours }}</td>
|
||||
<td>{% if a.is_cumulative %}<span class="badge bg-success">是</span>{% else %}<span class="badge bg-secondary">否</span>{% endif %}</td>
|
||||
<td>{% if a.allow_multi_trigger %}<span class="badge bg-success">是</span>{% else %}<span class="badge bg-secondary">否</span>{% endif %}</td>
|
||||
<td>{% if a.is_time_limited %}{{ a.start_date }} ~ {{ a.end_date }}{% else %}不限{% endif %}</td>
|
||||
<td>{% if a.target_audience == 'all' %}全部{% elif a.target_audience == 'new' %}新学员{% else %}老学员{% endif %}</td>
|
||||
<td>{% if a.can_stack %}<span class="badge bg-success">可</span>{% else %}<span class="badge bg-secondary">否</span>{% endif %}</td>
|
||||
<td>{% if a.status == 1 %}<span class="badge bg-success">启用</span>{% else %}<span class="badge bg-secondary">停用</span>{% endif %}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('recharge_activity_edit', id=a.id) }}" class="btn btn-sm btn-warning"><i class="bi bi-pencil"></i></a>
|
||||
<form method="POST" action="{{ url_for('recharge_activity_delete', id=a.id) }}" style="display:inline;" onsubmit="return confirm('确定停用?')">
|
||||
<button type="submit" class="btn btn-sm btn-danger"><i class="bi bi-x-circle"></i></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% if not activities %}
|
||||
<tr><td colspan="11" class="text-center text-muted">暂无活动数据</td></tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user