diff --git a/app/admin/lists/store_branch_product/StoreBranchProductLists.php b/app/admin/lists/store_branch_product/StoreBranchProductLists.php index cce4193a4..c5b70125e 100644 --- a/app/admin/lists/store_branch_product/StoreBranchProductLists.php +++ b/app/admin/lists/store_branch_product/StoreBranchProductLists.php @@ -57,6 +57,11 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI $where[]=['cate_id','in',array_merge($arr,$arr2)]; } } + if(empty($where) && $class_all){ + //2或者1 + $where[]=['cate_id','=',$class_all]; + } + return StoreBranchProduct::where($this->searchWhere)->where($where) ->field(['id','store_id','product_id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'unit', 'cost','purchase', 'status']) ->when(!empty($this->adminInfo['store_id']), function ($query) {