diff --git a/app/AdminAgent/Renderable/SelectProduct.php b/app/AdminAgent/Renderable/SelectProduct.php index e8194bb..ec52e5d 100644 --- a/app/AdminAgent/Renderable/SelectProduct.php +++ b/app/AdminAgent/Renderable/SelectProduct.php @@ -24,7 +24,7 @@ class SelectProduct extends LazyRenderable $grid->disableBatchDelete(); $grid->disableBatchActions(); - $grid->model()->where('status', ProductStatus::ON_SALE); + $grid->model()->where('status', ProductStatus::ON_SALE)->whereIn('agent_id', [0, Admin::user()->id]); $grid->quickSearch(['title', 'supplier.name'])->placeholder('搜索产品名称、供应商'); $grid->column('id');