marriage.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  18. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  19. </li>
  20. </ul>
  21. </div>
  22. </form>
  23. </div>
  24. <div class="btn-group-sm" id="toolbar" role="group">
  25. <a class="btn btn-success" onclick="add()" shiro:hasPermission="room:marriage:add">
  26. <i class="fa fa-plus"></i> 新增
  27. </a>
  28. </div>
  29. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  30. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  31. </div>
  32. </div>
  33. </div>
  34. <th:block th:include="include :: footer" />
  35. <script th:inline="javascript">
  36. var removeFlag = [[${@permission.hasPermi('room:marriage:del')}]];
  37. var commonType = [[${@dict.getType('common_type')}]];
  38. var prefix = ctx + "room/marriage";
  39. $(function() {
  40. var options = {
  41. url: prefix + "/list",
  42. createUrl: prefix + "/add",
  43. removeUrl: prefix + "/remove",
  44. modalName: "姻缘管理",
  45. height: $(window).height()-120,
  46. columns: [
  47. {
  48. field: 'id',
  49. title: 'ID'
  50. },
  51. {
  52. field: 'uid',
  53. title: 'UID'
  54. },
  55. {
  56. field: 'erbanNo',
  57. title: '卿卿号',
  58. align : 'center'
  59. },
  60. {
  61. field: 'nick',
  62. title: '昵称',
  63. align : 'center'
  64. },
  65. {
  66. field: 'start',
  67. title: '开始时间',
  68. align : 'center'
  69. },
  70. {
  71. field: 'end',
  72. title: '结束时间',
  73. align : 'center'
  74. },
  75. {
  76. field: 'status',
  77. title: '状态',
  78. align: 'center',
  79. formatter: function(value, row, index) {
  80. return $.table.selectDictLabel(commonType, value);
  81. }
  82. },
  83. {
  84. field: 'createTime',
  85. title: '创建时间',
  86. align : 'center'
  87. },
  88. {
  89. field: 'adminName',
  90. title: '操作人',
  91. align : 'center'
  92. },
  93. {
  94. title: '操作',
  95. align: 'center',
  96. formatter: function(value, row, index) {
  97. var actions = [];
  98. 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>');
  99. return actions.join('');
  100. }
  101. }]
  102. };
  103. $.table.init(options);
  104. });
  105. function add(){
  106. var url = prefix + "/add";
  107. $.modal.open("新增姻缘信息",url,'800','400');
  108. }
  109. function remove(id) {
  110. $.modal.confirm("确认要删除该姻缘配置记录吗?", function() {
  111. $.operate.post(prefix + "/del?ids=" + id);
  112. });
  113. }
  114. </script>
  115. </body>
  116. </html>