index.html 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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'>商品ID</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. <th class='text-left nowrap'>创建时间</th>
  29. <th class="text-left nowrap">操作</th>
  30. </tr>
  31. </thead>
  32. {/notempty}
  33. <tbody>
  34. {foreach $list as $key=>$vo}
  35. <tr>
  36. <td class='list-table-check-td think-checkbox'>
  37. <input class="list-check-box" value='{$vo.id}' type='checkbox'>
  38. </td>
  39. <td class='text-left nowrap'>{$vo.id|default='--'}</td>
  40. <td class='text-left nowrap'>{$vo.goods_category_one.name|default='--'} - {$vo.goods_category.name|default='--'}</td>
  41. <td class='text-left nowrap'>{$vo.goods_no|default='--'}</td>
  42. <td class='text-left nowrap'>{$vo.goods_name|default='--'}</td>
  43. <td class='text-left nowrap'>{$vo.goods_brand|default='--'}</td>
  44. <td class='text-left nowrap'>
  45. {foreach $vo.goods_stock as $k=>$v}
  46. <p><span class="color-desc">{$v.name}</span><span> 库存:{$v.stock}</span><span> 冻结库存:{$v.freeze_stock}</span></p>
  47. {/foreach}
  48. </td>
  49. <td class='list-table-sort-td'>
  50. <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">
  51. </td>
  52. <td class='text-left nowrap'>
  53. {eq name='vo.status' value='0'}<strong class="color-red">已下架</strong>{else}<strong class="color-green">正常</strong>{/eq}
  54. </td>
  55. <td class='text-left nowrap'>{$vo.create_at|default=''}</td>
  56. <td class='text-left nowrap'>
  57. <a class="layui-btn layui-btn-xs layui-bg-blue"
  58. data-open="{:url('goods_stock_log/index')}?goods_id={$vo.id}">入库记录</a>
  59. <a class="layui-btn layui-btn-xs layui-btn-danger"
  60. data-open="{:url('goods_use_log/index')}?goods_id={$vo.id}">出库记录</a>
  61. {if $vo.status eq 1 and auth("forbid")}
  62. <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>
  63. {elseif auth("resume")}
  64. <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>
  65. {/if}
  66. {if auth("edit")}
  67. <a class="layui-btn layui-btn-xs" data-modal="{:url('edit')}?id={$vo.id}">编 辑</a>
  68. {/if}
  69. {if auth("remove")}
  70. <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>
  71. {/if}
  72. </td>
  73. </tr>
  74. {/foreach}
  75. </tbody>
  76. </table>
  77. {empty name='list'}<span class="notdata">没 有 记 录 哦!</span>{else}{$pagehtml|raw|default=''}{/empty}
  78. </div>
  79. {/block}