index.blade.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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" name="thisform" class="form-horizontal form-line">
  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="title" value="" placeholder="请输入标题模糊搜索" />
  9. </div>
  10. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
  11. <select name="type_id" class="form-control">
  12. <option value="" >请选择类型搜索</option>
  13. <option value="1" @if (request('type_id') === '1' ) selected="selected" @endif >阅读</option>
  14. <option value="2" @if (request('type_id') === '2' ) selected="selected" @endif >点赞</option>
  15. <option value="3" @if (request('type_id') === '3' ) selected="selected" @endif >分享</option>
  16. <option value="4" @if (request('type_id') === '4' ) selected="selected" @endif >推荐</option>
  17. </select>
  18. </div>
  19. <div class="form-group col-sm-2 col-lg-2 col-md-2 col-sm-2 col-xs-12">
  20. <input class="form-control" type="datetime-local" placeholder="开始时间" name="start_time" value="" />
  21. </div>
  22. <div class="form-group col-sm-2 col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
  23. <input class="form-control" type="datetime-local" placeholder="结束时间" name="end_time" value="" />
  24. </div>
  25. <div class="form-group col col-xs-4 col-md-2" style="margin-right: 2px;">
  26. <button type="button" onclick="alter_from_attr({'method':'get','action':''})" class="btn btn-sm btn-primary" style="margin-right: 20px;"> 查询</button>
  27. <a href="{{url('admin/article_event/index')}}" class="btn btn-sm btn-default" style="margin-right: 20px;" >重置</a>
  28. @if( check_auth('admin/article_event/down_excel') )
  29. <button type="button" onclick="alter_from_attr({'method':'get','action':`{{url('admin/article_event/down_excel')}}`})" class="btn btn-sm btn-primary"> 下载表格</button>
  30. @endif
  31. </div>
  32. @csrf
  33. </form>
  34. <div class="row">
  35. <div class="col-xs-12">
  36. <div class="table-responsive">
  37. <table class="table table-striped table-bordered table-hover">
  38. <thead>
  39. <tr>
  40. <th>资讯ID</th>
  41. <th>资讯标题</th>
  42. <th>客户昵称</th>
  43. <th>操作类型</th>
  44. <th>操作时间</th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. @foreach ($list as $a)
  49. <tr>
  50. <td> {{$a['article_id']}}</td>
  51. <td> {{$a['title']}}</td>
  52. <td> {{$a['custom_name']}}</td>
  53. <td> {{$a['event']}} </td>
  54. <td> {{date('Y/m/d H:i',$a['update_time'])}}</td>
  55. </tr>
  56. @endforeach
  57. <tr>
  58. <td colspan="20" class="page">{{$list->render()}}</td>
  59. </tr>
  60. <tr>
  61. <td colspan="20">总计 {{$list->total()}} 条数据</td>
  62. </tr>
  63. </tbody>
  64. </table>
  65. </div>
  66. </div>
  67. </div>
  68. @endsection
  69. @section('javascript')
  70. <script src="/static/fileupload/jquery.ui.widget.js"></script>
  71. <script src="/static/fileupload/jquery.fileupload.js"></script>
  72. <script type="text/javascript">
  73. $(function(){
  74. $('.upload').on('click', function() {
  75. $('#form-upload').remove();
  76. $('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>');
  77. $('#form-upload input[name=\'order_file\']').trigger('click');
  78. $('[osctype="btn_upload_file"]').fileupload({
  79. dataType: 'json',
  80. url: "{{url('admin/orders/import_execl')}}",
  81. singleFileUploads: false,
  82. beforeSend: function() {
  83. art.dialog({
  84. id: 'loading',
  85. lock: true,
  86. title: '文件上传中'
  87. });
  88. },
  89. done: function(e, data) {
  90. art.dialog.list['loading'].close();
  91. var result = data.result;
  92. if (result.code == 'error') {
  93. art.dialog({
  94. content: result.msg,
  95. lock: true,
  96. ok: function() {}
  97. });
  98. }
  99. if (result.code == 'success') {
  100. art.dialog({
  101. content: result.msg,
  102. lock: true,
  103. ok: function() {
  104. location.reload();
  105. }
  106. });
  107. }
  108. },
  109. fail: function(e,c) {
  110. art.dialog.list['loading'].close();
  111. art.dialog({
  112. content: '<p>'+c.jqXHR.status+'=>'+c.jqXHR.statusText+'</p>',
  113. lock: true,
  114. ok: function() {}
  115. });
  116. }
  117. });
  118. });
  119. $('.upload_status').on('click', function() {
  120. $('#form-upload').remove();
  121. $('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>');
  122. $('#form-upload input[name=\'order_file\']').trigger('click');
  123. $('[osctype="btn_upload_file"]').fileupload({
  124. dataType: 'json',
  125. url: "{{url('admin/orders/import_execl_status')}}",
  126. singleFileUploads: false,
  127. beforeSend: function() {
  128. art.dialog({
  129. id: 'loading',
  130. lock: true,
  131. title: '文件上传中'
  132. });
  133. },
  134. done: function(e, data) {
  135. art.dialog.list['loading'].close();
  136. var result = data.result;
  137. if (result.code == 'error') {
  138. art.dialog({
  139. content: result.msg,
  140. lock: true,
  141. ok: function() {}
  142. });
  143. }
  144. if (result.code == 'success') {
  145. art.dialog({
  146. content: result.msg,
  147. lock: true,
  148. ok: function() {
  149. location.reload();
  150. }
  151. });
  152. }
  153. },
  154. fail: function(e,c) {
  155. art.dialog.list['loading'].close();
  156. art.dialog({
  157. content: '<p>'+c.jqXHR.status+'=>'+c.jqXHR.statusText+'</p>',
  158. lock: true,
  159. ok: function() {}
  160. });
  161. }
  162. });
  163. });
  164. })
  165. </script>
  166. @endsection