data.blade.php 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  2. <thead>
  3. <tr>
  4. <th>
  5. <label><input type="checkbox" id="checkAll"> 本页</label>
  6. <label><input type="checkbox" id="checkTotal"> 全部</label>
  7. </th>
  8. <th class="sorting" data-sort="id"> ID</th>
  9. <th class="sorting"> 联系方式</th>
  10. <th class="sorting"> 联系人姓名</th>
  11. <th class="sorting" data-sort="ower_id"> 线索拥有者</th>
  12. <th class="sorting">企业名称</th>
  13. <th class="sorting">企业网址</th>
  14. <th class="sorting">注册资本</th>
  15. <th class="sorting"> 最新跟进</th>
  16. <th class="sorting"> 标签</th>
  17. <th class="sorting" data-sort="created_at"> 领取时间</th>
  18. <th width="22%">相关操作</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. @if(isset($list))
  23. @foreach($list as $key => $item)
  24. <tr>
  25. <td>
  26. <label><input class="contacts" name='contact_id[]' type="checkbox"
  27. value="{{ $item->id }}" data-id="{{ $item->id }}"></label>
  28. </td>
  29. <td>{{ $item->id }}</td>
  30. <td>{{ $item->contact?$item->contact->phone:'暂无联系人信息' }}</td>
  31. <td>{{ $item->contact?$item->contact->linkman:'' }}</td>
  32. <td>{{ $item->ower->real_name }}</td>
  33. <td>
  34. <a href="{{ U('Company/Info/view',['id'=> $item->company->id]) }}"> {{ $item->company->company_name }} </a>
  35. </td>
  36. <td><a href="http://{{ $item->company->website }}"
  37. target="_blank">{{ $item->company->website }}</a></td>
  38. <td>{{ $item->company->reg_capital }}</td>
  39. <td>{{ $item->latestProgress() }}</td>
  40. <td>{{ $item->label }}</td>
  41. <td>{{ $item->created_at }}</td>
  42. <td>
  43. @if(role('User/Threads/update'))
  44. <button onclick="layer.open({type: 2,area: ['25%', '60%'],content: '{{ U('User/Threads/update',['id'=>$item->id])}}'});"
  45. class="btn btn-sm btn-primary ">跟进
  46. </button>
  47. @endif
  48. @if(role('User/Threads/destroy'))
  49. <a class="btn btn-sm btn-danger"
  50. href="{{ U('User/Threads/destroy',['id'=>$item->id])}}"
  51. onclick="return confirm('你确定放弃该线索?');">放弃</a>
  52. @endif
  53. @if(role('User/Threads/view'))
  54. @endif
  55. </td>
  56. </tr>
  57. @endforeach
  58. @endif
  59. </tbody>
  60. </table>
  61. <div class="row">
  62. <div class="col-sm-6">
  63. <div class="dataTables_info" id="DataTables_Table_0_info"
  64. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  65. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  66. </div>
  67. </div>
  68. <div class="col-sm-6">
  69. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  70. {!! $list->setPath('')->appends(Request::all())->render() !!}
  71. </div>
  72. </div>
  73. </div>