|
@@ -34,6 +34,7 @@ class SupplierGoods extends Controller
|
|
|
{
|
|
|
$this->title = '供货商商品列表';
|
|
|
$supplier_id = input('get.supplier_id');
|
|
|
+ $name = input('get.name');
|
|
|
$company_id = input('get.company_id');
|
|
|
$third_classify = input('get.third_classify');
|
|
|
$this->supplier_id = $supplier_id;
|
|
@@ -44,6 +45,7 @@ class SupplierGoods extends Controller
|
|
|
if($supplier_id)$where[] = ['a.supplier_id','=',$supplier_id];
|
|
|
if($company_id)$where[] = ['a.company_id','=',$company_id];
|
|
|
if($third_classify)$where[] = ['a.third_classify','=',$third_classify];
|
|
|
+ if($name)$where[] = ['a.name','like','%'.$name.'%'];
|
|
|
$query = $this->_query($this->table)->where($where)->like('a.name')->alias('a')->field('a.*,b.title supplier_name ,c.title company_name');
|
|
|
$query->leftJoin('Supplier b','b.id = a.supplier_id')->leftJoin('Company c','c.id = a.company_id');
|
|
|
$query->order(' a.sort desc , a.id desc')->page();
|