diff --git a/modules/EcommerceFinance/View/SupplierReconciliationPageData.php b/modules/EcommerceFinance/View/SupplierReconciliationPageData.php index e39e037d..1c28d216 100644 --- a/modules/EcommerceFinance/View/SupplierReconciliationPageData.php +++ b/modules/EcommerceFinance/View/SupplierReconciliationPageData.php @@ -20,6 +20,9 @@ class SupplierReconciliationPageData /** 厂家上传的对账数据表:每页行数(短表 + 翻页)。 */ private const PER_PAGE = 15; + /** 退货明细行较高:每页 10 行,并在页面内固定表头滚动查看。 */ + private const RETURN_PER_PAGE = 10; + public function __construct( private readonly SupplierPayableOverrideStore $store, private readonly SupplierStatementStore $statements, @@ -377,8 +380,8 @@ class SupplierReconciliationPageData $rows[] = ['_key' => $key, 'status' => $status, 'deduction' => $deduction] + $row; } - // 全部退货行按导入顺序分页展示(每页 15 行),不做金额排序。 - $perPage = self::PER_PAGE; + // 全部退货行按导入顺序分页展示(每页 10 行),不做金额排序。 + $perPage = self::RETURN_PER_PAGE; $pages = max((int) ceil(count($rows) / $perPage), 1); $page = min(max((int) request()->query($pageQueryKey, 1), 1), $pages); diff --git a/resources/views/business/pages/supplier-reconciliation/supplier-data.blade.php b/resources/views/business/pages/supplier-reconciliation/supplier-data.blade.php index e6d87248..f5fce02b 100644 --- a/resources/views/business/pages/supplier-reconciliation/supplier-data.blade.php +++ b/resources/views/business/pages/supplier-reconciliation/supplier-data.blade.php @@ -45,6 +45,8 @@ .supplier-reconciliation-page .sr-return-stat strong small { margin-left: 3px; color: var(--vip-content-muted, #595959); font-size: .75rem; font-weight: 500; } .supplier-reconciliation-page .sr-return-stat em { color: var(--vip-content-muted, #595959); font-size: .8125rem; font-style: normal; font-variant-numeric: tabular-nums; } .supplier-reconciliation-page .sr-return-table { min-width: 1420px; } + .supplier-reconciliation-page .sr-return-scroll { max-height: min(62vh, 560px); overflow: auto; scrollbar-gutter: stable; } + .supplier-reconciliation-page .sr-return-scroll thead th { position: sticky; top: 0; z-index: 4; box-shadow: 0 1px 0 var(--vip-border, #D8D2C7); } .supplier-reconciliation-page .sr-filter { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(2, minmax(135px, .8fr)) minmax(150px, 1fr) minmax(125px, .75fr); gap: 10px 12px; align-items: end; padding: 12px; border: 1px solid #EFEAE0; border-radius: 8px; background: #FCFAF5; } .supplier-reconciliation-page .sr-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; } .supplier-reconciliation-page .sr-date-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; grid-column: 1 / -1; margin-top: -2px; } @@ -316,7 +318,7 @@ -
+
diff --git a/resources/views/portal/supplier-reconciliation/index.blade.php b/resources/views/portal/supplier-reconciliation/index.blade.php index 99c61655..decd31fe 100644 --- a/resources/views/portal/supplier-reconciliation/index.blade.php +++ b/resources/views/portal/supplier-reconciliation/index.blade.php @@ -43,6 +43,8 @@ .supplier-portal-page .sp-return-stat strong small { margin-left: 3px; color: var(--vip-content-muted, #595959); font-size: .75rem; font-weight: 500; } .supplier-portal-page .sp-return-stat em { color: var(--vip-content-muted, #595959); font-size: .8125rem; font-style: normal; font-variant-numeric: tabular-nums; } .supplier-portal-page .sp-return-table { min-width: 1420px; } + .supplier-portal-page .sp-return-scroll { max-height: min(62vh, 560px); overflow: auto; scrollbar-gutter: stable; } + .supplier-portal-page .sp-return-scroll thead th { position: sticky; top: 0; z-index: 4; box-shadow: 0 1px 0 var(--vip-border, #D8D2C7); } .supplier-portal-page .sp-filter { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(2, minmax(135px, .8fr)) minmax(150px, 1fr) minmax(125px, .75fr); gap: 10px 12px; align-items: end; padding: 12px; border: 1px solid #EFEAE0; border-radius: 8px; background: #FCFAF5; } .supplier-portal-page .sp-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; } .supplier-portal-page .sp-date-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; grid-column: 1 / -1; margin-top: -2px; } @@ -202,7 +204,7 @@ -
+
diff --git a/tests/Feature/Business/SupplierReconciliationTest.php b/tests/Feature/Business/SupplierReconciliationTest.php index bdf74b8e..97063eda 100644 --- a/tests/Feature/Business/SupplierReconciliationTest.php +++ b/tests/Feature/Business/SupplierReconciliationTest.php @@ -142,6 +142,8 @@ class SupplierReconciliationTest extends FeatureTestCase ->assertSeeText('查询') ->assertSeeText('导出当前筛选结果'); + $response->assertSee('sr-return-scroll', false); + $html = (string) $response->getContent(); $tableStart = strpos($html, '
'); $tableEnd = $tableStart === false ? false : strpos($html, '
', $tableStart); @@ -238,6 +240,7 @@ class SupplierReconciliationTest extends FeatureTestCase ->assertDontSeeText('OTHER-SUPPLIER-RETURN') ->assertDontSeeText('鸣飞家具') ->assertDontSee('supplier-name-options', false) + ->assertSee('sp-return-scroll', false) ->assertSee('id="portal-return-date-from"', false) ->assertSee('data-return-date-range="last-month"', false) ->assertDontSeeText('预估单价'); @@ -469,15 +472,19 @@ class SupplierReconciliationTest extends FeatureTestCase $this->loginAs()->get($pageUrl(1)) ->assertOk() - ->assertSeeText('每页 15 行') + ->assertSeeText('每页 10 行') ->assertSeeText('第 1 / 2 页') ->assertSeeText('RT-01') + ->assertSeeText('RT-10') + ->assertDontSeeText('RT-11') ->assertDontSeeText('RT-20'); $this->loginAs()->get($pageUrl(2)) ->assertOk() ->assertSeeText('第 2 / 2 页') + ->assertSeeText('RT-11') ->assertSeeText('RT-20') + ->assertDontSeeText('RT-10') ->assertDontSeeText('RT-01'); }