update
This commit is contained in:
parent
8a377c9e7c
commit
a217839599
@ -18,6 +18,7 @@ namespace app\adminapi\lists;
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\ProjectCommission;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\ProjectCommissionDetail;
|
||||
|
||||
|
||||
/**
|
||||
@ -55,9 +56,15 @@ class ProjectCommissionLists extends BaseAdminDataLists implements ListsSearchIn
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return ProjectCommission::with(['projectInfo'])->where($this->searchWhere)
|
||||
return ProjectCommission::with(['projectInfo'])
|
||||
->append(['children'])
|
||||
->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->withAttr('children', function ($value, $data){
|
||||
$details = ProjectCommissionDetail::where('project_commission_id', $data['id'])->select();
|
||||
return $details;
|
||||
})
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user