ui(platform-orders): add created-at range quick links
This commit is contained in:
@@ -409,6 +409,43 @@
|
||||
<input type="number" name="site_subscription_id" placeholder="订阅ID(可选)" value="{{ $filters['site_subscription_id'] ?? '' }}" class="w-140">
|
||||
<input type="text" name="created_from" placeholder="创建时间从(YYYY-MM-DD)" value="{{ $filters['created_from'] ?? '' }}" class="w-180">
|
||||
<input type="text" name="created_to" placeholder="创建时间到(YYYY-MM-DD)" value="{{ $filters['created_to'] ?? '' }}" class="w-180">
|
||||
@php
|
||||
// 运营提效:常用时间范围快捷入口(保持 query/back 安全口径;不依赖 JS)。
|
||||
$today = now()->format('Y-m-d');
|
||||
$from7d = now()->subDays(6)->format('Y-m-d');
|
||||
$from30d = now()->subDays(29)->format('Y-m-d');
|
||||
|
||||
$createdRangeTodayUrl = $safeFullUrlWithQuery([
|
||||
'created_from' => $today,
|
||||
'created_to' => $today,
|
||||
'page' => null,
|
||||
]);
|
||||
$createdRange7dUrl = $safeFullUrlWithQuery([
|
||||
'created_from' => $from7d,
|
||||
'created_to' => $today,
|
||||
'page' => null,
|
||||
]);
|
||||
$createdRange30dUrl = $safeFullUrlWithQuery([
|
||||
'created_from' => $from30d,
|
||||
'created_to' => $today,
|
||||
'page' => null,
|
||||
]);
|
||||
$createdRangeClearUrl = $safeFullUrlWithQuery([
|
||||
'created_from' => null,
|
||||
'created_to' => null,
|
||||
'page' => null,
|
||||
]);
|
||||
@endphp
|
||||
<span class="muted muted-xs" data-role="platform-orders-created-range-quick-links">
|
||||
时间快捷:
|
||||
<a class="link" data-role="po-created-range-today" href="{!! $createdRangeTodayUrl !!}">今天</a>
|
||||
<span class="muted">|</span>
|
||||
<a class="link" data-role="po-created-range-7d" href="{!! $createdRange7dUrl !!}">近7天</a>
|
||||
<span class="muted">|</span>
|
||||
<a class="link" data-role="po-created-range-30d" href="{!! $createdRange30dUrl !!}">近30天</a>
|
||||
<span class="muted">|</span>
|
||||
<a class="link" data-role="po-created-range-clear" href="{!! $createdRangeClearUrl !!}">清空</a>
|
||||
</span>
|
||||
<label class="form-inline-row">
|
||||
<input type="checkbox" name="fail_only" value="1" @checked(($filters['fail_only'] ?? '') === '1')>
|
||||
<span>只看同步失败</span>
|
||||
|
||||
Reference in New Issue
Block a user