@php $assignment = $assignment ?? null; $suppliers = $suppliers ?? []; $supplierResults = $supplierResults ?? []; $latestPeriod = $latestPeriod ?? ['month' => '', 'negative_amount' => 0, 'supplier_count' => 0, 'row_count' => 0]; $processingDeadline = $processingDeadline ?? null; $supplierAttachments = $supplierAttachments ?? []; $completed = ($assignment->status ?? '') === 'completed'; $processing = ($assignment->status ?? '') === 'processing'; $statusLabel = $completed ? '全部已回传,可继续修改' : ($processing ? '部分已回传,可继续填写' : '待填写'); $filledCount = collect($suppliers)->filter( static fn (array $supplier): bool => filled($supplierResults[$supplier['supplier'] ?? ''] ?? null) )->count(); @endphp 供应商负数预警处理

{{ $assignment->group_name }}

供应商负数预警处理

采购:{{ $assignment->purchaser_name }} 发送时间:{{ mb_substr((string) $assignment->sent_at, 0, 16) }} 状态:{{ $statusLabel }}
@if (session('negative_alert_success'))
{{ session('negative_alert_success') }}
@endif @if ($errors->any()) @endif
最新账期负数合计 · {{ ($latestPeriod['month'] ?? '') !== '' ? $latestPeriod['month'] : '未标注月份' }} ¥{{ number_format((float) ($latestPeriod['negative_amount'] ?? 0), 2) }}
该账期涉及 {{ number_format((int) ($latestPeriod['supplier_count'] ?? 0)) }} 家供应商、 {{ number_format((int) ($latestPeriod['row_count'] ?? 0)) }} 条负数预警
@if ($processingDeadline)
最晚处理时间 {{ $processingDeadline }} (每月账单须在次月最后一天 18:00 前处理完成)
@endif
供应商 {{ number_format(count($suppliers)) }} 家
预警记录 {{ number_format((int) $assignment->row_count) }} 条
已填写 {{ number_format($filledCount) }} 家
@csrf @foreach ($suppliers as $index => $supplier) @php $supplierName = (string) ($supplier['supplier'] ?? ''); $months = implode('、', (array) ($supplier['months'] ?? [])); $reasons = implode(';', (array) ($supplier['negative_reasons'] ?? [])); $value = old('results.' . $index, $supplierResults[$supplierName] ?? ''); @endphp
{{ $index + 1 }}

{{ $supplierName }}

{{ number_format((int) ($supplier['row_count'] ?? 0)) }} 条预警 @if ($months !== '') · 月份 {{ $months }} @endif

负数金额 ¥{{ number_format((float) ($supplier['alert_amount'] ?? 0), 2) }}
@if ($reasons !== '')
情况说明 {{ $reasons }}
@endif
@if ($errors->has('results.' . $index))

{{ $errors->first('results.' . $index) }}

@endif

支持 JPG、PNG、WEBP,单张不超过 10MB。

@php $attachments = (array) ($supplierAttachments[$supplierName] ?? []); @endphp @if ($attachments !== [])
@foreach ($attachments as $attachment) {{ $attachment->original_name }} 已上传 {{ $loop->iteration }} @endforeach
@endif
@endforeach
已填写 {{ $filledCount }} / {{ count($suppliers) }} 家