diff --git a/app/Admin/Controllers/Store/OrderController.php b/app/Admin/Controllers/Store/OrderController.php index 7b2e9cc9..c42e0aef 100644 --- a/app/Admin/Controllers/Store/OrderController.php +++ b/app/Admin/Controllers/Store/OrderController.php @@ -194,9 +194,11 @@ class OrderController extends AdminController $show->field('pay_at'); $show->field('completed_at'); - $show->panel()->tools(function ($tools) { + $show->panel()->tools(function (Show\Tools $tools) { $tools->disableEdit(); $tools->disableDelete(); + + $tools->append(new \App\Admin\Actions\Store\ShowOrderPrint()); }); $row = new Row(); diff --git a/app/Listeners/OrderPrint.php b/app/Listeners/OrderPrint.php index d225b829..00d09d7a 100644 --- a/app/Listeners/OrderPrint.php +++ b/app/Listeners/OrderPrint.php @@ -40,7 +40,7 @@ class OrderPrint 'sn' => $order->sn, 'time' => $order->created_at->format('Y-m-d H:i:s'), 'desk' => $desk->name, - 'products' => json_encode($products, JSON_UNESCAPED_UNICODE), + 'products' => $products, 'total' => round($order->total_amount, 2, PHP_ROUND_HALF_DOWN), 'remarks' => $order->note ?: '', ];