报价执行期间冲突显示明确错误提示 (#383)

This commit is contained in:
limeng 2026-10-17 21:02:31 +08:00
parent bd39a7fdda
commit 10d9c22e3e
2 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,9 @@
@endphp
<section class="quote-management" aria-label="报价管理" data-quote-management>
@if(isset($errors) && ($errors->has('end_date') || $errors->has('reason') || $errors->has('courier_name')))
<div role="alert" style="padding:12px;margin-bottom:12px;border:1px solid #D8D2C7;border-radius:8px;background:#F7F0DE;color:#B80000">{{ $errors->first() }}</div>
@endif
<style>
.quote-management {
--quote-accent: var(--vip-content-accent-dark, #856632);

View File

@ -336,6 +336,7 @@ class CourierStockQuoteEntryTest extends FeatureTestCase
$this->assertDatabaseHas('business_courier_quote_change_events', ['quote_change_id' => $entry->source_change_id, 'event_type' => 'period_end_updated', 'created_by' => $reviewer->id]);
$this->createEntry(['effective_date' => '2026-10-01']);
$this->withExceptionHandling()->loginAs($reviewer, $this->company)->post(route('business.courier-stock-quotes.period-end', $entry), ['end_date' => '2026-10-01', 'reason' => '重叠边界验证'])->assertSessionHasErrors('courier_name');
$this->get(route('business.pages.show', ['section' => 'courier-payables', 'page' => 'quote-management']))->assertOk()->assertSeeText('执行期间重叠');
$this->assertSame('2026-09-30', $entry->fresh()->end_date->toDateString());
}