data.blade.php 3.1 KB

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