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