|
@@ -17,7 +17,7 @@ class Good extends Base
|
|
|
*/
|
|
|
public function list(){
|
|
|
$param=$this->request->param(["spuCode"=>"","status"=>"","good_name"=>"",'companyNo'=>'','supplierNo'=>'',
|
|
|
- 'creater'=>'','isZx'=>'',"cat_diff"=>"","tax_diff"=>"",'page'=>'1','size'=>'15'],"post","trim");
|
|
|
+ 'creater'=>'','isZx'=>'',"cat_diff"=>"","tax_diff"=>"","is_diff"=>"",'page'=>'1','size'=>'15'],"post","trim");
|
|
|
$where=[];
|
|
|
$param["spuCode"]==""?? $where[]=['spuCode','like',"%{$param['spuCode']}%"];
|
|
|
$param["good_name"]==""?? $where[]=['good_name','like',"%{$param['good_name']}%"];
|
|
@@ -26,7 +26,12 @@ class Good extends Base
|
|
|
$param["creater"]==""?? $where[]=['creater','like',"%{$param['creater']}%"];
|
|
|
$param["status"]===""?? $where[]=['status','=',$param['status']];
|
|
|
$param["isZx"]==""?? $where[]=['isZx','=',$param['isZx']];
|
|
|
- $list= $this->model->where($where)->order("id desc")
|
|
|
+ $param["is_diff"]==""?? $where[]=['cat_diff|tax_diff','=',2];
|
|
|
+ $param["cat_diff"]==""?? $where[]=['cat_diff','=',$param['cat_diff']];
|
|
|
+ $param["tax_diff"]==""?? $where[]=['tax_diff','=',$param['tax_diff']];
|
|
|
+ $list= $this->model
|
|
|
+ ->where($where)
|
|
|
+ ->order("id desc")
|
|
|
->paginate(["page"=>$param['page'],"list_rows"=>$param["size"]]);
|
|
|
$this->success("获取成功",["list"=>$list->items(),"count"=>$list->total()]);
|
|
|
}
|