From 0903b091a2f71b30ff3eea8340054c7eb8364739 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Sat, 18 Dec 2021 13:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Actions/Show/OrderConsigneeInfo.php | 2 +- app/Admin/Actions/Show/OrderReduce.php | 2 +- app/Admin/Controllers/OrderController.php | 17 ++++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/Admin/Actions/Show/OrderConsigneeInfo.php b/app/Admin/Actions/Show/OrderConsigneeInfo.php index c999c320..01754531 100644 --- a/app/Admin/Actions/Show/OrderConsigneeInfo.php +++ b/app/Admin/Actions/Show/OrderConsigneeInfo.php @@ -18,7 +18,7 @@ class OrderConsigneeInfo extends AbstractTool * * @var string */ - protected $style = 'btn-success'; + protected $style = 'btn-warning'; public function render() { diff --git a/app/Admin/Actions/Show/OrderReduce.php b/app/Admin/Actions/Show/OrderReduce.php index 453ee4e0..239c85e7 100644 --- a/app/Admin/Actions/Show/OrderReduce.php +++ b/app/Admin/Actions/Show/OrderReduce.php @@ -18,7 +18,7 @@ class OrderReduce extends AbstractTool * * @var string */ - protected $style = 'btn-success'; + protected $style = 'btn-warning'; public function render() { diff --git a/app/Admin/Controllers/OrderController.php b/app/Admin/Controllers/OrderController.php index 773406f6..061a0da3 100644 --- a/app/Admin/Controllers/OrderController.php +++ b/app/Admin/Controllers/OrderController.php @@ -158,17 +158,20 @@ class OrderController extends AdminController })->prepend('¥'); $show->field('vip_discount_amount')->as(function ($v) { return bcdiv($v, 100, 2); - })->prepend('¥'); - $show->field('userCoupon.coupon_name')->label(); - $show->field('coupon_discount_amount')->as(function ($v) { - return bcdiv($v, 100, 2); - })->prepend('¥'); + })->prepend('- ¥'); + if ($show->model()->user_coupon_id) { + $show->field('userCoupon.coupon_name')->label(); + $show->field('coupon_discount_amount')->as(function ($v) { + return bcdiv($v, 100, 2); + })->prepend('- ¥'); + } + $show->field('reduced_amount')->as(function ($v) { return bcdiv($v, 100, 2); - })->prepend('¥'); + })->prepend('- ¥'); $show->field('shipping_fee')->as(function ($v) { return bcdiv($v, 100, 2); - })->prepend('¥'); + })->prepend('+ ¥'); $show->divider(); $show->field('note'); $show->field('remark');