This commit is contained in:
weiz 2024-03-13 13:47:38 +08:00
parent 8e64219988
commit 98de7b1676
2 changed files with 7 additions and 3 deletions

View File

@ -40,8 +40,8 @@ class CostProjectLists extends BaseAdminDataLists implements ListsSearchInterfac
public function setSearch(): array
{
return [
'=' => ['cost_project_id'],
'%like%' => ['superior_sort', 'name'],
'=' => ['cost_project_id','types','industry'],
'%like%' => ['project_num', 'project_name'],
];
}

View File

@ -17,6 +17,7 @@ namespace app\adminapi\lists\task;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\cost_project\CostProject;
use app\common\model\task\TaskType;
use app\common\lists\ListsSearchInterface;
@ -65,7 +66,10 @@ class TaskTypeLists extends BaseAdminDataLists implements ListsSearchInterface,L
}})
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->select()->each(function($data){
$project = CostProject::field('project_name')->where('id',$data['cost_project_id'])->findOrEmpty();
$data['project_name'] = $project['project_name'];
})
->toArray();
}