Merge installation detail filter bar

This commit is contained in:
chenxi 2026-08-31 21:39:11 +08:00
commit df5e844b80
2 changed files with 81 additions and 0 deletions

View File

@ -143,6 +143,51 @@
margin-top: 1.25rem;
}
.installation-filter-bar {
display: grid;
grid-template-columns: repeat(4, minmax(12rem, 1fr));
gap: 0.65rem 1rem;
padding: 1rem 1.5rem;
border-bottom: 1px solid #f3f4f6;
background: #fcfbf8;
}
.installation-filter-field {
display: flex;
align-items: center;
gap: 0.4rem;
min-width: 0;
color: #595959;
font-size: 0.75rem;
white-space: nowrap;
}
.installation-filter-field span {
flex: 0 0 auto;
}
.installation-filter-field input {
min-width: 0;
width: 100%;
height: 2.1rem;
padding: 0 0.5rem;
border: 1px solid #d8d2c7;
border-radius: 0.375rem;
background: #ffffff;
color: #171717;
font-size: 0.75rem;
}
.installation-filter-actions {
display: flex;
align-items: center;
gap: 0.5rem;
}
@media (max-width: 1100px) {
.installation-filter-bar { grid-template-columns: repeat(2, minmax(14rem, 1fr)); }
}
.biz-card-head {
display: flex;
align-items: center;
@ -532,6 +577,34 @@
@include($pageView)
@elseif ($descriptor)
<div class="biz-card mt-6">
@if ($page['slug'] === 'installation-details')
<form method="GET" action="{{ request()->url() }}" class="installation-filter-bar" aria-label="安装明细筛选查询栏">
@php
$filterFields = [
['name' => 'created_from', 'label' => '创建日期:', 'type' => 'date'], ['name' => 'created_to', 'label' => '至:', 'type' => 'date'],
['name' => 'customer_review_from', 'label' => '客服审核时间:', 'type' => 'date'], ['name' => 'customer_review_to', 'label' => '至:', 'type' => 'date'],
['name' => 'finance_review_from', 'label' => '财务审核时间:', 'type' => 'date'], ['name' => 'finance_review_to', 'label' => '至:', 'type' => 'date'],
['name' => 'push_status', 'label' => '推送状态:'], ['name' => 'order_no', 'label' => '订单编号:'],
['name' => 'customer_review', 'label' => '客服审核:'], ['name' => 'finance_review', 'label' => '财务审核:'],
['name' => 'quote_status', 'label' => '报价状态:'], ['name' => 'arranged_status', 'label' => '是否安排:'],
['name' => 'fee_payer', 'label' => '安装费承担方:'], ['name' => 'completed_status', 'label' => '是否完工:'],
['name' => 'shop_name', 'label' => '选择店铺:'], ['name' => 'delete_status', 'label' => '选择删除:'],
['name' => 'installation_company', 'label' => '安装公司:'], ['name' => 'installation_no', 'label' => '安装单号:'],
['name' => 'order_type', 'label' => '订单类型:'], ['name' => 'product_id', 'label' => '商品ID:'],
];
@endphp
@foreach ($filterFields as $filter)
<label class="installation-filter-field">
<span>{{ $filter['label'] }}</span>
<input type="{{ $filter['type'] ?? 'text' }}" name="{{ $filter['name'] }}" value="{{ request($filter['name']) }}">
</label>
@endforeach
<div class="installation-filter-actions">
<button type="submit" class="biz-btn biz-btn-primary">查询</button>
<a href="{{ request()->url() }}" class="biz-btn biz-btn-ghost">清除</a>
</div>
</form>
@endif
<div class="biz-card-head">
<div class="biz-card-title">
<span class="material-icons-outlined" aria-hidden="true">table_view</span>

View File

@ -45,6 +45,14 @@ class ManagementCrudTest extends FeatureTestCase
->assertSeeText('安装单号')
->assertSeeText('申请总金额')
->assertSeeText('商品名称(1)')
->assertSeeText('创建日期:')
->assertSeeText('客服审核时间:')
->assertSeeText('财务审核时间:')
->assertSeeText('推送状态:')
->assertSeeText('选择店铺:')
->assertSeeText('选择删除:')
->assertSeeText('订单类型:')
->assertSeeText('商品ID:')
->assertSeeText('INSTALL-TEST-001')
->assertSeeText('测试安装公司')
->assertSeeText('120.50')