|
|
@@ -3,9 +3,8 @@
|
|
|
@section('title')临时工报表@endsection
|
|
|
|
|
|
@section('content')
|
|
|
- <div id="nav2">
|
|
|
- @component('personnel.menu')@endcomponent
|
|
|
- </div>
|
|
|
+ @component('personnel.laborReport.menu')@endcomponent
|
|
|
+
|
|
|
<div class="d-none container-fluid" id="list">
|
|
|
<div id="form_div"></div>
|
|
|
<span class="dropdown">
|
|
|
@@ -32,25 +31,27 @@
|
|
|
<td >
|
|
|
@can('人事管理-门卫审核')
|
|
|
<span >
|
|
|
- <span v-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined==1" class="text-success">已审核</span>
|
|
|
+ <b v-if="laborReport.isAdult==1" class="text-danger">童工</b>
|
|
|
+ <span v-else-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined==1" class="text-success">已审核</span>
|
|
|
<span v-else-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined&&laborReport.sequence" class="text-black"> @{{laborReport.sequence}}/@{{laborReport.amountOfJoined}}</span>
|
|
|
<button v-else class="btn btn-sm btn-outline-secondary" @click="guardClockAudit(laborReport.id,laborReport.user_duty_check_id)">门卫审核</button>
|
|
|
</span>
|
|
|
@else
|
|
|
- <span v-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined==1" class="text-success">已审核</span>
|
|
|
+ <b v-if="laborReport.isAdult==1" class="text-danger">童工</b>
|
|
|
+ <span v-else-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined==1" class="text-success">已审核</span>
|
|
|
<span v-else-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined&&laborReport.sequence" class="text-black"> @{{ laborReport.sequence }}/@{{ laborReport.amountOfJoined }}</span>
|
|
|
<span v-else class="text-center"><b class="text-danger">门卫未审核</b></span>
|
|
|
@endcan
|
|
|
|
|
|
@can('人事管理-组长审核')
|
|
|
<span>
|
|
|
- <button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup" @click="groupExport(laborReport.id,laborReport.name)" class="btn btn-sm btn-outline-danger">退组</button>
|
|
|
+ <button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export" @click="groupExport(laborReport.id,laborReport.name)" class="btn btn-sm btn-outline-danger">退组</button>
|
|
|
<span v-else-if="laborReport.groupUserId&&laborReport.is_exportGroup&&!laborReport.is_export" class="text-info">已退组</span>
|
|
|
<span v-else-if="laborReport.is_export" class="text-black">已退场</span>
|
|
|
<button v-else-if="laborReport.user_workgroup_id" @click="groupClockAudit(laborReport.id,laborReport.userWorkgroupNeedRemark)" class="btn btn-sm btn-outline-primary">组长审核</button>
|
|
|
</span>
|
|
|
@else
|
|
|
- <span v-if="laborReport.groupUserId&&!laborReport.is_exportGroup"><b class="text-success">在组</b></span>
|
|
|
+ <span v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export"><b class="text-success">在组</b></span>
|
|
|
<span v-else-if="laborReport.groupUserId&&laborReport.is_exportGroup&&!laborReport.is_export" class="text-info">已退组</span>
|
|
|
<span v-else-if="laborReport.is_export" class="text-black">已退场</span>
|
|
|
<span v-else-if="laborReport.user_workgroup_id" class="text-center"><b class="text-danger">组长未审核</b></span>
|
|
|
@@ -61,7 +62,15 @@
|
|
|
<td >@{{laborReport.name}}</td>
|
|
|
<td class="text-muted">@{{laborReport.mobile_phone}}</td>
|
|
|
<td class="text-muted">@{{laborReport.identity_number}}</td>
|
|
|
- <td class="text-muted">@{{laborReport.labor_company}}</td>
|
|
|
+ @can('人事管理-临时工报表-修改劳务所')
|
|
|
+ <td class="text-muted">
|
|
|
+ <select class="form-control-sm" name="labor_company" id="labor_company" @change="updateLaborCompany(laborReport.labor_company_id,laborReport.enter_number)" v-model="laborReport.labor_company_id">
|
|
|
+ <option v-for="laborCompany in laborCompanies" :value="laborCompany.id">@{{ laborCompany.name }}</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ @else
|
|
|
+ <td class="text-muted">@{{laborReport.labor_company}}</td>
|
|
|
+ @endcan
|
|
|
<td class="text-muted">@{{laborReport.enter_at}}</td>
|
|
|
<td>@{{laborReport.checkInAt}}</td>
|
|
|
<td class="text-muted">@{{laborReport.checkOutAt}}</td>
|
|
|
@@ -74,6 +83,9 @@
|
|
|
<td><span v-if="laborReport.thisRecordWorkingTime">@{{laborReport.thisRecordWorkingTime}}</span></td>
|
|
|
{{-- <td><span v-if="laborReport.workingDuration">@{{laborReport.workingDuration}}</span></td>--}}
|
|
|
<td><span v-if="laborReport.remark">@{{laborReport.remark}}</span></td>
|
|
|
+ @can('人事管理-临时工报表-删除')
|
|
|
+ <td><span class="btn btn-sm btn-outline-danger" @click="删除(laborReport.id,laborReport.name)">删</span></td>
|
|
|
+ @endcan
|
|
|
</tr>
|
|
|
</table>
|
|
|
<table id="listOnPad" class="table table-striped table-bordered table-hover p-0 d-table d-xl-none" style="background: rgb(255, 255, 255);">
|
|
|
@@ -86,25 +98,27 @@
|
|
|
<span >
|
|
|
@can('人事管理-门卫审核')
|
|
|
<span >
|
|
|
- <b v-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined==1" class="text-success">已审核</b>
|
|
|
+ <b v-if="laborReport.isAdult==1" class="text-danger">童工</b>
|
|
|
+ <b v-else-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined==1" class="text-success">已审核</b>
|
|
|
<b v-else-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined&&laborReport.sequence" class="text-black"> @{{laborReport.sequence}}/@{{laborReport.amountOfJoined}}</b>
|
|
|
<button v-else style="transform:scale(1.1)" class="btn btn-lg btn-outline-secondary" @click="guardClockAudit(laborReport.id,laborReport.user_duty_check_id)">门卫审核</button>
|
|
|
</span>
|
|
|
@else
|
|
|
- <b v-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined==1" class="text-success">已审核</b>
|
|
|
+ <b v-if="laborReport.isAdult==1" class="text-danger">童工</b>
|
|
|
+ <b v-else-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined==1" class="text-success">已审核</b>
|
|
|
<b v-else-if="laborReport.userDutyCheckVerifyUserId&&laborReport.amountOfJoined&&laborReport.sequence" class="text-black"> @{{ laborReport.sequence }}/@{{ laborReport.amountOfJoined }}</b>
|
|
|
<span v-else class="text-center"><b class="text-danger">门卫未审核</b></span>
|
|
|
@endcan
|
|
|
|
|
|
@can('人事管理-组长审核')
|
|
|
<span>
|
|
|
- <button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup" @click="groupExport(laborReport.id,laborReport.name)" style="transform:scale(1.1)" class="btn btn-lg btn-danger">退组</button>
|
|
|
+ <button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export" @click="groupExport(laborReport.id,laborReport.name)" style="transform:scale(1.1)" class="btn btn-lg btn-danger">退组</button>
|
|
|
<b v-else-if="laborReport.groupUserId&&laborReport.is_exportGroup&&!laborReport.is_export" class="text-info">已退组</b>
|
|
|
<b v-else-if="laborReport.is_export" class="text-black">已退场</b>
|
|
|
<button v-else-if="laborReport.user_workgroup_id" @click="groupClockAudit(laborReport.id,laborReport.userWorkgroupNeedRemark)" class="btn btn-lg btn-outline-primary" style="transform:scale(1.1)" >组长审核</button>
|
|
|
</span>
|
|
|
@else
|
|
|
- <span v-if="laborReport.groupUserId&&!laborReport.is_exportGroup"><b class="text-success">在组</b></span>
|
|
|
+ <span v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export"><b class="text-success">在组</b></span>
|
|
|
<b v-else-if="laborReport.groupUserId&&laborReport.is_exportGroup&&!laborReport.is_export" class="text-info">已退组</b>
|
|
|
<b v-else-if="laborReport.is_export" class="text-black">已退场</b>
|
|
|
<span v-else-if="laborReport.user_workgroup_id" class="text-center"><b class="text-danger">组长未审核</b></span>
|
|
|
@@ -117,101 +131,104 @@
|
|
|
{{-- <span class="mr-3 text-nowrap"><span class="text-black">进场编号:</span><span style="color:#af7651">@{{ laborReport.enter_number }}</span></span>--}}
|
|
|
<span class="mr-3 text-nowrap"><span class="text-black">小组:</span><span class="text-black-50">@{{laborReport.userWorkGroupName }}</span></span>
|
|
|
<span class="mr-3 text-nowrap"><span class="text-black">临时工:</span><span class="text-black-50">@{{ laborReport.name }} </span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="text-black">电话:</span><span style="color:#af7651" v-if="">@{{ laborReport.mobile_phone }} </span></span>
|
|
|
- <span class="text-nowrap"><span class="text-black">身份证号:</span><span style="color:#af7651" v-if="">@{{ laborReport.identity_number }} </span></span>
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">劳务所:</span><span style="color:#af7651" v-if="">@{{ laborReport.labor_company }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">进组时间:</span><span style="color:#af7651" v-if="">@{{ laborReport.checkInAt }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">审核时间:</span><span style="color:#af7651" v-if="">@{{ laborReport.verifyAt }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">审核人:</span><span style="color:#af7651" v-if="">@{{ laborReport.verifyPerson }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">晚饭打卡(分):</span><span style="color:#af7651" v-if="">@{{ laborReport.relax_time }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">在线时长:</span><span style="color:#af7651" v-if="">@{{ laborReport.onlineDuration }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">本次工作时长:</span><span style="color:#af7651" v-if="">@{{ laborReport.workingDuration }} </span></span>--}}
|
|
|
+ <span class="mr-3 text-nowrap"><span class="text-black">电话:</span><span style="color:#af7651" v-if="">@{{ laborReport.mobile_phone }} </span></span>
|
|
|
+ <span class="text-nowrap"><span class="text-black">身份证号:</span><span style="color:#af7651" v-if="">@{{ laborReport.identity_number }} </span></span>
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">劳务所:</span><span style="color:#af7651" v-if="">@{{ laborReport.labor_company }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">进组时间:</span><span style="color:#af7651" v-if="">@{{ laborReport.checkInAt }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">审核时间:</span><span style="color:#af7651" v-if="">@{{ laborReport.verifyAt }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">审核人:</span><span style="color:#af7651" v-if="">@{{ laborReport.verifyPerson }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">晚饭打卡(分):</span><span style="color:#af7651" v-if="">@{{ laborReport.relax_time }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">在线时长:</span><span style="color:#af7651" v-if="">@{{ laborReport.onlineDuration }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">本次工作时长:</span><span style="color:#af7651" v-if="">@{{ laborReport.workingDuration }} </span></span>--}}
|
|
|
+ @can('人事管理-临时工报表-删除')
|
|
|
+ <span style="transform:scale(1.1)" class="btn btn-sm btn-outline-danger" @click="删除(laborReport.id,laborReport.name)">删</span>
|
|
|
+ @endcan
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <div class="text-info h5 btn btn">{{$laborReports->count()}}/@{{ sum }}</div>
|
|
|
+ <div>{{$laborReports->appends($paginateParams)->links()}}</div>
|
|
|
+ {{-- 选择晚饭时长弹框 --}}
|
|
|
+ <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="exampleModalLabel">晚餐时长</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <form>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="relax_time" class="col-form-label">选择晚饭时长:</label>
|
|
|
+ <select class="form-control" id="relax_time" v-model="relax_time">
|
|
|
+ <option value="30">30分</option>
|
|
|
+ <option value="60">60分</option>
|
|
|
+ </select>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- <div class="text-info h5 btn btn">{{$laborReports->count()}}/@{{ sum }}</div>
|
|
|
- <div>{{$laborReports->appends($paginateParams)->links()}}</div>
|
|
|
- {{-- 选择晚饭时长弹框 --}}
|
|
|
- <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h5 class="modal-title" id="exampleModalLabel">晚餐时长</h5>
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <form>
|
|
|
- <div class="form-group">
|
|
|
- <label for="relax_time" class="col-form-label">选择晚饭时长:</label>
|
|
|
- <select class="form-control" id="relax_time" v-model="relax_time">
|
|
|
- <option value="30">30分</option>
|
|
|
- <option value="60">60分</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span class="btn btn-block" aria-hidden="true">取消</span>
|
|
|
- </button>
|
|
|
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="makeSureRelax_time">确定</button>
|
|
|
- </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span class="btn btn-block" aria-hidden="true">取消</span>
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="makeSureRelax_time">确定</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- {{-- 特定组需要添加备注 --}}
|
|
|
- <div class="modal fade" id="remarkModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h5 class="modal-title" id="exampleModalLabel">添加所需备注</h5>
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <form>
|
|
|
- <div class="form-group">
|
|
|
- <label for="remark" class="col-form-label">备注:</label>
|
|
|
- <textarea class="form-control" id="remark"></textarea>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span class="btn btn-block" aria-hidden="true">取消</span>
|
|
|
- </button>
|
|
|
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="addRemarkAndGroupClock">确定</button>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ {{-- 特定组需要添加备注 --}}
|
|
|
+ <div class="modal fade" id="remarkModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="exampleModalLabel">添加所需备注</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <form>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="remark" class="col-form-label">备注:</label>
|
|
|
+ <textarea class="form-control" id="remark"></textarea>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span class="btn btn-block" aria-hidden="true">取消</span>
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="addRemarkAndGroupClock">确定</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 是否晚餐弹框 -->
|
|
|
- <div class="modal fade" id="dinnerModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" >
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-body">
|
|
|
- <b class="font-weight-bold">是否晚餐?</b>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span class="btn btn-block" @click="noDinner">否</span>
|
|
|
- </button>
|
|
|
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="haveDinner">是</button>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <!-- 是否晚餐弹框 -->
|
|
|
+ <div class="modal fade" id="dinnerModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" >
|
|
|
+ <div class="modal-dialog">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-body">
|
|
|
+ <b class="font-weight-bold">是否晚餐?</b>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span class="btn btn-block" @click="noDinner">否</span>
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="haveDinner">是</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
@endsection
|
|
|
|
|
|
@section('lastScript')
|
|
|
<script type="text/javascript" src="{{asset('js/queryForm/export200818a.js')}}"></script>
|
|
|
- <script type="text/javascript" src="{{asset('js/queryForm/queryForm200901.js')}}"></script>
|
|
|
+ <script type="text/javascript" src="{{asset('js/queryForm/queryForm200914.js')}}"></script>
|
|
|
<script type="text/javascript" src="{{asset('js/queryForm/header200826b.js')}}"></script>
|
|
|
<script>
|
|
|
let today=(new Date());
|
|
|
@@ -242,429 +259,490 @@
|
|
|
};
|
|
|
window.onresize= hideHeaderTitle;
|
|
|
window.onscroll=hideHeaderTitle;
|
|
|
- @if(isset($request))
|
|
|
+ @if(isset($request))
|
|
|
let request={!! json_encode($request) !!};
|
|
|
- @endif
|
|
|
+ @endif
|
|
|
let vue = new Vue({
|
|
|
- el:"#list",
|
|
|
- data:{
|
|
|
- laborReports:[
|
|
|
- @foreach($laborReports as $laborReport)
|
|
|
- {id:'{{$laborReport->id}}',enter_number:'{{$laborReport->enter_number}}'
|
|
|
- ,@if($laborReport->userWorkgroup)user_workgroup_id:'{{$laborReport->userWorkgroup->id}}',
|
|
|
- userWorkgroupNeedRemark:'{{$laborReport->userWorkgroup->isNeedRemark}}',
|
|
|
- userWorkGroupName:'{{$laborReport->userWorkgroup->name}}',@endif
|
|
|
- userId:'{{$laborReport->user_id}}',name:'{{$laborReport->name}}'
|
|
|
- ,mobile_phone:'{{$laborReport->mobile_phone}}',identity_number:'{{$laborReport->identity_number}}',labor_company:'{{$laborReport->labor_company}}'
|
|
|
- ,checkInAt:'{{$laborReport->check_in_at}}', relax_time:'{{$laborReport->relax_time}}',
|
|
|
- is_exportGroup:'{{$laborReport->is_exportGroup}}',is_export:'{{$laborReport->is_export}}',
|
|
|
- verifyAt:'{{$laborReport->verify_at}}',groupUserId:'{{$laborReport->group_user_id}}',verifyPerson:'{{$laborReport->user['name']}}',
|
|
|
- checkOutAt:'{{$laborReport->check_out_at}}',onlineDuration:'{{$laborReport->online_duration}}',
|
|
|
- workingDuration:'{{$laborReport->working_duration}}', created_at:'{{$laborReport->created_at}}',
|
|
|
- enter_at:'{{$laborReport->enter_at}}',exit_at:'{{$laborReport->exit_at}}',
|
|
|
- thisRecordOnlineTime:'{{$laborReport->thisRecordOnlineTime}}',
|
|
|
- thisRecordWorkingTime:'{{$laborReport->thisRecordWorkingTime}}',
|
|
|
- sequence:'{{$laborReport->sequence}}',amountOfJoined:'{{$laborReport->amountOfJoined}}',remark:'{{$laborReport->remark}}',
|
|
|
- @if($laborReport->userDutyCheck)user_duty_check_id:'{{$laborReport->userDutyCheck->id}}', userDutyCheckVerifyUserId:'{{$laborReport->userDutyCheck->verify_user_id}}'
|
|
|
- ,userDutyCheckType:'{{$laborReport->userDutyCheck->type}}',userDutyCheckAt:'{{$laborReport->userDutyCheck->checked_at}}',@endif},
|
|
|
- @endforeach
|
|
|
- ],
|
|
|
- i:0,
|
|
|
- userWorkGroups:[
|
|
|
- @foreach($userWorkGroups as $userWorkGroup)
|
|
|
- {name:'{{$userWorkGroup->id}}',value:'{{$userWorkGroup->name}}'},
|
|
|
- @endforeach
|
|
|
- ],
|
|
|
- checkData:[],
|
|
|
- permittingWorkgroups:{!! $permittingWorkgroups !!},
|
|
|
- relax_time:'',dateTime:'',selectedStyle:'',
|
|
|
- sum:{!! $laborReports->total() !!},
|
|
|
- },
|
|
|
- mounted:function(){
|
|
|
- initEcho();
|
|
|
- let _this=this;
|
|
|
- let laborReports=_this.laborReports;
|
|
|
- //进场
|
|
|
- let tokenOfBroadcastEnterAndLeave='{{$tokenOfBroadcastEnterAndLeave}}';
|
|
|
- if(tokenOfBroadcastEnterAndLeave){
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}'+tokenOfBroadcastEnterAndLeave).listen('ImportEvent',(e)=>{
|
|
|
+ el:"#list",
|
|
|
+ data:{
|
|
|
+ laborReports:[
|
|
|
+ @foreach($laborReports as $laborReport)
|
|
|
+ {id:'{{$laborReport->id}}',enter_number:'{{$laborReport->enter_number}}'
|
|
|
+ ,@if($laborReport->userWorkgroup)user_workgroup_id:'{{$laborReport->userWorkgroup->id}}',
|
|
|
+ userWorkgroupNeedRemark:'{{$laborReport->userWorkgroup->isNeedRemark}}',
|
|
|
+ userWorkGroupName:'{{$laborReport->userWorkgroup->name}}',@endif
|
|
|
+ userId:'{{$laborReport->user_id}}',name:'{{$laborReport->name}}'
|
|
|
+ ,mobile_phone:'{{$laborReport->mobile_phone}}',identity_number:'{{$laborReport->identity_number}}',
|
|
|
+ @if($laborReport->laborCompany)
|
|
|
+ labor_company:'{{$laborReport->laborCompany->name}}',labor_company_id:'{{$laborReport->laborCompany->id}}',@endif
|
|
|
+ checkInAt:'{{$laborReport->check_in_at}}', relax_time:'{{$laborReport->relax_time}}',
|
|
|
+ is_exportGroup:'{{$laborReport->is_exportGroup}}',is_export:'{{$laborReport->is_export}}',
|
|
|
+ verifyAt:'{{$laborReport->verify_at}}',groupUserId:'{{$laborReport->group_user_id}}',verifyPerson:'{{$laborReport->user['name']}}',
|
|
|
+ checkOutAt:'{{$laborReport->check_out_at}}',onlineDuration:'{{$laborReport->online_duration}}',
|
|
|
+ workingDuration:'{{$laborReport->working_duration}}', created_at:'{{$laborReport->created_at}}',
|
|
|
+ enter_at:'{{$laborReport->enter_at}}',exit_at:'{{$laborReport->exit_at}}',
|
|
|
+ thisRecordOnlineTime:'{{$laborReport->thisRecordOnlineTime}}',
|
|
|
+ thisRecordWorkingTime:'{{$laborReport->thisRecordWorkingTime}}',isAdult:'{{$laborReport->isAdult}}',
|
|
|
+ sequence:'{{$laborReport->sequence}}',amountOfJoined:'{{$laborReport->amountOfJoined}}',remark:'{{$laborReport->remark}}',
|
|
|
+ @if($laborReport->userDutyCheck)user_duty_check_id:'{{$laborReport->userDutyCheck->id}}', userDutyCheckVerifyUserId:'{{$laborReport->userDutyCheck->verify_user_id}}'
|
|
|
+ ,userDutyCheckType:'{{$laborReport->userDutyCheck->type}}',userDutyCheckAt:'{{$laborReport->userDutyCheck->checked_at}}',@endif},
|
|
|
+ @endforeach
|
|
|
+ ],
|
|
|
+ i:0,
|
|
|
+ userWorkGroups:[
|
|
|
+ @foreach($userWorkGroups as $userWorkGroup)
|
|
|
+ {name:'{{$userWorkGroup->id}}',value:'{{$userWorkGroup->name}}'},
|
|
|
+ @endforeach
|
|
|
+ ],
|
|
|
+ checkData:[],
|
|
|
+ permittingWorkgroups:{!! $permittingWorkgroups !!},
|
|
|
+ laborCompanies:[
|
|
|
+ @foreach($laborCompanies as $laborCompany)
|
|
|
+ {id:'{{$laborCompany->id}}',name:'{{$laborCompany->name}}'},
|
|
|
+ @endforeach
|
|
|
+ ],
|
|
|
+ relax_time:'',dateTime:'',selectedStyle:'',
|
|
|
+ sum:{!! $laborReports->total() !!},
|
|
|
+ },
|
|
|
+ mounted:function(){
|
|
|
+ initEcho();
|
|
|
+ let _this=this;
|
|
|
+ let laborReports=_this.laborReports;
|
|
|
+ //进场
|
|
|
+ let tokenOfBroadcastEnterAndLeave='{{$tokenOfBroadcastEnterAndLeave}}';
|
|
|
+ if(tokenOfBroadcastEnterAndLeave){
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}'+tokenOfBroadcastEnterAndLeave).listen('ImportEvent',(e)=>{
|
|
|
+ let labor=e.laborReport;
|
|
|
+ laborReports.push(labor);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //退场
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}laborReport').listen('ExportEvent',(e)=>{
|
|
|
let labor=e.laborReport;
|
|
|
- laborReports.push(labor);
|
|
|
- });
|
|
|
- }
|
|
|
- //退场
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}laborReport').listen('ExportEvent',(e)=>{
|
|
|
- let labor=e.laborReport;
|
|
|
- laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==labor.id){
|
|
|
- laborReport.thisRecordOnlineTime=labor.thisRecordOnlineTime;
|
|
|
- laborReport.thisRecordWorkingTime=labor.thisRecordWorkingTime;
|
|
|
- laborReport.is_export=labor.is_export;
|
|
|
- laborReport.exit_at=labor.exit_at;
|
|
|
- return false
|
|
|
- }
|
|
|
- return true;
|
|
|
- });
|
|
|
- });
|
|
|
- //门卫审核
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}userDutyCheck').listen('GuardAuditEvent',(e)=>{
|
|
|
- let userDutyCheck=e.userDutyCheck;
|
|
|
- laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.user_duty_check_id==userDutyCheck.id){
|
|
|
- laborReport.userDutyCheckVerifyUserId=userDutyCheck.verify_user_id;
|
|
|
- laborReport.user_duty_check_id=userDutyCheck.id;
|
|
|
- return false
|
|
|
- }
|
|
|
- return true;
|
|
|
- });
|
|
|
- });
|
|
|
- //组长审核
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}laborReport').listen('TeamAuditEvent',(e)=>{
|
|
|
- let labor=e.laborReport;
|
|
|
- laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==labor.id){
|
|
|
- if(labor.remark){
|
|
|
- laborReport.remark=labor.remark;
|
|
|
+ laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==labor.id){
|
|
|
+ laborReport.thisRecordOnlineTime=labor.thisRecordOnlineTime;
|
|
|
+ laborReport.thisRecordWorkingTime=labor.thisRecordWorkingTime;
|
|
|
+ laborReport.is_export=labor.is_export;
|
|
|
+ laborReport.exit_at=labor.exit_at;
|
|
|
+ return false
|
|
|
}
|
|
|
- laborReport.verifyAt=labor.verify_at;
|
|
|
- laborReport.groupUserId=labor.group_user_id;
|
|
|
- laborReport.verifyPerson=labor.verifyPerson;
|
|
|
- return false
|
|
|
- }
|
|
|
- return true;
|
|
|
+ return true;
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- //进组
|
|
|
- _this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockinEvent',(e)=>{
|
|
|
- setTimeout(function () {
|
|
|
- window.location.reload();
|
|
|
- },500);
|
|
|
+ //门卫审核
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}userDutyCheck').listen('GuardAuditEvent',(e)=>{
|
|
|
+ let userDutyCheck=e.userDutyCheck;
|
|
|
+ laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.user_duty_check_id==userDutyCheck.id){
|
|
|
+ laborReport.userDutyCheckVerifyUserId=userDutyCheck.verify_user_id;
|
|
|
+ laborReport.user_duty_check_id=userDutyCheck.id;
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- //退组
|
|
|
- _this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockoutEvent',(e)=>{
|
|
|
+ //组长审核
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}laborReport').listen('TeamAuditEvent',(e)=>{
|
|
|
let labor=e.laborReport;
|
|
|
laborReports.every(function (laborReport) {
|
|
|
if (laborReport.id==labor.id){
|
|
|
- laborReport.thisRecordOnlineTime=labor.thisRecordOnlineTime;
|
|
|
- laborReport.thisRecordWorkingTime=labor.thisRecordWorkingTime;
|
|
|
- laborReport.is_exportGroup=labor.is_exportGroup;
|
|
|
- laborReport.checkOutAt=labor.check_out_at;
|
|
|
- if (labor.relax_time){
|
|
|
- laborReport.relax_time=labor.relax_time;
|
|
|
+ if(labor.remark){
|
|
|
+ laborReport.remark=labor.remark;
|
|
|
}
|
|
|
+ laborReport.verifyAt=labor.verify_at;
|
|
|
+ laborReport.groupUserId=labor.group_user_id;
|
|
|
+ laborReport.verifyPerson=labor.verifyPerson;
|
|
|
return false
|
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
});
|
|
|
- });
|
|
|
- $(".tooltipTarget").tooltip({'trigger':'hover'});
|
|
|
- $('#list').removeClass('d-none');
|
|
|
- let data=[
|
|
|
- [
|
|
|
- {name:'created_at_start',type:'dateTime',tip:'选择显示指定日期的起始时间'},
|
|
|
- {name:'user_workgroup_id',type:'search_select',tip:['',''],placeholder:['小组',''],data:this.userWorkGroups},
|
|
|
- {name:'enter_number',type:'input',tip:'进场编号:支持15天内模糊搜索,15天外精确搜索',placeholder: '进场编号'},
|
|
|
- {name:'is_export',type:'checkbox',data:[{name:true,value:'显示已退场'}]},
|
|
|
- ],
|
|
|
- [
|
|
|
- {name:'created_at_end',type:'dateTime',tip:'选择显示指定日期的结束时间'},
|
|
|
- {name:'mobile_phone',type:'input',tip:'',placeholder: '电话号'},
|
|
|
- {name:'identity_number',type:'input',tip:'',placeholder: '身份证号'},
|
|
|
- ],
|
|
|
- ];
|
|
|
- this.form = new query({
|
|
|
- el:"#form_div",
|
|
|
- condition:data,
|
|
|
- });
|
|
|
- this.form.init();
|
|
|
- let column = [
|
|
|
- {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
|
|
|
- dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
|
|
|
- {name:'index',value: '序号', neglect: true},
|
|
|
- {name:'operation',value: '操作', neglect: true},
|
|
|
- {name:'enter_number',value: '进厂编号', style:'background-color: rgb(241, 234, 190)'},
|
|
|
- {name:'userWorkGroupName',value: '小组', style:'background-color: rgb(241, 234, 190)'},
|
|
|
- {name:'name',value: '临时工', style:'background-color: rgb(241, 234, 190)'},
|
|
|
- {name:'mobile_phone',value: '电话', style:'background-color: rgb(241, 234, 190)'},
|
|
|
- {name:'identity_number',value: '身份证号', style:'background-color: rgb(241, 234, 190)'},
|
|
|
- {name:'labor_company',value: '劳务所', style:'background-color: rgb(241, 234, 190)'},
|
|
|
- {name:'enter_at',value: '进场时间'},
|
|
|
- {name:'checkInAt',value: '进组时间'},
|
|
|
- {name:'checkOutAt',value: '退组时间'},
|
|
|
- {name:'exit_at',value: '退场时间'},
|
|
|
- {name:'verifyAt',value: '审核时间'},
|
|
|
- {name:'verifyPerson',value: '审核人'},
|
|
|
- {name:'relax_time',value: '晚饭打卡(分)', neglect: true},
|
|
|
- {name:'thisRecordOnlineTime',value: '在线时长', neglect: true},
|
|
|
- {name:'thisRecordWorkingTime',value: '本次工作时长', neglect: true},
|
|
|
- {name:'remark',value: '备注'},
|
|
|
- ];
|
|
|
- setTimeout(function () {
|
|
|
- let header = new Header({
|
|
|
- el: "#header",
|
|
|
- column: column,
|
|
|
- data: _this.laborReports,
|
|
|
- restorationColumn: 'id',
|
|
|
- fixedTop:($('#form_div').height())+2,
|
|
|
- offset:0.5,
|
|
|
- vue:vue
|
|
|
- });
|
|
|
- header.init();
|
|
|
- },0);
|
|
|
- },
|
|
|
- watch:{
|
|
|
- checkData:{
|
|
|
- handler(){
|
|
|
- if (this.checkData.length === this.laborReports.length){
|
|
|
- document.querySelector('#all').checked = true;
|
|
|
- document.querySelector('#all_temp').checked = true;
|
|
|
- }else {
|
|
|
- document.querySelector('#all').checked = false;
|
|
|
- document.querySelector('#all_temp').checked = false;
|
|
|
- }
|
|
|
- },
|
|
|
- deep:true
|
|
|
- }
|
|
|
- },
|
|
|
- methods:{
|
|
|
- selectedColor(id){
|
|
|
- if (id==this.selectedStyle){
|
|
|
- this.selectedStyle='';
|
|
|
- return;
|
|
|
- }
|
|
|
- this.selectedStyle=id;
|
|
|
- },
|
|
|
- checkAll(e){
|
|
|
- if (e.target.checked){
|
|
|
- this.laborReports.forEach((el,i)=>{
|
|
|
- if (this.checkData.indexOf(el.id) == '-1'){
|
|
|
- this.checkData.push(el.id);
|
|
|
- }
|
|
|
+ //进组
|
|
|
+ _this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockinEvent',(e)=>{
|
|
|
+ setTimeout(function () {
|
|
|
+ window.location.reload();
|
|
|
+ },500);
|
|
|
});
|
|
|
- }else {
|
|
|
- this.checkData = [];
|
|
|
- }
|
|
|
- },
|
|
|
- laborReportExport(checkAllSign){
|
|
|
- let url = '{{url('laborReport/export')}}';
|
|
|
- let token='{{ csrf_token() }}';
|
|
|
- excelExport(checkAllSign,this.checkData,url,this.sum,token);
|
|
|
- },
|
|
|
- //门卫审核
|
|
|
- guardClockAudit(id,user_duty_check_id){
|
|
|
- let url='{{url("laborReport/guardClockAudit")}}';
|
|
|
- let _this=this;
|
|
|
- axios.post(url,{id:id,user_duty_check_id:user_duty_check_id})
|
|
|
- .then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(response.data.data);
|
|
|
- return;
|
|
|
- }
|
|
|
- _this.laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==id){
|
|
|
- laborReport.userDutyCheckVerifyUserId=response.data.data;
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('审核通过!');
|
|
|
+ });
|
|
|
+ //退组
|
|
|
+ _this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockoutEvent',(e)=>{
|
|
|
+ let labor=e.laborReport;
|
|
|
+ laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==labor.id){
|
|
|
+ laborReport.thisRecordOnlineTime=labor.thisRecordOnlineTime;
|
|
|
+ laborReport.thisRecordWorkingTime=labor.thisRecordWorkingTime;
|
|
|
+ laborReport.is_exportGroup=labor.is_exportGroup;
|
|
|
+ laborReport.checkOutAt=labor.check_out_at;
|
|
|
+ if (labor.relax_time){
|
|
|
+ laborReport.relax_time=labor.relax_time;
|
|
|
+ }
|
|
|
return false
|
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show('审核失败!网络错误:'+err);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ $(".tooltipTarget").tooltip({'trigger':'hover'});
|
|
|
+ $('#list').removeClass('d-none');
|
|
|
+ let data=[
|
|
|
+ [
|
|
|
+ {name:'created_at_start',type:'dateTime',tip:'选择显示指定日期的起始时间'},
|
|
|
+ {name:'user_workgroup_id',type:'search_select',tip:['',''],placeholder:['小组',''],data:this.userWorkGroups},
|
|
|
+ {name:'enter_number',type:'input',tip:'进场编号:支持15天内模糊搜索,15天外精确搜索',placeholder: '进场编号'},
|
|
|
+ {name:'is_export',type:'checkbox',data:[{name:true,value:'显示已退场'}]},
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {name:'created_at_end',type:'dateTime',tip:'选择显示指定日期的结束时间'},
|
|
|
+ {name:'name',type:'input',tip:'',placeholder: '姓名'},
|
|
|
+ {name:'mobile_phone',type:'input',tip:'',placeholder: '电话号'},
|
|
|
+ {name:'identity_number',type:'input',tip:'',placeholder: '身份证号'},
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ this.form = new query({
|
|
|
+ el:"#form_div",
|
|
|
+ condition:data,
|
|
|
});
|
|
|
+ this.form.init();
|
|
|
+ let column = [
|
|
|
+ {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
|
|
|
+ dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
|
|
|
+ {name:'index',value: '序号', neglect: true},
|
|
|
+ {name:'operation',value: '操作', neglect: true},
|
|
|
+ {name:'enter_number',value: '进厂编号', style:'background-color: rgb(241, 234, 190)'},
|
|
|
+ {name:'userWorkGroupName',value: '小组', style:'background-color: rgb(241, 234, 190)'},
|
|
|
+ {name:'name',value: '临时工', style:'background-color: rgb(241, 234, 190)'},
|
|
|
+ {name:'mobile_phone',value: '电话', style:'background-color: rgb(241, 234, 190)'},
|
|
|
+ {name:'identity_number',value: '身份证号', style:'background-color: rgb(241, 234, 190)'},
|
|
|
+ {name:'labor_company',value: '劳务所', style:'background-color: rgb(241, 234, 190)'},
|
|
|
+ {name:'enter_at',value: '进场时间'},
|
|
|
+ {name:'checkInAt',value: '进组时间'},
|
|
|
+ {name:'checkOutAt',value: '退组时间'},
|
|
|
+ {name:'exit_at',value: '退场时间'},
|
|
|
+ {name:'verifyAt',value: '审核时间'},
|
|
|
+ {name:'verifyPerson',value: '审核人'},
|
|
|
+ {name:'relax_time',value: '晚饭打卡(分)', neglect: true},
|
|
|
+ {name:'thisRecordOnlineTime',value: '在线时长', neglect: true},
|
|
|
+ {name:'thisRecordWorkingTime',value: '本次工作时长', neglect: true},
|
|
|
+ {name:'remark',value: '备注'},
|
|
|
+ ];
|
|
|
+ setTimeout(function () {
|
|
|
+ let header = new Header({
|
|
|
+ el: "#header",
|
|
|
+ column: column,
|
|
|
+ data: _this.laborReports,
|
|
|
+ restorationColumn: 'id',
|
|
|
+ fixedTop:($('#form_div').height())+2,
|
|
|
+ offset:0.5,
|
|
|
+ vue:vue
|
|
|
+ });
|
|
|
+ header.init();
|
|
|
+ },0);
|
|
|
},
|
|
|
- ////组长打卡审核(特定组添加备注)
|
|
|
- addRemarkAndGroupClock(){
|
|
|
- let _this=this;
|
|
|
- let id = getSelectId();
|
|
|
- let remark=document.getElementById('remark').value;
|
|
|
- let url='{{url("laborReport/addRemarkAndGroupClock")}}';
|
|
|
- if (remark==null|| remark=='' || remark=="undefined"){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show("您还未添加任何备注");
|
|
|
- return;
|
|
|
- }
|
|
|
- axios.post(url,{id:id,remark:remark})
|
|
|
- .then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(response.data.data);
|
|
|
- return;
|
|
|
+ watch:{
|
|
|
+ checkData:{
|
|
|
+ handler(){
|
|
|
+ if (this.checkData.length === this.laborReports.length){
|
|
|
+ document.querySelector('#all').checked = true;
|
|
|
+ document.querySelector('#all_temp').checked = true;
|
|
|
+ }else {
|
|
|
+ document.querySelector('#all').checked = false;
|
|
|
+ document.querySelector('#all_temp').checked = false;
|
|
|
}
|
|
|
- _this.laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==id){
|
|
|
- laborReport.groupUserId=response.data.data.group_user_id;
|
|
|
- laborReport.verifyAt=response.data.data.verify_at;
|
|
|
- laborReport.verifyPerson=response.data.data.verifyPerson;
|
|
|
- laborReport.remark=response.data.data.remark;
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('审核通过!');
|
|
|
- return false
|
|
|
+ },
|
|
|
+ deep:true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ selectedColor(id){
|
|
|
+ if (id==this.selectedStyle){
|
|
|
+ this.selectedStyle='';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.selectedStyle=id;
|
|
|
+ },
|
|
|
+ checkAll(e){
|
|
|
+ if (e.target.checked){
|
|
|
+ this.laborReports.forEach((el,i)=>{
|
|
|
+ if (this.checkData.indexOf(el.id) == '-1'){
|
|
|
+ this.checkData.push(el.id);
|
|
|
}
|
|
|
- return true;
|
|
|
});
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show('审核失败!网络错误:'+err);
|
|
|
- });
|
|
|
+ }else {
|
|
|
+ this.checkData = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ laborReportExport(checkAllSign){
|
|
|
+ let url = '{{url('laborReport/export')}}';
|
|
|
+ let token='{{ csrf_token() }}';
|
|
|
+ excelExport(checkAllSign,this.checkData,url,this.sum,token);
|
|
|
+ },
|
|
|
+ //门卫审核
|
|
|
+ guardClockAudit(id,user_duty_check_id){
|
|
|
+ let url='{{url("laborReport/guardClockAudit")}}';
|
|
|
+ let _this=this;
|
|
|
+ axios.post(url,{id:id,user_duty_check_id:user_duty_check_id})
|
|
|
+ .then(function (response) {
|
|
|
+ if (!response.data.success){
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show(response.data.data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ _this.laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==id){
|
|
|
+ laborReport.userDutyCheckVerifyUserId=response.data.data;
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('审核通过!');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(4000);
|
|
|
+ tempTip.show('审核失败!网络错误:'+err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ ////组长打卡审核(特定组添加备注)
|
|
|
+ addRemarkAndGroupClock(){
|
|
|
+ let _this=this;
|
|
|
+ let id = getSelectId();
|
|
|
+ let remark=document.getElementById('remark').value;
|
|
|
+ let url='{{url("laborReport/addRemarkAndGroupClock")}}';
|
|
|
+ if (remark==null|| remark=='' || remark=="undefined"){
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show("您还未添加任何备注");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ axios.post(url,{id:id,remark:remark})
|
|
|
+ .then(function (response) {
|
|
|
+ if (!response.data.success){
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show(response.data.data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ _this.laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==id){
|
|
|
+ laborReport.groupUserId=response.data.data.group_user_id;
|
|
|
+ laborReport.verifyAt=response.data.data.verify_at;
|
|
|
+ laborReport.verifyPerson=response.data.data.verifyPerson;
|
|
|
+ laborReport.remark=response.data.data.remark;
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('审核通过!');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(4000);
|
|
|
+ tempTip.show('审核失败!网络错误:'+err);
|
|
|
+ });
|
|
|
|
|
|
- },
|
|
|
- //组长打卡审核
|
|
|
- groupClockAudit(id,userWorkgroupNeedRemark){
|
|
|
- let url='{{url("laborReport/groupClockAudit")}}';
|
|
|
- let _this=this;
|
|
|
- if (userWorkgroupNeedRemark){
|
|
|
- $('#remarkModal').modal('show');
|
|
|
- selectId(id);
|
|
|
- return;
|
|
|
- }
|
|
|
- axios.post(url,{id:id})
|
|
|
- .then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(response.data.data);
|
|
|
- return;
|
|
|
- }
|
|
|
- _this.laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==id){
|
|
|
- laborReport.groupUserId=response.data.data.group_user_id;
|
|
|
- laborReport.verifyAt=response.data.data.verify_at;
|
|
|
- laborReport.verifyPerson=response.data.data.verifyPerson;
|
|
|
+ },
|
|
|
+ //组长打卡审核
|
|
|
+ groupClockAudit(id,userWorkgroupNeedRemark){
|
|
|
+ let url='{{url("laborReport/groupClockAudit")}}';
|
|
|
+ let _this=this;
|
|
|
+ if (userWorkgroupNeedRemark){
|
|
|
+ $('#remarkModal').modal('show');
|
|
|
+ selectId(id);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ axios.post(url,{id:id})
|
|
|
+ .then(function (response) {
|
|
|
+ if (!response.data.success){
|
|
|
tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('审核通过!');
|
|
|
- return false
|
|
|
+ tempTip.show(response.data.data);
|
|
|
+ return;
|
|
|
}
|
|
|
- return true;
|
|
|
- });
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show('审核失败!网络错误:'+err);
|
|
|
- });
|
|
|
- },
|
|
|
- //有晚餐
|
|
|
- haveDinner(){
|
|
|
- $('#exampleModal').modal('show');
|
|
|
- },
|
|
|
- noDinner(){
|
|
|
- let _this=this;
|
|
|
- let id = getSelectId();
|
|
|
- let url='{{url("laborReport/groupExport")}}';
|
|
|
- axios.post(url,{id:id})
|
|
|
- .then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(response.data.data);
|
|
|
- return;
|
|
|
- }
|
|
|
- _this.laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==id){
|
|
|
- laborReport.checkOutAt=response.data.data.check_out_at;
|
|
|
- laborReport.workingDuration=response.data.data.working_duration;
|
|
|
- laborReport.is_exportGroup=response.data.data.is_exportGroup;
|
|
|
- laborReport.onlineDuration=response.data.data.online_duration;
|
|
|
+ _this.laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==id){
|
|
|
+ laborReport.groupUserId=response.data.data.group_user_id;
|
|
|
+ laborReport.verifyAt=response.data.data.verify_at;
|
|
|
+ laborReport.verifyPerson=response.data.data.verifyPerson;
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('审核通过!');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(4000);
|
|
|
+ tempTip.show('审核失败!网络错误:'+err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //有晚餐
|
|
|
+ haveDinner(){
|
|
|
+ $('#exampleModal').modal('show');
|
|
|
+ },
|
|
|
+ noDinner(){
|
|
|
+ let _this=this;
|
|
|
+ let id = getSelectId();
|
|
|
+ let url='{{url("laborReport/groupExport")}}';
|
|
|
+ axios.post(url,{id:id})
|
|
|
+ .then(function (response) {
|
|
|
+ if (!response.data.success){
|
|
|
tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('退组成功!');
|
|
|
- return false
|
|
|
+ tempTip.show(response.data.data);
|
|
|
+ return;
|
|
|
}
|
|
|
- return true;
|
|
|
- });
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show('退组失败!网络错误:'+err);
|
|
|
- });
|
|
|
- },
|
|
|
- //退场有晚饭时间
|
|
|
- makeSureRelax_time(){
|
|
|
- let url='{{url("laborReport/groupExportEnsure")}}';
|
|
|
- let _this=this;
|
|
|
- let id = getSelectId();
|
|
|
- axios.post(url,{id:id,relax_time:_this.relax_time})
|
|
|
- .then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(response.data.data);
|
|
|
- return;
|
|
|
+ _this.laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==id){
|
|
|
+ laborReport.checkOutAt=response.data.data.check_out_at;
|
|
|
+ laborReport.workingDuration=response.data.data.working_duration;
|
|
|
+ laborReport.is_exportGroup=response.data.data.is_exportGroup;
|
|
|
+ laborReport.onlineDuration=response.data.data.online_duration;
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('退组成功!');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(4000);
|
|
|
+ tempTip.show('退组失败!网络错误:'+err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //退场有晚饭时间
|
|
|
+ makeSureRelax_time(){
|
|
|
+ let url='{{url("laborReport/groupExportEnsure")}}';
|
|
|
+ let _this=this;
|
|
|
+ let id = getSelectId();
|
|
|
+ axios.post(url,{id:id,relax_time:_this.relax_time})
|
|
|
+ .then(function (response) {
|
|
|
+ if (!response.data.success){
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show(response.data.data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ _this.laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==id){
|
|
|
+ laborReport.checkOutAt=response.data.data.check_out_at;
|
|
|
+ laborReport.workingDuration=response.data.data.working_duration;
|
|
|
+ laborReport.relax_time=response.data.data.relax_time;
|
|
|
+ laborReport.is_exportGroup=response.data.data.is_exportGroup;
|
|
|
+ laborReport.onlineDuration=response.data.data.online_duration;
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('退组成功!');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(4000);
|
|
|
+ tempTip.show('退组失败!网络错误:'+err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //组长点击退组,
|
|
|
+ groupExport(id,name){
|
|
|
+ let _this=this;
|
|
|
+ _this.laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==id){
|
|
|
+ _this.dateTime=new Date(new Date(laborReport.created_at).toLocaleDateString());
|
|
|
+ return false;
|
|
|
}
|
|
|
- _this.laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==id){
|
|
|
- laborReport.checkOutAt=response.data.data.check_out_at;
|
|
|
- laborReport.workingDuration=response.data.data.working_duration;
|
|
|
- laborReport.relax_time=response.data.data.relax_time;
|
|
|
- laborReport.is_exportGroup=response.data.data.is_exportGroup;
|
|
|
- laborReport.onlineDuration=response.data.data.online_duration;
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ const dateTime=new Date(_this.dateTime.setDate(_this.dateTime.getDate()+1));
|
|
|
+ const start = new Date(new Date(new Date().toLocaleDateString()).getTime()+19*60*60*1000);
|
|
|
+ if(!confirm("确定要临时工“"+name+"“退组吗?")){return}
|
|
|
+ if (new Date()>=start || new Date()>dateTime){
|
|
|
+ $('#dinnerModal').modal('show');
|
|
|
+ selectId(id);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let url='{{url("laborReport/groupExport")}}';
|
|
|
+ axios.post(url,{id:id})
|
|
|
+ .then(function (response) {
|
|
|
+ if (!response.data.success){
|
|
|
tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('退组成功!');
|
|
|
- return false
|
|
|
+ tempTip.show(response.data.data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ _this.laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==id){
|
|
|
+ laborReport.checkOutAt=response.data.data.check_out_at;
|
|
|
+ laborReport.workingDuration=response.data.data.working_duration;
|
|
|
+ laborReport.is_exportGroup=response.data.data.is_exportGroup;
|
|
|
+ laborReport.onlineDuration=response.data.data.online_duration;
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('退组成功!');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(5000);
|
|
|
+ tempTip.show('退组失败!网络错误:'+err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ owner_seek:function (e) {
|
|
|
+ let _this=this;
|
|
|
+ let $val=e.target.value;
|
|
|
+ if($val==='')_this.filterData.user_workgroup_id='';
|
|
|
+ else
|
|
|
+ _this.userWorkGroups.forEach(function (userWorkGroup) {
|
|
|
+ if (userWorkGroup.name.includes($val)){
|
|
|
+ _this.filterData.user_workgroup_id=userWorkGroup.id;
|
|
|
}
|
|
|
- return true;
|
|
|
});
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show('退组失败!网络错误:'+err);
|
|
|
- });
|
|
|
- },
|
|
|
- //组长点击退组,
|
|
|
- groupExport(id,name){
|
|
|
- let _this=this;
|
|
|
- _this.laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==id){
|
|
|
- _this.dateTime=new Date(new Date(laborReport.created_at).toLocaleDateString());
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- });
|
|
|
- const dateTime=new Date(_this.dateTime.setDate(_this.dateTime.getDate()+1));
|
|
|
- const start = new Date(new Date(new Date().toLocaleDateString()).getTime()+19*60*60*1000);
|
|
|
- if(!confirm("确定要临时工“"+name+"“退组吗?")){return}
|
|
|
- if (new Date()>=start || new Date()>dateTime){
|
|
|
- $('#dinnerModal').modal('show');
|
|
|
- selectId(id);
|
|
|
- return;
|
|
|
- }
|
|
|
- let url='{{url("laborReport/groupExport")}}';
|
|
|
- axios.post(url,{id:id})
|
|
|
- .then(function (response) {
|
|
|
+ },
|
|
|
+ updateLaborCompany(laborCompanyId,enter_number){
|
|
|
+ let _this=this;
|
|
|
+ let url='{{url("laborReport/updateLaborCompany")}}';
|
|
|
+ axios.post(url,{enter_number:enter_number,laborCompanyId:laborCompanyId}).then(function (response) {
|
|
|
if (!response.data.success){
|
|
|
tempTip.setDuration(3000);
|
|
|
- tempTip.show(response.data.data);
|
|
|
+ tempTip.show('修改劳务所失败'+response.data.data);
|
|
|
return;
|
|
|
+ }else {
|
|
|
+ _this.laborReports.forEach(function (laborReport) {
|
|
|
+ if (laborReport.enter_number==response.data.data.enter_number){
|
|
|
+ laborReport.labor_company_id=response.data.data.labor_company_id;
|
|
|
+ laborReport.labor_company=response.data.labor_company;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('修改劳务所成功!');
|
|
|
+
|
|
|
}
|
|
|
- _this.laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==id){
|
|
|
- laborReport.checkOutAt=response.data.data.check_out_at;
|
|
|
- laborReport.workingDuration=response.data.data.working_duration;
|
|
|
- laborReport.is_exportGroup=response.data.data.is_exportGroup;
|
|
|
- laborReport.onlineDuration=response.data.data.online_duration;
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('修改劳务所失败!网络错误:'+err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 删除(id,name){
|
|
|
+ let _this=this;
|
|
|
+ if(!confirm('确定要删除临时工为:“'+name+'”的报表记录吗?')){return};
|
|
|
+ let url='{{url("laborReport/删除")}}/'+id;
|
|
|
+ axios.delete(url).then(
|
|
|
+ function (response) {
|
|
|
+ if(!response.data.success){
|
|
|
tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('退组成功!');
|
|
|
- return false
|
|
|
+ tempTip.show('临时工报表记录删除失败!'+response.data.data);
|
|
|
+ }else {
|
|
|
+ _this.laborReports.every(function (laborReport,i) {
|
|
|
+ if (response.data.data>0&&laborReport.id===id){
|
|
|
+ _this.laborReports.splice(i,1);
|
|
|
+ return false;
|
|
|
+ }else {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ });
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('临时工报表记录删除成功!');
|
|
|
}
|
|
|
- return true;
|
|
|
- });
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(5000);
|
|
|
- tempTip.show('退组失败!网络错误:'+err);
|
|
|
- });
|
|
|
- },
|
|
|
- owner_seek:function (e) {
|
|
|
- let _this=this;
|
|
|
- let $val=e.target.value;
|
|
|
- if($val==='')_this.filterData.user_workgroup_id='';
|
|
|
- else
|
|
|
- _this.userWorkGroups.forEach(function (userWorkGroup) {
|
|
|
- if (userWorkGroup.name.includes($val)){
|
|
|
- _this.filterData.user_workgroup_id=userWorkGroup.id;
|
|
|
}
|
|
|
+ ).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('删除失败,网络链接错误!'+err);
|
|
|
});
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
- },
|
|
|
- });
|
|
|
+ });
|
|
|
|
|
|
let select_id = 0;
|
|
|
function selectId(id) {
|