This commit is contained in:
weiz 2024-01-25 09:34:48 +08:00
parent 99805d84e9
commit c53744db2e

View File

@ -50,19 +50,19 @@ class SupplierContacts extends BaseModel
public function getContactsTypeTextAttr($value,$data): string
{
$dict = DictData::where('type_value','contacts_type')->column('name','value');
return $dict[$data['contacts_type']];
return !empty($data['contacts_type']) ? $dict[$data['contacts_type']] : '';
}
public function getContactsCateTextAttr($value,$data): string
{
$dict = DictData::where('type_value','contacts_cate')->column('name','value');
return $dict[$data['contacts_cate']];
return !empty($data['contacts_cate']) ? $dict[$data['contacts_cate']] : '';
}
public function getIdTypeTextAttr($value,$data): string
{
$dict = DictData::where('type_value','id_type')->column('name','value');
return $dict[$data['id_type']];
return !empty($data['id_type']) ? $dict[$data['id_type']] : '';
}
public function supplier(){