HEL-222: 整合自动提醒引擎(212b1f9)到现行测试版 d6f39e0

- 迁移链追加 0009_reminders_engine:旧 manual reminders 表改名
  reminders_legacy_manual 保留历史,新建 reminders/reminder_events/
  reminder_settings(append-only 触发器)
- server.py:新提醒 API(pending/scan/send/manual/resend/settings/
  公司端收件与状态流转)替换旧 manual-send 端点
- web:admin 待提醒清单+扫描+详情抽屉,公司端通知动态化+
  去处理事件委托;设置保存同步提醒扫描参数
- 移除被取代的 settings.pending_items/send_reminders 与旧 UI 逻辑
- 全量测试 346 项通过(5 项浏览器跳过与历史一致)

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
总工
2026-08-28 15:21:27 +00:00
co-authored by multica-agent
18 changed files with 2215 additions and 698 deletions
+59 -10
View File
@@ -633,6 +633,22 @@
<h1>提醒管理</h1>
<p class="page-sub">向成员公司发送处理提醒,并跟踪系统提醒与人工提醒的触达与处理状态。</p>
</div>
<div class="page-actions">
<button type="button" class="btn btn-sm" id="reminder-scan-btn">立即扫描</button>
</div>
</div>
<div class="card" id="pending-reminders-card" style="margin-bottom: 16px;">
<div class="card-head">
<span class="card-title">待提醒清单<span class="sub">系统按流水提交、断档、待确认自动发现,点发送即送达对应公司</span></span>
<div class="row" style="gap: 10px; align-items: center;">
<span class="meta" id="pending-summary"></span>
<button type="button" class="btn btn-primary btn-sm" id="pending-send-all" disabled>全部一键发送</button>
</div>
</div>
<div id="pending-list">
<div class="empty" id="pending-empty">暂无需要提醒的事项 · 各公司流水与确认进度正常</div>
</div>
</div>
<div class="grid grid-1-2">
@@ -642,18 +658,30 @@
</div>
<form id="reminderForm" novalidate>
<div class="field" style="margin-bottom: 14px;">
<label for="reminder-company">接收公司</label>
<select class="select" id="reminder-company"><option value="">请选择公司</option></select>
<span class="hint error" id="company-error" style="display: none;">请选择一家接收公司</span>
<label>接收公司(可多选)</label>
<div class="row" id="reminderCompanyList" style="flex-wrap: wrap; gap: 8px 16px;"></div>
<span class="hint error" id="company-error" style="display: none;">至少选择一家接收公司</span>
</div>
<div class="field" style="margin-bottom: 16px;">
<label>提醒事项(系统自动列出)</label>
<div id="reminder-items">
<div class="empty">请先选择公司,系统将自动列出该公司待提醒事项。</div>
</div>
<span class="hint error" id="reminder-error" style="display: none;">该公司当前没有待提醒事项</span>
<div class="field" style="margin-bottom: 14px;">
<label for="reminder-type">提醒类型</label>
<select class="select" id="reminder-type">
<option selected>流水未提交</option>
<option>单边待确认</option>
<option>科目待确认</option>
<option>账户登记</option>
<option>其他</option>
</select>
</div>
<button type="submit" class="btn btn-primary" id="send-btn" style="width: 100%;" disabled>发送提醒</button>
<div class="field" style="margin-bottom: 14px;">
<label for="reminder-content">提醒内容</label>
<textarea class="textarea" id="reminder-content">请于截止日期前完成 2026 年 7 月银行流水上传与待确认事项处理。</textarea>
<span class="hint error" id="content-error" style="display: none;">提醒内容不能为空</span>
</div>
<div class="field" style="margin-bottom: 18px;">
<label for="reminder-deadline">截止日期</label>
<input class="input" type="date" id="reminder-deadline" value="2026-08-29" min="2026-08-20" />
</div>
<button type="submit" class="btn btn-primary" id="send-btn" style="width: 100%;">发送提醒</button>
<p class="hint" id="send-hint" style="margin-top: 10px; display: none;"></p>
</form>
</div>
@@ -672,6 +700,7 @@
<thead>
<tr>
<th>公司</th>
<th>来源</th>
<th>类型</th>
<th class="wrap">内容摘要</th>
<th>发送时间</th>
@@ -947,6 +976,26 @@
</div>
</div>
<!-- 提醒详情抽屉 -->
<aside class="drawer" id="reminder-detail-drawer" aria-label="提醒详情">
<div class="drawer-head">
<div>
<span class="pill pill-info" id="rd-source-pill">系统</span>
<h2 class="d-title" id="rd-title">提醒详情</h2>
<p class="d-desc" id="rd-sub"></p>
</div>
<button type="button" class="icon-button" data-close-rd aria-label="关闭详情" title="关闭详情">×</button>
</div>
<div class="drawer-body">
<dl class="kv" id="rd-fields"></dl>
<h3 style="font-size: 13px; margin: 16px 0 8px; color: var(--muted);">事件留痕</h3>
<div id="rd-events"></div>
</div>
<div class="drawer-foot">
<button type="button" class="btn" data-close-rd>关闭</button>
</div>
</aside>
<!-- 提醒历史弹窗 -->
<div class="modal-backdrop" id="history-modal">
<div class="modal">