供应商对账:退货明细按导入顺序展示,不再按金额排序

退货扣减确认表取消「金额从高到低」排序,按导入顺序分页展示(每页 15 行),页面说明同步调整。
This commit is contained in:
苏木 2026-10-17 10:24:00 +08:00
parent a8ffb6fc23
commit eeb3001946
3 changed files with 6 additions and 8 deletions

View File

@ -205,9 +205,7 @@ class SupplierReconciliationPageData
$rows[] = ['_key' => $key, 'status' => $status, 'deduction' => $deduction] + $row;
}
usort($rows, static fn (array $a, array $b): int => $b['deduction'] <=> $a['deduction']);
// 全部退货行按金额从高到低分页展示(每页 15 行)。
// 全部退货行按导入顺序分页展示(每页 15 行),不做金额排序。
$perPage = self::PER_PAGE;
$pages = max((int) ceil(count($rows) / $perPage), 1);
$page = min(max((int) request()->query('return_page', 1), 1), $pages);

View File

@ -239,7 +239,7 @@
</div>
<p class="sr-hint">
列名取自《退货明细》原始表头(标记多标签、创建人、对账人、退货单备注等内部字段不展示),左右滑动查看全部。
退货共 {{ number_format($returnPanel['total_rows']) }} 行,按扣减金额从高到低排列,每页 {{ $returnPanel['per_page'] }} 行(第 {{ $returnPanel['page'] }} / {{ $returnPanel['pages'] }} 页)。
退货共 {{ number_format($returnPanel['total_rows']) }} 行,按导入顺序展示,每页 {{ $returnPanel['per_page'] }} 行(第 {{ $returnPanel['page'] }} / {{ $returnPanel['pages'] }} 页)。
金额列为空的行以预估金额参与扣减,与采购方记账口径一致。
</p>
@if ($returnPanel['pages'] > 1)

View File

@ -185,14 +185,14 @@ class SupplierReconciliationTest extends FeatureTestCase
->assertOk()
->assertSeeText('每页 15 行')
->assertSeeText('第 1 / 2 页')
->assertSeeText('RT-20')
->assertDontSeeText('RT-01');
->assertSeeText('RT-01')
->assertDontSeeText('RT-20');
$this->loginAs()->get($pageUrl(2))
->assertOk()
->assertSeeText('第 2 / 2 页')
->assertSeeText('RT-01')
->assertDontSeeText('RT-20');
->assertSeeText('RT-20')
->assertDontSeeText('RT-01');
}
public function test_return_rows_can_be_confirmed_disputed_and_confirmed_all(): void