|
@@ -76,6 +76,19 @@ class InvCat extends BaseController{
|
|
|
}
|
|
|
return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
|
}
|
|
|
+ //商品详情
|
|
|
+ public function goodinfo(){
|
|
|
+ $spuCode=isset($this->post['spuCode'])&&$this->post['spuCode']!=''?trim($this->post['spuCode']):"";
|
|
|
+ if($spuCode=="") return error_show(1004,"参数 spuCode 不能为空");
|
|
|
+ $goodinfo =Db::name("good")->where(["spuCode"=>$spuCode])->findOrEmpty();
|
|
|
+ if(empty($goodinfo))return error_show(1004,"商品数据未找到");
|
|
|
+ $company =Db::name("company_info")->where(["companyNo"=>$goodinfo['companyNo']])->find();
|
|
|
+ $goodinfo['companyName']=$company['company_name']??"";
|
|
|
+ $supplier =Db::name("supplier_info")->where(["code"=>$goodinfo["supplierNo"]])->find();
|
|
|
+ $goodinfo["supplierName"]=$supplier["name"]??"";
|
|
|
+
|
|
|
+ return app_show(0,"获取成功",$goodinfo);
|
|
|
+ }
|
|
|
//发票类目列表
|
|
|
public function catlist(){
|
|
|
$page =isset($this->post['page'])&& $this->post['page']!="" ? intval($this->post['page']) :1;
|