award.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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="role-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. 奖项类型:<select name="type" th:with="type=${@dict.getType('zxb_item_type')}">
  15. <option value="">所有</option>
  16. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  17. </select>
  18. </li>
  19. <li>
  20. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  21. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  22. </li>
  23. </ul>
  24. </div>
  25. </form>
  26. </div>
  27. <div class="btn-group-sm" id="toolbar" role="group">
  28. <a class="btn btn-success" onclick="add()" shiro:hasPermission="activity:zxb:award:add">
  29. <i class="fa fa-plus"></i> 新增
  30. </a>
  31. </div>
  32. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  33. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  34. </div>
  35. </div>
  36. </div>
  37. <th:block th:include="include :: footer" />
  38. <script th:inline="javascript">
  39. var editFlag = [[${@permission.hasPermi('activity:zxb:award:edit')}]];
  40. var removeFlag = [[${@permission.hasPermi('activity:zxb:award:del')}]];
  41. var zxbItemType = [[${@dict.getType('zxb_item_type')}]];
  42. var commonType = [[${@dict.getType('common_type')}]];
  43. var prefix = ctx + "activity/zxb/award";
  44. $(function() {
  45. var options = {
  46. url: prefix + "/list",
  47. createUrl: prefix + "/add",
  48. updateUrl: prefix + "/edit/{id}",
  49. removeUrl: prefix + "/remove",
  50. modalName: "周星礼物奖励",
  51. height: $(window).height()-120,
  52. columns: [
  53. {
  54. field: 'id',
  55. title: 'ID'
  56. },
  57. {
  58. field: 'giftId',
  59. title: '周星礼物ID'
  60. },
  61. {
  62. field: 'giftName',
  63. title: '周星礼物名称',
  64. align : 'center'
  65. },
  66. {
  67. field: 'itemId',
  68. title: '奖项ID',
  69. align : 'center'
  70. },
  71. {
  72. field: 'itemName',
  73. title: '奖项名称',
  74. align : 'center'
  75. },
  76. {
  77. field: 'type',
  78. title: '奖项类型',
  79. align : 'center',
  80. formatter: function(value, row, index) {
  81. return $.table.selectDictLabel(zxbItemType, value);
  82. }
  83. },
  84. {
  85. field: 'days',
  86. title: '天数',
  87. align : 'center'
  88. },
  89. {
  90. field: 'status',
  91. title: '状态',
  92. align: 'center',
  93. formatter: function(value, row, index) {
  94. return $.table.selectDictLabel(commonType, value);
  95. }
  96. },
  97. {
  98. field: 'content',
  99. title: '内容',
  100. align : 'center'
  101. },
  102. {
  103. field: 'seq',
  104. title: '排序',
  105. align : 'center'
  106. },
  107. {
  108. field: 'createTime',
  109. title: '创建时间',
  110. align : 'center'
  111. },
  112. {
  113. field: 'adminName',
  114. title: '操作人',
  115. align : 'center'
  116. },
  117. {
  118. title: '操作',
  119. align: 'center',
  120. formatter: function(value, row, index) {
  121. var actions = [];
  122. if(row.status == 1){
  123. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
  124. }
  125. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="remove(\'' + row.id + '\')"><i class="fa fa-remove"></i> 删除</a>');
  126. return actions.join('');
  127. }
  128. }]
  129. };
  130. $.table.init(options);
  131. });
  132. function add(){
  133. var url = prefix + "/add";
  134. $.modal.open("新增周星奖励信息",url,'800','600');
  135. }
  136. function edit(id){
  137. var url = prefix + "/edit/" + id;
  138. $.modal.open("编辑周星奖励信息",url,'800','600');
  139. }
  140. function remove(id) {
  141. $.modal.confirm("确认要删除该周星奖励记录吗?", function() {
  142. $.operate.post(prefix + "/del?ids=" + id);
  143. });
  144. }
  145. </script>
  146. </body>
  147. </html>