index.blade.php 5.7 KB

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