update
This commit is contained in:
parent
960b1e405a
commit
de027c4ee7
@ -58,6 +58,7 @@ class CostProjectLists extends BaseAdminDataLists implements ListsSearchInterfac
|
|||||||
return CostProject::where($this->searchWhere)
|
return CostProject::where($this->searchWhere)
|
||||||
->field(['id', 'project_num', 'project_name', 'contract_id', 'types', 'industry', 'province', 'city', 'address', 'starting', 'endtime', 'jhgq', 'depar', 'principal', 'person', 'invest', 'budget', 'cost', 'approval', 'aunit', 'Acontact', 'acontactnum', 'date', 'generalize', 'note', 'remark', 'annex'])
|
->field(['id', 'project_num', 'project_name', 'contract_id', 'types', 'industry', 'province', 'city', 'address', 'starting', 'endtime', 'jhgq', 'depar', 'principal', 'person', 'invest', 'budget', 'cost', 'approval', 'aunit', 'Acontact', 'acontactnum', 'date', 'generalize', 'note', 'remark', 'annex'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
|
->with(['contract'])
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
|
@ -30,5 +30,8 @@ class CostProject extends BaseModel
|
|||||||
protected $name = 'cost_project';
|
protected $name = 'cost_project';
|
||||||
protected $deleteTime = 'delete_time';
|
protected $deleteTime = 'delete_time';
|
||||||
|
|
||||||
|
public function contract()
|
||||||
|
{
|
||||||
|
return $this->hasOne(CostApprovedProject::class, 'id','contract_id');
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user