reach.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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="col-md-8 pull-right">--}}
  40. <div class="input-group">
  41. <select name="sellerId" id="sellerId" title="" class="form-control"
  42. style="width: 150px;float: right" onchange="units.selectPage();">
  43. <option value="">请选择销售</option>
  44. @foreach($sellerUsers as $item)
  45. <option value="{{$item->id}}">{{$item->nickname}}</option>
  46. @endforeach
  47. </select>
  48. <select name="serverId" id="serverId" title="" class="form-control"
  49. style="width: 150px;float: right" onchange="units.selectPage();">
  50. <option value="">请选择客服</option>
  51. @foreach($services as $item)
  52. <option value="{{$item->id}}">{{$item->nickname}}</option>
  53. @endforeach
  54. </select>
  55. <select name="editorId" id="editorId" title="" class="form-control"
  56. style="width: 150px;float: right" onchange="units.selectPage();">
  57. <option value="">请选择建站采编</option>
  58. @foreach($editors as $item)
  59. <option value="{{$item->id}}">{{$item->nickname}}</option>
  60. @endforeach
  61. </select>
  62. <select name="manageHelperId" id="manageHelperId" title="" class="form-control"
  63. style="width: 150px;float: right" onchange="units.selectPage();">
  64. <option value="">请选择项目经理</option>
  65. @foreach($managerHelpers as $item)
  66. <option value="{{$item->id}}">{{$item->nickname}}</option>
  67. @endforeach
  68. </select>
  69. <select name="managerId" id="managerId" title="" class="form-control"
  70. style="width: 150px;float: right" onchange="units.selectPage();">
  71. <option value="">请选择优化师/优化采编</option>
  72. @foreach($optimizersAe as $item)
  73. <option value="{{$item->id}}">{{$item->nickname}}</option>
  74. @endforeach
  75. </select>
  76. <select name="optimizerId" id="optimizerId" title="" class="form-control"
  77. style="width: 150px;float: right"
  78. onchange="units.selectPage();">
  79. <option value="">请选择优化组长</option>
  80. @foreach($optimizers as $item)
  81. <option value="{{$item->id}}">{{$item->nickname}}</option>
  82. @endforeach
  83. </select>
  84. <div class="input-group" style="width: 150px;float: right">
  85. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  86. <input type="text" class="form-control lay-datetime" id="monthRange"
  87. name="endDate" placeholder="请选择达标截止时间" style="width: 150px">
  88. </div>
  89. <div class="input-group" style="width: 150px;float: right">
  90. <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
  91. <input type="text" class="form-control lay-datetime" id="monthRange2"
  92. name="startDate" placeholder="请选择达标起始时间" style="width: 150px">
  93. </div>
  94. <select name="status" id="status" title="" class="form-control"
  95. style="width: 150px;float: right" onchange="tips.selectPage();">
  96. <option value="">请选择项目状态</option>
  97. @foreach(\App\Http\Models\Site::STATUS_MAP as $key=>$item)
  98. @if(!in_array($key,[5,6]))
  99. <option value="{{$key}}">{{$item}}</option>
  100. @endif
  101. @endforeach
  102. </select>
  103. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  104. name="keyword"
  105. id="keyword" style="width: 260px;float: right">
  106. <span class="input-group-btn">
  107. <button type="button" class="btn btn-md btn-primary"
  108. onclick="units.search()"> 搜索</button>
  109. <button type="button" class="btn btn-md" style="margin-left: 10px"
  110. name="btnReset"> 重置</button>
  111. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"
  112. onclick="units.export()"> 导出</button>
  113. </span>
  114. </div>
  115. </form>
  116. <hr>
  117. <div class="table-responsive">
  118. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </body>
  126. @endsection
  127. @section('footer')
  128. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  129. <script>
  130. laydate.render({
  131. elem: '#monthRange'
  132. , type: 'month'
  133. , format: 'yyyy-MM'
  134. });
  135. laydate.render({
  136. elem: '#monthRange2'
  137. , type: 'month'
  138. , format: 'yyyy-MM'
  139. });
  140. var units = {
  141. export: function () {
  142. var formValues = tips.getFormValues("#searchForm");
  143. var str = $.param(formValues);
  144. window.open('/admin/analyze/index/reach-export?=' + str)
  145. },
  146. selectPage: function () {
  147. tips.selectPage();
  148. },
  149. search: function () {
  150. tips.selectPage();
  151. },
  152. openDetail: function (id, title) {
  153. tips.page('/admin/sites/' + id + '/overview', title);
  154. }
  155. };
  156. var config = {};
  157. config.url = '/admin/analyze/index/reach';
  158. config.pageSize = 50;
  159. config.showColumns = true;
  160. config.columns = [ //字段
  161. {
  162. title: '序号', align: 'center', formatter: function (value, item, index) {
  163. return index + 1;
  164. },
  165. width: '10px'
  166. },
  167. {title: '达标时间', field: 'reach_at', align: 'center'},
  168. {title: '过期时间', field: 'expired_at', align: 'center'},
  169. {title: '达标邮件确认时间', field: 'reach_mail_at', align: 'center'},
  170. {title: '达标款支付时间', field: 'reach_pay_at', align: 'center'},
  171. {title: '公司', field: 'cn_title', align: 'center'},
  172. {title: '项目状态', field: 'status', align: 'center'},
  173. {title: '网站', field: 'domain', align: 'center'},
  174. {title: '关键词指标', field: 'keyword_goal', align: 'center'},
  175. {title: '实际达标关键词', field: 'top10', align: 'center'},
  176. {title: '达标时长', field: 'reach_days', align: 'center'},
  177. {title: '询盘', field: 'inquire', align: 'center'},
  178. {title: '项目销售', field: 'seller_title', align: 'center'},
  179. {title: '客服经理', field: 'server_title', align: 'center'},
  180. {title: '优化组长', field: 'optimizerTitle', align: 'center'},
  181. {title: '优化师/优化采编', field: 'optimizerAe', align: 'center'},
  182. {title: '竞价', field: 'bidTitle', align: 'center', visible: false},
  183. {title: '软文', field: 'articleTitle', align: 'center', visible: false},
  184. {title: '设计', field: 'designerTitle', align: 'center', visible: false},
  185. {title: '前端', field: 'webTitle', align: 'center', visible: false},
  186. {title: '合同签订时间', field: 'sign_at', align: 'center', visible: false},
  187. {title: '下单时间', field: 'order_at', align: 'center', visible: false},
  188. {title: '分配时间', field: 'assign_at', align: 'center', visible: false},
  189. {title: '上线时间', field: 'online_at', align: 'center', visible: false},
  190. {title: '百千约访时间', field: 'bq_at', align: 'center', visible: false},
  191. {title: '续费次数', field: 'renewal_times', align: 'center', visible: false},
  192. {title: '续费时间', field: 'renewal_at', align: 'center', visible: false},
  193. {
  194. title: '操作', field: 'id', align: 'center',
  195. formatter: function (value, row) {
  196. var str = '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  197. return str;
  198. }
  199. }
  200. ];
  201. tips.bootstrapTable(config);
  202. </script>
  203. @endsection