本轮全部为前端改动,版本号保持 1.9.0: - CSS 加载顺序调整为 app.css → bootstrap,让 Bootstrap 覆盖表格/按钮/表单/卡片等基础组件,日历/热屏等自定义组件类不受影响 - 主题切换同时写 data-theme 与 data-bs-theme,Bootstrap 组件跟随亮/暗 - 登录页、初始化页重写为 Bootstrap card + form-control + btn-primary,垂直居中 - 客户列表搜索框加 form-control 验证: - 无头 Chrome 实拍登录、客户列表、套餐、设置四页(shots/bs2-*.png) - 数据库与业务逻辑零改动 后续:第 3 轮日历抽屉/追加面板/客户月历,第 4 轮大屏内部与收尾
64 lines
2.4 KiB
HTML
64 lines
2.4 KiB
HTML
{{define "content"}}
|
||
<div class="page">
|
||
<header class="page-head">
|
||
<div>
|
||
<h1>客户</h1>
|
||
<p class="muted">共 {{.D.Total}} 位 · 输入手机尾号可快速定位</p>
|
||
</div>
|
||
<div class="page-actions">
|
||
{{if .D.ShowArchived}}
|
||
<a class="btn btn-ghost" href="/customers?q={{.D.Q}}">隐藏已停用</a>
|
||
{{else}}
|
||
<a class="btn btn-ghost" href="/customers?q={{.D.Q}}&archived=1">显示已停用{{if gt .D.ArchivedCount 0}} ({{.D.ArchivedCount}}){{end}}</a>
|
||
{{end}}
|
||
<a class="btn btn-primary" href="/customers/new">+ 新建客户</a>
|
||
</div>
|
||
</header>
|
||
|
||
<form class="filterbar" method="get" action="/customers">
|
||
<input class="form-control" type="search" name="q" value="{{.D.Q}}" placeholder="手机尾号 / 姓名 / 游戏名 / 联系方式" autocomplete="off">
|
||
<button class="btn" type="submit">搜索</button>
|
||
{{if .D.Q}}<a class="btn btn-ghost" href="/customers">清除</a>{{end}}
|
||
</form>
|
||
|
||
{{if .D.List}}
|
||
<div class="table-wrap">
|
||
<table class="table">
|
||
<thead>
|
||
<tr><th>尾号</th><th>客户</th><th>联系方式</th><th>订阅与剩余</th><th>标签</th><th></th></tr>
|
||
</thead>
|
||
<tbody>
|
||
{{range .D.List}}
|
||
<tr{{if .Archived}} class="archived"{{end}}>
|
||
<td><a class="tail" href="/customers/{{.ID}}">{{.Tail}}</a></td>
|
||
<td>
|
||
<a class="name" href="/customers/{{.ID}}">{{.Name}}</a>{{if .Archived}} <span class="chip chip-closed">已停用</span>{{end}}
|
||
{{if .GameName}}<div class="muted small">{{.GameName}}{{if .GameServer}} · {{.GameServer}}{{end}}</div>{{end}}
|
||
</td>
|
||
<td class="muted small">{{if .Contact}}{{.Contact}}{{else}}—{{end}}</td>
|
||
<td>
|
||
<span class="summary due-{{.Level}}">{{.Summary}}</span>
|
||
</td>
|
||
<td>{{range .TagList}}<span class="tagchip">{{.}}</span>{{end}}</td>
|
||
<td class="right"><a class="btn btn-sm" href="/customers/{{.ID}}">详情</a></td>
|
||
</tr>
|
||
{{end}}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{{template "pager" .D.Pager}}
|
||
{{else}}
|
||
<div class="empty">
|
||
<div class="empty-mark">票</div>
|
||
{{if .D.Q}}
|
||
<p>没有匹配「{{.D.Q}}」的客户。</p>
|
||
<a class="btn" href="/customers">看全部客户</a>
|
||
{{else}}
|
||
<p>还没有客户。先建一位,再给他开套餐。</p>
|
||
<a class="btn btn-primary" href="/customers/new">+ 新建客户</a>
|
||
{{end}}
|
||
</div>
|
||
{{end}}
|
||
</div>
|
||
{{end}}
|