更新供应商联系人模块

This commit is contained in:
yaooo 2023-12-26 14:13:55 +08:00
parent 6a5d5d9057
commit b4a749479d
2 changed files with 7 additions and 1 deletions

View File

@ -158,6 +158,7 @@ class SupplierLogic extends BaseLogic
$supplier = Supplier::findOrEmpty($params['id']);
$supplier->org;
$supplier->dept;
$supplier->contact;
return $supplier->toArray();
}
}

View File

@ -51,5 +51,10 @@ class Supplier extends BaseModel
{
return $this->hasOne(\app\common\model\dept\Dept::class, 'id', 'dept_id');
}
public function contact()
{
return $this->hasMany(\app\common\model\supplier\SupplierContacts::class, 'supplier_id', 'id');
}
}