diff --git a/app/Admin/Forms/RefundNote.php b/app/Admin/Forms/RefundNote.php index 4335ba0..8a99b7b 100644 --- a/app/Admin/Forms/RefundNote.php +++ b/app/Admin/Forms/RefundNote.php @@ -24,7 +24,7 @@ class RefundNote extends Form $current_page = request()->get('current_page'); $order = ImsCjdcOrderMain::where('id', $oid)->first(); $order->refuse_refund_note = $note; - $order->state = 10; + $order->state = 2; $order->updated_at = time(); if ($order->save()) { $storeIds = ImsCjdcOrder::where('order_main_id',$order->global_order_id)->pluck('store_id')->toArray(); diff --git a/app/Admin/Metrics/Examples/Community/TotalAmount.php b/app/Admin/Metrics/Examples/Community/TotalAmount.php index 2d075eb..a0c36d9 100644 --- a/app/Admin/Metrics/Examples/Community/TotalAmount.php +++ b/app/Admin/Metrics/Examples/Community/TotalAmount.php @@ -3,6 +3,8 @@ namespace App\Admin\Metrics\Examples\Community; use App\Models\LanzuUserBalance; +use Dcat\Admin\Admin; +use Dcat\Admin\Support\Helper; use Dcat\Admin\Widgets\Metrics\Card; class TotalAmount extends Card @@ -21,7 +23,6 @@ class TotalAmount extends Card { parent::init(); $this->content(LanzuUserBalance::getBalance($this->uid, $this->uType)); - } /** @@ -30,11 +31,23 @@ class TotalAmount extends Card */ public function renderContent() { + $content = parent::renderContent(); + $adu = Admin::user(); + $url = ""; + if ($adu->isRole('lanzu_mp')){ + $url = url('admin/mp_withdraw/create'); + }elseif ($adu->isRole('lanzu_cs')){ + $url = url('admin/cs_withdraw/create'); + }elseif ($adu->isRole('lanzu_mm')){ + $url = url('admin/mm_withdraw/create'); + } return <<