index.blade.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. @extends('layouts.admin.app')
  2. @section('plug-css')
  3. <link href="{{ asset('js/bootstrap-table/dist/bootstrap-table.css') }}" rel="stylesheet">
  4. @endsection
  5. @section('crumbs')
  6. <ol class="breadcrumb crumbs">
  7. <li><a href="{{ route('admin.index') }}#">后台导航</a></li>
  8. <li class="active">会员列表</li>
  9. </ol>
  10. @endsection
  11. @section('content')
  12. <form id="searchForm" class="form-inline">
  13. <div class="">
  14. <div class="form-group">
  15. <label for="name" class="label-css"> ID:</label>
  16. <input class="form-control" type="text" name="id">
  17. </div>
  18. <div class="form-group">
  19. <label for="name" class="label-css"> 昵称:</label>
  20. <input class="form-control" type="text" name="nickname">
  21. </div>
  22. <div class="form-group">
  23. <label for="name" class="label-css"> 手机号:</label>
  24. <input class="form-control" type="text" name="phone">
  25. </div>
  26. <button type="button" class="btn btn-primary">查询</button>
  27. </div>
  28. </form>
  29. <hr class="hr-css">
  30. <div>
  31. <div id="toolbar">
  32. <div class="columns columns-left btn-group pull-left">
  33. </div>
  34. </div>
  35. <table id="ContentTable"></table>
  36. </div>
  37. @endsection
  38. @section('plug-js')
  39. <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
  40. <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
  41. <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
  42. <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
  43. <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
  44. @endsection
  45. @section('scripts')
  46. <script>
  47. $(function(){
  48. BootStrapInit.init('tableMember','ContentTable',{
  49. searchForm: 'searchForm', // 表单搜索id 省略默认 'searchForm'
  50. url: "{{ route('admin.member.ajax.index') }}",
  51. method: 'post',
  52. toolbar: '#toolbar',
  53. idField: '', // 指定主键列
  54. uniqueId: "id", // 这里需要指定当前查询表唯一主键字段
  55. columns: [
  56. {
  57. checkbox: true,
  58. align: 'center',
  59. valign: 'middle'
  60. },
  61. {
  62. field: 'id',
  63. title: 'ID',
  64. align: 'center',
  65. valign: 'middle',
  66. },
  67. {
  68. field: 'nickname',
  69. title: '会员昵称',
  70. align: 'center',
  71. valign: 'middle',
  72. },
  73. {
  74. field: 'phone',
  75. title: '会员电话',
  76. align: 'center',
  77. valign: 'middle',
  78. },
  79. {
  80. field: 'head_img',
  81. title: '头像',
  82. align: 'center',
  83. valign: 'middle',
  84. formatter:thumbFormatter
  85. },
  86. {
  87. field: 'money',
  88. title: '余额',
  89. align: 'center',
  90. valign: 'middle',
  91. },
  92. {
  93. field: 'consume_money',
  94. title: '消费金',
  95. align: 'center',
  96. valign: 'middle',
  97. },
  98. {
  99. field: 'invite_code',
  100. title: '推荐码',
  101. align: 'center',
  102. valign: 'middle',
  103. },
  104. {
  105. field: 'created_at',
  106. title: '创建时间',
  107. align: 'center',
  108. valign: 'middle',
  109. },
  110. {
  111. field: 'updated_at',
  112. title: '更新时间',
  113. align: 'center',
  114. valign: 'middle',
  115. },
  116. {
  117. pkId: 'id', // 当前主键id 兼容排序 field='id' 默认值id
  118. title: '操作',
  119. align: 'center',
  120. valign: 'middle',
  121. width: '185px',
  122. formatter:operateFormatter,
  123. btn_group:[
  124. {
  125. 'name' : '设为客服',
  126. 'message' : '是否设置为客服',
  127. 'class' : 'btn-primary createForm',
  128. 'skip' : 'skip',
  129. 'url' : 'javascript:;',
  130. }
  131. ]
  132. }
  133. ]
  134. });
  135. });
  136. </script>
  137. @endsection