133 lines
5.7 KiB
HTML
133 lines
5.7 KiB
HTML
{{define "price_inquiries.html"}}
|
|
{{template "admin_head" .}}
|
|
<body>
|
|
{{template "admin_nav" .}}
|
|
<main class="shell">
|
|
<div class="toolbar">
|
|
<form class="filter-form" method="get" action="/admin/price-inquiries">
|
|
<div class="field">
|
|
<label for="area">地区筛选</label>
|
|
<input id="area" name="area" value="{{.AreaFilter}}" placeholder="省、市或区县">
|
|
</div>
|
|
<div class="field">
|
|
<label for="phone">手机号</label>
|
|
<input id="phone" name="phone" value="{{.PhoneFilter}}" placeholder="手机号">
|
|
</div>
|
|
<div class="field">
|
|
<label for="status">状态</label>
|
|
<select id="status" name="status">
|
|
<option value="" {{if eq .StatusFilter ""}}selected{{end}}>全部状态</option>
|
|
<option value="pending" {{if eq .StatusFilter "pending"}}selected{{end}}>待派单</option>
|
|
<option value="assigned" {{if eq .StatusFilter "assigned"}}selected{{end}}>已经派单</option>
|
|
<option value="completed" {{if eq .StatusFilter "completed"}}selected{{end}}>已跟进</option>
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<label for="time_from">筛选时间起</label>
|
|
<input id="time_from" name="time_from" value="{{.TimeFromFilter}}" type="date">
|
|
</div>
|
|
<div class="field">
|
|
<label for="time_to">筛选时间止</label>
|
|
<input id="time_to" name="time_to" value="{{.TimeToFilter}}" type="date">
|
|
</div>
|
|
<div class="field">
|
|
<label for="page_size">每页条数</label>
|
|
<select id="page_size" name="page_size">
|
|
{{range .PriceInquiryPageSizeOptions}}
|
|
<option value="{{.Value}}" {{if .Selected}}selected{{end}}>{{.Value}} 条/页</option>
|
|
{{end}}
|
|
</select>
|
|
</div>
|
|
<button class="button" type="submit">筛选</button>
|
|
{{if .HasPriceInquiryFilter}}<a class="button secondary" href="/admin/price-inquiries">全部</a>{{end}}
|
|
</form>
|
|
</div>
|
|
|
|
<div class="muted result-summary">共 {{.PriceInquiryTotal}} 条咨询,第 {{.PriceInquiryPage}} / {{.PriceInquiryTotalPages}} 页</div>
|
|
|
|
{{if .Message}}<div class="notice">{{.Message}}</div>{{end}}
|
|
{{if .Error}}<div class="error">{{.Error}}</div>{{end}}
|
|
|
|
<div class="table-wrap">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>手机号</th>
|
|
<th>咨询项目</th>
|
|
<th>所在地区</th>
|
|
<th>状态</th>
|
|
<th>创建时间</th>
|
|
<th>最近提交时间</th>
|
|
<th>更新时间</th>
|
|
<th>备注</th>
|
|
<th>设置</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .PriceInquiryRecords}}
|
|
<tr>
|
|
<td><strong>{{.Phone}}</strong></td>
|
|
<td>{{.ProjectName}}</td>
|
|
<td>{{.Region}}</td>
|
|
<td><span class="status-pill {{.StatusClass}}">{{.StatusText}}</span></td>
|
|
<td>{{.CreatedAt}}</td>
|
|
<td>{{.LastSubmittedAt}}</td>
|
|
<td>{{.UpdatedAt}}</td>
|
|
<td class="remark-cell">{{if .Remark}}{{.Remark}}{{else}}-{{end}}</td>
|
|
<td>
|
|
<details class="settings">
|
|
<summary class="button secondary small">设置</summary>
|
|
<form class="settings-form" method="post" action="/admin/price-inquiries/settings">
|
|
<input type="hidden" name="id" value="{{.InquiryID}}">
|
|
<input type="hidden" name="area" value="{{$.AreaFilter}}">
|
|
<input type="hidden" name="phone" value="{{$.PhoneFilter}}">
|
|
<input type="hidden" name="status_filter" value="{{$.StatusFilter}}">
|
|
<input type="hidden" name="time_from" value="{{$.TimeFromFilter}}">
|
|
<input type="hidden" name="time_to" value="{{$.TimeToFilter}}">
|
|
<input type="hidden" name="page" value="{{$.PriceInquiryPage}}">
|
|
<input type="hidden" name="page_size" value="{{$.PriceInquiryPageSize}}">
|
|
<div class="field">
|
|
<label>状态</label>
|
|
<select name="status">
|
|
<option value="pending" {{if eq .Status "pending"}}selected{{end}}>待派单</option>
|
|
<option value="assigned" {{if eq .Status "assigned"}}selected{{end}}>已经派单</option>
|
|
<option value="completed" {{if eq .Status "completed"}}selected{{end}}>已跟进</option>
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<label>备注</label>
|
|
<textarea name="remark" placeholder="填写备注信息">{{.Remark}}</textarea>
|
|
</div>
|
|
<button class="button" type="submit">保存</button>
|
|
</form>
|
|
</details>
|
|
</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr>
|
|
<td colspan="9" class="muted">暂无价格咨询数据</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="pagination">
|
|
<div class="muted">每页 {{.PriceInquiryPageSize}} 条</div>
|
|
<div class="pagination-actions">
|
|
{{if .PriceInquiryHasPreviousPage}}
|
|
<a class="button secondary small" href="{{.PriceInquiryPreviousURL}}">上一页</a>
|
|
{{else}}
|
|
<span class="button secondary small disabled">上一页</span>
|
|
{{end}}
|
|
{{if .PriceInquiryHasNextPage}}
|
|
<a class="button secondary small" href="{{.PriceInquiryNextURL}}">下一页</a>
|
|
{{else}}
|
|
<span class="button secondary small disabled">下一页</span>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|
|
{{end}}
|