admin/app/common/model/supplier/Apply.php
@@ -3,6 +3,7 @@
namespace app\common\model\supplier;
use app\common\enum\supplier\SupplierType;
use app\common\model\BaseModel;
/**
@@ -12,6 +13,7 @@
{
    protected $pk = 'supplier_apply_id';
    protected $name = 'supplier_apply';
    protected $append = ['type_text'];
    /**
     * 关联营业执照照
@@ -45,6 +47,10 @@
        return $this->belongsTo("app\\{$module}\\model\\supplier\\Area",'area_id', 'area_id');
    }
    public function getTypeTextAttr($value, $data)
    {
        return (new SupplierType())::getName($data['supplier_type']);
    }
    /**
     * 最近申请记录
     */