供应商对账:厂家端隐藏上传记录并调整内部位置 #404

Merged
renshen merged 1 commits from feature/renshen-upload-history-position into main 2026-10-20 11:39:21 +08:00
3 changed files with 31 additions and 29 deletions

View File

@ -124,28 +124,6 @@
</div>
@if ($selectedSupplier !== '')
<div class="sr-card">
<h2>{{ $selectedSupplier }} · 上传记录</h2>
<div class="sr-scroll">
<table>
<thead>
<tr><th scope="col">上传时间</th><th scope="col">文件名</th><th scope="col">行数</th></tr>
</thead>
<tbody>
@forelse ($uploads as $upload)
<tr>
<td class="sr-muted">{{ $upload['uploaded_at'] ?? '—' }}</td>
<td>{{ $upload['filename'] ?? '—' }}</td>
<td class="is-num">{{ number_format((int) ($upload['rows'] ?? 0)) }}</td>
</tr>
@empty
<tr><td colspan="3"><div class="sr-empty">该厂家还没有上传过对账单。</div></td></tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="sr-card">
<h2>{{ $selectedSupplier }} · 上传的对账数据(共 {{ number_format($statementTotal) }} 行)</h2>
<div class="sr-scroll">
@ -445,6 +423,30 @@
</div>
@endif
@if ($selectedSupplier !== '')
<div class="sr-card">
<h2>{{ $selectedSupplier }} · 上传记录</h2>
<div class="sr-scroll">
<table>
<thead>
<tr><th scope="col">上传时间</th><th scope="col">文件名</th><th scope="col">行数</th></tr>
</thead>
<tbody>
@forelse ($uploads as $upload)
<tr>
<td class="sr-muted">{{ $upload['uploaded_at'] ?? '—' }}</td>
<td>{{ $upload['filename'] ?? '—' }}</td>
<td class="is-num">{{ number_format((int) ($upload['rows'] ?? 0)) }}</td>
</tr>
@empty
<tr><td colspan="3"><div class="sr-empty">该厂家还没有上传过对账单。</div></td></tr>
@endforelse
</tbody>
</table>
</div>
</div>
@endif
<script>
(() => {
const form = document.querySelector('[data-return-filter-form]');

View File

@ -93,13 +93,6 @@
单价或金额留空时会按数量自动补齐。
</p>
<div class="sp-summary">
@if (! empty($uploads[0]))
<span>最近上传:{{ $uploads[0]['uploaded_at'] ?? '—' }}</span>
<span>文件:{{ $uploads[0]['filename'] ?? '—' }}</span>
<span>行数:{{ number_format((int) ($uploads[0]['rows'] ?? 0)) }}</span>
@else
<span>当前还没有上传过对账单。</span>
@endif
<span>退货件数:{{ $formatReturnQty($returnPanel['return_qty']) }} 件</span>
<span>退货金额:¥{{ number_format($returnPanel['total_amount'], 2) }}</span>
</div>

View File

@ -145,6 +145,12 @@ class SupplierReconciliationTest extends FeatureTestCase
$response->assertSee('sr-return-scroll', false);
$html = (string) $response->getContent();
$uploadHistoryPosition = strpos($html, ' · 上传记录');
$returnPanelPosition = strpos($html, '退货扣减确认');
$this->assertNotFalse($uploadHistoryPosition, '内部页面应保留上传记录。');
$this->assertNotFalse($returnPanelPosition, '内部页面应正常渲染退货面板。');
$this->assertGreaterThan($returnPanelPosition, $uploadHistoryPosition, '上传记录应移动到页面最下面。');
$tableStart = strpos($html, '<table class="sr-return-table">');
$tableEnd = $tableStart === false ? false : strpos($html, '</table>', $tableStart);
$this->assertNotFalse($tableStart, '厂家退货表应正常渲染。');
@ -239,6 +245,7 @@ class SupplierReconciliationTest extends FeatureTestCase
->assertDontSeeText('PORTAL-20')
->assertDontSeeText('OTHER-SUPPLIER-RETURN')
->assertDontSeeText('鸣飞家具')
->assertDontSeeText('最近上传')
->assertDontSee('supplier-name-options', false)
->assertSee('sp-return-scroll', false)
->assertSee('id="portal-return-date-from"', false)