build_flow.blade.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. @extends('admin/layout')
  2. @section('header')
  3. @endsection
  4. <style type="text/css">
  5. table.tftable {
  6. font-size: 12px;
  7. color: #333333;
  8. width: 100%;
  9. border-width: 1px;
  10. border-color: #9dcc7a;
  11. border-collapse: collapse;
  12. }
  13. table.tftable th {
  14. font-size: 12px;
  15. background-color: #abd28e;
  16. border-width: 1px;
  17. padding: 8px;
  18. border-style: solid;
  19. border-color: #9dcc7a;
  20. text-align: left;
  21. }
  22. table.tftable tr {
  23. background-color: #ffffff;
  24. }
  25. table.tftable td {
  26. font-size: 12px;
  27. border-width: 1px;
  28. padding: 8px;
  29. border-style: solid;
  30. border-color: #9dcc7a;
  31. }
  32. .fenish {
  33. background: #1D976C;
  34. color: #fff;
  35. }
  36. #tfhover tbody tr td:nth-child(2) {
  37. position: relative;
  38. padding-left: 35px;
  39. }
  40. .fa-heart {
  41. position: absolute;
  42. left: 10px;
  43. color: #ddd;
  44. transform: translateY(-50%);
  45. top: 50%;
  46. font-size: 18px !important;
  47. cursor: pointer;
  48. }
  49. .first-numb {
  50. color: palevioletred;
  51. }
  52. </style>
  53. <form action="{{url('/admin/flow/buildFlow')}}" method="post" id="form1">
  54. <div style="margin-left: 10px">
  55. <div style="display: flex;padding: 10px 0;">
  56. <input type="text" placeholder="请输入域名或项目名称" name="keyword" id="keyword" class="input-md form-control"
  57. style="width: 200px;" value="{{$result['keyword']??''}}">
  58. <select data-placeholder="请选择状态..." style="width:150px;" name="status" id="status"
  59. class="form-control">
  60. <option value="1" selected="selected">
  61. 建站期
  62. </option>
  63. <option value="2" @if(!empty($result['status']) && $result['status']==2) selected="selected"@endif >
  64. 上线
  65. </option>
  66. </select>
  67. <select data-placeholder="请选择客服..." style="width:150px;" name="serverId" id="serverId"
  68. class="form-control">
  69. <option value="">请选择客服</option>
  70. @foreach ($userList as $key => $value)
  71. @if($value->role_id==7)
  72. <option value="{{$value->id}}"
  73. @if(!empty($result['serverId']) && $result['serverId']==$value->id) selected="selected"@endif>{{$value->nickname}}</option>
  74. @endif
  75. @endforeach
  76. </select>
  77. <select data-placeholder="请选择销售..." style="width:150px;" name="sellerId" id="sellerId"
  78. class="form-control">
  79. <option value="">请选择销售</option>
  80. @foreach ($userList as $key => $value)
  81. @if($value->role_id==1)
  82. <option value="{{$value->id}}"
  83. @if(!empty($result['sellerId']) && $result['sellerId']==$value->id) selected="selected"@endif >{{$value->nickname}}</option>
  84. @endif
  85. @endforeach
  86. </select>
  87. <select data-placeholder="请选择项目经理..." style="width:150px;" name="projectManagerId" id="projectManagerId"
  88. class="form-control">
  89. <option value="">请选择项目经理</option>
  90. @foreach ($userList as $key => $value)
  91. @if($value->role_id==25)
  92. <option value="{{$value->id}}"
  93. @if(!empty($result['projectManagerId']) && $result['projectManagerId']==$value->id) selected="selected" @endif>{{$value->nickname}}</option>
  94. @endif
  95. @endforeach
  96. </select>
  97. <select data-placeholder="请选择建站采编..." style="width:150px;" name="editingId" id="editingId"
  98. class="form-control">
  99. <option value="">请选择建站采编</option>
  100. @foreach ($userList as $key => $value)
  101. @if($value->role_id==2)
  102. <option value="{{$value->id}}"
  103. @if(!empty($result['editingId']) && $result['editingId']==$value->id) selected="selected"@endif >{{$value->nickname}}</option>
  104. @endif
  105. @endforeach
  106. </select>
  107. <input style="margin-left: 10px" type="submit" class="btn btn-primary" value="搜索">
  108. <button style="margin-left: 10px" type="button" class="btn btn-primary reset"> 重置</button>
  109. <button style="margin-left: 10px" type="button" class="btn btn-primary button"> 保存</button>
  110. </div>
  111. </div>
  112. <table id="tfhover" class="tftable" border="1">
  113. <input type="hidden" name="lv" id="lv">
  114. <input type="hidden" name="sortName" id="sortName">
  115. <thead>
  116. <tr>
  117. <th colspan="21" style="text-align: center">
  118. 建站流程2.0总进度
  119. </th>
  120. </tr>
  121. <tr>
  122. <th style="width: 3%;">序号</th>
  123. <th style="width: 7%;">项目</th>
  124. <th style="width: 5%;" class="sort_btn" data-sortName="order_at"><span style="cursor:pointer">下单时间</span>
  125. <i class="fa fa-caret-up" aria-hidden="true"></i></th>
  126. <th style="width: 5%;">备注</th>
  127. <th style="width: 5%;" class="sort_btn" data-sortName="lv1"><span
  128. style="cursor:pointer">第一阶段 <br>项目资料收集</span>
  129. <i class="fa fa-caret-up" aria-hidden="true"></i>
  130. </th>
  131. <th style="width: 5%;" class="sort_btn" data-sortName="lv2"><span
  132. style="cursor:pointer">第二阶段 <br>竞分&架构</span>
  133. <i class="fa fa-caret-up" aria-hidden="true"></i>
  134. </th>
  135. <th style="width: 5%;" class="sort_btn" data-sortName="lv3"><span
  136. style="cursor:pointer">第三阶段 <br>首页设计</span>
  137. <i class="fa fa-caret-up" aria-hidden="true"></i>
  138. </th>
  139. <th style="width: 5%;" class="sort_btn" data-sortName="lv4"><span
  140. style="cursor:pointer">第四阶段 <br>整站样式</span>
  141. <i class="fa fa-caret-up" aria-hidden="true"></i>
  142. </th>
  143. <th style="width: 5%;" class="sort_btn" data-sortName="lv5"><span
  144. style="cursor:pointer">第五阶段 <br>整站资料</span>
  145. <i class="fa fa-caret-up" aria-hidden="true"></i>
  146. </th>
  147. <th style="width: 5%;" class="sort_btn" data-sortName="lv6"><span
  148. style="cursor:pointer">第六阶段 <br>页面切片</span>
  149. <i class="fa fa-caret-up" aria-hidden="true"></i>
  150. </th>
  151. <th style="width: 5%;" class="sort_btn" data-sortName="lv7"><span
  152. style="cursor:pointer">第七阶段 <br>资料上传</span>
  153. <i class="fa fa-caret-up"></i>
  154. </th>
  155. <th style="width: 5%;" class="sort_btn" data-sortName="lv8"><span
  156. style="cursor:pointer">第八阶段 <br>页面读取</span>
  157. <i class="fa fa-caret-up" aria-hidden="true"></i>
  158. </th>
  159. <th style="width: 5%;" class="sort_btn" data-sortName="lv9"><span
  160. style="cursor:pointer">第九阶段 <br>pc测试站</span>
  161. <i class="fa fa-caret-up" aria-hidden="true"></i>
  162. </th>
  163. <th style="width: 5%;" class="sort_btn" data-sortName="lv10"><span
  164. style="cursor:pointer">第十阶段 <br>手机端调整</span>
  165. <i class="fa fa-caret-up" aria-hidden="true"></i>
  166. </th>
  167. <th style="width: 5%;" class="sort_btn" data-sortName="lv11"><span
  168. style="cursor:pointer">第十一阶段 <br>测试站seo</span>
  169. <i class="fa fa-caret-up" aria-hidden="true"></i>
  170. </th>
  171. <th style="width: 5%;" class="sort_btn" data-sortName="lv12"><span
  172. style="cursor:pointer">第十二阶段 <br>关键词</span>
  173. <i class="fa fa-caret-up" aria-hidden="true"></i>
  174. </th>
  175. <th style="width: 5%;" class="sort_btn" data-sortName="lv13"><span
  176. style="cursor:pointer">第十三阶段 <br>上线</span>
  177. <i class="fa fa-caret-up" aria-hidden="true"></i>
  178. </th>
  179. <th style="width: 5%;" class="sort_btn" data-sortName="lv14"><span
  180. style="cursor:pointer">第十四阶段 <br>优化交接</span>
  181. <i class="fa fa-caret-up" aria-hidden="true"></i>
  182. </th>
  183. </tr>
  184. </thead>
  185. <tbody>
  186. @foreach($siteList as $key=>$value)
  187. <tr>
  188. <td style="text-align: center">
  189. {{$key+1}}
  190. </td>
  191. <td data-a="{{$value['id']}}" data-rank="{{$value['rank']}}">
  192. <i @if($value['rank']==1)class="fa fa-heart first-numb" @else class="fa fa-heart" @endif></i>
  193. <a onclick="units.openDetail('{{$value['id']}}','{{$value['cn_title']}}')">{{$value['cn_title']}}</a>
  194. </td>
  195. <td>{{$value['order_at']??''}}</td>
  196. <td><textarea style="border: none;width: 100%;height: 100%">{{$value['memo']??''}}</textarea></td>
  197. <td @if($value['lv1']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  198. {{$value['lv1complete']}}/{{$value['lv1count']}} {{$value['lv1completeDate']??''}}
  199. @if(!empty($value['lv1CompleteOverdueTime']))
  200. <br>完成逾期:{{$value['lv1CompleteOverdueTime']??''}}天
  201. @endif
  202. @if(!empty($value['lv1OverdueTime']))
  203. <br>未完成逾期:{{$value['lv1OverdueTime']??''}}天
  204. @endif
  205. </td>
  206. <td @if($value['lv2']==1)class="fenish"@endif ><p style="opacity:0.4"></p>
  207. {{$value['lv2complete']}}/{{$value['lv2count']}} {{$value['lv2completeDate']??''}}
  208. @if(!empty($value['lv2CompleteOverdueTime']))
  209. <br>完成逾期:{{$value['lv2CompleteOverdueTime']??''}}天
  210. @endif
  211. @if(!empty($value['lv2OverdueTime']))
  212. <br>未完成逾期:{{$value['lv2OverdueTime']??''}}天
  213. @endif
  214. </td>
  215. <td @if($value['lv3']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  216. {{$value['lv3complete']}}/{{$value['lv3count']}} {{$value['lv3completeDate']??''}}
  217. @if(!empty($value['lv3CompleteOverdueTime']))
  218. <br>完成逾期:{{$value['lv3CompleteOverdueTime']??''}}天
  219. @endif
  220. @if(!empty($value['lv3OverdueTime']))
  221. <br>未完成逾期:{{$value['lv3OverdueTime']??''}}天
  222. @endif
  223. </td>
  224. <td @if($value['lv4']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  225. {{$value['lv4complete']}}/{{$value['lv4count']}} {{$value['lv4completeDate']??''}}
  226. @if(!empty($value['lv4CompleteOverdueTime']))
  227. <br>完成逾期:{{$value['lv4CompleteOverdueTime']??''}}天
  228. @endif
  229. @if(!empty($value['lv4OverdueTime']))
  230. <br>未完成逾期:{{$value['lv4OverdueTime']??''}}天
  231. @endif
  232. </td>
  233. <td @if($value['lv5']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  234. {{$value['lv5complete']}}/{{$value['lv5count']}} {{$value['lv5completeDate']??''}}
  235. @if(!empty($value['lv5CompleteOverdueTime']))
  236. <br>完成逾期:{{$value['lv5CompleteOverdueTime']??''}}天
  237. @endif
  238. @if(!empty($value['lv5OverdueTime']))
  239. <br>未完成逾期:{{$value['lv5OverdueTime']??''}}天
  240. @endif
  241. </td>
  242. <td @if($value['lv6']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  243. {{$value['lv6complete']}}/{{$value['lv6count']}} {{$value['lv6completeDate']??''}}
  244. @if(!empty($value['lv6CompleteOverdueTime']))
  245. <br>完成逾期:{{$value['lv6CompleteOverdueTime']??''}}天
  246. @endif
  247. @if(!empty($value['lv6OverdueTime']))
  248. <br>未完成逾期:{{$value['lv6OverdueTime']??''}}天
  249. @endif
  250. </td>
  251. <td @if($value['lv7']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  252. {{$value['lv7complete']}}/{{$value['lv7count']}} {{$value['lv7completeDate']??''}}
  253. @if(!empty($value['lv7CompleteOverdueTime']))
  254. <br>完成逾期:{{$value['lv7CompleteOverdueTime']??''}}天
  255. @endif
  256. @if(!empty($value['lv7OverdueTime']))
  257. <br>未完成逾期:{{$value['lv7OverdueTime']??''}}天
  258. @endif
  259. </td>
  260. <td @if($value['lv8']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  261. {{$value['lv8complete']}}/{{$value['lv8count']}} {{$value['lv8completeDate']??''}}
  262. @if(!empty($value['lv8CompleteOverdueTime']))
  263. <br>完成逾期:{{$value['lv8CompleteOverdueTime']??''}}天
  264. @endif
  265. @if(!empty($value['lv8OverdueTime']))
  266. <br>未完成逾期:{{$value['lv8OverdueTime']??''}}天
  267. @endif
  268. </td>
  269. <td @if($value['lv9']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  270. {{$value['lv9complete']}}/{{$value['lv9count']}} {{$value['lv9completeDate']??''}}
  271. @if(!empty($value['lv9CompleteOverdueTime']))
  272. <br>完成逾期:{{$value['lv9CompleteOverdueTime']??''}}天
  273. @endif
  274. @if(!empty($value['lv9OverdueTime']))
  275. <br>未完成逾期:{{$value['lv9OverdueTime']??''}}天
  276. @endif
  277. </td>
  278. <td @if($value['lv10']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  279. {{$value['lv10complete']}}/{{$value['lv10count']}} {{$value['lv10completeDate']??''}}
  280. @if(!empty($value['lv10CompleteOverdueTime']))
  281. <br>完成逾期:{{$value['lv10CompleteOverdueTime']??''}}天
  282. @endif
  283. @if(!empty($value['lv10OverdueTime']))
  284. <br>未完成逾期:{{$value['lv10OverdueTime']??''}}天
  285. @endif
  286. </td>
  287. <td @if($value['lv11']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  288. {{$value['lv11complete']}}/{{$value['lv11count']}} {{$value['lv11completeDate']??''}}
  289. @if(!empty($value['lv11CompleteOverdueTime']))
  290. <br>完成逾期:{{$value['lv11CompleteOverdueTime']??''}}天
  291. @endif
  292. @if(!empty($value['lv11OverdueTime']))
  293. <br>未完成逾期:{{$value['lv11OverdueTime']??''}}天
  294. @endif
  295. </td>
  296. <td @if($value['lv12']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  297. {{$value['lv12complete']}}/{{$value['lv12count']}} {{$value['lv12completeDate']??''}}
  298. @if(!empty($value['lv12CompleteOverdueTime']))
  299. <br>完成逾期:{{$value['lv12CompleteOverdueTime']??''}}天
  300. @endif
  301. @if(!empty($value['lv12OverdueTime']))
  302. <br>未完成逾期:{{$value['lv12OverdueTime']??''}}天
  303. @endif
  304. </td>
  305. <td @if($value['lv13']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  306. {{$value['lv13complete']}}/{{$value['lv13count']}} {{$value['lv13completeDate']??''}}
  307. @if(!empty($value['lv13CompleteOverdueTime']))
  308. <br>完成逾期:{{$value['lv13CompleteOverdueTime']??''}}天
  309. @endif
  310. @if(!empty($value['lv13OverdueTime']))
  311. <br>未完成逾期:{{$value['lv13OverdueTime']??''}}天
  312. @endif
  313. </td>
  314. <td @if($value['lv14']==1)class="fenish"@endif><p style="opacity:0.4"></p>
  315. {{$value['lv14complete']}}/{{$value['lv14count']}} {{$value['lv14completeDate']??''}}
  316. @if(!empty($value['lv14CompleteOverdueTime']))
  317. <br>完成逾期:{{$value['lv14CompleteOverdueTime']??''}}天
  318. @endif
  319. @if(!empty($value['lv14OverdueTime']))
  320. <br>未完成逾期:{{$value['lv14OverdueTime']??''}}天
  321. @endif
  322. </td>
  323. </tr>
  324. @endforeach
  325. </tbody>
  326. </table>
  327. </form>
  328. @section('footer')
  329. <script>
  330. window.onload = function () {
  331. var tfrow = document.getElementById('tfhover').rows.length;
  332. var tbRow = [];
  333. for (var i = 1; i < tfrow; i++) {
  334. tbRow[i] = document.getElementById('tfhover').rows[i];
  335. tbRow[i].onmouseover = function () {
  336. this.style.backgroundColor = '#f3f8aa';
  337. };
  338. tbRow[i].onmouseout = function () {
  339. this.style.backgroundColor = '#ffffff';
  340. };
  341. }
  342. };
  343. $('#tfhover tbody tr td:nth-child(2) i').click(function () {
  344. var rank = 0;
  345. if ($(this).hasClass('first-numb')) {
  346. $(this).removeClass('first-numb');
  347. } else {
  348. rank = 1;
  349. $(this).addClass('first-numb');
  350. }
  351. var siteId = $(this).parent().attr('data-a');
  352. var ajaxConfig = {
  353. url: '/admin/flow/setSiteIdByRankId',
  354. type: 'post',
  355. data: {siteId: siteId, type: 6, rank: rank},
  356. success: function (result) {
  357. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  358. window.location.reload();
  359. });
  360. }
  361. };
  362. tips.ajax(ajaxConfig);
  363. });
  364. var units = {
  365. openDetail: function (id, title) {
  366. tips.page('/admin/sites/' + id + '/overview', title);
  367. },
  368. };
  369. $('#tfhover tbody tr td').click(function () {
  370. $(this).toggleClass("fenish");
  371. if ($(this).hasClass("fenish")) {
  372. $(this).attr("data-a", "1");
  373. } else {
  374. $(this).attr("data-a", "0");
  375. }
  376. });
  377. $('#tfhover tbody tr td:first-child').unbind('click');
  378. $('#tfhover tbody tr td:nth-child(2)').unbind('click');
  379. $('#tfhover tbody tr td:nth-child(3)').unbind('click');
  380. $('#tfhover tbody tr td:nth-child(4)').unbind('click');
  381. $('#tfhover tbody tr td:nth-child(5)').unbind('click');
  382. $('#tfhover tbody tr td:nth-child(6)').unbind('click');
  383. $('#tfhover tbody tr td:nth-child(7)').unbind('click');
  384. $('#tfhover tbody tr td:nth-child(8)').unbind('click');
  385. $('#tfhover tbody tr td:nth-child(9)').unbind('click');
  386. $('#tfhover tbody tr td:nth-child(10)').unbind('click');
  387. $('#tfhover tbody tr td:nth-child(11)').unbind('click');
  388. $('#tfhover tbody tr td:nth-child(12)').unbind('click');
  389. $('#tfhover tbody tr td:nth-child(13)').unbind('click');
  390. $('#tfhover tbody tr td:nth-child(14)').unbind('click');
  391. $('#tfhover tbody tr td:nth-child(15)').unbind('click');
  392. $('#tfhover tbody tr td:nth-child(16)').unbind('click');
  393. $('#tfhover tbody tr td:nth-child(17)').unbind('click');
  394. $('#tfhover tbody tr td:nth-child(18)').unbind('click');
  395. $(".button").click(function () {
  396. var list = [];
  397. $("#tfhover tbody").find("tr").each(function () {
  398. var tdArr = $(this).children();
  399. var site_id = tdArr.eq(1).attr('data-a');
  400. var rank = tdArr.eq(1).attr('data-rank');
  401. var memo = tdArr.eq(3).find('textarea').val();
  402. var array = {};
  403. array.site_id = site_id;
  404. array.rank = rank;
  405. array.memo = memo;
  406. list.push(array);
  407. });
  408. var ajaxConfig = {
  409. url: '/admin/flow/buildFlow',
  410. type: 'post',
  411. data: {list: JSON.stringify(list)},
  412. success: function (result) {
  413. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  414. window.location.reload();
  415. });
  416. }
  417. };
  418. tips.ajax(ajaxConfig);
  419. });
  420. //重置
  421. $(function () {
  422. $('.reset').click(function () {
  423. $('#keyword').val('');
  424. $('#projectManagerId').val('');
  425. $('#serverId').val('');
  426. $('#sellerId').val('');
  427. $('#editingId').val('');
  428. $('#status').val(1);
  429. $('#lv').val('');
  430. $('#form1').submit();
  431. });
  432. });
  433. $(document).ready(function () {
  434. $('.sort_btn').each(function () {
  435. $(this).click(function () {
  436. $('#lv').val($(this).attr('data-sortName'));
  437. $('#form1').submit();
  438. });
  439. })
  440. })
  441. </script>
  442. @endsection