index.blade.php 5.2 KB

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