index.blade.php 5.6 KB

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