salary.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('工资列表')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 search-collapse">
  10. <form id="formId">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. <label>用户:</label>
  15. <!-- <input type="text" name="userId"/>-->
  16. <select name="userId" th:with="users=${@user.getUserList()}">
  17. <option value="">所有</option>
  18. <option th:each="user : ${users}" th:text="${user.userName}" th:value="${user.userId}"></option>
  19. </select>
  20. </li>
  21. <li>
  22. <label>科目种类:</label>
  23. <select name="subjectType" th:with="type=${@dict.getType('subject_type')}">
  24. <option value="">所有</option>
  25. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  26. </select>
  27. </li>
  28. <li class="select-time">
  29. <label>工资日期:</label>
  30. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginSalaryDate]"/>
  31. <span>-</span>
  32. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endSalaryDate]"/>
  33. </li>
  34. <li>
  35. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  36. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  37. </li>
  38. </ul>
  39. </div>
  40. </form>
  41. </div>
  42. <div class="btn-group-sm" id="toolbar" role="group">
  43. <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="business:salary:add">
  44. <i class="fa fa-plus"></i> 添加
  45. </a>
  46. <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="business:salary:edit">
  47. <i class="fa fa-edit"></i> 修改
  48. </a>
  49. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:salary:remove">
  50. <i class="fa fa-remove"></i> 删除
  51. </a>
  52. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="business:salary:export">
  53. <i class="fa fa-download"></i> 导出
  54. </a>
  55. </div>
  56. <div class="col-sm-12 select-table table-striped">
  57. <table id="bootstrap-table"></table>
  58. </div>
  59. </div>
  60. </div>
  61. <th:block th:include="include :: footer" />
  62. <script th:inline="javascript">
  63. var editFlag = [[${@permission.hasPermi('business:salary:edit')}]];
  64. var removeFlag = [[${@permission.hasPermi('business:salary:remove')}]];
  65. var subjectTypeDatas = [[${@dict.getType('subject_type')}]];
  66. var prefix = ctx + "business/salary";
  67. $(function() {
  68. var options = {
  69. url: prefix + "/list",
  70. createUrl: prefix + "/add",
  71. updateUrl: prefix + "/edit/{id}",
  72. removeUrl: prefix + "/remove",
  73. exportUrl: prefix + "/export",
  74. modalName: "工资",
  75. columns: [{
  76. checkbox: true
  77. },
  78. {
  79. field: 'salaryId',
  80. title: '主键',
  81. visible: false
  82. },
  83. {
  84. field: 'userId',
  85. title: '用户',
  86. visible: false
  87. },
  88. {
  89. field: 'userName',
  90. title: '用户名称'
  91. },
  92. {
  93. field: 'subjectType',
  94. title: '薪水分类',
  95. formatter: function(value, row, index) {
  96. return $.table.selectDictLabel(subjectTypeDatas, value);
  97. }
  98. },
  99. {
  100. field: 'salaryDate',
  101. title: '日期'
  102. },
  103. {
  104. field: 'sumAmount',
  105. title: '总金额'
  106. },
  107. {
  108. title: '操作',
  109. align: 'center',
  110. formatter: function(value, row, index) {
  111. var actions = [];
  112. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.salaryId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  113. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.salaryId + '\')"><i class="fa fa-remove"></i>删除</a>');
  114. return actions.join('');
  115. }
  116. }]
  117. };
  118. $.table.init(options);
  119. });
  120. </script>
  121. </body>
  122. </html>