123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686 |
- <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
- <link href="{{asset('css/style.min862f.css?v=4.1.0')}}" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="{{asset('oss/style.css?v=1')}}"/>
- <style type="text/css">
- .person {
- display: flex;
- text-align: center;
- align-items: center;
- justify-content: center;
- margin: 5px
- }
- .workingHours {
- display: block;
- padding: 0 10px;
- }
- h1 {
- font: 400 16px 'Open Sans';
- text-transform: uppercase;
- color: #999;
- text-shadow: 1px 1px 1px #fff;
- margin-bottom: 30px;
- }
- .tableBox table {
- width: 100%;
- }
- .tableBox thead {
- width: 100%;
- border-top: 1px solid #9dcc7a;
- border-left: 1px solid #9dcc7a;
- }
- .tableBox tbody td, .tableBox thead th {
- height: 30px;
- line-height: 30px;
- text-align: center;
- font-size: 12px;
- color: #404040;
- }
- .tableBox thead th {
- background-color: #abd28e;
- border-bottom: 1px solid #9dcc7a;
- border-right: 1px solid #9dcc7a;
- }
- .tableBox tbody {
- border-left: 1px solid #abd28e;
- }
- .tableBox tbody td {
- border-bottom: 1px solid #abd28e;
- border-right: 1px solid #abd28e;
- border-left: 1px solid #abd28e;
- border-spacing: 0;
- }
- .tableBox thead th {
- background-color: #abd28e;
- border-bottom: 1px solid #9dcc7a;
- border-right: 1px solid #9dcc7a;
- border-left: 1px solid #9dcc7a;
- border-spacing: 0;
- }
- .tableBox table {
- border-spacing: 0;
- border-collapse: collapse;
- }
- /* .tableBox tbody tr:nth-child(even) td {
- background-color: rgb(246, 246, 246);
- }*/
- .tableBox table td, .tableBox table th {
- vertical-align: middle;
- }
- .file {
- background-color: #4ea397;
- }
- #tableid tr {
- background-color: #ffff;
- }
- </style>
- <form action="{{url('/admin/flow/siteConstructionProcess/'.$siteId.'/type/1')}}" method="post" id="form1">
- <div class="tableBox">
- <table id="tableid" border="0" cellspacing="0" cellpadding="0" style=" border-collapse: collapse;">
- <thead>
- <tr>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <th colspan="14" style="text-align: center">
- {{$siteInfo->cn_title??''}} 建站流程表 进度【{{$count-$toBeCompletedCount}}/{{$count}}】 (ctrl+s保存)
- </th>
- @else
- <th colspan="9" style="text-align: center">
- {{$siteInfo->cn_title??''}} 建站流程表 进度【{{$count-$toBeCompletedCount}}/{{$count}}】 (ctrl+s保存)
- </th>
- @endif
- </tr>
- <tr>
- <th style="width: 6%;">状态/时间</th>
- <th style="width: 6%;">具体事项</th>
- <th style="width: 6%;">事项备注</th>
- <th style="width: 7%;">负责人/工时(单位:天)</th>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <th style="width: 6%;">验收标准</th>
- @endif
- <th style="width: 6%;">文件(小于8M)</th>
- <th style="width: 6%;">节点时间</th>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <th style="width: 5%;">逾期时间</th>
- @endif
- <th style="width: 6%;">逾期原因</th>
- <th style="width: 5%;">打分节点(客户)</th>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <th style="width: 5%;">质检打分</th>
- <th style="width: 5%;">质检人员</th>
- @endif
- <th style="width: 6%;">备注</th>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <th style="width: 3%;">操作</th>
- @endif
- </tr>
- </thead>
- <tbody id="tbody">
- @foreach($flowList as $item)
- <tr>
- <td>
- @if(empty($item->status))
- <button type="button" style="margin:0 auto;" class="btn"
- name="btnReset"
- onclick="taskByStatus(this,'#{{$item->id.'-status'}}')">
- 未完成
- </button>
- @else
- <div style="text-align: center">{{$item->status}}</div>
- <button type="button" style="margin:0 auto;" class="btn2"
- name="btnReset"
- onclick="taskByStatus(this,'#{{$item->id.'-status'}}')">
- 完成
- </button>
- @endif
- <input type="hidden" name="{{$item->id.'-status'}}"
- id="{{$item->id.'-status'}}"
- value="{{$item->status?? ''}}">
- </td>
- <td>
- <input type="hidden" name="{{$item->id.'-id'}}" id="{{$item->id.'-id'}}"
- value="{{$item->id?? 0}}">
- <span style="font-weight:bold">{{$item->title??''}}</span><br>
- <span style="color:{{$item->color??'red'}}; font-weight:bold">【{{$item->rank??''}}】</span>
- </td>
- <td>
- {{$item->memo??''}}
- </td>
- <td>
- @foreach($item->roles as $key=>$value)
- @if($key==\App\Http\Models\Role::TYPE_CUSTOMER)
- {{--客户--}}
- <div class="person">
- <span class="workingHours">
- @if($roles->role_id ==\App\Http\Models\Role::TYPE_CUSTOMER)
- <span style="color:#893448 ">{{$siteName}}</span> @else {{$siteName}}
- @endif
- </span>
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_SELLER)
- {{--销售--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden"
- id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_SELLER}}"
- name="{{$item->id.'-user_id-1'}}" value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span
- style="color:#893448 ">{{$value->user_id??''}}</span> @else {{$value->nickname??''}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_SELLER}}"
- id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_SELLER}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_SERVER)
- {{--项目管家--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden"
- id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_SERVER}}"
- name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_SERVER}}"
- value="{{$value->user_id??''}}">
- @if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span style="color:#893448 ">{{$value->nickname??'未分配项目管家'}}</span>
- @else {{$value->nickname??''}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_SERVER}}"
- id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_SERVER}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_MANAGE_HELPER)
- {{--项目经理--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden"
- id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_MANAGE_HELPER}}"
- name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_MANAGE_HELPER}}"
- value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span
- style="color:#893448 ">{{$value->nickname??'未分配项目经理'}}</span> @else {{$value->nickname??'未分配项目经理'}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_MANAGE_HELPER}}"
- id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_MANAGE_HELPER}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_PLANNER)
- {{--策划--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden" id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_PLANNER}}"
- name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_PLANNER}}"
- value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span
- style="color:#893448 ">{{$value->nickname??'未分配策划'}}</span> @else {{$value->nickname??'策划'}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_PLANNER}}"
- id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_PLANNER}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_AE)
- {{--采编--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden" id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_AE}}"
- name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_AE}}"
- value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span
- style="color:#893448 ">{{$value->nickname??'未分配采编'}}</span> @else {{$value->nickname??'未分配采编'}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_AE}}"
- id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_AE}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_WEB)
- {{--前端--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden" id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_WEB}}"
- name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_WEB}}"
- value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span
- style="color:#893448 ">{{$value->nickname??'未分配采编'}}</span> @else {{$value->nickname??'未分配采编'}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_WEB}}"
- id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_WEB}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_DESIGNER)
- {{--设计--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden"
- id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_DESIGNER}}"
- name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_DESIGNER}}"
- value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span
- style="color:#893448 ">{{$value->nickname??'未分配设计'}}</span> @else {{$value->nickname??'未分配设计'}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_DESIGNER}}"
- id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_DESIGNER}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_QUALITY)
- {{--质检--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden"
- id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_QUALITY}}"
- name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_QUALITY}}"
- value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span
- style="color:#893448 ">{{$value->nickname??'未分配质检'}}</span> @else {{$value->nickname??'未分配质检'}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_QUALITY}}"
- id="{{$item->id.'-working_hours-&'.\App\Http\Models\Role::TYPE_QUALITY}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @if($key==\App\Http\Models\Role::TYPE_OPTIMIZER)
- {{--优化--}}
- <div class="person">
- <span class="workingHours">
- <input type="hidden"
- id="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_OPTIMIZER}}"
- name="{{$item->id.'-user_id-'.\App\Http\Models\Role::TYPE_OPTIMIZER}}"
- value="{{$value->user_id??''}}">@if(!empty($value->user_id) && $roles->id == $value->user_id)
- <span
- style="color:#893448 ">{{$value->nickname??'未分配优化师'}}</span> @else {{$value->nickname??'未分配优化师'}} @endif
- </span>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <input type="text" class="form-control" style="width:50%;"
- name="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_OPTIMIZER}}"
- id="{{$item->id.'-working_hours-'.\App\Http\Models\Role::TYPE_OPTIMIZER}}"
- value="{{$value->working_hours??''}}">
- @endif
- </div>
- @endif
- @endforeach
- </td>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <td>
- {{$item->acceptance??''}}
- </td>
- @endif
- <td>
- {{$item->file??''}}
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <div style="display: flex;justify-content: center;padding: 0 0 20px 0;">
- <button type="button" class="btn" name="file_upload"
- style="float: left;margin-top: 5px; margin-right:10px;width: 70px">上传
- </button>
- <input type="file" value="" style="display: none" name="uploadFile"
- data-for="{{$item->id.'-file_path'}}">
- <input type="hidden" id="{{$item->id.'-file_path'}}"
- name="{{$item->id.'-file_path'}}"
- value="{{$item->file_path??''}}">
- <button type="button" class="btn" name="download"
- onclick="downloadSiteFile({{$item->id}})"
- style="float: left;margin-top: 5px;width: 70px; @if(!empty($item->file_path)) background-color:#4ea397;@endif">
- 下载
- </button>
- </div>
- @endif
- </td>
- {{-- <td>
- {{$item->file??''}}
- <div style="display: flex">
- <button type="button" class="site" name="file_upload"
- style="float: left;margin-top: 5px; width: 70px">上传
- </button>
- <input type="file" value="" style="display: none" name="uploadFile"
- data-for="{{$item->id.'-client_file_path'}}">
- <input type="hidden" id="{{$item->id.'-client_file_path'}}"
- name="{{$item->id.'-client_file_path'}}"
- value="{{$item->client_file_path??''}}">
- <button type="button" class="site" name="download"
- onclick="downloadSiteFile({{$item->id}})"
- 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">
- 下载
- </button>
- --}}{{--@if(!empty($item->master_plate_path))--}}{{--
- <button type="button" class="site" name="download"
- onclick="downloadSiteFile('{{$item->id}}',1)"
- 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">
- 模版
- </button>
- --}}{{--@endif--}}{{--
- </div>
- </td>--}}
- <td>
- {{$item->node??''}}
- <br>
- @if(strtotime($item->node_date)<strtotime($date))
- <span
- style="color:#c1232b;font-size: 14px;font-weight:bold;">{{$item->node_date??''}}</span>
- @else
- <span
- style="color:#4ea397;font-size: 14px;font-weight:bold;">{{$item->node_date??''}}</span>
- @endif
- <input type="hidden"
- name="{{$item->id.'-node_date'}}"
- id="{{$item->id.'-node_date'}}"
- value="{{$item->node_date??''}}">
- </td>
- <td style="padding-left: 10px">
- @php
- if(!empty($item->status) && strtotime($item->node_date)< strtotime(date('Y-m-d',strtotime($item->status)))){
- $beOverdueDay=(strtotime(date('Y-m-d',strtotime($item->status)))-strtotime($item->node_date))/3600/24;
- echo '逾期'.round($beOverdueDay).'天';
- }else{
- if(!empty($item->node_date) && strtotime($item->node_date)< strtotime(date('Y-m-d'))){
- $beOverdueDay=(strtotime(date('Y-m-d'))-strtotime($item->node_date))/3600/24;
- echo '逾期'.round($beOverdueDay).'天';
- }
- }
- @endphp
- <input type="hidden" name="{{$item->id.'-overdue_day'}}"
- id="{{$item->id.'-overdue_day'}}" value="{{round($beOverdueDay??0)}}">
- </td>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <td>
- <select class="form-control" style="width:100%;"
- name="{{$item->id.'-reasons_for_overdue'}}"
- id="{{$item->id.'-reasons_for_overdue'}}">
- @foreach($reasonsForOverdueList as $k=>$v)
- <option value="{{$k}}"
- @if(!empty($item->reasons_for_overdue) && $item->reasons_for_overdue==$k) selected @endif>{{$v}}</option>
- @endforeach
- </select>
- </td>
- @endif
- <td>
- <select class="form-control" style="width:100%;"
- name="{{$item->id.'-client_score'}}"
- id="{{$item->id.'-client_score'}}">
- <option value="0">请选择分数</option>
- @foreach($scoreList as $k=>$v)
- <option value="{{$k}}"
- @if(!empty($item->client_score) &&!empty($item->client_score) && $item->client_score==$k) selected @endif>{{$v}}</option>
- @endforeach
- </select>
- </td>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <td>
- <select class="form-control" style="width:100%;"
- name="{{$item->id.'-inspection_score'}}"
- id="{{$item->id.'-inspection_score'}}">
- <option value="0">请选择分数</option>
- @foreach($scoreList as $k=>$v)
- <option value="{{$k}}"
- @if(!empty($item->inspection_score) &&!empty($item->inspection_score) && $item->inspection_score==$k) selected @endif>{{$v}}</option>
- @endforeach
- </select>
- </td>
- @endif
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <td>
- @foreach($item->roles as $key=>$value)
- @if($item->level==1 && $key==\App\Http\Models\Role::TYPE_SERVER)
- <input type="hidden" name="{{$item->id.'-inspection'}}"
- id="{{$item->id.'-inspection'}}"
- value="{{$value->user_id?? 0}}">{{$value->nickname??''}}
- @endif
- @if(in_array($item->level,[2,3,4,5,7]) && $key==\App\Http\Models\Role::TYPE_MANAGE_HELPER)
- <input type="hidden" name="{{$item->id.'-inspection'}}"
- id="{{$item->id.'-inspection'}}"
- value="{{$value->user_id?? 0}}">{{$value->nickname??''}}
- @endif
- @if($item->level==6 && $key==\App\Http\Models\Role::TYPE_WEB)
- <input type="hidden" name="{{$item->id.'-inspection'}}"
- id="{{$item->id.'-inspection'}}"
- value="{{$value->user_id?? 0}}">{{$value->nickname??''}}
- @endif
- @if(in_array($item->level,[8,9]) && $key==\App\Http\Models\Role::TYPE_OPTIMIZER)
- <input type="hidden" name="{{$item->id.'-inspection'}}"
- id="{{$item->id.'-inspection'}}"
- value="{{$value->user_id?? 0}}">{{$value->nickname??''}}
- @endif
- @endforeach
- </td>
- @endif
- <td>
- <textarea name="{{$item->id.'-overdue_memo'}}" id="{{$item->id.'-overdue_memo'}}"
- style="border: none;width: 100%;height: 60px">{{$item->overdue_memo}}</textarea>
- </td>
- @if($roles->role_id !=\App\Http\Models\Role::TYPE_CUSTOMER)
- <td>
- <button type="button" class="btn" onclick="taskResetting({{$item->id}})"
- style="width: 70px; margin:0 auto;">重置
- </button>
- </td>
- @endif
- </tr>
- @endforeach
- </tbody>
- </table>
- </div>
- <button type="submit" class="btn" style="float: left;margin-top: 5px;margin-right:10px; width: 70px">
- 保存
- </button>
- {{-- <button type="button" class="site" style="float: left;margin-top: 5px;margin-right:10px; width: 70px"
- onclick="resetting({{$siteId}})">
- 重置
- </button>--}}
- </form>
- <script src="{{asset('js/plugins/layDate-v5.2.1/laydate/laydate.js')}}"></script>
- <script src="{{asset('js/jquery.min.js?v=2.1.4')}}"></script>
- <script src="{{asset('js/plugins/layer-v3.1.1/layer/layer.js')}}"></script>
- <script src="{{asset('js/tools/tips.js')}}"></script>
- <script>
- window.onload = function () {
- var tfrow = document.getElementById('tableid').rows.length;
- var tbRow = [];
- for (var i = 1; i < tfrow; i++) {
- tbRow[i] = document.getElementById('tableid').rows[i];
- tbRow[i].onmouseover = function () {
- this.style.backgroundColor = '#f3f8aa';
- };
- tbRow[i].onmouseout = function () {
- this.style.backgroundColor = '#ffffff';
- };
- }
- };
- $(document).on('click', '[name=file_upload]', function () {
- $(this).next().trigger('click');
- });
- $(document).on('change', '[name=uploadFile]', function () {
- var _this = this;
- if (!$(this)[0].files[0]) {
- return;
- }
- var formData = new FormData();
- formData.append('file', $(this)[0].files[0]);
- var size = $(this)[0].files[0].size;
- if (size > (8 * 1024 * 1024)) {
- layer.alert("文件不能大于8MB", {icon: 5});
- return;
- }
- var ln;
- $.ajax({
- url: '/admin/flow/uploadSiteFile',
- type: 'POST',
- cache: false,
- data: formData,
- processData: false,
- contentType: false,
- beforeSend: function () {
- ln = layer.load();
- },
- complete: function () {
- layer.close(ln);
- },
- success: function (result) {
- var data = result.data;
- $(_this).next().val(data.file_url);
- $(_this).prev().addClass('file');
- layer.alert('上传成功');
- },
- error: function (XMLHttpRequest) {
- if (XMLHttpRequest.status === 500) {
- layer.alert("异步请求失败", {icon: 5});
- return;
- }
- layer.alert(JSON.parse(XMLHttpRequest.responseText).message, {icon: 0});
- }
- });
- });
- function downloadSiteFile(id, type = 0) {
- var url = "/admin/flow/downloadSiteFile/" + id + "/type/" + type;
- window.open(url);
- }
- // 滑动滚动条
- tableHeader()
- function tableHeader() {
- $("#tableid").parent().prepend(
- '<table id="tableid_" border="0" cellspacing="0" cellpadding="0"><thead>' + $("#tableid thead").html() + '</thead></table>'
- ).css({
- 'position': 'relative',
- 'height': '90%',
- 'overflow-y': 'auto'
- })
- $("#tableid_").find('th').each(function (i) {
- $(this).css('width', $('#tableid').find('th:eq(' + i + ')').width());
- });
- $("#tableid_").find('th').each(function (i) {
- $(this).css('width', $('#tableid').find('th:eq(' + i + ')').width());
- });
- $("#tableid_").css({
- 'position': 'sticky',
- 'top': '0',
- 'left': 0,
- 'z-index': 2
- })
- $("#tableid").css({
- 'position': 'absolute',
- 'top': 0,
- 'left': 0
- })
- }
- function taskByStatus(tis, input) {
- if ($(tis).hasClass('btn')) {
- $(tis).removeClass('btn');
- $(tis).addClass('btn2');
- $(tis).text('完成');
- $(input).attr('value', '{{$date}}');
- } else {
- $(tis).removeClass('btn2');
- $(tis).addClass('btn');
- $(tis).text('未完成');
- $(input).attr('value', 0);
- }
- }
- window.addEventListener("keydown", function (e) {
- //可以判断是不是mac,如果是mac,ctrl变为花键
- //event.preventDefault() 方法阻止元素发生默认的行为。
- if (e.keyCode === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
- e.preventDefault();
- // Process event...
- $('#form1').submit();
- //window.location.reload();
- }
- }, false);
- /* function resetting(siteId) {
- layer.confirm('确定重置吗?', {icon: 3, title: '重置'}, function (index, layero) {
- var ajaxConfig = {
- url: '/admin/flow/resetting',
- type: 'put',
- data: {siteId: siteId},
- success: function () {
- layer.msg('操作成功', {
- icon: 1,
- time: 1500 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- window.location.href = "{{url('/admin/flow/siteConstructionProcess/'.$siteId.'/type/1')}}";
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- }*/
- function taskResetting(taskId) {
- layer.confirm('确定重置此条任务吗?', {icon: 3, title: '重置此条任务'}, function (index, layero) {
- var ajaxConfig = {
- url: '/admin/flow/taskResetting',
- type: 'put',
- data: {taskId: taskId},
- success: function () {
- layer.msg('操作成功', {
- icon: 1,
- time: 1500 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- window.location.href = "{{url('/admin/flow/siteConstructionProcess/'.$siteId.'/type/1')}}";
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- }
- </script>
|