diff --git a/app/adminapi/lists/project/ProjectAttendanceDetailLists.php b/app/adminapi/lists/project/ProjectAttendanceDetailLists.php index 9597dfa67..f25c6b188 100644 --- a/app/adminapi/lists/project/ProjectAttendanceDetailLists.php +++ b/app/adminapi/lists/project/ProjectAttendanceDetailLists.php @@ -39,7 +39,9 @@ class ProjectAttendanceDetailLists extends BaseAdminDataLists implements ListsSe */ public function setSearch(): array { - return []; + return [ + '=' => ['project_id'] + ]; } diff --git a/app/adminapi/lists/project/ProjectAttendanceRecordLists.php b/app/adminapi/lists/project/ProjectAttendanceRecordLists.php index a655b8168..8090fe352 100644 --- a/app/adminapi/lists/project/ProjectAttendanceRecordLists.php +++ b/app/adminapi/lists/project/ProjectAttendanceRecordLists.php @@ -40,7 +40,7 @@ class ProjectAttendanceRecordLists extends BaseAdminDataLists implements ListsSe public function setSearch(): array { return [ - '=' => ['attendance_date'], + '=' => ['attendance_date','project_id'], ]; } diff --git a/app/adminapi/lists/project/ProjectInsuranceManagementLists.php b/app/adminapi/lists/project/ProjectInsuranceManagementLists.php index 6c3517771..dcd5ab7b8 100644 --- a/app/adminapi/lists/project/ProjectInsuranceManagementLists.php +++ b/app/adminapi/lists/project/ProjectInsuranceManagementLists.php @@ -40,6 +40,7 @@ class ProjectInsuranceManagementLists extends BaseAdminDataLists implements List public function setSearch(): array { return [ + '=' => ['project_id'], '%like%' => ['type', 'insurance_no', 'insurance_company', 'invoice_no', 'handler'], ]; } diff --git a/app/adminapi/lists/project/ProjectLaborContractLists.php b/app/adminapi/lists/project/ProjectLaborContractLists.php index cf6d842a8..e8b08ebe7 100644 --- a/app/adminapi/lists/project/ProjectLaborContractLists.php +++ b/app/adminapi/lists/project/ProjectLaborContractLists.php @@ -40,7 +40,7 @@ class ProjectLaborContractLists extends BaseAdminDataLists implements ListsSearc public function setSearch(): array { return [ - '=' => ['contract_status', 'contract_type', 'contract_title'], + '=' => ['contract_status', 'project_id', 'contract_type', 'contract_title'], ]; } diff --git a/app/adminapi/lists/project/ProjectSalaryDetailLists.php b/app/adminapi/lists/project/ProjectSalaryDetailLists.php index 6e759e0c6..022db666c 100644 --- a/app/adminapi/lists/project/ProjectSalaryDetailLists.php +++ b/app/adminapi/lists/project/ProjectSalaryDetailLists.php @@ -61,8 +61,12 @@ class ProjectSalaryDetailLists extends BaseAdminDataLists implements ListsSearch */ public function lists(): array { - $prarms = $this->request->get(['payment_code','project_name','project_code']); + $prarms = $this->request->get(['project_id','payment_code','project_name','project_code']); $where = []; + if(isset($prarms['project_id']) && $prarms['project_id'] != ''){ + $salary_payment_ids = ProjectSalaryPayment::where('project_id',$prarms['project_id'])->column('id'); + $where[] = ['salary_payment_id','in',$salary_payment_ids]; + } if(isset($prarms['payment_code']) && $prarms['payment_code'] != ''){ $salary_payment_ids = ProjectSalaryPayment::where('payment_code','like','%'.$prarms['payment_code'].'%')->column('id'); $where[] = ['salary_payment_id','in',$salary_payment_ids]; @@ -120,8 +124,12 @@ class ProjectSalaryDetailLists extends BaseAdminDataLists implements ListsSearch */ public function count(): int { - $prarms = $this->request->get(['payment_code','project_name','project_code']); + $prarms = $this->request->get(['project_id','payment_code','project_name','project_code']); $where = []; + if(isset($prarms['project_id']) && $prarms['project_id'] != ''){ + $salary_payment_ids = ProjectSalaryPayment::where('project_id',$prarms['project_id'])->column('id'); + $where[] = ['salary_payment_id','in',$salary_payment_ids]; + } if(isset($prarms['payment_code']) && $prarms['payment_code'] != ''){ $salary_payment_ids = ProjectSalaryPayment::where('payment_code','like','%'.$prarms['payment_code'].'%')->column('id'); $where[] = ['salary_payment_id','in',$salary_payment_ids]; diff --git a/app/adminapi/lists/project/ProjectSalaryPaymentLists.php b/app/adminapi/lists/project/ProjectSalaryPaymentLists.php index 986b5be9c..9d11cff5a 100644 --- a/app/adminapi/lists/project/ProjectSalaryPaymentLists.php +++ b/app/adminapi/lists/project/ProjectSalaryPaymentLists.php @@ -40,7 +40,7 @@ class ProjectSalaryPaymentLists extends BaseAdminDataLists implements ListsSearc public function setSearch(): array { return [ - '=' => ['payment_type', 'apply_date'], + '=' => ['payment_type', 'apply_date','project_id'], '%like%' => ['payment_code'], ]; }