238 lines
12 KiB
PHP
238 lines
12 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"
|
|
placeholder="CDK/项目">
|
|
</div>
|
|
<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">
|
|
<select name="status" id="status" class="form-control index-search">
|
|
<option value="">使用状态</option>
|
|
|
|
<option value="0" {if isset($status) && $status !='' && $status == 0}selected{/if}>未使用</option>
|
|
<option value="1" {if isset($status) && $status !='' && $status == 1}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">
|
|
<input readonly value="{$update_time ?? '' ;}"
|
|
name="update_time" id="update_time" class="form-control indexSearchDatetimeRange"
|
|
placeholder="使用时间">
|
|
</div>
|
|
<script>
|
|
laydate.render({
|
|
elem: '#update_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 title="添加" data-toggle="tooltip" class="btn btn-primary btn-sm " href="{:url('add')}">
|
|
<i class="fa fa-plus"></i> 添加
|
|
</a>
|
|
<a class="btn btn-danger btn-sm AjaxButton" data-toggle="tooltip" title="删除选中数据"
|
|
data-confirm-title="删除确认" data-confirm-content="您确定要删除选中的数据吗?" data-id="checked"
|
|
data-url="{:url('del')}">
|
|
<i class="fa fa-trash"></i> {:lang('batch_delete_button')}
|
|
</a>
|
|
<a class="btn btn-warning btn-sm AjaxButton" data-toggle="tooltip" title="{:lang('invalidate_selected_data')}"
|
|
data-confirm-title="{:lang('confirmed_invalid_cdk')}" data-confirm-content="{:lang('batch_invalid_cdk')}" data-id="checked"
|
|
data-url="{:url('disable')}">
|
|
<i class="fa fa-circle"></i> {:lang('batch_invalid_button')}
|
|
</a>
|
|
|
|
<a class="btn btn-success btn-sm ReloadButton" data-toggle="tooltip" title="刷新">
|
|
<i class="fa fa-refresh"></i> 刷新
|
|
</a>
|
|
<button onclick="exportData()" class="btn btn-sm btn-info exportData" type="button"><i
|
|
class="fa fa-file-excel-o"></i> 导出
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box-body table-responsive">
|
|
<table class="table table-hover table-bordered datatable" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<input id="dataCheckAll" type="checkbox" onclick="checkAll(this)" class="checkbox"
|
|
placeholder="全选/取消">
|
|
</th>
|
|
<th>ID</th>
|
|
<th>CDK</th>
|
|
<th>类型</th>
|
|
<th>金额</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>
|
|
<input type="checkbox" onclick="checkThis(this)" name="data-checkbox"
|
|
data-id="{$item.id}" class="checkbox data-list-check" value="{$item.id}"
|
|
placeholder="选择/取消">
|
|
</td>
|
|
<td>{$item.id}</td>
|
|
<td title="点击复制" id="cdk_code{$item.id}">
|
|
<span style="cursor: pointer;" id="copy{$item.id}">{$item.cdk_code}</span>
|
|
</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 class="t_c">
|
|
<small class="label label-warning">{$item.money|sprintf="%.2f",###} {:lang('cny')}</small>
|
|
</td>
|
|
<td>{$item.item_name}</td>
|
|
<td>{$item.num}</td>
|
|
<td class="t_c">
|
|
<small class="label
|
|
{switch name="item.status"}
|
|
{case value="0"}label-success{/case}
|
|
{case value="1"}label label-danger{/case}
|
|
{/switch}
|
|
">{$item.status_text}
|
|
</small>
|
|
|
|
</td>
|
|
<td>{$item.create_time}</td>
|
|
<td>{$item.update_time}</td>
|
|
|
|
<td class="td-do">
|
|
|
|
<a class="btn btn-danger btn-xs AjaxButton" data-toggle="tooltip" title="删除"
|
|
data-id="{$item.id}" data-confirm-title="删除确认"
|
|
data-confirm-content='您确定要删除ID为 <span class="text-red">{$item.id}</span> 的数据吗'
|
|
data-url="{:url('del')}">
|
|
<i class="fa fa-trash"></i>
|
|
|
|
</a>
|
|
|
|
{if $item.status==0}
|
|
<a class="btn btn-warning btn-xs AjaxButton" data-toggle="tooltip" title="{:lang('invalid_cdk')}"
|
|
data-id="{$item.id}" data-confirm-title="{:lang('confirmed_invalid_cdk')}"
|
|
data-confirm-content="{:lang('prompt_invalid_cdk',[$item.cdk_code])}"
|
|
data-url="{:url('enable')}">
|
|
<i class="fa fa-circle"></i>
|
|
</a>
|
|
{/if}
|
|
|
|
</td>
|
|
</tr>
|
|
<script src="__ADMIN_PLUGINS__/clipBoard.js-master/clipBoard.min.js"></script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#cdk_code{$item.id}").click(function () {
|
|
var copy = new clipBoard(document.getElementById('copy{$item.id}'));
|
|
copy.copyd();
|
|
layer.msg('复制成功');
|
|
});
|
|
});
|
|
</script>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- 数据列表底部 -->
|
|
<div class="box-footer">
|
|
{$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}
|
|
|