From b0160dade631319220dba4d44ddb43be36932fea Mon Sep 17 00:00:00 2001 From: lanzu_qinsheng <334039090@qq.com> Date: Fri, 18 Sep 2020 12:58:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E9=87=8F=E8=AE=A2=E5=8D=95=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=98=BE=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ImsCjdcOrderMainController.php | 17 +++++++++-------- config/admin.php | 4 +++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/Admin/Controllers/ImsCjdcOrderMainController.php b/app/Admin/Controllers/ImsCjdcOrderMainController.php index 5691890..2390ccb 100644 --- a/app/Admin/Controllers/ImsCjdcOrderMainController.php +++ b/app/Admin/Controllers/ImsCjdcOrderMainController.php @@ -69,19 +69,20 @@ class ImsCjdcOrderMainController extends AdminController $grid->actions(function (Grid\Displayers\Actions $actions) use ($grid) { $state = $actions->row->state; + $actions->append(new OrderDetail($actions->row->id, $grid->model()->getCurrentPage(), '
详情
')); + if ($state == 2) { - $actions->append(new OrderStateHandle('
接单
', 3)); + $actions->append(new OrderStateHandle('
接单
', 3)); } elseif ($state == 311) { - $actions->append(new OrderStateHandle('
完成
', 4)); - $actions->append(new OrderPrint('
打印
')); + $actions->append(new OrderStateHandle('
完成
', 4)); + $actions->append(new OrderPrint('
打印
')); } elseif ($state == 3) { - $actions->append(new OrderPrint('
打印
')); - $actions->append(new CheckRow($actions->row->id, $grid->model()->getCurrentPage(), '
自送
')); + $actions->append(new OrderPrint('
打印
')); + $actions->append(new CheckRow($actions->row->id, $grid->model()->getCurrentPage(), '
自送
')); } elseif ($state == 8) { - $actions->append(new OrderStateHandle('
同意退款
', 9)); - $actions->append(new OrderRefund($actions->row->id, $grid->model()->getCurrentPage(), '
拒绝退款
')); + $actions->append(new OrderStateHandle('
同意
', 9)); + $actions->append(new OrderRefund($actions->row->id, $grid->model()->getCurrentPage(), '
拒绝
')); } - $actions->append(new OrderDetail($actions->row->id, $grid->model()->getCurrentPage(), '
详情
')); }); diff --git a/config/admin.php b/config/admin.php index cb25c10..d653267 100644 --- a/config/admin.php +++ b/config/admin.php @@ -157,7 +157,9 @@ return [ | The global Grid action display class. |-------------------------------------------------------------------------- */ - 'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class, + //'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class, + 'grid_action_class' => Dcat\Admin\Grid\Displayers\Actions::class, + //'grid_action_class' => Dcat\Admin\Grid\Displayers\ContextMenuActions::class, ], /*