|
|
@@ -12,14 +12,14 @@ class OrderCommodityAssignController extends Controller
|
|
|
{
|
|
|
public function index()
|
|
|
{
|
|
|
- if(!Gate::allows('商品配置-查询')){ return redirect(url('denied')); }
|
|
|
+ if(!Gate::allows('指定分配-查询')){ return redirect(url('denied')); }
|
|
|
$assigns = app("OrderCommodityAssignService")->paginate();
|
|
|
return view("order.index.index",compact("assigns"));
|
|
|
}
|
|
|
|
|
|
public function import(Request $request)
|
|
|
{
|
|
|
- if(!Gate::allows('商品配置-编辑')){ return ["success"=>false,"data"=>"无权操作!"]; }
|
|
|
+ if(!Gate::allows('指定分配-编辑')){ return ["success"=>false,"data"=>"无权操作!"]; }
|
|
|
$fileSuffix=$request->file('file')->getClientOriginalExtension();
|
|
|
if ($fileSuffix != 'xlsx' && $fileSuffix != 'xls' && $fileSuffix != 'csv')
|
|
|
return ['success'=>false,'data'=>'不支持该文件类型'];
|