平台订单列表:锁定订阅ID时显示上下文提示
This commit is contained in:
@@ -182,6 +182,13 @@ class PlatformOrderController extends Controller
|
||||
->paginate(10)
|
||||
->withQueryString();
|
||||
|
||||
// 当前列表若锁定了订阅ID,则加载该订阅用于“上下文提示/快捷续费下单”等运营入口
|
||||
$currentSubscription = null;
|
||||
$currentSubscriptionId = (int) ($filters['site_subscription_id'] ?? 0);
|
||||
if ($currentSubscriptionId > 0) {
|
||||
$currentSubscription = SiteSubscription::query()->with(['merchant', 'plan'])->find($currentSubscriptionId);
|
||||
}
|
||||
|
||||
// 列表行级对账视图:回执总额 / 差额(便于运营快速定位问题订单)
|
||||
$orders->getCollection()->transform(function (PlatformOrder $o) {
|
||||
$receiptTotal = (float) $this->receiptTotalForOrder($o);
|
||||
@@ -258,6 +265,7 @@ class PlatformOrderController extends Controller
|
||||
$totalPaidAmount = (float) ((clone $baseQuery)->sum('paid_amount') ?: 0);
|
||||
|
||||
return view('admin.platform_orders.index', [
|
||||
'currentSubscription' => $currentSubscription,
|
||||
'orders' => $orders,
|
||||
'filters' => $filters,
|
||||
'filterOptions' => [
|
||||
|
||||
Reference in New Issue
Block a user