|
|
@@ -45,11 +45,11 @@
|
|
|
|
|
|
@can('人事管理-组长审核')
|
|
|
<span>
|
|
|
- <button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export{{--&&laborReport.has_group_verify_right--}}" @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{{--&&!laborReport.has_group_verify_right--}}"><b class="text-success">在组</b></span>
|
|
|
+ <button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export&&laborReport.has_group_verify_right" @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&&!laborReport.has_group_verify_right"><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>
|
|
|
- <button v-else-if="laborReport.user_workgroup_id{{--&&laborReport.has_group_verify_right--}}" @click="groupClockAudit(laborReport.id,laborReport.userWorkgroupNeedRemark)" class="btn btn-sm btn-outline-primary">组长审核</button>
|
|
|
+ <button v-else-if="laborReport.user_workgroup_id&&laborReport.has_group_verify_right" @click="groupClockAudit(laborReport.id,laborReport.userWorkgroupNeedRemark)" class="btn btn-sm btn-outline-primary">组长审核</button>
|
|
|
</span>
|
|
|
@else
|
|
|
<span v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export"><b class="text-success">在组</b></span>
|
|
|
@@ -123,11 +123,11 @@
|
|
|
|
|
|
@can('人事管理-组长审核')
|
|
|
<span>
|
|
|
- <button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export{{--&&laborReport.has_group_verify_right--}}" @click="groupExport(laborReport.id,laborReport.name)" style="transform:scale(1.1)" class="btn btn-lg btn-danger">退组</button>
|
|
|
- <span v-else-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export{{--&&!laborReport.has_group_verify_right--}}"><b class="text-success">在组</b></span>
|
|
|
+ <button v-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export&&laborReport.has_group_verify_right" @click="groupExport(laborReport.id,laborReport.name)" style="transform:scale(1.1)" class="btn btn-lg btn-danger">退组</button>
|
|
|
+ <span v-else-if="laborReport.groupUserId&&!laborReport.is_exportGroup&&!laborReport.is_export&&!laborReport.has_group_verify_right"><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>
|
|
|
- <button v-else-if="laborReport.user_workgroup_id{{--&&laborReport.has_group_verify_right--}}" @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&&laborReport.has_group_verify_right" @click="groupClockAudit(laborReport.id,laborReport.userWorkgroupNeedRemark)" class="btn btn-lg btn-outline-primary" style="transform:scale(1.1)" >组长审核</button>
|
|
|
|
|
|
</span>
|
|
|
@else
|
|
|
@@ -380,32 +380,33 @@
|
|
|
//进组
|
|
|
_this.permittingWorkgroups.forEach(function(workgroup){
|
|
|
Echo.channel('{{$laravelEchoPrefix}}'+workgroup.token).listen('ClockinEvent',(e)=>{
|
|
|
- let labor=e.laborReport;
|
|
|
- let res=false;
|
|
|
- laborReports.forEach(function (item){
|
|
|
- if(item.id==labor.id){
|
|
|
- res=true;
|
|
|
- }
|
|
|
- })
|
|
|
- if (res){
|
|
|
- laborReports.every(function (laborReport) {
|
|
|
- if (laborReport.id==labor.id){
|
|
|
- laborReport.userWorkGroupName=labor.user_workgroup.name;
|
|
|
- laborReport.user_workgroup_id=labor.user_workgroup_id;
|
|
|
- laborReport.checkInAt=labor.check_in_at;
|
|
|
- laborReport.round_check_in_at=labor.round_check_in_at;
|
|
|
- return false
|
|
|
- }
|
|
|
- return true;
|
|
|
- });
|
|
|
- }else {
|
|
|
- labor.userWorkGroupName=labor.user_workgroup.name;
|
|
|
- labor.checkInAt=labor.check_in_at;
|
|
|
- laborReports.push(labor);
|
|
|
- }
|
|
|
- // setTimeout(function () {
|
|
|
- // window.location.reload();
|
|
|
- // },500);
|
|
|
+ // let res=false;
|
|
|
+ // laborReports.forEach(function (item){
|
|
|
+ // if(item.id==labor.id){
|
|
|
+ // res=true;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // if (res){
|
|
|
+ // laborReports.every(function (laborReport) {
|
|
|
+ // if (laborReport.id==labor.id){
|
|
|
+ // laborReport.userWorkGroupName=labor.user_workgroup.name;
|
|
|
+ // laborReport.has_group_verify_right=labor.has_group_verify_right;
|
|
|
+ // laborReport.user_workgroup_id=labor.user_workgroup_id;
|
|
|
+ // laborReport.checkInAt=labor.check_in_at;
|
|
|
+ // laborReport.round_check_in_at=labor.round_check_in_at;
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // return true;
|
|
|
+ // });
|
|
|
+ // }else {
|
|
|
+ // labor.userWorkGroupName=labor.user_workgroup.name;
|
|
|
+ // labor.checkInAt=labor.check_in_at;
|
|
|
+ // labor.has_group_verify_right=labor.has_group_verify_right;
|
|
|
+ // laborReports.push(labor);
|
|
|
+ // }
|
|
|
+ setTimeout(function () {
|
|
|
+ window.location.reload();
|
|
|
+ },500);
|
|
|
});
|
|
|
});
|
|
|
//退组
|