168 lines
9.0 KiB
HTML
168 lines
9.0 KiB
HTML
{extend name="../../admin/view/main"}
|
|
{block name="button"}
|
|
|
|
<!--{if auth("out")}-->
|
|
<button data-modal='{:url("out")}' data-title="导出卡密" class='layui-btn layui-btn-sm layui-btn-primary'>导出卡密</button>
|
|
<!--{/if}-->
|
|
|
|
<!--{if auth("set")}-->
|
|
<button data-modal='{:url("set")}' data-title="分配商户" class='layui-btn layui-btn-sm layui-btn-primary'>分配商户</button>
|
|
<!--{/if}-->
|
|
|
|
<!--{if auth("add")}-->
|
|
<button data-modal='{:url("add")}' data-title="添加卡密" class='layui-btn layui-btn-sm layui-btn-primary'>添加单个卡密</button>
|
|
|
|
<!--{/if}-->
|
|
{/block}
|
|
|
|
{block name="content"}
|
|
<div class="layui-tab layui-tab-card think-bg-white table-block">
|
|
|
|
<div class="layui-tab-content think-box-shadow table-block table-block">
|
|
{include file='card/index_search'}
|
|
{include file='card/statement'}
|
|
<table class="layui-table margin-top-10" lay-skin="line">
|
|
{notempty name='list'}
|
|
<thead>
|
|
<tr>
|
|
<th class='text-left nowrap' width="">ID</th>
|
|
<th class='text-left nowrap' width="">批次</th>
|
|
<th class='text-left nowrap' width="">卡号</th>
|
|
<th class='text-left nowrap' width="">面值</th>
|
|
<th class='text-left nowrap' width="">使用状态</th>
|
|
<th class='text-left nowrap' width="">使用记录</th>
|
|
<th class='text-left nowrap' width="">录入时间</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
{/notempty}
|
|
<tbody>
|
|
{foreach $list as $key=>$vo}
|
|
<tr>
|
|
<td class='text-left nowrap'>
|
|
{$vo.id}
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
{$vo.group.name}
|
|
</td>
|
|
|
|
<td class='text-left nowrap'>
|
|
{if $vo.log_error >= 5}
|
|
<span class="color-red"><b>{$vo.cnum|default=''}</b></span>
|
|
{else}
|
|
<span class="color-black"><b>{$vo.cnum|default=''}</b></span>
|
|
{/if}
|
|
|
|
{if $vo.merchant}
|
|
<br />
|
|
<b>{$vo.merchant.name|default=''}</b>
|
|
{else}
|
|
<br />
|
|
<b>通用</b>
|
|
{/if}
|
|
</td>
|
|
<td class='text-left nowrap' style="display:none;">
|
|
|
|
{if $vo.log_error >= 5}
|
|
<span class="color-red"><b>*******</b></span>
|
|
{else}
|
|
<span class="color-black"><b>*******</b></span>
|
|
{/if}
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
<span class="color-black"><b>{$vo.value|default=''}</b></span>
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
{eq name='vo.use' value='1'}<span class="color-blue">可用</span>{/eq}
|
|
{eq name='vo.use' value='2'}<span class="color-gray">下单中</span>{/eq}
|
|
{eq name='vo.use' value='3'}<span class="color-gray">下单成功</span>{/eq}
|
|
{eq name='vo.use' value='4'}<span class="color-red">下单失败</span>{/eq}
|
|
{eq name='vo.use' value='5'}<span class="color-green">充值成功</span>{/eq}
|
|
{eq name='vo.use' value='6'}<span class="color-red">渠道充值失败</span>{/eq}
|
|
{eq name='vo.use' value='7'}<span class="color-red">疑似:卡密充值失败</span>{/eq}
|
|
{eq name='vo.use' value='8'}<span class="color-red">充值失败</span>{/eq}
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
{if $vo.log && count($vo.log) > 0}
|
|
<span class="color-blue">
|
|
<table class="layui-table margin-top-10" lay-skin="line">
|
|
<thead>
|
|
<tr>
|
|
<th class='text-left nowrap' width="">卡号</th>
|
|
<th class='text-left nowrap' width="">订单号</th>
|
|
<th class='text-left nowrap' width="">短信内容</th>
|
|
<th class='text-left nowrap' width="">使用状态</th>
|
|
<th class='text-left nowrap' width="">使用时间</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach $vo.log as $k=>$v}
|
|
<tr>
|
|
<td class='text-left nowrap'>
|
|
<span class="color-black"><b>{$v.card|default=''}</b></span>
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
<span class="color-black"><b>{$v.order_id|default=''}</b></span>
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
<span class="color-black"><b>{$v.msg|default=''}</b></span>
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
{eq name='v.status' value='1'}<span class="color-blue">可用</span>{/eq}
|
|
{eq name='v.status' value='2'}<span class="color-gray">下单中</span>{/eq}
|
|
{eq name='v.status' value='3'}<span class="color-gray">下单成功</span>{/eq}
|
|
{eq name='v.status' value='4'}<span class="color-red">下单失败</span>{/eq}
|
|
{eq name='v.status' value='5'}<span class="color-green">充值成功</span>{/eq}
|
|
{eq name='v.status' value='6'}<span class="color-red">渠道充值失败</span>{/eq}
|
|
{eq name='v.status' value='7'}<span class="color-red">疑似:卡密充值失败</span>{/eq}
|
|
{eq name='v.status' value='8'}<span class="color-red">充值失败</span>{/eq}
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
<span>{$v.create_at|format_datetime}</span>
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</span>
|
|
{else}
|
|
<span class="color-blue">未使用</span>
|
|
{/if}
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
<span>{$vo.create_at|format_datetime}</span>
|
|
</td>
|
|
<td class='text-left nowrap'>
|
|
<!--{if auth("edit") && $vo.status == 2}-->
|
|
<a class="layui-btn layui-btn-xs layui-btn-normal" data-title="查看使用记录" data-open="{:url('/merchat/card/index')}?card_id={$vo.id}" data-csrf="{:systoken('edit')}">使用记录</a>
|
|
<!--{/if}-->
|
|
|
|
<!--{if auth("edit")}-->
|
|
<a data-dbclick class="layui-btn layui-btn-xs" data-title="编辑卡密" data-modal='{:url("edit")}?id={$vo.id}' style="display: none;">编 辑</a>
|
|
<!--{/if}-->
|
|
<!-- {if $vo.status eq 1 and auth("state")} -->
|
|
<a class="layui-btn layui-btn-warm layui-btn-xs" data-confirm="确定要禁用该卡密吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}">禁 用</a>
|
|
<!-- {elseif auth("state")} -->
|
|
<a class="layui-btn layui-btn-warm layui-btn-xs" data-confirm="确定要启用该卡密吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}">启 用</a>
|
|
<!-- {/if} -->
|
|
|
|
<!--{if auth("setUse")}-->
|
|
<!-- {if $vo.use == 4 || $vo.use == 6 || $vo.use == 7} -->
|
|
<a class="layui-btn layui-btn-warm layui-btn-xs" data-confirm="确定要修改卡密的状态吗?" data-action="{:url('setUse')}" data-value="id#{$vo.id};use#1" data-csrf="{:systoken('setUse')}">改为可用</a>
|
|
<!-- {/if} -->
|
|
<!-- {/if} -->
|
|
|
|
<!-- {if auth("remove")} -->
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
|
|
<!-- {/if} -->
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
|
</div>
|
|
</div>
|
|
{/block}
|