修改合同详情
This commit is contained in:
parent
e8ad78c3d9
commit
e0faf898b1
@ -115,6 +115,6 @@ class ContractLogic extends BaseLogic
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return Contract::findOrEmpty($params['id'])->toArray();
|
||||
return Contract::with(['companyName','partyA','partyB','contractType'])->findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
}
|
@ -46,7 +46,11 @@ class Contract extends BaseModel
|
||||
}
|
||||
public function partyA()
|
||||
{
|
||||
return $this->hasOne(Company::class, 'id', 'company_id')->bind(['party_a_name'=>'company_name']);;
|
||||
return $this->hasOne(Company::class, 'id', 'party_a')->bind(['party_a_name'=>'company_name']);
|
||||
}
|
||||
public function partyB()
|
||||
{
|
||||
return $this->hasOne(Company::class, 'id', 'party_b')->bind(['party_b_name'=>'company_name']);
|
||||
}
|
||||
public function contractType()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user