index.html 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {extend name='admin@main'}
  2. {block name="button"}
  3. {if auth("add")}
  4. <button class='layui-btn layui-btn-sm layui-btn-primary' data-modal='{:url("add")}'>添 加</button>
  5. {/if}
  6. {if auth("remove")}
  7. <button class="layui-btn layui-btn-sm layui-btn-primary" data-confirm="确定要删除吗?" data-action="{:url('remove')}" data-rule="id#{key}" data-csrf="{:systoken('remove')}">删 除</button>
  8. {/if}
  9. {/block}
  10. {block name="content"}
  11. <div class="think-box-shadow">
  12. {include file='goods/index_search'}
  13. <table class="layui-table margin-top-10" lay-skin="line">
  14. {notempty name='list'}
  15. <thead>
  16. <tr>
  17. <th class='list-table-check-td think-checkbox'>
  18. <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
  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. <th class='text-left nowrap'>状态</th>
  26. <th class='text-left nowrap'>创建时间</th>
  27. <th class="text-left nowrap">操作</th>
  28. </tr>
  29. </thead>
  30. {/notempty}
  31. <tbody>
  32. {foreach $list as $key=>$vo}
  33. <tr>
  34. <td class='list-table-check-td think-checkbox'>
  35. <input class="list-check-box" value='{$vo.id}' type='checkbox'>
  36. </td>
  37. <td class='text-left nowrap'>{$vo.goods_category_first|default='--'} - {$vo.goods_category_id|default='--'}</td>
  38. <td class='text-left nowrap'>{$vo.goods_no|default='--'}</td>
  39. <td class='text-left nowrap'>{$vo.goods_name|default='--'}</td>
  40. <td class='text-left nowrap'>{$vo.goods_brand|default='--'}</td>
  41. <td class='list-table-sort-td'>
  42. <input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
  43. </td>
  44. <td class='text-left nowrap'>
  45. {eq name='vo.status' value='0'}<strong class="color-red">已下架</strong>{else}<strong class="color-green">正常</strong>{/eq}
  46. </td>
  47. <td class='text-left nowrap'>{$vo.create_at|default=''}</td>
  48. <td class='text-left nowrap'>
  49. {if $vo.status eq 1 and auth("forbid")}
  50. <a class="layui-btn layui-btn-xs layui-btn-warm" data-confirm="确定要禁用该账号吗?" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('forbid')}">禁 用</a>
  51. {elseif auth("resume")}
  52. <a class="layui-btn layui-btn-xs layui-bg-blue" data-confirm="确定要启用该账号吗?" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('resume')}">启 用</a>
  53. {/if}
  54. {if auth("edit")}
  55. <a class="layui-btn layui-btn-xs" data-modal="{:url('edit')}?id={$vo.id}">编 辑</a>
  56. {/if}
  57. {if auth("remove")}
  58. <a class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除该用户吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
  59. {/if}
  60. </td>
  61. </tr>
  62. {/foreach}
  63. </tbody>
  64. </table>
  65. {empty name='list'}<span class="notdata">没 有 记 录 哦!</span>{else}{$pagehtml|raw|default=''}{/empty}
  66. </div>
  67. {/block}