indexj.blade.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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="mobile" class="label-css"> 匠人账户:</label>
  16. <input class="form-control" type="text" name="mobile">
  17. </div>
  18. <div class="form-group">
  19. <label for="recom_mobile" class="label-css"> 推荐人账户:</label>
  20. <input class="form-control" type="text" name="recom_mobile">
  21. </div>
  22. <input type="hidden" name="level_id" value="1">
  23. &ensp;&ensp;
  24. <button type="button" class="btn btn-primary">查询</button>
  25. </div>
  26. </form>
  27. <hr class="hr-css">
  28. <div>
  29. <div id="toolbar">
  30. <div class="columns columns-left btn-group pull-left">
  31. <a href="javascript:;">
  32. <button class="btn btn-default" type="button" id="excel-jys">
  33. <span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>&ensp;匠人导出
  34. </button>
  35. </a>
  36. </div>
  37. </div>
  38. <table id="ContentTable"></table>
  39. </div>
  40. @endsection
  41. @section('plug-js')
  42. <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
  43. <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
  44. <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
  45. <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
  46. <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
  47. @endsection
  48. @section('scripts')
  49. <script>
  50. $(function(){
  51. BootStrapInit.init('tableMember','ContentTable',{
  52. searchForm: 'searchForm', // 表单搜索id 省略默认 'searchForm'
  53. url: "{{ route('admin.member.ajax.list',['level_id'=>$level_id]) }}",
  54. method: 'post',
  55. toolbar: '#toolbar',
  56. idField: '', // 指定主键列
  57. uniqueId: "id", // 这里需要指定当前查询表唯一主键字段
  58. columns: [
  59. {
  60. checkbox: true,
  61. align: 'center',
  62. valign: 'middle'
  63. },
  64. {
  65. field: 'nickname',
  66. title: '匠人昵称',
  67. align: 'center',
  68. valign: 'middle',
  69. },
  70. {
  71. field: 'mobile',
  72. title: '匠人账户',
  73. align: 'center',
  74. valign: 'middle',
  75. },
  76. {
  77. field: 'recom_mobile',
  78. title: '推荐人账户',
  79. align: 'center',
  80. valign: 'middle',
  81. },
  82. {
  83. field: 'order_num',
  84. title: '商品使用总数',
  85. align: 'center',
  86. valign: 'middle'
  87. },
  88. {
  89. field: 'money',
  90. title: '余额',
  91. align: 'center',
  92. valign: 'middle'
  93. },
  94. {
  95. field: 'w_money',
  96. title: '使用收益',
  97. align: 'center',
  98. valign: 'middle'
  99. },
  100. {
  101. field: 't_money',
  102. title: '推荐收益',
  103. align: 'center',
  104. valign: 'middle'
  105. },
  106. {
  107. field: 'total_money',
  108. title: '总收益',
  109. align: 'center',
  110. valign: 'middle'
  111. },
  112. {
  113. field: 'created_at',
  114. title: '创建时间',
  115. align: 'center',
  116. valign: 'middle',
  117. sortable: true
  118. },
  119. ]
  120. });
  121. $(document).on('click', '#excel-jys', function () {
  122. $('#searchForm').prop('action', "{{ route('admin.member.excel') }}");
  123. $('#searchForm').prop('method', 'get');
  124. $('#searchForm').submit();
  125. return false;
  126. });
  127. });
  128. </script>
  129. @endsection