|
|
@@ -20,7 +20,7 @@
|
|
|
<td>序号</td>
|
|
|
<td>姓名</td>
|
|
|
@can('人事管理-打卡审核')<td>门卫审核</td>@endcan
|
|
|
- <td v-if="workgroupSign">组长审核</td>
|
|
|
+ <td>组长审核</td>
|
|
|
<td >打卡时间</td>
|
|
|
<td>打卡类型</td>
|
|
|
<td>手机号</td>
|
|
|
@@ -40,21 +40,25 @@
|
|
|
<button v-else @click="storeClockAudit(userDutyCheck.id,userDutyCheck.type)" class="btn btn-primary w-80">审核</button>
|
|
|
</span>
|
|
|
</td>@endcan
|
|
|
- <td v-if="workgroupSign">
|
|
|
+ <td>
|
|
|
<span v-if="userDutyCheck.type=='登入'">
|
|
|
<b v-if="userDutyCheck.group_user_id" class="text-success">已审核</b>
|
|
|
<button v-else @click="storeGroupAudit(userDutyCheck.id,userDutyCheck.type)" class="btn btn-primary w-80">组长审核</button>
|
|
|
</span>
|
|
|
</td>
|
|
|
<td>@{{ userDutyCheck.checked_at.substring(11,16) }}</td>
|
|
|
- @can('人事管理-打卡审核类型')<td>
|
|
|
- <button v-if="!userDutyCheck.isChangingType" class="btn btn-sm btn-outline-secondary text-center" @click="dutyCheckType($event,userDutyCheck)" :data_id="userDutyCheck.id">@{{ userDutyCheck.type }}</button>
|
|
|
- <select v-else v-model="userDutyCheck.type" :data_id="userDutyCheck.id"
|
|
|
- @change="isException(userDutyCheck.id,userDutyCheck.user_id,userDutyCheck.checked_at,userDutyCheck.type)" class="form-control" style="width: 100px">
|
|
|
- <option value="登入">登入</option>
|
|
|
- <option value="登出">登出</option>
|
|
|
- </select>
|
|
|
- </td>@endcan
|
|
|
+ <td>
|
|
|
+ @can('人事管理-打卡审核类型')
|
|
|
+ <button v-if="!userDutyCheck.isChangingType" class="btn btn-sm btn-outline-secondary text-center" @click="dutyCheckType($event,userDutyCheck)" :data_id="userDutyCheck.id">@{{ userDutyCheck.type }}</button>
|
|
|
+ <select v-else v-model="userDutyCheck.type" :data_id="userDutyCheck.id"
|
|
|
+ @change="isException(userDutyCheck.id,userDutyCheck.user_id,userDutyCheck.checked_at,userDutyCheck.type)" class="form-control" style="width: 100px">
|
|
|
+ <option value="登入">登入</option>
|
|
|
+ <option value="登出">登出</option>
|
|
|
+ </select>
|
|
|
+ @else
|
|
|
+ <span class="text-center">@{{ userDutyCheck.type }}</span>
|
|
|
+ @endcan
|
|
|
+ </td>
|
|
|
<td class="text-muted"><span v-if="userDutyCheck.user_detail">@{{ userDutyCheck.user_detail.mobile_phone }}</span></td>
|
|
|
<td ><span v-if="userDutyCheck.user_labor">@{{ userDutyCheck.user_labor.labor_company.name }}</span></td>
|
|
|
<td class="font-weight-bold"><span v-if="userDutyCheck.user_workgroup">
|
|
|
@@ -91,15 +95,17 @@
|
|
|
@if($userDutyCheck->userLabor)user_labor:{!! $userDutyCheck->userLabor !!}, @endif},
|
|
|
@endforeach
|
|
|
],
|
|
|
- workgroupSign:'{{$workgroupSign}}',
|
|
|
+ permittingWorkgroups:{!! $permittingWorkgroups !!},
|
|
|
},
|
|
|
mounted(){
|
|
|
initEcho();
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}userDutyCheck').listen('ClockinEvent',(e)=>{
|
|
|
- window.location.reload();
|
|
|
- });
|
|
|
- Echo.channel('{{$laravelEchoPrefix}}userDutyCheck').listen('ClockoutEvent',(e)=>{
|
|
|
- window.location.reload();
|
|
|
+ this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockinEvent',(e)=>{
|
|
|
+ window.location.reload();
|
|
|
+ });
|
|
|
+ Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockoutEvent',(e)=>{
|
|
|
+ window.location.reload();
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
methods:{
|