progress_rate.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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. .blue {
  37. background: #6DD5FA;
  38. color: #fff;
  39. }
  40. #tfhover tbody tr td:nth-child(2) {
  41. position: relative;
  42. padding-left: 35px;
  43. }
  44. .fa {
  45. position: absolute;
  46. left: 10px;
  47. top: 0;
  48. color: #ddd;
  49. transform: translateY(-50%);
  50. top: 50%;
  51. font-size: 18px !important;
  52. cursor: pointer;
  53. }
  54. .first-numb {
  55. color: palevioletred;
  56. }
  57. </style>
  58. <div style="margin-left: 10px">
  59. <form action="{{url('/admin/flow/progressRate')}}" method="post" id="form1">
  60. <div style="display: flex;padding: 10px 0;">
  61. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control" name="keyword"
  62. value="{{$result['keyword']??''}}"
  63. style="width: 260px;">
  64. <select name="manageHelperId" id="manageHelperId" title="" class="form-control"
  65. style="width: 150px;float: right"
  66. onchange="units.selectPage();">
  67. <option value="">请选择项目经理</option>
  68. @foreach($userList as $item)
  69. @if($item->role_id==25)
  70. <option
  71. value="{{$item->id}}"
  72. @if(!empty($result['manageHelperId']) && $result['manageHelperId']==$item->id) selected @endif>{{$item->nickname}}</option>
  73. @endif
  74. @endforeach
  75. </select>
  76. <select name="editorId" id="editorId" title="" class="form-control"
  77. style="width: 150px;float: right" onchange="units.selectPage();">
  78. <option value="">请选择采编</option>
  79. @foreach($userList as $item)
  80. @if($item->role_id==2)
  81. <option
  82. value="{{$item->id}}" @if(!empty($result['editorId']) && $result['editorId']==$item->id) selected @endif>{{$item->nickname}}</option>
  83. @endif
  84. @endforeach
  85. </select>
  86. <select name="webId" id="webId" title="" class="form-control"
  87. style="width: 150px;float: right" onchange="units.selectPage();">
  88. <option value="">请选择前端</option>
  89. @foreach($userList as $item)
  90. @if($item->role_id==14)
  91. <option value="{{$item->id}}"
  92. @if(!empty($result['webId']) && $result['webId']==$item->id) selected @endif>{{$item->nickname}}</option>
  93. @endif
  94. @endforeach
  95. </select>
  96. <select name="plannerId" id="plannerId" title="" class="form-control"
  97. style="width: 150px;float: right" onchange="units.selectPage();">
  98. <option value="">请选择策划师</option>
  99. @foreach($userList as $item)
  100. @if($item->role_id==29)
  101. <option value="{{$item->id}}"
  102. @if(!empty($result['plannerId']) && $result['plannerId']==$item->id) selected @endif>{{$item->nickname}}</option>
  103. @endif
  104. @endforeach
  105. </select>
  106. <select data-placeholder="选择项目阶级..." style="width:200px;" name="sort" class="form-control">
  107. <option value="">选择项目阶级</option>
  108. <option value="0">请选择阶段</option>
  109. <option value="1">上线阶段</option>
  110. <option value="2">测试站阶段</option>
  111. <option value="3">设计阶段策划师跟进</option>
  112. <option value="4">架构阶段</option>
  113. <option value="5">暂停项目</option>
  114. </select>
  115. <input style="margin-left: 10px" type="submit" class="btn btn-primary" value="搜索">
  116. <button style="margin-left: 10px" type="button" class="btn btn-primary reset"> 重置</button>
  117. <button style="margin-left: 10px" type="button" class=" btn btn-primary button"> 保存</button>
  118. <a href="{{url('/admin/flow/progressRateExport')}}" style="margin-left: 10px"
  119. class=" btn btn-primary">导出</a>
  120. </div>
  121. </form>
  122. </div>
  123. <table id="tfhover" class="tftable" border="1">
  124. <thead>
  125. <tr>
  126. <th colspan="22" style="text-align: center">
  127. 项目总进度
  128. </th>
  129. </tr>
  130. <tr>
  131. <th colspan="8">项目配置</th>
  132. <th colspan="4">采编进度</th>
  133. <th colspan="7">策划师进度</th>
  134. </tr>
  135. <tr>
  136. <th style="width: 3%;">序号</th>
  137. <th style="width: 10%;">项目</th>
  138. <th style="width: 10%;">阶级</th>
  139. <th style="width: 5%;">项目经理</th>
  140. <th style="width: 5%;">策划师</th>
  141. <th style="width: 5%;">采编</th>
  142. <th style="width: 10%;">备注</th>
  143. <th style="width: 3%;">架构&确定域名</th>
  144. <th>建站前期</th>
  145. <th>资料</th>
  146. <th>测试站</th>
  147. <th>上线</th>
  148. <th>关键词初选</th>
  149. <th>关键词地图</th>
  150. <th>TDK</th>
  151. <th>页面策划</th>
  152. </tr>
  153. </thead>
  154. <tbody>
  155. @foreach($siteList as $key=>$value)
  156. <tr>
  157. <td>
  158. {{$key+1}}
  159. </td>
  160. <td data-a="{{$value->id}}" data-rank="{{$value->rank}}">
  161. <i @if($value->rank==1)class="fa fa-heart first-numb" @else class="fa fa-heart" @endif></i>
  162. <a onclick="units.openDetail('{{$value->id}}','{{$value->cn_title}}')">{{$value->cn_title}}</a>
  163. </td>
  164. <td>
  165. <select class="form-control" style="width:150px;">
  166. <option value="0" @if($value->sort==0) selected="selected"@endif>请选择阶段</option>
  167. <option value="1" @if($value->sort==1) selected="selected"@endif>上线阶段</option>
  168. <option value="2" @if($value->sort==2) selected="selected"@endif>测试站阶段</option>
  169. <option value="3" @if($value->sort==3) selected="selected"@endif>设计阶段策划师跟进</option>
  170. <option value="4" @if($value->sort==4) selected="selected"@endif>架构阶段</option>
  171. <option value="5" @if($value->sort==5) selected="selected"@endif>暂停项目</option>
  172. </select>
  173. </td>
  174. <td>{{$value->project_manager}}</td>
  175. <td>{{$value->planner}}</td>
  176. <td>{{$value->editing}}</td>
  177. <td><textarea style="border: none;width: 100%">{{$value->memo}}</textarea></td>
  178. <td @if($value->info==1)class="fenish"@endif>{{$value->domain}}</td>
  179. <td @if($value->prophase==1)class="fenish"@endif >建站前期</td>
  180. <td @if($value->data==1)class="fenish"@endif>资料</td>
  181. <td @if($value->test==1)class="fenish"@endif>测试站</td>
  182. <td @if($value->online==1)class="fenish"@endif>上线</td>
  183. <td @if($value->is_keywords==1)class="fenish"@endif>关键词初选</td>
  184. <td @if($value->is_keywords_map==1)class="fenish"@endif>关键词地图</td>
  185. <td @if($value->is_tdk==1)class="fenish"@endif>TDK</td>
  186. <td @if($value->page_planning==1)class="fenish"@endif>页面策划</td>
  187. </tr>
  188. @endforeach
  189. </tbody>
  190. </table>
  191. @section('footer')
  192. <script>
  193. window.onload = function () {
  194. var tfrow = document.getElementById('tfhover').rows.length;
  195. var tbRow = [];
  196. for (var i = 1; i < tfrow; i++) {
  197. tbRow[i] = document.getElementById('tfhover').rows[i];
  198. tbRow[i].onmouseover = function () {
  199. this.style.backgroundColor = '#f3f8aa';
  200. };
  201. tbRow[i].onmouseout = function () {
  202. this.style.backgroundColor = '#ffffff';
  203. };
  204. }
  205. };
  206. $('#tfhover tbody tr td:nth-child(2) i').click(function () {
  207. var rank = 0;
  208. if ($(this).hasClass('first-numb')) {
  209. $(this).removeClass('first-numb');
  210. } else {
  211. rank = 1;
  212. $(this).addClass('first-numb');
  213. }
  214. var siteId = $(this).parent().attr('data-a');
  215. var ajaxConfig = {
  216. url: '/admin/flow/setSiteIdByRankId',
  217. type: 'post',
  218. data: {siteId: siteId, type: 4, rank: rank},
  219. success: function (result) {
  220. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  221. window.location.reload();
  222. });
  223. }
  224. };
  225. tips.ajax(ajaxConfig);
  226. });
  227. var units = {
  228. openDetail: function (id, title) {
  229. tips.page('/admin/sites/' + id + '/overview', title);
  230. },
  231. };
  232. //重置
  233. $(function () {
  234. $('.reset').click(function () {
  235. $('#manageHelperId').val('');
  236. $('#editorId').val('');
  237. $('#webId').val('');
  238. $('#plannerId').val('');
  239. $('#schedule').val('');
  240. $('#form1').submit();
  241. });
  242. });
  243. $('#tfhover tbody tr td').click(function () {
  244. $(this).toggleClass("fenish");
  245. if ($(this).hasClass("fenish")) {
  246. $(this).attr("data-a", "1");
  247. } else {
  248. $(this).attr("data-a", "0");
  249. }
  250. });
  251. $('#tfhover tbody tr td:first-child').unbind('click');
  252. $('#tfhover tbody tr td:nth-child(2)').unbind('click');
  253. $('#tfhover tbody tr td:nth-child(3)').unbind('click');
  254. $('#tfhover tbody tr td:nth-child(4)').unbind('click');
  255. $('#tfhover tbody tr td:nth-child(5)').unbind('click');
  256. $('#tfhover tbody tr td:nth-child(6)').unbind('click');
  257. $('#tfhover tbody tr td:nth-child(7)').unbind('click');
  258. $('#tfhover tbody tr td:nth-child(8)').unbind('click');
  259. $('#tfhover tbody tr td:nth-child(9)').unbind('click');
  260. $('#tfhover tbody tr td:nth-child(10)').unbind('click');
  261. $('#tfhover tbody tr td:nth-child(11)').unbind('click');
  262. $('#tfhover tbody tr td:nth-child(12)').unbind('click');
  263. $('#tfhover tbody tr td:nth-child(13)').unbind('click');
  264. $('#tfhover tbody tr td:nth-child(14)').unbind('click');
  265. $('#tfhover tbody tr td:nth-child(15)').unbind('click');
  266. $('#tfhover tbody tr td:nth-child(16)').unbind('click');
  267. $(".button").click(function () {
  268. var list = [];
  269. $("#tfhover tbody").find("tr").each(function () {
  270. var tdArr = $(this).children();
  271. var site_id = tdArr.eq(1).attr('data-a');
  272. var rank = tdArr.eq(1).attr('data-rank');
  273. var memo = tdArr.eq(6).find('textarea').val();
  274. var sort = tdArr.eq(2).find('select').val();
  275. var array = {};
  276. array.site_id = site_id;
  277. array.rank = rank;
  278. array.memo = memo;
  279. array.sort = sort;
  280. list.push(array);
  281. });
  282. var ajaxConfig = {
  283. url: '/admin/flow/progressRate',
  284. type: 'post',
  285. data: {list: JSON.stringify(list)},
  286. success: function (result) {
  287. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  288. window.location.reload();
  289. });
  290. }
  291. };
  292. tips.ajax(ajaxConfig);
  293. });
  294. </script>
  295. @endsection