gift.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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="giftName"/>
  16. </li>
  17. <li>
  18. <label>礼物价值积分数:</label>
  19. <input type="text" name="giftNum"/>
  20. </li>
  21. <!-- <li>-->
  22. <!-- <label>该礼物是否显示:</label>-->
  23. <!-- <input type="text" name="state"/>-->
  24. <!-- </li>-->
  25. <li>
  26. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
  27. class="fa fa-search"></i>&nbsp;搜索</a>
  28. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
  29. class="fa fa-refresh"></i>&nbsp;重置</a>
  30. </li>
  31. </ul>
  32. </div>
  33. </form>
  34. </div>
  35. <div class="btn-group-sm" id="toolbar" role="group">
  36. <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="xhnnotsingle:gift:add">
  37. <i class="fa fa-plus"></i> 添加
  38. </a>
  39. <a class="btn btn-primary single disabled" onclick="$.operate.edit()"
  40. shiro:hasPermission="xhnnotsingle:gift:edit">
  41. <i class="fa fa-edit"></i> 修改
  42. </a>
  43. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
  44. shiro:hasPermission="xhnnotsingle:gift:remove">
  45. <i class="fa fa-remove"></i> 删除
  46. </a>
  47. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="xhnnotsingle:gift:export">
  48. <i class="fa fa-download"></i> 导出
  49. </a>
  50. </div>
  51. <div class="col-sm-12 select-table table-striped">
  52. <table id="bootstrap-table"></table>
  53. </div>
  54. </div>
  55. </div>
  56. <th:block th:include="include :: footer"/>
  57. <script th:inline="javascript">
  58. var sys_yes_no = [[${@dict.getType('sys_yes_no')}]];
  59. var editFlag = [[${@permission.hasPermi('xhnnotsingle:gift:edit')}]];
  60. var removeFlag = [[${@permission.hasPermi('xhnnotsingle:gift:remove')}]];
  61. var prefix = ctx + "xhnnotsingle/gift";
  62. $(function () {
  63. var options = {
  64. url: prefix + "/list",
  65. createUrl: prefix + "/add",
  66. updateUrl: prefix + "/edit/{id}",
  67. removeUrl: prefix + "/remove",
  68. exportUrl: prefix + "/export",
  69. modalName: "礼物信息",
  70. columns: [{
  71. checkbox: true
  72. },
  73. {
  74. field: 'giftName',
  75. title: '礼物名称'
  76. },
  77. {
  78. field: 'giftNum',
  79. title: '礼物价值积分数'
  80. },
  81. {
  82. field: 'state',
  83. title: '该礼物是否显示',
  84. formatter: function(value, row, index) {
  85. return $.table.selectDictLabel(sys_yes_no, value);
  86. }
  87. },
  88. {
  89. field: 'giftNum',
  90. title: '礼物图标',
  91. formatter: function (value, row, index) {
  92. var html ='<img src=\"' + value + '\" width=\"30\" height=\"30\">';
  93. return html;
  94. }
  95. },
  96. {
  97. title: '操作',
  98. align: 'center',
  99. formatter: function (value, row, index) {
  100. var actions = [];
  101. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  102. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
  103. return actions.join('');
  104. }
  105. }]
  106. };
  107. $.table.init(options);
  108. });
  109. </script>
  110. </body>
  111. </html>