fix(供应商对账): 将全部确认操作移至退货标题区
This commit is contained in:
parent
8543953752
commit
edd8a101b1
@ -226,6 +226,11 @@
|
||||
.supplier-portal-page .sp-title-number { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 6px; background: var(--sp-gold-soft); color: var(--sp-gold); font-size: 11px; font-weight: 700; }
|
||||
.supplier-portal-page .sp-caption { margin: 4px 0 0; color: var(--sp-muted); font-size: 12px; line-height: 1.65; }
|
||||
.supplier-portal-page .sp-caption strong { color: var(--sp-ink); font-weight: 600; }
|
||||
.supplier-portal-page .sp-return-head-actions { display: grid; justify-items: end; gap: 6px; }
|
||||
.supplier-portal-page .sp-return-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
|
||||
.supplier-portal-page .sp-return-confirm-form { display: inline-flex; }
|
||||
.supplier-portal-page .sp-return-confirm-button { min-height: 36px; padding: 0 15px; font-weight: 700; }
|
||||
.supplier-portal-page .sp-return-confirm-note { max-width: 320px; color: var(--sp-muted); font-size: 11px; line-height: 1.5; text-align: right; }
|
||||
|
||||
.supplier-portal-page .sp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
||||
.supplier-portal-page .sp-button {
|
||||
@ -442,6 +447,11 @@
|
||||
.supplier-portal-page .sp-panel { padding: 14px; }
|
||||
.supplier-portal-page .sp-filter { grid-template-columns: minmax(0, 1fr); }
|
||||
.supplier-portal-page .sp-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
.supplier-portal-page .sp-return-head-actions { width: 100%; justify-items: stretch; }
|
||||
.supplier-portal-page .sp-return-head-row { justify-content: flex-start; }
|
||||
.supplier-portal-page .sp-return-confirm-form { flex: 1 1 100%; }
|
||||
.supplier-portal-page .sp-return-confirm-button { width: 100%; }
|
||||
.supplier-portal-page .sp-return-confirm-note { max-width: none; text-align: left; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -625,7 +635,22 @@
|
||||
<h3 class="sp-title" id="sp-return-title"><span class="sp-title-number">2</span>退货扣减确认</h3>
|
||||
<p class="sp-caption">查看本厂家全部退货数据。系统只记录你的确认或异议,不会代替厂家点击确认。</p>
|
||||
</div>
|
||||
<span class="sp-status {{ $hasPendingReturns ? 'is-warning' : 'is-success' }}">{{ $hasPendingReturns ? '待确认 ¥' . number_format($pendingAmount, 2) : '已处理' }}</span>
|
||||
<div class="sp-return-head-actions">
|
||||
<div class="sp-return-head-row">
|
||||
<span class="sp-status {{ $hasPendingReturns ? 'is-warning' : 'is-success' }}">{{ $hasPendingReturns ? '待确认 ¥' . number_format($pendingAmount, 2) : '已处理' }}</span>
|
||||
<form method="POST" action="{{ $returnConfirmAllUrl }}" class="sp-return-confirm-form" aria-label="批量确认退货">
|
||||
@csrf
|
||||
@foreach ($returnPanel['filter_query'] as $filterName => $filterValue)
|
||||
<input type="hidden" name="{{ $filterName }}" value="{{ $filterValue }}">
|
||||
@endforeach
|
||||
<button type="submit" class="sp-button is-primary sp-return-confirm-button" aria-describedby="sp-confirm-all-return-note">
|
||||
<span class="material-icons-outlined" aria-hidden="true">done_all</span>
|
||||
<span>{{ $returnPanel['is_filtered'] ? '全部确认当前筛选' : '全部确认无异议' }}</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<span class="sp-return-confirm-note" id="sp-confirm-all-return-note">“全部确认”不会覆盖已经提出异议的记录</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sp-summary" aria-label="退货确认汇总">
|
||||
@ -812,19 +837,6 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="sp-table-footer">
|
||||
<form method="POST" action="{{ $returnConfirmAllUrl }}" class="sp-inline-form">
|
||||
@csrf
|
||||
@foreach ($returnPanel['filter_query'] as $filterName => $filterValue)
|
||||
<input type="hidden" name="{{ $filterName }}" value="{{ $filterValue }}">
|
||||
@endforeach
|
||||
<button type="submit" class="sp-button is-primary">
|
||||
{{ $returnPanel['is_filtered'] ? '全部确认当前筛选' : '全部确认无异议' }}
|
||||
</button>
|
||||
</form>
|
||||
<span class="sp-caption">“全部确认”不会覆盖已经提出异议的记录</span>
|
||||
</div>
|
||||
|
||||
<div class="sp-rule-note">
|
||||
<span class="material-icons-outlined" aria-hidden="true">info</span>
|
||||
<span><strong>系统只发送到期提醒,不代替厂家点击确认。</strong> 逾期后,财务结算会按“默认无异议”处理,但页面仍保留厂家的原始确认状态和提醒记录,方便追溯。</span>
|
||||
|
||||
@ -1125,18 +1125,24 @@ class SupplierReconciliationTest extends FeatureTestCase
|
||||
|
||||
$response->assertSee('sp-return-scroll', false);
|
||||
$response->assertSee('sp-upload-rules', false);
|
||||
$response->assertSee('sp-return-head-actions', false);
|
||||
$response->assertSee('sp-return-confirm-button', false);
|
||||
|
||||
$html = (string) $response->getContent();
|
||||
$uploadHistoryPosition = strpos($html, '上传记录');
|
||||
$returnPanelPosition = strpos($html, '退货扣减确认');
|
||||
$confirmAllPosition = strpos($html, 'class="sp-button is-primary sp-return-confirm-button"');
|
||||
$this->assertNotFalse($uploadHistoryPosition, '内部页面应保留上传记录。');
|
||||
$this->assertNotFalse($returnPanelPosition, '内部页面应正常渲染退货面板。');
|
||||
$this->assertNotFalse($confirmAllPosition, '内部页面应保留全部确认操作。');
|
||||
$this->assertLessThan($returnPanelPosition, $uploadHistoryPosition, '上传记录应紧邻上传区域展示。');
|
||||
$this->assertGreaterThan($returnPanelPosition, $confirmAllPosition, '全部确认按钮应位于退货扣减确认标题之后。');
|
||||
|
||||
$tableStart = strpos($html, '<table class="sp-return-table">');
|
||||
$tableEnd = $tableStart === false ? false : strpos($html, '</table>', $tableStart);
|
||||
$this->assertNotFalse($tableStart, '厂家退货表应正常渲染。');
|
||||
$this->assertNotFalse($tableEnd, '厂家退货表应正常结束。');
|
||||
$this->assertLessThan($tableStart, $confirmAllPosition, '全部确认按钮应移到退货表格之前。');
|
||||
|
||||
$returnTable = substr($html, $tableStart, $tableEnd - $tableStart);
|
||||
$this->assertSame(14, substr_count($returnTable, '<th scope="col">'));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user