|
@@ -32,9 +32,13 @@ class SupplierGoods extends Controller
|
|
|
{
|
|
|
$this->title = '供货商商品列表';
|
|
|
$supplier_id = input('get.id');
|
|
|
+ $company_id = input('get.company_id');
|
|
|
$this->supplier_id = $supplier_id;
|
|
|
- $query = $this->_query($this->table)->where('is_deleted',0)->where('supplier_id',$supplier_id);
|
|
|
- $query->like('name');
|
|
|
+ $where = [];
|
|
|
+ $where[] = ['is_deleted','=',0];
|
|
|
+ if($supplier_id)$where[] = ['supplier_id','=',$supplier_id];
|
|
|
+ if($company_id)$where[] = ['company_id','=',$company_id];
|
|
|
+ $query = $this->_query($this->table)->where($where)->like('name');
|
|
|
$query->order(' sort desc , id desc')->page();
|
|
|
}
|
|
|
|