@extends('admin.layouts.app') @section('title', '总台仪表盘') @section('page_title', '总台仪表盘') @section('content') @php $incomingBack = (string) request()->query('back', ''); $safeBackForLinks = \App\Support\BackUrl::sanitizeForLinks($incomingBack); // 用于构建“从仪表盘跳到其它治理页后可返回仪表盘”的 back $selfWithoutBack = \App\Support\BackUrl::selfWithoutBack(); $billingEntryLinks = [ 'platform_orders' => \App\Support\BackUrl::withBack('/admin/platform-orders', $safeBackForLinks), 'site_subscriptions' => \App\Support\BackUrl::withBack('/admin/site-subscriptions', $safeBackForLinks), 'plans' => \App\Support\BackUrl::withBack('/admin/plans', $safeBackForLinks), ]; $platformOrdersQuickLinks = [ 'unpaid_pending' => \App\Support\BackUrl::withBack('/admin/platform-orders?payment_status=unpaid&status=pending', $safeBackForLinks), // 待生效:paid + pending,并显式锁定 sync_status=unsynced(排除同步失败等异常单) 'paid_pending' => \App\Support\BackUrl::withBack('/admin/platform-orders?payment_status=paid&status=pending&sync_status=unsynced', $safeBackForLinks), 'syncable_only' => \App\Support\BackUrl::withBack('/admin/platform-orders?syncable_only=1', $safeBackForLinks), 'sync_failed' => \App\Support\BackUrl::withBack('/admin/platform-orders?sync_status=failed', $safeBackForLinks), ]; @endphp
| 日期 | 订单数 | 已付金额 |
|---|---|---|
| {{ $d }} | {{ (int) ($row['count'] ?? 0) }} | ¥{{ number_format((float) ($row['paid_sum'] ?? 0), 2) }} |
| 暂无数据 | ||
| 站点 | 订单数 | 已付金额 |
|---|---|---|
| {{ $mname }} | {{ (int) ($row['count'] ?? 0) }} | ¥{{ number_format((float) ($row['paid_sum'] ?? 0), 2) }} |
| 暂无数据 | ||
| 后台角色 | {{ $platformOverview['system_role'] }} |
|---|---|
| 当前视角 | {{ $platformOverview['current_scope'] }} |
| 商家模式 | {{ $platformOverview['merchant_mode'] }} |
| 渠道数 | {{ $platformOverview['channel_count'] }} |
| 活跃商家 | {{ $platformOverview['active_merchants'] }} |
| 待处理订单 | {{ $platformOverview['pending_orders'] }} |
| 订单号 | 类型 | 金额 | 支付 | 状态 |
|---|---|---|---|---|
| {{ $po->order_no }} |
{{ $po->orderTypeLabel() }}
{{ (string) (optional($po->merchant)->name ?: ('站点#' . (int) ($po->merchant_id ?? 0))) }}
|
{{ (string) (optional($po->plan)->name ?: ((int) ($po->plan_id ?? 0) > 0 ? ('套餐#' . (int) $po->plan_id) : '-')) }}
回执:
@if($receiptStatusText === '无')
{{ $receiptStatusText }}
@else
{{ $receiptStatusText }}
@endif
|
对账:
@if($reconcileStatusText !== '-' && $reconcileStatusText !== '一致')
{{ $reconcileStatusText }}
@else
{{ $reconcileStatusText }}
@endif
|
退款:
@if($refundStatusText !== '-' && $refundStatusText !== '正常')
{{ $refundStatusText }}
@else
{{ $refundStatusText }}
@endif
|
同步:
@if($syncStatusText === '失败')
{{ $syncStatusText }}
@else
{{ $syncStatusText }}
@endif
|
BMPA:
@if($bmpaStatusText === '失败')
{{ $bmpaStatusText }}
@else
{{ $bmpaStatusText }}
@endif
|
订阅:
@if($subscriptionStatusText === '缺')
{{ $subscriptionStatusText }}
@else
{{ $subscriptionStatusText }}
@endif
|
¥{{ number_format((float) $po->payable_amount, 2) }} | {{ $po->payment_status }} @if((string) $po->payment_status === 'paid' && ! $hasReceiptEvidence) @endif | {{ $po->status }} @if($syncErrMsg !== '') @endif @if($bmpaErrMsg !== '') @endif @if((string) $po->status === 'pending' && (string) $po->payment_status === 'paid' && $po->isReconcileMismatch()) @php $reconcileMismatchUrl = \App\Support\BackUrl::withBack('/admin/platform-orders?reconcile_mismatch=1', $selfWithoutBack); @endphp @endif @if($po->isRefundInconsistent()) @php $refundInconsistentUrl = \App\Support\BackUrl::withBack('/admin/platform-orders?refund_inconsistent=1', $selfWithoutBack); @endphp @endif @if((string) $po->order_type === 'renewal' && empty($po->site_subscription_id)) @php $renewalMissingSubscriptionUrl = \App\Support\BackUrl::withBack('/admin/platform-orders?renewal_missing_subscription=1', $selfWithoutBack); @endphp @endif |
| 暂无数据 | ||||
| 套餐 | 订单数 | 占比 |
|---|---|---|
| {{ $planName }} | {{ $count }} | {{ $pct }}% |
| 暂无数据 | ||