From 7378f1997bbdd9ef098557f4caff09d854528a58 Mon Sep 17 00:00:00 2001 From: pushuo <229102104@qq.com> Date: Wed, 31 Aug 2022 18:41:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=94=AE=E5=90=8E=E5=89=8D=E5=8F=B0=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Account/RmaController.php | 5 +- themes/default/account/rmas/info.blade.php | 66 +++++++++++++++++-- 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/beike/Shop/Http/Controllers/Account/RmaController.php b/beike/Shop/Http/Controllers/Account/RmaController.php index cb9e2a15..ea80b5e5 100644 --- a/beike/Shop/Http/Controllers/Account/RmaController.php +++ b/beike/Shop/Http/Controllers/Account/RmaController.php @@ -41,9 +41,12 @@ class RmaController extends Controller */ public function show(int $id) { + $rma = RmaRepo::find($id); $data = [ - 'rma' => RmaRepo::find($id), + 'rma' => $rma, + 'orderProduct' => OrderProductRepo::find($rma->order_product_id), 'statuses' => RmaRepo::getStatuses(), + 'reasons' => RmaReasonDetail::collection(RmaReasonRepo::list())->jsonSerialize(), 'types' => RmaRepo::getTypes(), ]; diff --git a/themes/default/account/rmas/info.blade.php b/themes/default/account/rmas/info.blade.php index 53cf4723..d4237baa 100644 --- a/themes/default/account/rmas/info.blade.php +++ b/themes/default/account/rmas/info.blade.php @@ -10,9 +10,9 @@
- +
- +
@@ -20,7 +20,66 @@
{{ __('shop/account.rma.rma_info.index') }}
- {{-- {{ dd($rma) }} --}} +
+
+
+ +
+
+
{{ $orderProduct->name }}
+
{{ $orderProduct->price }} x {{ $orderProduct->quantity }}
+
+
+
+
+
+ + @foreach ($types as $key => $item) + @if ($key == $rma->type) +
{{ $item}}
+ @endif + @endforeach +
+ +
+ +
{{ $rma->quantity }}
+
+ +
+ +
+ @if ($rma->opened) + {{ __('common.yes') }} + @else + {{ __('common.no') }} + @endif +
+
+ +
+ +
+ {{ $rma->created_at }} +
+
+ +
+ +
+ @foreach ($reasons as $item) + @if ($rma->rma_reason_id == $item['id']) + {{$item['name']}} + @endif + @endforeach +
+
+ +
+ +
{{$rma->comment}}
+
+
@@ -29,5 +88,4 @@ @endsection @push('add-scripts') - @endpush