92451 89bd1703c7 feat: 提现管理连续3天余额预警并生成待办 (#519)
## 完成内容
- 提现管理展示所选余额日及前两天余额。
- 连续3个自然日余额一致且均严格高于预留标准时显示预警。
- 余额导入成功后自动生成或更新待处理事项,同一店铺不重复创建。
- 导出文件同步包含三天余额和预警状态。

## 验证
- 新增预警测试:3 项通过,30 个断言。
- 提现管理导入导出测试:12 项通过,96 个断言。
- 管理页面回归:1 项通过,56 个断言。
- 余额仓库测试:11 项通过,46 个断言。
- 本地页面已验证:39 家店铺触发预警,待办事项生成 39 条。

## 风险
- 无数据库结构迁移。
- 不改上游数据;仅在成功导入余额后读取共享镜像并写入待办。

Reviewed-on: #519
Co-authored-by: 92451 <924518135@qq.com>
Co-committed-by: 92451 <924518135@qq.com>
2026-10-24 19:50:40 +08:00

83 lines
3.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<section class="biz-card mt-6 todo-list" aria-label="待办事项">
<div class="biz-card-head">
<div>
<div class="biz-card-title">
<span class="material-icons-outlined" aria-hidden="true">task_alt</span>
<span>待办清单</span>
</div>
<p class="todo-list__description">集中展示系统预警和人工待办,保持事项从触发到处理的完整记录。</p>
</div>
<span class="biz-badge">{{ number_format($items->total()) }} 条</span>
</div>
<div class="biz-table-wrap">
<table class="biz-table" aria-label="待办事项表格">
<thead>
<tr>
<th>序号</th>
<th>标题</th>
<th>分类</th>
<th>优先级</th>
<th>状态</th>
<th>截止日期</th>
<th>描述</th>
</tr>
</thead>
<tbody>
@forelse ($items as $item)
<tr>
<td>{{ $items->firstItem() + $loop->index }}</td>
<td>{{ $item->title }}</td>
<td><span class="biz-badge">{{ $item->category ?: '-' }}</span></td>
<td>
<span @class(['biz-badge', 'todo-list__priority' => $item->priority === '高'])>
{{ $item->priority ?: '-' }}
</span>
</td>
<td>
<span @class(['biz-badge', 'biz-badge-no' => in_array($item->status, ['已完成', '已关闭'], true)])>
{{ $item->status ?: '待处理' }}
</span>
</td>
<td>{{ $item->due_date ?: '-' }}</td>
<td class="todo-list__detail">{!! nl2br(e($item->description ?: '-')) !!}</td>
</tr>
@empty
<tr>
<td colspan="7">
<div class="biz-empty">
<span class="material-icons-outlined" aria-hidden="true">inbox</span>
<div>暂无待办事项。</div>
</div>
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if ($items->hasPages())
<div class="biz-pagination">
<span>共 {{ number_format($items->total()) }} 条 · 第 {{ $items->currentPage() }} / {{ $items->lastPage() }} 页</span>
<span>
@if ($items->onFirstPage())
<span>‹ 上一页</span>
@else
<a href="{{ $items->previousPageUrl() }}">‹ 上一页</a>
@endif
@if ($items->hasMorePages())
<a href="{{ $items->nextPageUrl() }}">下一页 ›</a>
@else
<span>下一页 ›</span>
@endif
</span>
</div>
@endif
</section>
<style>
.todo-list__description { margin:.35rem 0 0; color:#595959; font-size:.75rem; line-height:1.5; }
.todo-list__priority { border-color:#d8b15d; background:#fff7df; color:#935f07; }
.todo-list__detail { min-width:22rem; max-width:42rem; white-space:normal; line-height:1.65; }
</style>