site_construction_process_user.blade.php 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  2. <link href="{{asset('css/style.min862f.css?v=4.1.0')}}" rel="stylesheet">
  3. <link rel="stylesheet" type="text/css" href="{{asset('oss/style.css?v=1')}}"/>
  4. <style type="text/css">
  5. .person {
  6. display: flex;
  7. text-align: center;
  8. align-items: center;
  9. justify-content: center;
  10. margin: 5px
  11. }
  12. .workingHours {
  13. display: block;
  14. padding: 0 10px;
  15. }
  16. h1 {
  17. font: 400 16px 'Open Sans';
  18. text-transform: uppercase;
  19. color: #999;
  20. text-shadow: 1px 1px 1px #fff;
  21. margin-bottom: 30px;
  22. }
  23. .tableBox table {
  24. width: 100%;
  25. }
  26. .tableBox thead {
  27. width: 100%;
  28. border-top: 1px solid #9dcc7a;
  29. border-left: 1px solid #9dcc7a;
  30. }
  31. .tableBox tbody td, .tableBox thead th {
  32. height: 30px;
  33. line-height: 30px;
  34. text-align: center;
  35. font-size: 12px;
  36. color: #404040;
  37. }
  38. .tableBox thead th {
  39. background-color: #abd28e;
  40. border-bottom: 1px solid #9dcc7a;
  41. border-right: 1px solid #9dcc7a;
  42. }
  43. .tableBox tbody {
  44. border-left: 1px solid #abd28e;
  45. }
  46. .tableBox tbody td {
  47. border-bottom: 1px solid #abd28e;
  48. border-right: 1px solid #abd28e;
  49. border-left: 1px solid #abd28e;
  50. border-spacing: 0;
  51. }
  52. .tableBox thead th {
  53. background-color: #abd28e;
  54. border-bottom: 1px solid #9dcc7a;
  55. border-right: 1px solid #9dcc7a;
  56. border-left: 1px solid #9dcc7a;
  57. border-spacing: 0;
  58. }
  59. .tableBox table {
  60. border-spacing: 0;
  61. border-collapse: collapse;
  62. }
  63. /* .tableBox tbody tr:nth-child(even) td {
  64. background-color: rgb(246, 246, 246);
  65. }*/
  66. .tableBox table td, .tableBox table th {
  67. vertical-align: middle;
  68. }
  69. .file {
  70. background-color: #4ea397;
  71. }
  72. #tableid tr {
  73. background-color: #ffff;
  74. }
  75. </style>
  76. <form action="{{url('/admin/flow/siteConstructionProcess/'.$siteId.'/type/1')}}" method="post" id="form1">
  77. <div class="tableBox">
  78. <table id="tableid" border="0" cellspacing="0" cellpadding="0" style=" border-collapse: collapse;">
  79. <thead>
  80. <tr>
  81. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  82. <th colspan="14" style="text-align: center">
  83. {{$siteInfo->cn_title??''}} 建站流程表 进度【{{$count-$toBeCompletedCount}}/{{$count}}】 (ctrl+s保存)
  84. </th>
  85. @else
  86. <th colspan="9" style="text-align: center">
  87. {{$siteInfo->cn_title??''}} 建站流程表 进度【{{$count-$toBeCompletedCount}}/{{$count}}】 (ctrl+s保存)
  88. </th>
  89. @endif
  90. </tr>
  91. <tr>
  92. <th style="width: 6%;">状态/时间</th>
  93. <th style="width: 6%;">具体事项</th>
  94. <th style="width: 6%;">事项备注</th>
  95. <th style="width: 7%;">负责人/工时(单位:天)</th>
  96. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  97. <th style="width: 6%;">验收标准</th>
  98. @endif
  99. <th style="width: 6%;">文件(小于8M)</th>
  100. <th style="width: 6%;">节点时间</th>
  101. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  102. <th style="width: 5%;">逾期时间</th>
  103. @endif
  104. <th style="width: 6%;">逾期原因</th>
  105. <th style="width: 5%;">打分节点(客户)</th>
  106. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  107. <th style="width: 5%;">质检打分</th>
  108. <th style="width: 5%;">质检人员</th>
  109. @endif
  110. <th style="width: 6%;">备注</th>
  111. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  112. <th style="width: 3%;">操作</th>
  113. @endif
  114. </tr>
  115. </thead>
  116. <tbody id="tbody">
  117. @foreach($flowList as $item)
  118. <tr>
  119. <td>
  120. @if(empty($item->status))
  121. <button type="button" style="margin:0 auto;" class="btn"
  122. name="btnReset"
  123. onclick="taskByStatus(this,'#{{$item->id.'-status'}}')">
  124. 未完成
  125. </button>
  126. @else
  127. <div style="text-align: center">{{$item->status}}</div>
  128. <button type="button" style="margin:0 auto;" class="btn2"
  129. name="btnReset"
  130. onclick="taskByStatus(this,'#{{$item->id.'-status'}}')">
  131. 完成
  132. </button>
  133. @endif
  134. <input type="hidden" name="{{$item->id.'-status'}}"
  135. id="{{$item->id.'-status'}}"
  136. value="{{$item->status?? ''}}">
  137. </td>
  138. <td>
  139. <input type="hidden" name="{{$item->id.'-id'}}" id="{{$item->id.'-id'}}"
  140. value="{{$item->id?? 0}}">
  141. <span style="font-weight:bold">{{$item->title??''}}</span><br>
  142. <span style="color:{{$item->color??'red'}}; font-weight:bold">【{{$item->rank??''}}】</span>
  143. </td>
  144. <td>
  145. {{$item->memo??''}}
  146. </td>
  147. <td>
  148. @foreach($item->roles as $key=>$value)
  149. @if($key==\App\Http\Models\Role::TYPE_CUSTOMER)
  150. {{--客户--}}
  151. <div class="person">
  152. <span class="workingHours">
  153. @if($roles->role_id ==\App\Http\Models\Role::TYPE_CUSTOMER)
  154. <span style="color:#893448 ">{{$siteName}}</span> @else {{$siteName}}
  155. @endif
  156. </span>
  157. </div>
  158. @endif
  159. @if($key==\App\Http\Models\Role::TYPE_SELLER)
  160. {{--销售--}}
  161. <div class="person">
  162. <span class="workingHours">
  163. <input type="hidden"
  164. id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_SELLER}}"
  165. name="{{$item->id.'-user_id-1'}}" value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
  166. <span
  167. style="color:#893448 ">{{$value->user_id??''}}</span> @else {{$value->nickname??''}} @endif
  168. </span>
  169. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  170. <input type="text" class="form-control" style="width:50%;"
  171. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_SELLER}}"
  172. id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_SELLER}}"
  173. value="{{$value->working_hours??''}}">
  174. @endif
  175. </div>
  176. @endif
  177. @if($key==\App\Http\Models\Role::TYPE_SERVER)
  178. {{--项目管家--}}
  179. <div class="person">
  180. <span class="workingHours">
  181. <input type="hidden"
  182. id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_SERVER}}"
  183. name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_SERVER}}"
  184. value="{{$value->user_id??''}}">
  185. @if(!empty($value->user_id) && $roles->id == $value->user_id)
  186. <span style="color:#893448 ">{{$value->nickname??'未分配项目管家'}}</span>
  187. @else {{$value->nickname??''}} @endif
  188. </span>
  189. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  190. <input type="text" class="form-control" style="width:50%;"
  191. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_SERVER}}"
  192. id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_SERVER}}"
  193. value="{{$value->working_hours??''}}">
  194. @endif
  195. </div>
  196. @endif
  197. @if($key==\App\Http\Models\Role::TYPE_MANAGE_HELPER)
  198. {{--项目经理--}}
  199. <div class="person">
  200. <span class="workingHours">
  201. <input type="hidden"
  202. id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_MANAGE_HELPER}}"
  203. name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_MANAGE_HELPER}}"
  204. value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
  205. <span
  206. style="color:#893448 ">{{$value->nickname??'未分配项目经理'}}</span> @else {{$value->nickname??'未分配项目经理'}} @endif
  207. </span>
  208. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  209. <input type="text" class="form-control" style="width:50%;"
  210. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_MANAGE_HELPER}}"
  211. id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_MANAGE_HELPER}}"
  212. value="{{$value->working_hours??''}}">
  213. @endif
  214. </div>
  215. @endif
  216. @if($key==\App\Http\Models\Role::TYPE_PLANNER)
  217. {{--策划--}}
  218. <div class="person">
  219. <span class="workingHours">
  220. <input type="hidden" id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_PLANNER}}"
  221. name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_PLANNER}}"
  222. value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
  223. <span
  224. style="color:#893448 ">{{$value->nickname??'未分配策划'}}</span> @else {{$value->nickname??'策划'}} @endif
  225. </span>
  226. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  227. <input type="text" class="form-control" style="width:50%;"
  228. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_PLANNER}}"
  229. id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_PLANNER}}"
  230. value="{{$value->working_hours??''}}">
  231. @endif
  232. </div>
  233. @endif
  234. @if($key==\App\Http\Models\Role::TYPE_AE)
  235. {{--采编--}}
  236. <div class="person">
  237. <span class="workingHours">
  238. <input type="hidden" id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_AE}}"
  239. name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_AE}}"
  240. value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
  241. <span
  242. style="color:#893448 ">{{$value->nickname??'未分配采编'}}</span> @else {{$value->nickname??'未分配采编'}} @endif
  243. </span>
  244. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  245. <input type="text" class="form-control" style="width:50%;"
  246. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_AE}}"
  247. id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_AE}}"
  248. value="{{$value->working_hours??''}}">
  249. @endif
  250. </div>
  251. @endif
  252. @if($key==\App\Http\Models\Role::TYPE_WEB)
  253. {{--前端--}}
  254. <div class="person">
  255. <span class="workingHours">
  256. <input type="hidden" id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_WEB}}"
  257. name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_WEB}}"
  258. value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
  259. <span
  260. style="color:#893448 ">{{$value->nickname??'未分配采编'}}</span> @else {{$value->nickname??'未分配采编'}} @endif
  261. </span>
  262. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  263. <input type="text" class="form-control" style="width:50%;"
  264. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_WEB}}"
  265. id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_WEB}}"
  266. value="{{$value->working_hours??''}}">
  267. @endif
  268. </div>
  269. @endif
  270. @if($key==\App\Http\Models\Role::TYPE_DESIGNER)
  271. {{--设计--}}
  272. <div class="person">
  273. <span class="workingHours">
  274. <input type="hidden"
  275. id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_DESIGNER}}"
  276. name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_DESIGNER}}"
  277. value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
  278. <span
  279. style="color:#893448 ">{{$value->nickname??'未分配设计'}}</span> @else {{$value->nickname??'未分配设计'}} @endif
  280. </span>
  281. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  282. <input type="text" class="form-control" style="width:50%;"
  283. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_DESIGNER}}"
  284. id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_DESIGNER}}"
  285. value="{{$value->working_hours??''}}">
  286. @endif
  287. </div>
  288. @endif
  289. @if($key==\App\Http\Models\Role::TYPE_QUALITY)
  290. {{--质检--}}
  291. <div class="person">
  292. <span class="workingHours">
  293. <input type="hidden"
  294. id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_QUALITY}}"
  295. name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_QUALITY}}"
  296. value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
  297. <span
  298. style="color:#893448 ">{{$value->nickname??'未分配质检'}}</span> @else {{$value->nickname??'未分配质检'}} @endif
  299. </span>
  300. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  301. <input type="text" class="form-control" style="width:50%;"
  302. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_QUALITY}}"
  303. id="{{$item->id.'-working_hours-&'.\App\Http\Models\Role::TYPE_QUALITY}}"
  304. value="{{$value->working_hours??''}}">
  305. @endif
  306. </div>
  307. @endif
  308. @if($key==\App\Http\Models\Role::TYPE_OPTIMIZER)
  309. {{--优化--}}
  310. <div class="person">
  311. <span class="workingHours">
  312. <input type="hidden"
  313. id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_OPTIMIZER}}"
  314. name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_OPTIMIZER}}"
  315. value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
  316. <span
  317. style="color:#893448 ">{{$value->nickname??'未分配优化师'}}</span> @else {{$value->nickname??'未分配优化师'}} @endif
  318. </span>
  319. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  320. <input type="text" class="form-control" style="width:50%;"
  321. name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_OPTIMIZER}}"
  322. id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_OPTIMIZER}}"
  323. value="{{$value->working_hours??''}}">
  324. @endif
  325. </div>
  326. @endif
  327. @endforeach
  328. </td>
  329. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  330. <td>
  331. {{$item->acceptance??''}}
  332. </td>
  333. @endif
  334. <td>
  335. {{$item->file??''}}
  336. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  337. <div style="display: flex;justify-content: center;padding: 0 0 20px 0;">
  338. <button type="button" class="btn" name="file_upload"
  339. style="float: left;margin-top: 5px; margin-right:10px;width: 70px">上传
  340. </button>
  341. <input type="file" value="" style="display: none" name="uploadFile"
  342. data-for="{{$item->id.'-file_path'}}">
  343. <input type="hidden" id="{{$item->id.'-file_path'}}"
  344. name="{{$item->id.'-file_path'}}"
  345. value="{{$item->file_path??''}}">
  346. <button type="button" class="btn" name="download"
  347. onclick="downloadSiteFile({{$item->id}})"
  348. style="float: left;margin-top: 5px;width: 70px; @if(!empty($item->file_path)) background-color:#4ea397;@endif">
  349. 下载
  350. </button>
  351. </div>
  352. @endif
  353. </td>
  354. {{-- <td>
  355. {{$item->file??''}}
  356. <div style="display: flex">
  357. <button type="button" class="site" name="file_upload"
  358. style="float: left;margin-top: 5px; width: 70px">上传
  359. </button>
  360. <input type="file" value="" style="display: none" name="uploadFile"
  361. data-for="{{$item->id.'-client_file_path'}}">
  362. <input type="hidden" id="{{$item->id.'-client_file_path'}}"
  363. name="{{$item->id.'-client_file_path'}}"
  364. value="{{$item->client_file_path??''}}">
  365. <button type="button" class="site" name="download"
  366. onclick="downloadSiteFile({{$item->id}})"
  367. style="float: left;margin-top: 5px; width: 70px; @if(!empty($item->client_file_path))background: linear-gradient(to bottom, #1ebea5 0%, #1ebea5 100%);border-bottom: 4px solid #1ebea5;border-bottom: 4px solid #11998e;@endif">
  368. 下载
  369. </button>
  370. --}}{{--@if(!empty($item->master_plate_path))--}}{{--
  371. <button type="button" class="site" name="download"
  372. onclick="downloadSiteFile('{{$item->id}}',1)"
  373. style="float: left;margin-top: 5px;width: 70px; @if(!empty($item->master_plate_path))background: linear-gradient(to bottom, #1ebea5 0%, #1ebea5 100%);border-bottom: 4px solid #1ebea5;border-bottom: 4px solid #11998e;@endif">
  374. 模版
  375. </button>
  376. --}}{{--@endif--}}{{--
  377. </div>
  378. </td>--}}
  379. <td>
  380. {{$item->node??''}}
  381. <br>
  382. @if(strtotime($item->node_date)<strtotime($date))
  383. <span
  384. style="color:#c1232b;font-size: 14px;font-weight:bold;">{{$item->node_date??''}}</span>
  385. @else
  386. <span
  387. style="color:#4ea397;font-size: 14px;font-weight:bold;">{{$item->node_date??''}}</span>
  388. @endif
  389. <input type="hidden"
  390. name="{{$item->id.'-node_date'}}"
  391. id="{{$item->id.'-node_date'}}"
  392. value="{{$item->node_date??''}}">
  393. </td>
  394. <td style="padding-left: 10px">
  395. @php
  396. if(!empty($item->status) && strtotime($item->node_date)< strtotime(date('Y-m-d',strtotime($item->status)))){
  397. $beOverdueDay=(strtotime(date('Y-m-d',strtotime($item->status)))-strtotime($item->node_date))/3600/24;
  398. echo '逾期'.round($beOverdueDay).'天';
  399. }else{
  400. if(!empty($item->node_date) && strtotime($item->node_date)< strtotime(date('Y-m-d'))){
  401. $beOverdueDay=(strtotime(date('Y-m-d'))-strtotime($item->node_date))/3600/24;
  402. echo '逾期'.round($beOverdueDay).'天';
  403. }
  404. }
  405. @endphp
  406. <input type="hidden" name="{{$item->id.'-overdue_day'}}"
  407. id="{{$item->id.'-overdue_day'}}" value="{{round($beOverdueDay??0)}}">
  408. </td>
  409. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  410. <td>
  411. <select class="form-control" style="width:100%;"
  412. name="{{$item->id.'-reasons_for_overdue'}}"
  413. id="{{$item->id.'-reasons_for_overdue'}}">
  414. @foreach($reasonsForOverdueList as $k=>$v)
  415. <option value="{{$k}}"
  416. @if(!empty($item->reasons_for_overdue) && $item->reasons_for_overdue==$k) selected @endif>{{$v}}</option>
  417. @endforeach
  418. </select>
  419. </td>
  420. @endif
  421. <td>
  422. <select class="form-control" style="width:100%;"
  423. name="{{$item->id.'-client_score'}}"
  424. id="{{$item->id.'-client_score'}}">
  425. <option value="0">请选择分数</option>
  426. @foreach($scoreList as $k=>$v)
  427. <option value="{{$k}}"
  428. @if(!empty($item->client_score) &&!empty($item->client_score) && $item->client_score==$k) selected @endif>{{$v}}</option>
  429. @endforeach
  430. </select>
  431. </td>
  432. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  433. <td>
  434. <select class="form-control" style="width:100%;"
  435. name="{{$item->id.'-inspection_score'}}"
  436. id="{{$item->id.'-inspection_score'}}">
  437. <option value="0">请选择分数</option>
  438. @foreach($scoreList as $k=>$v)
  439. <option value="{{$k}}"
  440. @if(!empty($item->inspection_score) &&!empty($item->inspection_score) && $item->inspection_score==$k) selected @endif>{{$v}}</option>
  441. @endforeach
  442. </select>
  443. </td>
  444. @endif
  445. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  446. <td>
  447. @foreach($item->roles as $key=>$value)
  448. @if($item->level==1 && $key==\App\Http\Models\Role::TYPE_SERVER)
  449. <input type="hidden" name="{{$item->id.'-inspection'}}"
  450. id="{{$item->id.'-inspection'}}"
  451. value="{{$value->user_id?? 0}}">{{$value->nickname??''}}
  452. @endif
  453. @if(in_array($item->level,[2,3,4,5,7]) && $key==\App\Http\Models\Role::TYPE_MANAGE_HELPER)
  454. <input type="hidden" name="{{$item->id.'-inspection'}}"
  455. id="{{$item->id.'-inspection'}}"
  456. value="{{$value->user_id?? 0}}">{{$value->nickname??''}}
  457. @endif
  458. @if($item->level==6 && $key==\App\Http\Models\Role::TYPE_WEB)
  459. <input type="hidden" name="{{$item->id.'-inspection'}}"
  460. id="{{$item->id.'-inspection'}}"
  461. value="{{$value->user_id?? 0}}">{{$value->nickname??''}}
  462. @endif
  463. @if(in_array($item->level,[8,9]) && $key==\App\Http\Models\Role::TYPE_OPTIMIZER)
  464. <input type="hidden" name="{{$item->id.'-inspection'}}"
  465. id="{{$item->id.'-inspection'}}"
  466. value="{{$value->user_id?? 0}}">{{$value->nickname??''}}
  467. @endif
  468. @endforeach
  469. </td>
  470. @endif
  471. <td>
  472. <textarea name="{{$item->id.'-overdue_memo'}}" id="{{$item->id.'-overdue_memo'}}"
  473. style="border: none;width: 100%;height: 60px">{{$item->overdue_memo}}</textarea>
  474. </td>
  475. @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
  476. <td>
  477. <button type="button" class="btn" onclick="taskResetting({{$item->id}})"
  478. style="width: 70px; margin:0 auto;">重置
  479. </button>
  480. </td>
  481. @endif
  482. </tr>
  483. @endforeach
  484. </tbody>
  485. </table>
  486. </div>
  487. <button type="submit" class="btn" style="float: left;margin-top: 5px;margin-right:10px; width: 70px">
  488. 保存
  489. </button>
  490. {{-- <button type="button" class="site" style="float: left;margin-top: 5px;margin-right:10px; width: 70px"
  491. onclick="resetting({{$siteId}})">
  492. 重置
  493. </button>--}}
  494. </form>
  495. <script src="{{asset('js/plugins/layDate-v5.2.1/laydate/laydate.js')}}"></script>
  496. <script src="{{asset('js/jquery.min.js?v=2.1.4')}}"></script>
  497. <script src="{{asset('js/plugins/layer-v3.1.1/layer/layer.js')}}"></script>
  498. <script src="{{asset('js/tools/tips.js')}}"></script>
  499. <script>
  500. window.onload = function () {
  501. var tfrow = document.getElementById('tableid').rows.length;
  502. var tbRow = [];
  503. for (var i = 1; i < tfrow; i++) {
  504. tbRow[i] = document.getElementById('tableid').rows[i];
  505. tbRow[i].onmouseover = function () {
  506. this.style.backgroundColor = '#f3f8aa';
  507. };
  508. tbRow[i].onmouseout = function () {
  509. this.style.backgroundColor = '#ffffff';
  510. };
  511. }
  512. };
  513. $(document).on('click', '[name=file_upload]', function () {
  514. $(this).next().trigger('click');
  515. });
  516. $(document).on('change', '[name=uploadFile]', function () {
  517. var _this = this;
  518. if (!$(this)[0].files[0]) {
  519. return;
  520. }
  521. var formData = new FormData();
  522. formData.append('file', $(this)[0].files[0]);
  523. var size = $(this)[0].files[0].size;
  524. if (size > (8 * 1024 * 1024)) {
  525. layer.alert("文件不能大于8MB", {icon: 5});
  526. return;
  527. }
  528. var ln;
  529. $.ajax({
  530. url: '/admin/flow/uploadSiteFile',
  531. type: 'POST',
  532. cache: false,
  533. data: formData,
  534. processData: false,
  535. contentType: false,
  536. beforeSend: function () {
  537. ln = layer.load();
  538. },
  539. complete: function () {
  540. layer.close(ln);
  541. },
  542. success: function (result) {
  543. var data = result.data;
  544. $(_this).next().val(data.file_url);
  545. $(_this).prev().addClass('file');
  546. layer.alert('上传成功');
  547. },
  548. error: function (XMLHttpRequest) {
  549. if (XMLHttpRequest.status === 500) {
  550. layer.alert("异步请求失败", {icon: 5});
  551. return;
  552. }
  553. layer.alert(JSON.parse(XMLHttpRequest.responseText).message, {icon: 0});
  554. }
  555. });
  556. });
  557. function downloadSiteFile(id, type = 0) {
  558. var url = "/admin/flow/downloadSiteFile/" + id + "/type/" + type;
  559. window.open(url);
  560. }
  561. // 滑动滚动条
  562. tableHeader()
  563. function tableHeader() {
  564. $("#tableid").parent().prepend(
  565. '<table id="tableid_" border="0" cellspacing="0" cellpadding="0"><thead>' + $("#tableid thead").html() + '</thead></table>'
  566. ).css({
  567. 'position': 'relative',
  568. 'height': '90%',
  569. 'overflow-y': 'auto'
  570. })
  571. $("#tableid_").find('th').each(function (i) {
  572. $(this).css('width', $('#tableid').find('th:eq(' + i + ')').width());
  573. });
  574. $("#tableid_").find('th').each(function (i) {
  575. $(this).css('width', $('#tableid').find('th:eq(' + i + ')').width());
  576. });
  577. $("#tableid_").css({
  578. 'position': 'sticky',
  579. 'top': '0',
  580. 'left': 0,
  581. 'z-index': 2
  582. })
  583. $("#tableid").css({
  584. 'position': 'absolute',
  585. 'top': 0,
  586. 'left': 0
  587. })
  588. }
  589. function taskByStatus(tis, input) {
  590. if ($(tis).hasClass('btn')) {
  591. $(tis).removeClass('btn');
  592. $(tis).addClass('btn2');
  593. $(tis).text('完成');
  594. $(input).attr('value', '{{$date}}');
  595. } else {
  596. $(tis).removeClass('btn2');
  597. $(tis).addClass('btn');
  598. $(tis).text('未完成');
  599. $(input).attr('value', 0);
  600. }
  601. }
  602. window.addEventListener("keydown", function (e) {
  603. //可以判断是不是mac,如果是mac,ctrl变为花键
  604. //event.preventDefault() 方法阻止元素发生默认的行为。
  605. if (e.keyCode === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
  606. e.preventDefault();
  607. // Process event...
  608. $('#form1').submit();
  609. //window.location.reload();
  610. }
  611. }, false);
  612. /* function resetting(siteId) {
  613. layer.confirm('确定重置吗?', {icon: 3, title: '重置'}, function (index, layero) {
  614. var ajaxConfig = {
  615. url: '/admin/flow/resetting',
  616. type: 'put',
  617. data: {siteId: siteId},
  618. success: function () {
  619. layer.msg('操作成功', {
  620. icon: 1,
  621. time: 1500 //2秒关闭(如果不配置,默认是3秒)
  622. }, function () {
  623. window.location.href = "{{url('/admin/flow/siteConstructionProcess/'.$siteId.'/type/1')}}";
  624. });
  625. }
  626. };
  627. tips.ajax(ajaxConfig);
  628. });
  629. }*/
  630. function taskResetting(taskId) {
  631. layer.confirm('确定重置此条任务吗?', {icon: 3, title: '重置此条任务'}, function (index, layero) {
  632. var ajaxConfig = {
  633. url: '/admin/flow/taskResetting',
  634. type: 'put',
  635. data: {taskId: taskId},
  636. success: function () {
  637. layer.msg('操作成功', {
  638. icon: 1,
  639. time: 1500 //2秒关闭(如果不配置,默认是3秒)
  640. }, function () {
  641. window.location.href = "{{url('/admin/flow/siteConstructionProcess/'.$siteId.'/type/1')}}";
  642. });
  643. }
  644. };
  645. tips.ajax(ajaxConfig);
  646. });
  647. }
  648. </script>