index.blade.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. <form action="" method="get" class="form-horizontal form-line" name="thisform">
  7. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  8. <input type="text" class="form-control" name="active_name" value="{{request('active_name','')}}" placeholder="请输入活动名称" />
  9. </div>
  10. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  11. <input type="text" class="form-control" name="custom_code" value="{{request('custom_code','')}}" placeholder="请输入客户编码查询" />
  12. </div>
  13. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  14. <input type="text" class="form-control" name="phone" value="{{request('phone','')}}" placeholder="请输入联系方式查询" />
  15. </div>
  16. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  17. <select name="city_id" class="form-control selectpicker" data-max-options="20" data-live-search="true" data-live-search-placeholder="搜索城市" data-none-results-text="未搜索到 {0}" title="选择城市">
  18. @foreach ($cityList as $group)
  19. <optgroup label="{{$group['name']}}">
  20. @foreach ($group['city'] as $city)
  21. <option value="{{$city['id']}}" @if( $city['id'] == request('city_id',0) ) selected @endif >{{$city['name']}}</option>
  22. @endforeach
  23. </optgroup>
  24. @endforeach
  25. </select>
  26. </div>
  27. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  28. <input type="date" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入创建时间查询" />
  29. </div>
  30. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  31. <a href="{{url('admin/custom_clockin_record/index')}}" class="btn btn-sm btn-default" >重置</a>
  32. @if( check_auth('admin/custom_clockin_record/down_excel') )
  33. <button type="button" onclick="alter_from_attr({'method':'get','action':`{{url('admin/custom_clockin_record/down_excel')}}`})" class="btn btn-sm btn-primary"> 下载</button>
  34. @endif
  35. </form>
  36. <div class="row">
  37. <div class="col-xs-12">
  38. <div class="table-responsive">
  39. <table class="table table-striped table-bordered table-hover">
  40. <thead>
  41. <tr>
  42. <th>记录ID</th>
  43. <th>客户编码</th>
  44. <th>客户昵称</th>
  45. <th>活动名称</th>
  46. <th>联系方式</th>
  47. <th>微伴ID</th>
  48. <th>客户城市</th>
  49. <th>客户状态</th>
  50. <th>打卡时间</th>
  51. <th>连续打卡天数</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. @foreach ($list as $a)
  56. <tr>
  57. <th> {{$a['id']}} </th>
  58. <th> {{$a['custom_code']}} </th>
  59. <td> {{$a['username']}} </td>
  60. <td> {{$a['active_name']}} </td>
  61. <td> {{$a['phone']}} </td>
  62. <td> <a href="{{url('admin/weiban_external/index?'.http_build_query(['id'=>$a['weiban_extid']]))}}">{{$a['weiban_extid']}}</a></td>
  63. <td> {{$a['city_name']}} </td>
  64. <td> {{$a['status']?'禁用':'正常'}} </td>
  65. <td> {{date('Y/m/d H:i:s',$a['clockin_time'])}}</td>
  66. <td> {{$a['clockin_day']}} </td>
  67. </tr>
  68. @endforeach
  69. <tr>
  70. <td colspan="20" class="page">{{$list->render()}}</td>
  71. </tr>
  72. <tr>
  73. <td colspan="20">总计 {{$list->total()}} 个记录</td>
  74. </tr>
  75. </tbody>
  76. </table>
  77. </div>
  78. </div>
  79. </div>
  80. @endsection
  81. @section('javascript')
  82. <script src="/static/fileupload/jquery.ui.widget.js"></script>
  83. <script src="/static/fileupload/jquery.fileupload.js"></script>
  84. <script type="text/javascript">
  85. $(function(){
  86. $('.upload').on('click', function() {
  87. $('#form-upload').remove();
  88. $('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input osctype="btn_upload_file" type="file" name="order_file" multiple="multiple" /></form>');
  89. $('#form-upload input[name=\'clockin_record_file\']').trigger('click');
  90. $('[osctype="btn_upload_file"]').fileupload({
  91. dataType: 'json',
  92. url: "{{url('admin/custom_clockin_record/import_execl')}}",
  93. singleFileUploads: false,
  94. beforeSend: function() {
  95. art.dialog({
  96. id: 'loading',
  97. lock: true,
  98. title: '文件上传中'
  99. });
  100. },
  101. done: function(e, data) {
  102. art.dialog.list['loading'].close();
  103. var result = data.result;
  104. if (result.code == 'error') {
  105. art.dialog({
  106. content: result.msg,
  107. lock: true,
  108. ok: function() {}
  109. });
  110. }
  111. if (result.code == 'success') {
  112. art.dialog({
  113. content: result.msg,
  114. lock: true,
  115. ok: function() {
  116. location.reload();
  117. }
  118. });
  119. }
  120. },
  121. fail: function(e,c) {
  122. art.dialog.list['loading'].close();
  123. art.dialog({
  124. content: '<p>'+c.jqXHR.status+'=>'+c.jqXHR.statusText+'</p>',
  125. lock: true,
  126. ok: function() {}
  127. });
  128. }
  129. });
  130. });
  131. })
  132. </script>
  133. @endsection