current_month_online.blade.php 13 KB

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