Files
saasshop/resources/views/admin/orders/show.blade.php

102 lines
4.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@extends('admin.layouts.app')
@section('title', '订单详情')
@section('page_title', '订单详情')
@section('content')
@php
$incomingBack = (string) request()->query('back', '');
$safeBackForLinks = \App\Support\BackUrl::sanitizeForLinks($incomingBack);
@endphp
<div class="page-header mb-20" data-page="admin.orders.show">
<div class="page-header-main">
<div>
<div class="page-header-title">订单详情</div>
<div class="page-header-subtitle">订单号 {{ $order->order_no }}(商家:{{ $order->merchant?->name ?? ('商家#'.$order->merchant_id) }}</div>
</div>
<div class="page-header-actions">
@if($safeBackForLinks)
<a class="btn btn-secondary btn-sm" href="{!! $safeBackForLinks !!}"> 返回上一页(保留上下文)</a>
@endif
<a class="btn btn-secondary btn-sm" href="/admin/orders">返回订单列表</a>
</div>
</div>
<div class="page-header-meta">
<div>订单状态:{{ $order->status }}</div>
<div>支付状态:{{ $order->payment_status }}</div>
<div>实付:¥{{ number_format((float) $order->pay_amount, 2) }}</div>
</div>
</div>
<div class="card list-card mb-20">
<div class="list-card-header">
<div>
<h3 class="list-card-title">订单信息</h3>
</div>
</div>
<div class="list-card-body">
<table class="list-card-table">
<tbody>
<tr><th style="width:160px;">ID</th><td>{{ $order->id }}</td></tr>
<tr><th>商家</th><td>{{ $order->merchant?->name ?? ('商家#'.$order->merchant_id) }}</td></tr>
<tr><th>平台</th><td>{{ $order->platform }}</td></tr>
<tr><th>订单状态</th><td>{{ $order->status }}</td></tr>
<tr><th>支付渠道</th><td>{{ $order->payment_channel }}</td></tr>
<tr><th>支付状态</th><td>{{ $order->payment_status }}</td></tr>
<tr><th>买家</th><td>{{ $order->buyer_name }}</td></tr>
<tr><th>手机</th><td>{{ $order->buyer_phone }}</td></tr>
<tr><th>邮箱</th><td>{{ $order->buyer_email }}</td></tr>
<tr><th>商品金额</th><td>¥{{ number_format((float) $order->product_amount, 2) }}</td></tr>
<tr><th>优惠金额</th><td>¥{{ number_format((float) $order->discount_amount, 2) }}</td></tr>
<tr><th>运费</th><td>¥{{ number_format((float) $order->shipping_amount, 2) }}</td></tr>
<tr><th>应付金额</th><td>¥{{ number_format((float) $order->pay_amount, 2) }}</td></tr>
<tr><th>备注</th><td>{{ $order->remark }}</td></tr>
<tr><th>创建时间</th><td>{{ $order->created_at }}</td></tr>
</tbody>
</table>
</div>
</div>
<div class="card list-card">
<div class="list-card-header">
<div>
<h3 class="list-card-title">订单明细</h3>
</div>
</div>
<div class="list-card-body">
<table class="list-card-table">
<thead>
<tr>
<th>ID</th>
<th>商品</th>
<th>SKU</th>
<th>单价</th>
<th>数量</th>
<th>小计</th>
<th>快照</th>
</tr>
</thead>
<tbody>
@forelse($order->items as $item)
<tr>
<td>{{ $item->id }}</td>
<td>{{ $item->product_title }}</td>
<td>{{ $item->product_sku }}</td>
<td>¥{{ number_format((float) $item->product_price, 2) }}</td>
<td>{{ $item->quantity }}</td>
<td>¥{{ number_format((float) $item->line_total_amount, 2) }}</td>
<td>{{ $item->snapshot['category'] ?? '-' }}</td>
</tr>
@empty
<tr><td colspan="7" class="muted table-empty">暂无订单明细</td></tr>
@endforelse
</tbody>
</table>
</div>
</div>
@endsection