index.html 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. {extend name='admin@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("remove")}
  7. <button data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" 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">
  12. {include file='user/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='list-table-sort-td'>
  21. <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
  22. </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-center nowrap'>使用状态</th>
  27. <th class='text-left nowrap'>添加时间</th>
  28. <th class='text-left nowrap'></th>
  29. </tr>
  30. </thead>
  31. {/notempty}
  32. <tbody>
  33. {foreach $list as $key=>$vo}
  34. <tr data-dbclick>
  35. <td class='list-table-check-td think-checkbox'>
  36. <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
  37. </td>
  38. <td class='list-table-sort-td'>
  39. <label><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"></label>
  40. </td>
  41. <td class='text-left nowrap'>{$vo.nickname|default=''}</td>
  42. <td class='text-left nowrap'>{$vo.user_type|default='-'}</td>
  43. <td class='text-left nowrap'>{$vo.svn_username|default='-'}</td>
  44. <td class='text-center nowrap'>
  45. {eq name='vo.status' value='0'}<span class="color-red">已禁用</span>{/eq}
  46. {eq name='vo.status' value='1'}<span class="color-green">在职中</span>{/eq}
  47. {eq name='vo.status' value='2'}<span class="color-desc">已离职</span>{/eq}
  48. </td>
  49. <td class='text-left nowrap'>
  50. {$vo.create_at|format_datetime}
  51. </td>
  52. <td class='text-left nowrap'>
  53. {if auth("edit")}
  54. <a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑员工信息" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
  55. {/if}
  56. {if auth("state") and $vo.status neq 0}
  57. <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}">禁 用</a>
  58. {elseif auth("state") and $vo.status neq 1 }
  59. <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}">启 用</a>
  60. {/if}
  61. {if auth("remove")}
  62. <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该员工吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
  63. {/if}
  64. </td>
  65. </tr>
  66. {/foreach}
  67. </tbody>
  68. </table>
  69. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  70. </div>
  71. {/block}