plan.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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. .pull-right.pagination-detail {
  29. display: none;
  30. }
  31. </style>
  32. @endsection
  33. @section('content')
  34. @php $authUser=auth()->user() @endphp
  35. <body class="gray-bg">
  36. <div class="wrapper wrapper-content animated fadeInRight">
  37. <div class="row">
  38. <div class="col-sm-12">
  39. <div class="ibox float-e-margins">
  40. <div class="ibox-content">
  41. <form class="row" id="searchForm" onsubmit="units.search();return false;">
  42. <div class="input-group">
  43. <select name="sellerId" id="sellerId" title="" class="form-control"
  44. style="width: 150px;float: right" onchange="units.selectPage();">
  45. <option value="">请选择销售</option>
  46. @foreach($sellerUsers as $item)
  47. <option value="{{$item->id}}">{{$item->nickname}}</option>
  48. @endforeach
  49. </select>
  50. <select name="serverId" id="serverId" title="" class="form-control"
  51. style="width: 150px;float: right" onchange="units.selectPage();">
  52. <option value="">请选择客服</option>
  53. @foreach($services as $item)
  54. <option value="{{$item->id}}">{{$item->nickname}}</option>
  55. @endforeach
  56. </select>
  57. <select name="manageHelperId" id="manageHelperId" title="" class="form-control"
  58. style="width: 150px;float: right"
  59. onchange="units.selectPage();">
  60. <option value="">请选择项目经理</option>
  61. @foreach($managerHelpers as $item)
  62. <option value="{{$item->id}}">{{$item->nickname}}</option>
  63. @endforeach
  64. </select>
  65. <select name="optimizerId" id="optimizerId" title="" class="form-control"
  66. style="width: 150px;float: right"
  67. onchange="units.selectPage();">
  68. <option value="">请选择优化组长</option>
  69. @foreach($optimizers as $item)
  70. <option value="{{$item->id}}">{{$item->nickname}}</option>
  71. @endforeach
  72. </select>
  73. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  74. name="keyword"
  75. id="keyword" style="width: 200px;float: right">
  76. <span class="input-group-btn">
  77. <button type="button" class="btn btn-md btn-primary"
  78. onclick="units.search()"> 搜索</button>
  79. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"
  80. name="btnReset"> 重置</button>
  81. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"
  82. onclick="units.export()"> 导出</button>
  83. </span>
  84. </span>
  85. </div>
  86. </form>
  87. <hr>
  88. <div class="table-responsive">
  89. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </body>
  97. @endsection
  98. @section('footer')
  99. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  100. <script>
  101. laydate.render({
  102. elem: '#monthRange'
  103. , type: 'month'
  104. , range: '→'
  105. , format: 'yyyy-MM'
  106. });
  107. var units = {
  108. export: function () {
  109. var formValues = tips.getFormValues("#searchForm");
  110. var str = $.param(formValues);
  111. window.open('/admin/analyze/index/plan-export?=' + str)
  112. },
  113. selectPage: function () {
  114. tips.selectPage();
  115. },
  116. search: function () {
  117. tips.selectPage();
  118. },
  119. openDetail: function (id, title) {
  120. tips.page('/admin/sites/' + id + '/overview', title);
  121. }
  122. };
  123. // 月流量 月询盘 月排名 月软文 项目经理 项目进度
  124. var config = {};
  125. config.url = '/admin/analyze/index/plan';
  126. config.pageSize = 300;
  127. config.showColumns = true;
  128. config.paginationDetailHAlign = 'right';
  129. config.columns = [ //字段
  130. {
  131. title: '序号', align: 'center', formatter: function (value, item, index) {
  132. return index + 1;
  133. },
  134. width: '10px'
  135. },
  136. {title: '公司', field: 'cn_title', align: 'center'},
  137. {title: '网站', field: 'domain', align: 'center'},
  138. {title: '下单时间', field: 'order_at', align: 'center'},
  139. {title: '上线时间', field: 'online_at', align: 'center',},
  140. {title: '百千约访时间', field: 'bq_at', align: 'center', sortable: true},
  141. {title: '百千客户评分', field: 'bq_score', align: 'center'},
  142. {
  143. title: '月流量',
  144. field: 'traffic',
  145. align: 'center',
  146. sortable: true,
  147. formatter: function (value, item, index) {
  148. var res = value;
  149. if (item.clicksDropResults) {
  150. res += '<i class="fa fa-arrow-down" style="font-size:8px;margin-left:6px"></i>' + item.clicksDropResults;
  151. }
  152. if (item.clicksDropResults1) {
  153. res += '<i class="fa fa-arrow-up" style="font-size:8px;margin-left:6px;color:#F00"></i>' + item.clicksDropResults1;
  154. }
  155. return res
  156. }
  157. },
  158. {
  159. title: '月排名', field: 'top10', align: 'center', sortable: true,
  160. formatter: function (value, item, index) {
  161. var res = value;
  162. if (item.keywordDropResults) {
  163. res += '<i class="fa fa-arrow-down" style="font-size:8px;margin-left:6px"></i>' + item.keywordDropResults;
  164. }
  165. if (item.keywordDropResults1) {
  166. res += '<i class="fa fa-arrow-up" style="font-size:8px;margin-left:6px;color:#F00"></i>' + item.keywordDropResults1;
  167. }
  168. return res
  169. }
  170. },
  171. {
  172. title: '询盘',
  173. field: 'inquire',
  174. align: 'center',
  175. sortable: true,
  176. formatter: function (value, item, index) {
  177. var res = value;
  178. if (item.listReportMapResult) {
  179. res += '<i class="fa fa-arrow-down" style="font-size:8px;margin-left:6px"></i>' + item.listReportMapResult;
  180. }
  181. if (item.listReportMapResult1) {
  182. res += '<i class="fa fa-arrow-up" style="font-size:8px;margin-left:6px;color:#F00"></i>' + item.listReportMapResult1;
  183. }
  184. return res
  185. }
  186. },
  187. {title: '销售', field: 'seller_title', align: 'center', visible: false},
  188. {title: '客服', field: 'server_title', align: 'center', visible: false},
  189. {title: '项目总监', field: 'managers_title', align: 'center', visible: false},
  190. {title: '项目经理', field: 'manage_helper_title', align: 'center', visible: false},
  191. {title: '优化组长', field: 'optimizerTitle', align: 'center', visible: false},
  192. {title: '建站采编', field: 'ae_title', align: 'center', visible: false},
  193. {title: '竞价', field: 'bidTitle', align: 'center', visible: false},
  194. {title: '软文', field: 'articleTitle', align: 'center', visible: false},
  195. {title: '设计', field: 'designerTitle', align: 'center', visible: false},
  196. {title: '前端', field: 'web', align: 'center', visible: false},
  197. {title: '合同签订时间', field: 'sign_at', align: 'center', visible: false},
  198. {title: '分配时间', field: 'assign_at', align: 'center', visible: false},
  199. {title: '达标时间', field: 'reach_at', align: 'center', visible: false},
  200. {title: '过期时间', field: 'expired_at', align: 'center', visible: false},
  201. {title: '续费次数', field: 'renewal_times', align: 'center', visible: false},
  202. {title: '续费时间', field: 'renewal_at', align: 'center', visible: false},
  203. {
  204. title: '操作', field: 'id', align: 'center',
  205. formatter: function (value, row) {
  206. return '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  207. }
  208. }
  209. ];
  210. tips.bootstrapTable(config);
  211. </script>
  212. @endsection