|
@@ -1365,13 +1365,8 @@ class Good extends Base
|
|
|
$param= $this->request->param(['spuCode'=>'',"isZx"=>""],'post','trim');
|
|
|
$list = (new GoodCombind())->with([$param['isZx']==1?"goodZx":"goodBasic"])->where('spuCode',$param['spuCode'])->select();
|
|
|
foreach ($list as &$item){
|
|
|
- $taxInfo=GoodTax::getInfobySpuCode($item['spuCode'],1);
|
|
|
- $item['tax_id'] = $taxInfo['tax_id']??'';
|
|
|
- $item['tax_name'] = $taxInfo['cat_name']??'';
|
|
|
- $item['tax_short_name'] =$taxInfo['short_name']??'';
|
|
|
- $item['tax_code'] =$taxInfo['merge_code']??'';
|
|
|
- $item['tax']=$taxInfo['tax']??'';
|
|
|
- $item['inv_good_name']=$taxInfo['inv_good_name']??'';
|
|
|
+ $taxInfo=GoodTax::with(['Tax','OutTax','CgdTax'])->where(['spuCode'=>$item['spuCode']])->findOrEmpty();
|
|
|
+ $item['tax_info'] = $taxInfo;
|
|
|
}
|
|
|
$this->success('获取成功',$list);
|
|
|
}
|