index.blade.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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>
  15. </form>
  16. <hr class="hr-css">
  17. <div>
  18. <div id="toolbar">
  19. <div class="columns columns-left btn-group pull-left">
  20. </div>
  21. </div>
  22. <table id="ContentTable"></table>
  23. </div>
  24. @endsection
  25. @section('plug-js')
  26. <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
  27. <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
  28. <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
  29. <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
  30. <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
  31. @endsection
  32. @section('scripts')
  33. <script>
  34. $(function(){
  35. BootStrapInit.init('tableInvest','ContentTable',{
  36. searchForm: 'searchForm', // 表单搜索id 省略默认 'searchForm'
  37. url: "{{ route('admin.invest.ajax.index') }}",
  38. method: 'post',
  39. toolbar: '#toolbar',
  40. idField: '', // 指定主键列
  41. uniqueId: "id", // 这里需要指定当前查询表唯一主键字段
  42. columns: [
  43. {
  44. checkbox: true,
  45. align: 'center',
  46. valign: 'middle'
  47. },
  48. {
  49. field: 'id',
  50. title: 'ID',
  51. align: 'center',
  52. valign: 'middle',
  53. },
  54. {
  55. field: 'title',
  56. title: '投资名称',
  57. align: 'center',
  58. valign: 'middle'
  59. },
  60. {
  61. field: 'invest_money',
  62. title: '投入金额',
  63. align: 'center',
  64. valign: 'middle'
  65. },
  66. {
  67. field: 'created_at',
  68. title: '创建时间',
  69. align: 'center',
  70. valign: 'middle',
  71. },
  72. {
  73. field: 'updated_at',
  74. title: '更新时间',
  75. align: 'center',
  76. valign: 'middle',
  77. },
  78. {
  79. pkId: 'id', // 当前主键id 兼容排序 field='id' 默认值id
  80. title: '操作',
  81. align: 'center',
  82. valign: 'middle',
  83. width: '185px',
  84. formatter:operateFormatter,
  85. btn_group:[
  86. {
  87. 'name' : '编辑',
  88. 'class' : 'btn-primary createForm',
  89. 'url' : 'javascript:;',
  90. 'confirm_url': '{{ route('admin.invest.edit', ['id'=>'-val-'])}}'
  91. }
  92. ]
  93. }
  94. ]
  95. });
  96. });
  97. </script>
  98. @endsection