platform_orders index: compact table with optional columns toggle
This commit is contained in:
@@ -81,3 +81,7 @@
|
||||
white-space:nowrap;
|
||||
word-break:normal;
|
||||
}
|
||||
|
||||
/* 平台订单列表:精简视图(默认隐藏部分列,避免列表过长) */
|
||||
.platform-orders-table .col-optional{display:none;}
|
||||
.platform-orders-table.is-full .col-optional{display:table-cell;}
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
|
||||
// 线索上下文(从开通线索跳转而来):用于提示“当前范围已锁定线索”,以及生成一键清除入口
|
||||
$incomingLeadId = (int) request()->query('lead_id', 0);
|
||||
|
||||
// 列表视图:默认精简(避免列表过长);view=full 展开全部列
|
||||
$isFullView = ((string) request()->query('view', '') === 'full');
|
||||
$clearLeadQuery = $currentQuery;
|
||||
unset($clearLeadQuery['lead_id'], $clearLeadQuery['page']);
|
||||
|
||||
@@ -624,8 +627,6 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card section-dark mb-10">
|
||||
<h4 class="mt-0">导出</h4>
|
||||
<div class="grid-2 tool-grid">
|
||||
<div class="tool-group focus-box">
|
||||
<div class="tool-group-title">导出</div>
|
||||
@@ -945,12 +946,10 @@
|
||||
<button class="btn btn-danger btn-sm" type="submit">清除批量标记支付失败标记(全部订单)</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="flex-between">
|
||||
<h3>平台订单列表</h3>
|
||||
@@ -974,17 +973,26 @@
|
||||
|
||||
$createOrderUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($createQuery);
|
||||
@endphp
|
||||
@php
|
||||
$toggleViewUrl = $isFullView
|
||||
? $safeFullUrlWithQuery(['view' => null, 'page' => null])
|
||||
: $safeFullUrlWithQuery(['view' => 'full', 'page' => null]);
|
||||
$toggleViewLabel = $isFullView ? '精简视图' : '展开全部列';
|
||||
@endphp
|
||||
<div class="actions gap-10">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $toggleViewUrl !!}">{{ $toggleViewLabel }}</a>
|
||||
<a href="{!! $createOrderUrl !!}" class="btn btn-sm">新建平台订单</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table class="table-nowrap">
|
||||
<table class="table-nowrap platform-orders-table {{ $isFullView ? 'is-full' : '' }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>订单号</th>
|
||||
<th>站点</th>
|
||||
<th>套餐</th>
|
||||
<th>订单类型</th>
|
||||
<th class="col-optional">订单类型</th>
|
||||
<th>订单状态</th>
|
||||
<th>支付状态</th>
|
||||
<th>应付金额</th>
|
||||
@@ -994,15 +1002,15 @@
|
||||
<th>同步状态</th>
|
||||
<th>订阅号</th>
|
||||
<th>订阅到期</th>
|
||||
<th>同步时间</th>
|
||||
<th>失败原因</th>
|
||||
<th>最近批量同步</th>
|
||||
<th>最近批量生效</th>
|
||||
<th>回执总额</th>
|
||||
<th>对账差额</th>
|
||||
<th>回执数</th>
|
||||
<th>退款数</th>
|
||||
<th>退款总额</th>
|
||||
<th class="col-optional">同步时间</th>
|
||||
<th class="col-optional">失败原因</th>
|
||||
<th class="col-optional">最近批量同步</th>
|
||||
<th class="col-optional">最近批量生效</th>
|
||||
<th class="col-optional">回执总额</th>
|
||||
<th class="col-optional">对账差额</th>
|
||||
<th class="col-optional">回执数</th>
|
||||
<th class="col-optional">退款数</th>
|
||||
<th class="col-optional">退款总额</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -1044,7 +1052,7 @@
|
||||
{{ $planName }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $order->order_type }}</td>
|
||||
<td class="col-optional">{{ $order->order_type }}</td>
|
||||
<td>
|
||||
{{ $statusLabels[$order->status] ?? $order->status }}
|
||||
<div class="muted">{{ $order->status }}</div>
|
||||
@@ -1088,8 +1096,8 @@
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ optional($order->siteSubscription?->ends_at)->format('Y-m-d H:i:s') ?: '-' }}</td>
|
||||
<td>{{ data_get($order->meta, 'subscription_activation.synced_at') ?: '-' }}</td>
|
||||
<td>
|
||||
<td class="col-optional">{{ data_get($order->meta, 'subscription_activation.synced_at') ?: '-' }}</td>
|
||||
<td class="col-optional">
|
||||
@php
|
||||
$syncErrMsg = (string) (data_get($order->meta, 'subscription_activation_error.message') ?? '');
|
||||
$syncErrTooLong = $syncErrMsg !== '' && mb_strlen($syncErrMsg) > $SYNC_ERROR_KEYWORD_LINK_MAX_LEN;
|
||||
@@ -1130,7 +1138,7 @@
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-optional">
|
||||
@php
|
||||
// 优先使用扁平字段 meta.batch_activation(便于筛选/统计,也避免遍历 audit)
|
||||
$batchActivation = (array) (data_get($order->meta, 'batch_activation', []) ?? []);
|
||||
@@ -1161,7 +1169,7 @@
|
||||
<span class="muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-optional">
|
||||
@php
|
||||
// 优先使用扁平字段 meta.batch_mark_activated(便于筛选/统计,也避免遍历 audit)
|
||||
$batchMarkActivated = (array) (data_get($order->meta, 'batch_mark_activated', []) ?? []);
|
||||
@@ -1192,7 +1200,7 @@
|
||||
<span class="muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-optional">
|
||||
@php
|
||||
$receiptTotal = (float) ($order->receipt_total ?? 0);
|
||||
@endphp
|
||||
@@ -1202,7 +1210,7 @@
|
||||
<span class="muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-optional">
|
||||
@php
|
||||
$rowDelta = (float) ($order->reconciliation_delta_row ?? 0);
|
||||
// 统一口径:按分取整判断是否对账不一致,避免浮点误差导致 0.01 边界不稳定
|
||||
@@ -1221,7 +1229,7 @@
|
||||
<span class="muted">¥0.00</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-optional">
|
||||
@php
|
||||
$receipts = (array) (data_get($order->meta, 'payment_receipts', []) ?? []);
|
||||
$receiptSummaryCount = data_get($order->meta, 'payment_summary.count');
|
||||
@@ -1236,7 +1244,7 @@
|
||||
<span class="muted">0</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-optional">
|
||||
@php
|
||||
$refunds = (array) (data_get($order->meta, 'refund_receipts', []) ?? []);
|
||||
$refundSummaryCount = data_get($order->meta, 'refund_summary.count');
|
||||
@@ -1251,7 +1259,7 @@
|
||||
<span class="muted">0</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-optional">
|
||||
@php
|
||||
$refundTotal = (float) $order->refundTotal();
|
||||
$isRefundInconsistent = (bool) $order->isRefundInconsistent();
|
||||
|
||||
Reference in New Issue
Block a user