history_reach.blade.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. @extends('admin/layout')
  2. @section('header')
  3. <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
  4. <style>
  5. .btn-danger, .btn-primary, .btn-info {
  6. background: #2a94e0 !important;
  7. border-color: #2a94e0 !important;
  8. }
  9. .table-striped > tbody > tr:nth-of-type(odd) {
  10. background: #f8f8f8 !important;
  11. }
  12. .table-striped > tbody > tr .btn {
  13. background: none !important;
  14. }
  15. .table-striped > tbody > tr td {
  16. font-size: 14px !important;
  17. }
  18. .table-striped > tbody > tr:hover {
  19. background: #ffebd8 !important;
  20. }
  21. .table-striped > tbody > tr:hover .btn {
  22. background: #2a94e0 !important;
  23. color: #fff !important;
  24. }
  25. .table-striped > tbody > tr:hover .btn .glyphicon {
  26. color: #fff !important;
  27. }
  28. </style>
  29. @endsection
  30. @section('content')
  31. @php $authUser=auth()->user() @endphp
  32. <body class="gray-bg">
  33. <div class="wrapper wrapper-content animated fadeInRight">
  34. <div class="row">
  35. <div class="col-sm-12">
  36. <div class="ibox float-e-margins">
  37. <div class="ibox-content">
  38. <form class="row" id="searchForm" onsubmit="units.search();return false;">
  39. <div class="input-group">
  40. <select name="manageHelperId" id="manageHelperId" title="" class="form-control"
  41. style="width: 150px;float: right" onchange="units.selectPage();">
  42. <option value="">请选择项目经理</option>
  43. @foreach($managerHelpers as $item)
  44. <option value="{{$item->id}}">{{$item->nickname}}</option>
  45. @endforeach
  46. </select>
  47. <select name="editorId" id="editorId" title="" class="form-control"
  48. style="width: 150px;float: right" onchange="units.selectPage();">
  49. <option value="">请选择建站采编</option>
  50. @foreach($editors as $item)
  51. <option value="{{$item->id}}">{{$item->nickname}}</option>
  52. @endforeach
  53. </select>
  54. <select name="optimizerId" id="optimizerId" title="" class="form-control"
  55. style="width: 150px;float: right"
  56. onchange="units.selectPage();">
  57. <option value="">请选择优化组长</option>
  58. @foreach($optimizers as $item)
  59. <option value="{{$item->id}}">{{$item->nickname}}</option>
  60. @endforeach
  61. </select>
  62. <select name="sellerId" id="sellerId" title="" class="form-control"
  63. style="width: 150px;float: right" onchange="units.selectPage();">
  64. <option value="">请选择销售</option>
  65. @foreach($sellerUsers as $item)
  66. <option value="{{$item->id}}">{{$item->nickname}}</option>
  67. @endforeach
  68. </select>
  69. <select name="serverId" id="serverId" title="" class="form-control"
  70. style="width: 150px;float: right" onchange="units.selectPage();">
  71. <option value="">请选择客服</option>
  72. @foreach($services as $item)
  73. <option value="{{$item->id}}">{{$item->nickname}}</option>
  74. @endforeach
  75. </select>
  76. <input type="text" class="form-control" id="monthRange" name="endDate"
  77. placeholder="截止时间"
  78. style="width: 150px;float: right">
  79. <input type="text" class="form-control" id="monthRange2" name="startDate"
  80. placeholder="开始时间"
  81. style="width: 150px;float: right">
  82. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  83. name="keyword"
  84. id="keyword" style="width: 200px;float: right">
  85. <span class="input-group-btn">
  86. <button type="button" class="btn btn-md btn-primary"
  87. onclick="units.search()"> 搜索</button>
  88. <button type="button" class="btn btn-md" style="margin-left: 10px"
  89. name="btnReset"> 重置</button>
  90. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px" onclick="units.export()"> 导出</button>
  91. </span>
  92. </div>
  93. </form>
  94. <hr>
  95. <div class="table-responsive">
  96. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </body>
  104. @endsection
  105. @section('footer')
  106. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  107. <script>
  108. laydate.render({
  109. elem: '#monthRange'
  110. , type: 'month'
  111. , format: 'yyyy-MM'
  112. });
  113. laydate.render({
  114. elem: '#monthRange2'
  115. , type: 'month'
  116. , format: 'yyyy-MM'
  117. });
  118. var units = {
  119. export:function(){
  120. var formValues = tips.getFormValues("#searchForm");
  121. var str=$.param(formValues);
  122. window.open('/admin/analyze/index/history-reach-export?='+str)
  123. },
  124. selectPage: function () {
  125. tips.selectPage();
  126. },
  127. search: function () {
  128. $('#table').bootstrapTable('selectPage', 1);
  129. // tips.tableRefresh();
  130. },
  131. openDetail: function (id, title) {
  132. tips.page('/admin/sites/' + id + '/overview', title);
  133. }
  134. };
  135. // 月流量 月询盘 月排名 月软文 项目经理 项目进度
  136. var config = {};
  137. config.url = '/admin/analyze/index/history-reach';
  138. config.pageSize = 20;
  139. config.showColumns = true;
  140. config.columns = [ //字段
  141. {
  142. title: '序号', align: 'center', formatter: function (value, item, index) {
  143. return index + 1;
  144. },
  145. width: '10px'
  146. },
  147. {title: '达标时间', field: 'reach_at', align: 'center'},
  148. {title: '过期时间', field: 'expired_at', align: 'center'},
  149. {title: '公司', field: 'cn_title', align: 'center'},
  150. {title: '网站', field: 'domain', align: 'center'},
  151. {title: '关键词指标', field: 'keyword_goal', align: 'center'},
  152. {title: '实际达标关键词', field: 'top10', align: 'center'},
  153. {title: '达标时长', field: 'reach_days', align: 'center'},
  154. {title: '项目销售', field: 'seller_title', align: 'center'},
  155. {title: '客服经理', field: 'server_title', align: 'center'},
  156. {title: '项目经理1', field: 'managers_title', align: 'center'},
  157. {title: '项目经理', field: 'manage_helper_title', align: 'center'},
  158. {title: '优化师', field: 'optimizerTitle', align: 'center'},
  159. {title: '项目采编', field: 'ae_title', align: 'center',visible: false},
  160. /*{title: '项目经理1', field: 'managers_title', align: 'center', visible: false},*/
  161. /*{title: '项目经理', field: 'manage_helper_title', align: 'center'},*/
  162. /*{title: '项目采编', field: 'ae_title', align: 'center', visible: false},*/
  163. /*{title: '优化师', field: 'optimizerTitle', align: 'center'},*/
  164. {title: '竞价', field: 'bidTitle', align: 'center', visible: false},
  165. {title: '软文', field: 'articleTitle', align: 'center', visible: false},
  166. {title: '设计', field: 'designerTitle', align: 'center', visible: false},
  167. {title: '前端', field: 'webTitle', align: 'center', visible: false},
  168. /*{title: '客服经理', field: 'server_title', align: 'center'},*/
  169. /*{title: '项目销售', field: 'seller_title', align: 'center'},*/
  170. {title: '合同签订时间', field: 'sign_at', align: 'center', visible: false},
  171. {title: '下单时间', field: 'order_at', align: 'center', visible: false},
  172. {title: '分配时间', field: 'assign_at', align: 'center'},
  173. {title: '上线时间', field: 'online_at', align: 'center', visible: false},
  174. /*{title: '达标时间', field: 'reach_at', align: 'center', visible: false},*/
  175. /*{title: '过期时间', field: 'expired_at', align: 'center', visible: false},*/
  176. {title: '百千约访时间', field: 'bq_at', align: 'center', visible: false},
  177. {title: '续费次数', field: 'renewal_times', align: 'center', visible: false},
  178. {title: '续费时间', field: 'renewal_at', align: 'center', visible: false},
  179. // {title: '评分', field: 'score', align: 'center'},
  180. {
  181. title: '操作', field: 'id', align: 'center',
  182. formatter: function (value, row) {
  183. var str = '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  184. return str;
  185. }
  186. }
  187. ];
  188. tips.bootstrapTable(config);
  189. </script>
  190. @endsection