@@ -346,6 +346,7 @@ class Supplier extends Base{
if($code=="")return error("参数错误");
$info = $this->model->with(["contactInfo"])->where('code','=',$code)->findOrEmpty();
if($info->isEmpty())return error("供应商不存在");
+ $info->legaler_tax = \app\user\model\Supplier::$legaler_tax[$info->legaler_type]??[];
return success("获取成功",$info);
}
/**删除供应商
@@ -60,6 +60,7 @@ class Supplier extends Base
public static $level=['生产厂家','一级代理',"二级代理"];
public static $supplier_type=['生产厂家','代理商','经销商','分销商','电商平台'];
public static $legaler_type=["一般纳税人","农户","合作社","个人","小规模"];
+ public static $legaler_tax=[[0,6,9,13],[0,9],[0,9],[0,1,3],[0,1,3,5]]; //对应不同类型资质税率
public function ContactInfo()
{