平台订单列表:新建订单链接从筛选条件预填 merchant/plan/subscription
This commit is contained in:
@@ -724,7 +724,19 @@
|
||||
<h3>平台订单列表</h3>
|
||||
@php
|
||||
// 新建平台订单:默认携带 back 回到本页自身(剔除 back query,避免嵌套)
|
||||
$createOrderUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]);
|
||||
// 同时:若当前列表已筛选站点/套餐/订阅ID,则预填到创建页,提高运营下单效率
|
||||
$createQuery = ['back' => $selfWithoutBack];
|
||||
if (trim((string) ($filters['merchant_id'] ?? '')) !== '') {
|
||||
$createQuery['merchant_id'] = (int) ($filters['merchant_id'] ?? 0);
|
||||
}
|
||||
if (trim((string) ($filters['plan_id'] ?? '')) !== '') {
|
||||
$createQuery['plan_id'] = (int) ($filters['plan_id'] ?? 0);
|
||||
}
|
||||
if (trim((string) ($filters['site_subscription_id'] ?? '')) !== '') {
|
||||
$createQuery['site_subscription_id'] = (int) ($filters['site_subscription_id'] ?? 0);
|
||||
}
|
||||
|
||||
$createOrderUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($createQuery);
|
||||
@endphp
|
||||
<a href="{!! $createOrderUrl !!}" class="btn">新建平台订单</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user