|
|
@@ -18,7 +18,7 @@
|
|
|
<a class="dropdown-item" @click="laborReportExport(true)" href="javascript:">导出所有页</a>
|
|
|
</div>
|
|
|
</span>
|
|
|
- <table class="table table-sm table-hover table-striped d-none d-sm-block p-0 text-nowrap table-bordered" >
|
|
|
+ <table class="table table-sm table-hover table-striped d-none d-xl-block p-0 text-nowrap table-bordered" >
|
|
|
<tr>
|
|
|
<th class="text-center">
|
|
|
<label for="all">
|
|
|
@@ -28,16 +28,16 @@
|
|
|
<th class="text-center">序号</th>
|
|
|
{{-- <th>ID</th>--}}
|
|
|
<th class="text-center">操作</th>
|
|
|
- <th class="text-center">进场时间</th>
|
|
|
- <th class="text-center">退场时间</th>
|
|
|
<th class="text-center" style="background-color: rgb(241, 234, 190)">进厂编号</th>
|
|
|
<th class="text-center" style="background-color: rgb(241, 234, 190)">小组</th>
|
|
|
<th class="text-center" style="background-color: rgb(241, 234, 190)">临时工</th>
|
|
|
<th class="text-center" style="background-color: rgb(241, 234, 190)">电话</th>
|
|
|
<th class="text-center" style="background-color: rgb(241, 234, 190)">身份证号</th>
|
|
|
<th class="text-center" style="background-color: rgb(241, 234, 190)">劳务所</th>
|
|
|
+ <th class="text-center">进场时间</th>
|
|
|
<th class="text-center">进组时间</th>
|
|
|
<th class="text-center">退组时间</th>
|
|
|
+ <th class="text-center">退场时间</th>
|
|
|
<th class="text-center">审核时间</th>
|
|
|
<th class="text-center">审核人</th>
|
|
|
<th class="text-center">晚饭打卡(分)</th>
|
|
|
@@ -45,7 +45,7 @@
|
|
|
<th class="text-center">本次工作时长</th>
|
|
|
<th class="text-center">备注</th>
|
|
|
</tr>
|
|
|
- <tr v-for="(laborReport,i) in laborReports" @click="selectedColor(laborReport.id)" :style="{'font-weight': laborReport.id==selectedStyle?'bold':''}">
|
|
|
+ <tr v-for="(laborReport,i) in laborReports" @click="selectedColor(laborReport.id)" :style="{'font-weight': laborReport.id==selectedStyle?'bold':''}">
|
|
|
<td>
|
|
|
<input class="checkItem" type="checkbox" :value="laborReport.id" v-model="checkData">
|
|
|
</td>
|
|
|
@@ -55,7 +55,7 @@
|
|
|
<span >
|
|
|
<span v-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.userDutyCheckId)">门卫审核</button>
|
|
|
+ <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>
|
|
|
@@ -68,41 +68,40 @@
|
|
|
<button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup" @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.userWorkGroupId" @click="groupClockAudit(laborReport.id,laborReport.userWorkgroupNeedRemark)" class="btn btn-sm btn-outline-primary">组长审核</button>
|
|
|
+ <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-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.userWorkGroupId" class="text-center"><b class="text-danger">组长未审核</b></span>
|
|
|
+ <span v-else-if="laborReport.user_workgroup_id" class="text-center"><b class="text-danger">组长未审核</b></span>
|
|
|
@endcan
|
|
|
</td>
|
|
|
- <td class="text-muted">@{{laborReport.enter_at}}</td>
|
|
|
- <td >@{{ laborReport.exit_at }}</td>
|
|
|
- <td class="text-muted">@{{laborReport.enterNumber}}</td>
|
|
|
+ <td class="text-muted">@{{laborReport.enter_number}}</td>
|
|
|
<td>@{{laborReport.userWorkGroupName}}</td>
|
|
|
<td >@{{laborReport.name}}</td>
|
|
|
- <td class="text-muted">@{{laborReport.mobilePhone}}</td>
|
|
|
- <td class="text-muted">@{{laborReport.identityNumber}}</td>
|
|
|
- <td class="text-muted">@{{laborReport.laborCompany}}</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>
|
|
|
+ <td class="text-muted">@{{laborReport.enter_at}}</td>
|
|
|
<td>@{{laborReport.checkInAt}}</td>
|
|
|
<td class="text-muted">@{{laborReport.checkOutAt}}</td>
|
|
|
+ <td >@{{ laborReport.exit_at }}</td>
|
|
|
<td class="text-muted">@{{laborReport.verifyAt}}</td>
|
|
|
<td class="text-muted"><span v-if="laborReport.verifyPerson">@{{laborReport.verifyPerson}}</span></td>
|
|
|
<td class="text-muted"><span v-if="laborReport.relax_time">@{{laborReport.relax_time}}</span></td>
|
|
|
-{{-- <td class="text-muted"><span v-if="laborReport.onlineDuration">@{{laborReport.onlineDuration}}</span></td>--}}
|
|
|
+ {{-- <td class="text-muted"><span v-if="laborReport.onlineDuration">@{{laborReport.onlineDuration}}</span></td>--}}
|
|
|
<td class="text-muted"><span v-if="laborReport.thisRecordOnlineTime">@{{laborReport.thisRecordOnlineTime}}</span></td>
|
|
|
<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>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- <table class="table table-striped table-sm table-bordered table-hover p-0 d-block d-sm-none" style="background: rgb(255, 255, 255);">
|
|
|
- <tbody>
|
|
|
- <tr v-for="laborReport in laborReports">
|
|
|
- <td style="filter:grayscale(30%); ">
|
|
|
- <div class="pl-3 mt-1">
|
|
|
- <div style="transform:scale(1)" class="pl-0">
|
|
|
+ {{-- <td><span v-if="laborReport.workingDuration">@{{laborReport.workingDuration}}</span></td>--}}
|
|
|
+ <td><span v-if="laborReport.remark">@{{laborReport.remark}}</span></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <table class="table table-striped table-bordered table-hover p-0 d-table d-xl-none" style="background: rgb(255, 255, 255);">
|
|
|
+ <tr v-for="laborReport in laborReports">
|
|
|
+ <td style="filter:grayscale(30%);">
|
|
|
+ <div class="pl-3 mt-1">
|
|
|
+ <div style="transform:scale(1)" class="pl-0">
|
|
|
<span class="mr-3 text-nowrap">
|
|
|
<span >操作:</span>
|
|
|
<span >
|
|
|
@@ -110,7 +109,7 @@
|
|
|
<span >
|
|
|
<b v-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.userDutyCheckId)">门卫审核</button>
|
|
|
+ <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>
|
|
|
@@ -123,39 +122,38 @@
|
|
|
<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>
|
|
|
<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.userWorkGroupId" @click="groupClockAudit(laborReport.id,laborReport.userWorkgroupNeedRemark)" class="btn btn-lg btn-outline-primary" style="transform:scale(1.1)" >组长审核</button>
|
|
|
+ <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>
|
|
|
<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.userWorkGroupId" class="text-center"><b class="text-danger">组长未审核</b></span>
|
|
|
+ <span v-else-if="laborReport.user_workgroup_id" class="text-center"><b class="text-danger">组长未审核</b></span>
|
|
|
@endcan
|
|
|
</span>
|
|
|
</span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="text-black">进场时间:</span><span class="text-black-50">@{{laborReport.enter_at }}</span></span>
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">退场时间:</span><span style="color:#af7651">@{{ laborReport.exit_at }}</span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">进场编号:</span><span style="color:#af7651">@{{ laborReport.enterNumber }}</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.mobilePhone }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">身份证号:</span><span style="color:#af7651" v-if="">@{{ laborReport.identityNumber }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">劳务所:</span><span style="color:#af7651" v-if="">@{{ laborReport.laborCompany }} </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.checkOutAt }} </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>--}}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="text-black">进场时间:</span><span class="text-black-50">@{{laborReport.enter_at }}</span></span>
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">退场时间:</span><span style="color:#af7651">@{{ laborReport.exit_at }}</span></span>--}}
|
|
|
+ {{-- <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="mr-3 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.checkOutAt }} </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>--}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
<div class="text-info h5 btn btn">{{$laborReports->count()}}/@{{ sum }}</div>
|
|
|
- <div>{{$laborReports->appends($request)->links()}}</div>
|
|
|
+ <div>{{$laborReports->appends($requests)->links()}}</div>
|
|
|
{{-- 选择晚饭时长弹框 --}}
|
|
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
<div class="modal-dialog">
|
|
|
@@ -235,6 +233,22 @@
|
|
|
@section('lastScript')
|
|
|
<script type="text/javascript" src="{{asset('js/queryForm/export.js')}}"></script>
|
|
|
<script type="text/javascript" src="{{asset('js/queryForm/queryForm200724.js')}}"></script>
|
|
|
+ <script>
|
|
|
+ let today=(new Date());
|
|
|
+ function isTomorrow(){
|
|
|
+ let now=(new Date());
|
|
|
+ const dateTime=new Date(now.setDate(now.getDate()+1));
|
|
|
+ if(dateTime<=today)return true;
|
|
|
+ else return false;
|
|
|
+ }
|
|
|
+ function reloadOnTomorrow(){
|
|
|
+ if(isTomorrow()){
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ window.onfocus=reloadOnTomorrow;
|
|
|
+ setInterval(reloadOnTomorrow,1000*60*60)
|
|
|
+ </script>
|
|
|
<script>
|
|
|
@if(isset($request))
|
|
|
let request={!! json_encode($request) !!};
|
|
|
@@ -244,12 +258,12 @@
|
|
|
data:{
|
|
|
laborReports:[
|
|
|
@foreach($laborReports as $laborReport)
|
|
|
- {id:'{{$laborReport->id}}',enterNumber:'{{$laborReport->enter_number}}'
|
|
|
- ,@if($laborReport->userWorkgroup)userWorkGroupId:'{{$laborReport->userWorkgroup->id}}',
|
|
|
+ {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}}'
|
|
|
- ,mobilePhone:'{{$laborReport->mobile_phone}}',identityNumber:'{{$laborReport->identity_number}}',laborCompany:'{{$laborReport->labor_company}}'
|
|
|
+ ,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']}}',
|
|
|
@@ -259,14 +273,13 @@
|
|
|
thisRecordOnlineTime:'{{$laborReport->thisRecordOnlineTime}}',
|
|
|
thisRecordWorkingTime:'{{$laborReport->thisRecordWorkingTime}}',
|
|
|
sequence:'{{$laborReport->sequence}}',amountOfJoined:'{{$laborReport->amountOfJoined}}',remark:'{{$laborReport->remark}}',
|
|
|
- @if($laborReport->userDutyCheck)userDutyCheckId:'{{$laborReport->userDutyCheck->id}}', userDutyCheckVerifyUserId:'{{$laborReport->userDutyCheck->verify_user_id}}'
|
|
|
+ @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)
|
|
|
+ @foreach($userWorkGroups as $userWorkGroup)
|
|
|
{name:'{{$userWorkGroup->id}}',value:'{{$userWorkGroup->name}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
@@ -277,63 +290,80 @@
|
|
|
},
|
|
|
mounted:function(){
|
|
|
initEcho();
|
|
|
+ let _this=this;
|
|
|
+ let laborReports=_this.laborReports;
|
|
|
//进场
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}userDutyCheck').listen('ImportEvent',(e)=>{
|
|
|
- window.location.reload();
|
|
|
- });
|
|
|
+ let tokenOfBroadcastEnterAndLeave='{{$tokenOfBroadcastEnterAndLeave}}';
|
|
|
+ if(tokenOfBroadcastEnterAndLeave)
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}'+tokenOfBroadcastEnterAndLeave).listen('ImportEvent',(e)=>{
|
|
|
+ let labor=e.laborReport;
|
|
|
+ laborReports.push(labor);
|
|
|
+ });
|
|
|
//退场
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}userDutyCheck').listen('ExportEvent',(e)=>{
|
|
|
- window.location.reload();
|
|
|
+ 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)=>{
|
|
|
- setTimeout(function (){
|
|
|
- window.location.reload();
|
|
|
- }, 500);
|
|
|
+ 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}}userDutyCheck').listen('GuardAuditEvent',(e)=>{--}}
|
|
|
- {{-- let userDutyCheck=e.userDutyCheck;--}}
|
|
|
- {{-- let _this=this;--}}
|
|
|
- {{-- _this.laborReports.every(function (laborReport) {--}}
|
|
|
- {{-- if (laborReport.userDutyCheckId==userDutyCheck.id){--}}
|
|
|
- {{-- laborReport.userDutyCheck=userDutyCheck;--}}
|
|
|
- {{-- laborReport.userDutyCheckVerifyUserId=userDutyCheck.verify_user_id;--}}
|
|
|
- {{-- return false--}}
|
|
|
- {{-- }--}}
|
|
|
- {{-- return true;--}}
|
|
|
- {{-- });--}}
|
|
|
- {{--});--}}
|
|
|
//组长审核
|
|
|
Echo.channel('{{$laravelEchoPrefix}}laborReport').listen('TeamAuditEvent',(e)=>{
|
|
|
- setTimeout(function (){
|
|
|
- window.location.reload();
|
|
|
- }, 500);
|
|
|
+ let labor=e.laborReport;
|
|
|
+ laborReports.every(function (laborReport) {
|
|
|
+ if (laborReport.id==labor.id){
|
|
|
+ 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;
|
|
|
+ });
|
|
|
});
|
|
|
- {{--Echo.channel('{{$laravelEchoPrefix}}laborReport').listen('TeamAuditEvent',(e)=>{--}}
|
|
|
- {{-- let labor=e.laborReport;--}}
|
|
|
- {{-- let _this=this;--}}
|
|
|
- {{-- setTimeout(function (){--}}
|
|
|
- {{-- _this.laborReports.every(function (laborReport) {--}}
|
|
|
- {{-- if (laborReport.id==labor.id){--}}
|
|
|
- {{-- laborReport.groupUserId==labor.group_user_id;--}}
|
|
|
- {{-- return false--}}
|
|
|
- {{-- }--}}
|
|
|
- {{-- return true;--}}
|
|
|
- {{-- });--}}
|
|
|
- {{-- }, 500);--}}
|
|
|
- {{--});--}}
|
|
|
//进组
|
|
|
- this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
+ _this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockinEvent',(e)=>{
|
|
|
window.location.reload();
|
|
|
});
|
|
|
});
|
|
|
//退组
|
|
|
- this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
+ _this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockoutEvent',(e)=>{
|
|
|
- setTimeout(function (){
|
|
|
- window.location.reload();
|
|
|
- }, 500);
|
|
|
+ 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;
|
|
|
+ });
|
|
|
});
|
|
|
});
|
|
|
$(".tooltipTarget").tooltip({'trigger':'hover'});
|
|
|
@@ -343,6 +373,7 @@
|
|
|
{name:'created_at_start',type:'dataTime',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:'dataTime',tip:'选择显示指定日期的结束时间'},
|
|
|
@@ -393,10 +424,10 @@
|
|
|
excelExport(checkAllSign,this.checkData,url,this.sum,token);
|
|
|
},
|
|
|
//门卫审核
|
|
|
- guardClockAudit(id,userDutyCheckId){
|
|
|
+ guardClockAudit(id,user_duty_check_id){
|
|
|
let url='{{url("laborReport/guardClockAudit")}}';
|
|
|
let _this=this;
|
|
|
- axios.post(url,{id:id,userDutyCheckId:userDutyCheckId})
|
|
|
+ axios.post(url,{id:id,user_duty_check_id:user_duty_check_id})
|
|
|
.then(function (response) {
|
|
|
if (!response.data.success){
|
|
|
tempTip.setDuration(3000);
|