index.blade.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @extends('admin.public.base')
  2. @section('body_class')
  3. style="margin: 0 auto;width: 96%;padding: 30px 0px;"
  4. @endsection
  5. @section('content')
  6. @if(check_auth('admin/work_sync/add'))
  7. <div class="page-header">
  8. <a data-url="{{url('admin/work_sync/add')}}" class="set_status btn btn-primary">创建任务</a>
  9. </div>
  10. @endif
  11. <form action="" method="get" class="form-horizontal form-line">
  12. </form>
  13. <div class="row">
  14. <div class="col-xs-12">
  15. <div class="table-responsive">
  16. <table class="table table-striped table-bordered table-hover">
  17. <thead>
  18. <tr>
  19. <th>任务ID</th>
  20. <th>任务状态</th>
  21. <th>同步数量</th>
  22. <th>存在数量</th>
  23. <th>创建时间</th>
  24. <th>更新时间</th>
  25. <th>操作</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. @foreach ($list as $a)
  30. <tr>
  31. <th>{{$a['id']}}</th>
  32. <td>{{$a['status']?'已结束':'进行中'}}</td>
  33. <td>{{$a['sync_total']}}</td>
  34. <td>{{$a['has_total']}}</td>
  35. <td> {{date('Y/m/d H:i:s',$a['insert_time'])}}</td>
  36. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  37. <td>
  38. @if(check_auth('admin/work_sync/set_status'))
  39. @if( $a['status'] == 0 )
  40. <a data-url="{{url('admin/work_sync/set_status?'.http_build_query(['id'=>$a['id'],'status'=>2]))}}" class="set_status btn btn-sm btn-danger" >取消任务</a>
  41. @endif
  42. @endif
  43. </td>
  44. </tr>
  45. @endforeach
  46. <tr>
  47. <td colspan="20" class="page">{{$list->render()}}</td>
  48. </tr>
  49. <tr>
  50. <td colspan="20">总计 {{$list->total()}} 个商店</td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. </div>
  55. </div>
  56. </div>
  57. @endsection