This commit is contained in:
chenbo 2024-02-29 17:16:33 +08:00
parent 0830b5d352
commit d68f042298

View File

@ -93,7 +93,8 @@ class CostConsultationReportController extends BaseAdminController
if ($project_name) { if ($project_name) {
$query->where('p.project_name', 'like', '%'.$project_name.'%'); $query->where('p.project_name', 'like', '%'.$project_name.'%');
} }
})->field('p.*')->append(['task_allocation_status', 'task_handling_three_level_review_status', 'data_reception_status']) ->withAttr('task_allocation_status', function ($data, $value){ })->append(['task_allocation_status', 'task_handling_three_level_review_status', 'data_reception_status'])
->withAttr('task_allocation_status', function ($data, $value){
$count = TaskAllocation::where('cost_project_id', $value['id'])->count(); $count = TaskAllocation::where('cost_project_id', $value['id'])->count();
return $count > 0 ? 1: 0; return $count > 0 ? 1: 0;
})->withAttr('task_handling_three_level_review_status', function ($data, $value){ })->withAttr('task_handling_three_level_review_status', function ($data, $value){