41 lines
1.4 KiB
HTML
41 lines
1.4 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}桌台管理{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container mt-4">
|
|
<h2>桌台管理</h2>
|
|
<a href="{{ url_for('tables.add_table') }}" class="btn btn-primary mb-3">添加新桌台</a>
|
|
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>id</th>
|
|
<th>桌号</th>
|
|
<th>容量</th>
|
|
<th>价格倍率</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for table in tables %}
|
|
<tr>
|
|
<td>{{ table.table_id }}</td>
|
|
<td>{{ table.game_table_number }}</td>
|
|
<td>{{ table.capacity }}人</td>
|
|
<td>{{ "%.2f"|format(table.price) }}</td>
|
|
<td>
|
|
<a href="{{ url_for('tables.edit_table', table_id=table.table_id) }}"
|
|
class="btn btn-sm btn-warning">编辑</a>
|
|
<form action="{{ url_for('tables.delete_table', table_id=table.table_id) }}"
|
|
method="POST" class="d-inline">
|
|
<button type="submit" class="btn btn-sm btn-danger"
|
|
onclick="return confirm('确认删除该桌台?')">删除</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|