home_hot_manual.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. 卿卿号:<input type="text" name="erBanNo" placeholder="请输入卿卿号"/>
  15. </li>
  16. <li>
  17. 显示位置:<select name="viewType" th:with="type=${@dict.getType('recomm_view_position')}">
  18. <option value="">所有</option>
  19. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  20. </select>
  21. </li>
  22. <li>
  23. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  24. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  25. </li>
  26. </ul>
  27. </div>
  28. </form>
  29. </div>
  30. <div class="btn-group-sm" id="toolbar" role="group">
  31. <a class="btn btn-success" onclick="add()" shiro:hasPermission="operation:home:recomm:add">
  32. <i class="fa fa-plus"></i> 新增
  33. </a>
  34. </div>
  35. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  36. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  37. </div>
  38. </div>
  39. </div>
  40. <th:block th:include="include :: footer" />
  41. <script th:inline="javascript">
  42. var editFlag = [[${@permission.hasPermi('operation:home:recomm:edit')}]];
  43. var removeFlag = [[${@permission.hasPermi('operation:home:recomm:del')}]];
  44. var recommViewPosition = [[${@dict.getType('recomm_view_position')}]];
  45. var isBuyType = [[${@dict.getType('is_buy_type')}]];
  46. var roomType = [[${@dict.getType('room_type')}]];
  47. var prefix = ctx + "operation/home/recomm";
  48. $(function() {
  49. var options = {
  50. url: prefix + "/list",
  51. createUrl: prefix + "/add",
  52. updateUrl: prefix + "/edit/{id}",
  53. removeUrl: prefix + "/remove",
  54. modalName: "推荐位信息",
  55. height: $(window).height()-120,
  56. columns: [
  57. {
  58. field: 'recommId',
  59. title: '编号'
  60. },
  61. {
  62. field: 'erBanNo',
  63. title: '卿卿号'
  64. },
  65. {
  66. field: 'type',
  67. title: '推荐类型',
  68. align : 'center',
  69. formatter: function(value, row, index) {
  70. return $.table.selectDictLabel(isBuyType, value);
  71. }
  72. },
  73. {
  74. field: 'title',
  75. title: '房间标题',
  76. align : 'center'
  77. },
  78. {
  79. field: 'isPermitRoom',
  80. title: '房间类型',
  81. align : 'center',
  82. formatter: function(value, row, index) {
  83. return $.table.selectDictLabel(roomType, value);
  84. }
  85. },
  86. {
  87. field: 'seqNo',
  88. title: '排序',
  89. align : 'center'
  90. },
  91. {
  92. field: 'viewType',
  93. title: '显示位置',
  94. align : 'center',
  95. formatter: function(value, row, index) {
  96. return $.table.selectDictLabel(recommViewPosition, value);
  97. }
  98. },
  99. {
  100. field: 'startValidTime',
  101. title: '开始时间',
  102. align : 'center'
  103. },
  104. {
  105. field: 'endValidTime',
  106. title: '结束时间',
  107. align : 'center'
  108. },
  109. {
  110. field: 'createTime',
  111. title: '创建时间',
  112. align : 'center'
  113. },
  114. {
  115. title: '操作',
  116. align: 'center',
  117. formatter: function(value, row, index) {
  118. var actions = [];
  119. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit(\'' + row.recommId + '\',\'' + row.erBanNo + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
  120. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="remove(\'' + row.recommId + '\')"><i class="fa fa-remove"></i> 删除</a>');
  121. return actions.join('');
  122. }
  123. }]
  124. };
  125. $.table.init(options);
  126. });
  127. function add(){
  128. var url = prefix + "/add";
  129. $.modal.open("新增推荐位信息",url,'800','400');
  130. }
  131. function edit(id,erBanNo){
  132. var url = prefix + "/edit/" + id;
  133. $.modal.open("编辑卿卿号【"+erBanNo+"】推荐位信息",url,'800','400');
  134. }
  135. function remove(id) {
  136. $.modal.confirm("确认要删除该推荐位记录吗?", function() {
  137. $.operate.post(prefix + "/remove?ids=" + id);
  138. });
  139. }
  140. </script>
  141. </body>
  142. </html>