185 lines
8.4 KiB
PHP
185 lines
8.4 KiB
PHP
{extend name="public/base" /}
|
|
{block name='content'}
|
|
{include file='public/content_header' /}
|
|
<!--数据列表页面-->
|
|
<section class="content">
|
|
|
|
<!--顶部搜索筛选-->
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="box">
|
|
<div class="box-body">
|
|
<form class="form-inline searchForm" id="searchForm" action="{:url('index')}" method="GET">
|
|
|
|
<div class="form-group">
|
|
<input value="{$_keywords ? $_keywords : '' ;}"
|
|
name="_keywords" id="_keywords" class="form-control indexSearchKeyword"
|
|
placeholder="CDK/账号/ID/项目">
|
|
</div>
|
|
<div class="form-group">
|
|
<select name="agency_account" id="agency_account" class="form-control input-sm index-search">
|
|
<option value="">所属代理</option>
|
|
{if in_array(2, $user->role)}
|
|
<option value="{$user->username}" {if isset($agency_account) &&''!==$agency_account && $agency_account==$user->username}selected{/if}>{$user->username}</option>
|
|
{/if}
|
|
{foreach name='agency' id='item'}
|
|
<option value="{$item.username}" {if isset($agency_account) &&''!==$agency_account && $agency_account==$item.username}selected{/if}>{$item.username}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
<script>
|
|
$(function () {
|
|
$('#agency_account').select2({
|
|
width: '100%'
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<div class="form-group">
|
|
<select name="type" id="type" class="form-control index-search">
|
|
<option value="">选择类型</option>
|
|
|
|
<option value="1" {if isset($type) && $type !='' && $type == 1}selected{/if}>充值</option>
|
|
<option value="2" {if isset($type) && $type !='' && $type == 2}selected{/if}>物品</option>
|
|
<option value="3" {if isset($type) && $type !='' && $type == 3}selected{/if}>邮件</option>
|
|
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<input readonly value="{$create_time ?? '' ;}"
|
|
name="create_time" id="create_time" class="form-control indexSearchDatetimeRange"
|
|
placeholder="兑换时间">
|
|
</div>
|
|
<script>
|
|
laydate.render({
|
|
elem: '#create_time'
|
|
, range: true
|
|
, type: 'datetime'
|
|
});
|
|
</script>
|
|
|
|
|
|
<div class="form-group">
|
|
<button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
|
|
</button>
|
|
</div>
|
|
<div class="form-group">
|
|
<button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
|
|
class="fa fa-eraser"></i> 清空查询
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="box">
|
|
|
|
<!--数据列表顶部-->
|
|
<div class="box-header">
|
|
<div>
|
|
|
|
|
|
<a class="btn btn-success btn-sm ReloadButton" data-toggle="tooltip" title="刷新">
|
|
<i class="fa fa-refresh"></i> 刷新
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box-body table-responsive">
|
|
<table class="table table-hover table-bordered datatable" width="100%">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
<th>兑换码</th>
|
|
<th>账号</th>
|
|
<th>角色ID</th>
|
|
<th>金额</th>
|
|
<th>所属代理</th>
|
|
<th>是否成功</th>
|
|
<th>兑换时间</th>
|
|
<th>类型</th>
|
|
<th>项目</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach name='data' id='item' key='data_key'}
|
|
<tr>
|
|
|
|
<td>{$item.id}</td>
|
|
<td>{$item.cdk_code}</td>
|
|
<td>{$item.account}</td>
|
|
<td>{$item.role_id}</td>
|
|
<td class="t_c">
|
|
<small class="label label-warning">{$item.money|sprintf="%.2f",###} {:lang('cny')}</small>
|
|
</td>
|
|
<td>{$item.agency_account}</td>
|
|
<td class="t_c">
|
|
<small class="label
|
|
{switch name="item.status"}
|
|
{case value="1"}label-success{/case}
|
|
{case value="0"}label label-danger{/case}
|
|
{/switch}
|
|
">{$item.status_text}
|
|
</small>
|
|
|
|
</td>
|
|
<td>{$item.create_time}</td>
|
|
<td class="t_c">
|
|
<small class="label
|
|
{switch name="item.type"}
|
|
{case value="1"}label-primary{/case}
|
|
{case value="2"}label label-info{/case}
|
|
{case value="3"}label label-success{/case}
|
|
{/switch}
|
|
">{$item.type_text}
|
|
</small>
|
|
|
|
</td>
|
|
<td>{$item.item_name}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- 数据列表底部 -->
|
|
<div class="box-footer">
|
|
<label class="control-label pull-left">
|
|
<small class="control-label" style="margin-right: 5px; font-size: 14px">
|
|
【本页合计】
|
|
</small>
|
|
<small class="label label-warning" style="margin-right: 5px;">
|
|
金额:{:sprintf('%.2f', array_sum(array_column($data->toArray()['data'], 'money')))}{:lang('cny')}
|
|
</small>
|
|
</label>
|
|
{$page|raw}
|
|
<label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
|
|
<small>共{$total}条记录</small>
|
|
<small>每页显示</small>
|
|
|
|
<select class="input-sm" onchange="changePerPage(this)">
|
|
<option value="10" {if $admin.per_page==10}selected{/if}>10</option>
|
|
<option value="20" {if $admin.per_page==20}selected{/if}>20</option>
|
|
<option value="30" {if $admin.per_page==30}selected{/if}>30</option>
|
|
<option value="50" {if $admin.per_page==50}selected{/if}>50</option>
|
|
<option value="100" {if $admin.per_page==100}selected{/if}>100</option>
|
|
</select>
|
|
|
|
<small>条记录</small>
|
|
</label>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{/block}
|
|
|