index.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {extend name="../../admin/view/main"}
  2. {block name="button"}
  3. <!--{if auth("add")}-->
  4. <button data-modal='{:url("add")}' data-title="添加奖品" class='layui-btn layui-btn-sm layui-btn-primary'>添加奖品</button>
  5. <!--{/if}-->
  6. <!--{if auth("del")}-->
  7. <button data-action='{:url("del")}' data-rule="id#{key}" data-confirm="确定要删除这些奖品吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除奖品</button>
  8. <!--{/if}-->
  9. {/block}
  10. {block name="content"}
  11. <div class="think-box-shadow table-block">
  12. {include file='luckdraw_prize/index_search'}
  13. <table class="layui-table" lay-skin="line">
  14. {notempty name='list'}
  15. <thead>
  16. <tr>
  17. <th class='list-table-check-td think-checkbox'>
  18. <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
  19. </th>
  20. <th class='text-left nowrap'>奖品编号</th>
  21. <th class='text-left nowrap'>奖品名称</th>
  22. <th class='text-left nowrap'>创建时间</th>
  23. <th class='text-left nowrap'>账号状态</th>
  24. <th class='text-left nowrap'></th>
  25. </tr>
  26. </thead>
  27. {/notempty}
  28. <tbody>
  29. {foreach $list as $key=>$vo}
  30. <tr>
  31. <td class='list-table-check-td think-checkbox'>
  32. <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
  33. </td>
  34. <td class='text-left nowrap'>{$vo.code|default=''}</td>
  35. <td class='text-left nowrap'>{$vo.name|default=''}</td>
  36. <td class='text-left nowrap'>{$vo.create_at|format_datetime}</td>
  37. <td class='text-left nowrap'>{eq name='vo.status' value='0'}<span class="layui-badge">已禁用</span>{else}<span class="layui-badge layui-bg-green">使用中</span>{/eq}</td>
  38. <td class='text-left nowrap'>
  39. <!--{if auth("edit")}-->
  40. <a class="layui-btn layui-btn-xs" data-title="编辑奖品" data-modal='{:url("edit")}?code={$vo.code}'>编 辑</a>
  41. <!--{/if}-->
  42. <!--{if auth('state') and $vo.status eq 1}-->
  43. <a class="layui-btn layui-btn-xs layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0">禁 用</a>
  44. <!--{/if}-->
  45. <!--{if auth("state") and $vo.status eq 0}-->
  46. <a class="layui-btn layui-btn-xs layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1">启 用</a>
  47. <!--{/if}-->
  48. <!--{if auth("remove")}-->
  49. <a class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除该奖品吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a>
  50. <!--{/if}-->
  51. </td>
  52. </tr>
  53. {/foreach}
  54. </tbody>
  55. </table>
  56. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  57. </div>
  58. {/block}