staffRoster.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>demo</title>
  7. <link rel="stylesheet" href="../../libs/bootstrap/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="../../libs/fontawesome/css/all.min.css">
  9. <link rel="stylesheet" href="../../libs/layui/css/layui.css">
  10. <link rel="stylesheet" href="../../css/style.css">
  11. <script src="../../libs/jquery-3.5.1.min.js"></script>
  12. <script src="../../libs/bootstrap/js/bootstrap.min.js"></script>
  13. </head>
  14. <body>
  15. <div class="main s000001">
  16. <div class="operate">
  17. <div>
  18. <div class="dm_picker">
  19. <i class="fas fa-layer-group"></i>
  20. <span class="name">张德晨</span>
  21. <i class="fas fa-caret-down"></i>
  22. </div>
  23. <div class="search">
  24. <input type="text" class="input">
  25. <button type="button" class="layui-btn layui-btn-primary layui-btn-sm search-btn"><i class="fas fa-search"></i></button>
  26. </div>
  27. </div>
  28. <div class="btn-handle">
  29. <button type="button" class="layui-btn">添加员工</button>
  30. <button type="button" class="layui-btn layui-btn-primary">导入花名册</button>
  31. <button type="button" class="layui-btn layui-btn-primary">导出花名册</button>
  32. </div>
  33. </div>
  34. <div class="content">
  35. <!-- <div class="table-handle pull-right">
  36. <span class="layui-breadcrumb" lay-separator="|">
  37. <a ></a>
  38. <a >刷新</a>
  39. <a >选择表头</a>
  40. <a >排序方式</a>
  41. <a >导出</a>
  42. <a ></a>
  43. </span>
  44. </div><br> -->
  45. <table id="staff" lay-filter="staff"></table>
  46. </div>
  47. </div>
  48. <script src="../../libs/layui/layui.all.js" charset="utf-8"></script>
  49. <script src="../../js/global.js"></script>
  50. <script>
  51. layui.use('table', function(){
  52. var table = layui.table;
  53. //第一个实例
  54. var tableObj = table.render({
  55. elem: '#staff',
  56. height: '600',
  57. // url: '/demo/table/user/', //数据接口
  58. page: true, //开启分页
  59. data:[{id:1},{id:2}],
  60. defaultToolbar:['filter', 'print', 'exports', {
  61. title: '自定义' //标题
  62. ,layEvent: 'LAYTABLE_TIPS' //事件名,用于 toolbar 事件中使用
  63. ,icon: 'layui-icon-tips' //图标类名
  64. }],
  65. toolbar: 'default' ,
  66. cols: [[ //表头
  67. {field: 'id', title: 'ID', width:80, fixed: 'left'},
  68. {field: 'username', title: '姓名', width:80},
  69. {field: 'wealth', title: '部门', width:80, },
  70. {field: 'wealth', title: '工号', width:80} ,
  71. {field: 'wealth', title: '工作性质', width: 177},
  72. {field: 'wealth', title: '岗位', width: 80, },
  73. {field: 'wealth', title: '入职日期', width: 80, },
  74. {field: 'wealth', title: '证件类型', width: 80},
  75. {field: 'wealth', title: '证件号码', width: 135, },
  76. {field: 'wealth', title: '手机号码', width: 135, },
  77. {field: 'wealth', title: '一级部门', width: 135, },
  78. {field: 'wealth', title: '二级部门', width: 135, },
  79. {field: 'wealth', title: '三级部门', width: 135, },
  80. {field: 'wealth', title: '职级', width: 135, },
  81. {field: 'wealth', title: '职等', width: 135, },
  82. {field: 'wealth', title: '职务', width: 135, },
  83. {field: 'wealth', title: '岗位类别', width: 135, },
  84. {field: 'wealth', title: '汇报上级', width: 135, },
  85. {field: 'wealth', title: '工作城市', width: 135, },
  86. {field: 'wealth', title: '工作地点', width: 135, },
  87. {field: 'wealth', title: '合同公司', width: 135, },
  88. {field: 'wealth', title: '考勤编号', width: 135, },
  89. {field: 'wealth', title: '工时制度', width: 135, },
  90. {field: 'wealth', title: '招聘渠道', width: 135, },
  91. {field: 'wealth', title: '员工状态', width: 135, },
  92. {field: 'wealth', title: '转正日期', width: 135, },
  93. {field: 'wealth', title: '司龄', width: 135, },
  94. {field: 'wealth', title: '档案编号', width: 135, },
  95. {field: 'wealth', title: '别名', width: 135, },
  96. {field: 'wealth', title: '英文名', width: 135, },
  97. {field: 'wealth', title: '身份证有效期', width: 135, },
  98. {field: 'wealth', title: '性别', width: 135, },
  99. {field: 'wealth', title: '生日', width: 135, },
  100. {field: 'wealth', title: '年龄', width: 135, },
  101. {field: 'wealth', title: '是否已婚', width: 135, },
  102. {field: 'wealth', title: '是否已育', width: 135, },
  103. {field: 'wealth', title: '国家地区', width: 135, },
  104. {field: 'wealth', title: '民族', width: 135, },
  105. {field: 'wealth', title: '政治面貌', width: 135, },
  106. {field: 'wealth', title: '籍贯', width: 135, },
  107. {field: 'wealth', title: '操作', width: 135, fixed: 'right',templet: `<div><a onclick='console.log({{d.id}})' class="layui-table-link">编辑</a></div>`},
  108. ]]
  109. });
  110. });
  111. </script>
  112. </body>
  113. </html>