Merge branch 'equipment-acceptance' into dev
This commit is contained in:
commit
3bfd881c4f
6 files changed
+644
No files matched your search
@@ -19,6 +19,12 @@
|
||||
- 员工在“员工培训”完成“出国规章培训”视频观看后,系统立即向该员工推送一条标题和正文均为“中国员工出差泰国的行为准则”的企业微信通知。
|
||||
- 推送以每次视频观看完成事实为准:同一员工重复完整观看时,每次均发送一次,不因既有培训完成记录而去重;企业微信事件开关关闭、通知总开关关闭或员工未绑定企业微信时,不影响培训完成记录落库,并由既有企微审计记录原因。
|
||||
|
||||
## 设备验收预警(2026-09)
|
||||
|
||||
- 从 OA 资产验收单第一次进入「使用部门担当」起按自然日累计停留;只监控未归档、有效、可以验收的流程。归档、退回、撤回、作废或无法验收立即停表。退回或无法验收后再次进入且重新可以验收,按新周期从 0 计时。
|
||||
- 超过 30/37/44/51 天各发一次企业微信。担当、直接主管、经副理取当前节点处理人及其上级;采购担当取流程申请人。采购经副理、COO、廖总可在界面配置。每日扫描只生成待发送,初始每周五 18:00 按收件人汇总。
|
||||
- 规则已冻结。OA 视图未提供,视图到位前不实现。完整说明见 [设备验收预警需求](features/equipment-acceptance-warning/demand.md)。
|
||||
|
||||
## 合同付款预警 Agent(2026-08)
|
||||
|
||||
- 覆盖预付款、出货款、验收款、质保款四阶段:预付款为合同申请单归档后第 7/14/21 天;出货款为交货期限前 7 天、当天、后 14 天;验收款为验收归档后第 30/40/60 天;质保款为质保到期前 7 天、当天、后 14 天。
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
| [procurement-contract](procurement-contract/README.md) | 采购合同审查 Agent(模板比对 / 单份审核) | [用户操作手册](procurement-contract/用户操作手册.md) · [demand.md](procurement-contract/demand.md) · [comprehensive-review-technical.md](procurement-contract/comprehensive-review-technical.md) · [原型](procurement-contract/procurement-contract-review-prototype.html) |
|
||||
| [contract-payment-plan](contract-payment-plan/) | 合同付款计划 / 预警 Agent | [方案 V3](contract-payment-plan/contract-payment-warning-proposal-v3.md) · [工作台原型](contract-payment-plan/contract-payment-plan-workspace-prototype-v2.html) · [人工复核原型](contract-payment-plan/contract-payment-review-prototype.html) · [Chat Agent 原型](contract-payment-plan/contract-payment-chat-agent-prototype.html) |
|
||||
| [equipment-maintenance](equipment-maintenance/README.md) | 设备维保助手 | [聊天原型](equipment-maintenance/equipment-maintenance-agent-chat-lofi.html) |
|
||||
| [equipment-acceptance-warning](equipment-acceptance-warning/README.md) | 设备验收停留预警 | [需求说明](equipment-acceptance-warning/demand.md) |
|
||||
|
||||
**平台级**设计与跨域原型见 [platform/](../platform/README.md)。
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# 设备验收预警(equipment-acceptance-warning)
|
||||
|
||||
| 文档 | 读者 | 路径 |
|
||||
| --- | --- | --- |
|
||||
| **需求说明** | 产品、业务、研发 | [demand.md](demand.md) |
|
||||
|
||||
**状态**:规则已冻结(2026-09-29)。OA 资产验收单视图未提供,视图到位前不实现同步、计时和推送。见 [funclist.md](../../funclist.md)「设备验收预警」。
|
||||
@@ -0,0 +1,97 @@
|
||||
# 设备验收预警需求说明
|
||||
|
||||
> **版本**:V1.0
|
||||
> **更新日期**:2026-09-29
|
||||
> **状态**:规则已冻结;OA 资产验收单数据库视图未提供,视图到位前不写同步、计时和推送代码
|
||||
> **适用范围**:OA 资产验收单停留预警、企业微信通知、固定岗位配置
|
||||
|
||||
## 1. 背景与目标
|
||||
|
||||
资产验收流程可能在某个节点停留很久。从流程进入「使用部门担当」起按自然日累计停留时间,对仍可验收的未归档单据按 30/37/44/51 天升级提醒,避免验收长期挂起。
|
||||
|
||||
现有合同付款预警只在验收单归档后读取 OA(`formtable_main_324`,`currentnodetype=3`),不监控进行中的节点停留。本需求是独立能力,不改付款预警的归档口径。
|
||||
|
||||
## 2. 范围
|
||||
|
||||
### 2.1 本期已冻结
|
||||
|
||||
- 监控对象、计时起点、自然日累计、停表与再进入规则。
|
||||
- 四档升级的主送、抄送,以及当前节点处理人、上级、申请人的取人规则。
|
||||
- 采购经副理、COO、廖总三个固定岗位可在管理界面配置,禁止在代码中写死姓名或账号。
|
||||
- 企业微信为唯一通知渠道。每日扫描只生成待发送记录;发送时刻可配置,初始为每周五 18:00,按收件人汇总一条。
|
||||
- OA 视图必须提供的字段清单。缺字段的单据跳过并留下原因。
|
||||
|
||||
### 2.2 本期不做
|
||||
|
||||
- 不写同步、计时、推送、配置界面和数据表。实现拆分等视图到位后再开。
|
||||
- 不做聊天工作台,不接 Dify。
|
||||
- 不撤回已发送的企业微信。停表只取消尚未发出的预警。
|
||||
- 「使用部门担当」之前的节点(ERP 触发、申请人确认、直属上级)不参与计时。
|
||||
|
||||
## 3. 监控对象
|
||||
|
||||
数据源是 OA 资产验收单,后续由业务提供数据库视图。只纳入同时满足以下条件的流程:
|
||||
|
||||
- 未归档
|
||||
- 有效(未撤回、未作废)
|
||||
- 可以验收
|
||||
|
||||
计时起点是该流程**第一次进入「使用部门担当」**。进入之后按自然日持续累计,中途更换后续节点不重置。流程图上该节点之后的使用部门经理、品质担当、品质经理、公用主管、设备管理部、设备管理部经理、固定资产管理人、COO、总经理、总务知会,都算在同一段累计时间里。节点正式名称以 OA 为准。
|
||||
|
||||
## 4. 停表与再进入
|
||||
|
||||
出现任一情况立即停止计时,并取消尚未发出的预警:
|
||||
|
||||
- 归档
|
||||
- 退回、撤回、作废
|
||||
- 验收单上为无法验收(无法验收说明从验收单抓取,只作留痕,不单独触发通知)
|
||||
|
||||
已确认:同一流程因退回或无法验收退出监控后,若再次进入「使用部门担当」且重新满足「未归档、有效、可以验收」,按**新周期从 0 计时**。上一周期已发过的档位不占用新周期,四档可以再各发一次。撤回、作废、归档后的同一请求不再恢复旧周期。
|
||||
|
||||
## 5. 升级与收件人
|
||||
|
||||
每一档在同一计时周期只产生一次待发送。每日扫描判断是否跨档,跨档后等到固定推送时刻再发。一次汇总前若跨了多档,各档都保留,合并进该收件人的同一条汇总,不逐单刷屏。
|
||||
|
||||
| 停留 | 主送 | 抄送 |
|
||||
| --- | --- | --- |
|
||||
| 超过 30 天 | 当前节点处理人(担当) | 其直接主管、采购担当 |
|
||||
| 超过 37 天 | 当前节点处理人的经副理 | COO、采购经副理 |
|
||||
| 超过 44 天 | COO | 采购经副理 |
|
||||
| 超过 51 天 | 廖总对应岗位 | COO、采购经副理 |
|
||||
|
||||
人员解析:
|
||||
|
||||
- 担当、直接主管、经副理取**当前节点处理人**及其上级,不固定成「使用部门担当」本人。
|
||||
- 采购担当取该流程的**申请人**。
|
||||
- 采购经副理、COO、廖总是固定岗位。配置初始值分别为赵琴、COO、廖总,必须能在管理界面修改。代码与环境文件不得写死这三个人的姓名或账号。
|
||||
- 当前节点有多名处理人时,主送这些处理人;直接主管、经副理按各处理人展开后去重。
|
||||
- 收件人解析失败(无上级、未绑定企业微信)时,该条保持失败可追查,不改发给别人。
|
||||
|
||||
## 6. 推送
|
||||
|
||||
已确认:扫描与发送分离。发送时刻做成可配置,**初始对齐合同付款预警,为每周五 18:00**(见 [合同付款预警需求](../contract-payment-plan/demand.md))。到点后按收件人合并为一条企业微信汇总。渠道只有企业微信。
|
||||
|
||||
## 7. 视图字段契约
|
||||
|
||||
视图未提供前不拆实现。规则依赖下列事实,缺一则该单据跳过并留下原因:
|
||||
|
||||
- 流程请求 ID、单号
|
||||
- 是否未归档、是否有效、是否可以验收、无法验收说明
|
||||
- 第一次进入「使用部门担当」的时间
|
||||
- 当前节点名称与当前处理人
|
||||
- 流程申请人(采购担当)
|
||||
- 退回、撤回、作废、归档状态,以及状态变化时间
|
||||
|
||||
直接主管、经副理若视图已给出则直接用;否则再按当前处理人查 OA 人员上级。采购经副理、COO、廖总不从单据取,只读界面配置。
|
||||
|
||||
## 8. 验收标准(视图到位后的实现对照)
|
||||
|
||||
| 编号 | 条件 | 期望 |
|
||||
| --- | --- | --- |
|
||||
| AC-01 | 尚未进入「使用部门担当」 | 不计时、不产生预警 |
|
||||
| AC-02 | 进入该节点后第 30/37/44/51 个自然日 | 各档只产生一次待发送,收件人符合第 5 节 |
|
||||
| AC-03 | 进入后更换后续节点 | 累计天数不重置 |
|
||||
| AC-04 | 归档、退回、撤回、作废或无法验收 | 立即停表,取消未发送预警,已发送消息保留 |
|
||||
| AC-05 | 退回或无法验收后再次进入「使用部门担当」且重新可以验收 | 新周期从 0 计时,四档可再各发一次 |
|
||||
| AC-06 | 发送时刻 | 默认每周五 18:00 按收件人汇总;时刻可配置 |
|
||||
| AC-07 | 修改采购经副理、COO、廖总配置 | 此后新产生的预警使用新人员,不改历史已发送记录 |
|
||||
+526
@@ -0,0 +1,526 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
docs/features/equipment-acceptance-warning/equipment-acceptance-warning-prototype.html
|
||||
用途:设备验收停留预警的可点击评审原型,用样例数据演示计时、四档升级、周五汇总和岗位配置。
|
||||
依赖:浏览器原生 HTML/CSS/JavaScript,无需构建。
|
||||
逻辑:与 demand.md 对齐;不接 OA、不发企业微信。改天数和岗位只影响尚未发送的档位。
|
||||
-->
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title>设备验收预警 · 原型</title>
|
||||
<style>
|
||||
:root { --ink:#142033; --muted:#64748b; --line:#dce4ef; --bg:#f4f7fb; --nav:#111c31; --brand:#2563eb; --soft:#eaf2ff; --green:#067647; --amber:#b54708; --red:#b42318; }
|
||||
* { box-sizing:border-box; }
|
||||
body { margin:0; background:var(--bg); color:var(--ink); font:14px/1.5 "Segoe UI","Microsoft YaHei",sans-serif; }
|
||||
button,select,input { font:inherit; }
|
||||
button { cursor:pointer; }
|
||||
.top { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:12px 24px; background:var(--nav); color:#fff; }
|
||||
.top small { color:#aac0db; margin-left:8px; }
|
||||
.tabs { display:flex; gap:5px; flex-wrap:wrap; }
|
||||
.tabs button { border:0; border-radius:7px; padding:7px 11px; color:#c5d3e6; background:transparent; font-weight:700; font-size:12px; }
|
||||
.tabs button.active { color:#fff; background:var(--brand); }
|
||||
main { width:min(1180px,calc(100% - 32px)); margin:auto; padding:22px 0 48px; }
|
||||
.view { display:none; }
|
||||
.view.active { display:block; }
|
||||
.note { margin:0 0 14px; padding:10px 12px; border:1px solid #c9dcfb; border-radius:10px; background:#f3f8ff; color:#334155; font-size:12px; }
|
||||
.hero { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:14px; }
|
||||
.hero h1 { margin:0; font-size:22px; }
|
||||
.hero p { margin:4px 0 0; color:var(--muted); }
|
||||
.btn { border:1px solid var(--line); border-radius:8px; padding:8px 11px; background:#fff; font-size:12px; font-weight:700; }
|
||||
.btn.primary { border-color:var(--brand); color:#fff; background:var(--brand); }
|
||||
.kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:14px; }
|
||||
.card { border:1px solid var(--line); border-radius:12px; background:#fff; overflow:hidden; }
|
||||
.metric { padding:14px 16px; }
|
||||
.metric b { display:block; font-size:26px; }
|
||||
.metric span { color:var(--muted); font-size:12px; }
|
||||
.filters { display:flex; flex-wrap:wrap; gap:8px; padding:12px; }
|
||||
.filters button { border:1px solid var(--line); border-radius:99px; padding:5px 10px; background:#fff; font-size:12px; font-weight:700; color:#475569; }
|
||||
.filters button.active { border-color:#bfdbfe; color:#1d4ed8; background:var(--soft); }
|
||||
table { width:100%; border-collapse:collapse; font-size:12px; }
|
||||
th,td { padding:10px 8px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
|
||||
th { color:var(--muted); background:#f8fbff; font-weight:700; }
|
||||
tr.clickable { cursor:pointer; }
|
||||
tr.clickable:hover,tr.selected { background:#f3f7ff; }
|
||||
.badge { display:inline-flex; padding:2px 8px; border-radius:99px; font-size:11px; font-weight:800; }
|
||||
.blue { color:#175cd3; background:var(--soft); }
|
||||
.green { color:var(--green); background:#eafaf1; }
|
||||
.amber { color:var(--amber); background:#fff7e6; }
|
||||
.red { color:var(--red); background:#fff0ef; }
|
||||
.gray { color:#475569; background:#edf1f6; }
|
||||
.link { border:0; padding:0; color:#175cd3; background:transparent; font-weight:800; white-space:nowrap; }
|
||||
.muted { color:var(--muted); }
|
||||
.bd { padding:14px 16px 16px; }
|
||||
.hd { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding:14px 16px 0; }
|
||||
.hd h2 { margin:0; font-size:15px; }
|
||||
.track { position:relative; height:8px; margin:22px 28px 26px; border-radius:99px; background:#e7edf5; }
|
||||
.track i { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#93c5fd,#2563eb); }
|
||||
.marks { position:relative; height:16px; margin:-18px 28px 8px; color:var(--muted); font-size:11px; }
|
||||
.marks span { position:absolute; transform:translateX(-50%); white-space:nowrap; }
|
||||
.nodes { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
|
||||
.nodes span { padding:4px 8px; border-radius:99px; background:#f1f5f9; color:#64748b; font-size:11px; }
|
||||
.nodes span.now { color:#1d4ed8; background:#dbeafe; font-weight:800; }
|
||||
.nodes span.done { color:#067647; background:#eafaf1; }
|
||||
.kv { display:grid; grid-template-columns:108px 1fr; gap:8px; padding:8px 0; border-bottom:1px solid var(--line); font-size:12px; }
|
||||
.kv b { color:var(--muted); font-weight:700; }
|
||||
.two { display:grid; grid-template-columns:1.1fr .9fr; gap:14px; }
|
||||
.phone { width:min(420px,100%); padding:16px; border-radius:24px; color:#fff; background:#172033; }
|
||||
.phone small { display:block; color:#aab9cc; text-align:center; }
|
||||
.notice { margin-top:12px; overflow:hidden; border-radius:12px; color:var(--ink); background:#fff; }
|
||||
.notice h3 { margin:0; padding:14px 14px 4px; font-size:16px; }
|
||||
.wx-meta { margin:0; padding:0 14px 12px; color:#64748b; font-size:12px; }
|
||||
.wx-item { margin:0 12px 12px; padding:10px 12px; border:1px solid #e7edf5; border-radius:10px; background:#f8fafc; }
|
||||
.wx-item .badge { margin-bottom:8px; }
|
||||
.wx-kv { display:grid; grid-template-columns:76px 1fr; gap:6px 8px; font-size:13px; }
|
||||
.wx-kv b { color:#64748b; font-weight:700; }
|
||||
.wx-empty { margin:0; padding:0 14px 14px; color:#64748b; font-size:13px; }
|
||||
.person { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
|
||||
.person button { border:1px solid var(--line); border-radius:8px; padding:6px 8px; background:#fff; font-size:12px; }
|
||||
.person button.active { border-color:#93c5fd; background:var(--soft); }
|
||||
.ladder { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
|
||||
.rung { display:grid; gap:8px; padding:14px 14px 12px; border:1px solid var(--line); border-top:3px solid #93c5fd; border-radius:12px; background:#fff; }
|
||||
.rung:nth-child(2) { border-top-color:#2563eb; }
|
||||
.rung:nth-child(3) { border-top-color:#d97706; }
|
||||
.rung:nth-child(4) { border-top-color:#dc2626; }
|
||||
.rung .k { color:#64748b; font-size:12px; font-weight:700; }
|
||||
.rung .num { display:flex; align-items:center; gap:8px; }
|
||||
.rung input { width:4.4rem; height:2.6rem; padding:0 6px; border:1px solid #d7dee8; border-radius:8px; background:#f8fafc; font-size:22px; font-weight:750; text-align:center; }
|
||||
.rung em { color:#94a3b8; font-size:13px; font-style:normal; font-weight:650; }
|
||||
.rung small { color:#334155; font-size:12px; font-weight:700; }
|
||||
.cfg-split { display:grid; grid-template-columns:minmax(300px,380px) minmax(0,1fr); gap:14px; align-items:start; }
|
||||
.roles { display:grid; padding-top:2px; }
|
||||
.role { display:grid; grid-template-columns:108px minmax(0,1fr); gap:12px; align-items:center; margin:0; padding:11px 0; border-bottom:1px solid var(--line); color:#334155; font-size:13px; font-weight:700; }
|
||||
.role:last-child { border-bottom:0; }
|
||||
.role input,.role select { width:100%; height:36px; padding:0 10px; border:1px solid #d7dee8; border-radius:8px; background:#fbfcfe; font-weight:650; }
|
||||
.rung input:focus,.role input:focus,.role select:focus { outline:2px solid #bfdbfe; border-color:#2563eb; background:#fff; }
|
||||
.card-foot { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 16px 14px; border-top:1px solid var(--line); background:#fafbfd; }
|
||||
.rules td b { font-weight:750; }
|
||||
.toast { position:fixed; right:16px; bottom:16px; padding:10px 12px; border-radius:8px; color:#fff; background:#142036; opacity:0; transition:.2s; }
|
||||
.toast.show { opacity:1; }
|
||||
@media (max-width:860px) {
|
||||
.top,.hero,.two,.cfg-split { display:block; }
|
||||
.ladder { grid-template-columns:1fr 1fr; }
|
||||
.cfg-split > article + article { margin-top:14px; }
|
||||
.kpis { grid-template-columns:1fr 1fr; }
|
||||
.tabs { margin-top:8px; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="top">
|
||||
<div><b>设备验收预警</b><small>原型 · 样例数据 · 不接 OA</small></div>
|
||||
<nav class="tabs" id="tabs">
|
||||
<button class="active" data-v="ledger">停留情况</button>
|
||||
<button data-v="detail">单据说明</button>
|
||||
<button data-v="batch">本周汇总</button>
|
||||
<button data-v="wecom">企业微信</button>
|
||||
<button data-v="config">预警配置</button>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<p class="note" id="banner"></p>
|
||||
|
||||
<section class="view active" id="v-ledger">
|
||||
<div class="hero">
|
||||
<div>
|
||||
<h1>停留情况</h1>
|
||||
<p>进入「使用部门担当」后开始计算停留天数。这里只列出还没归档、并且可以验收的单据。样例日期相对 2026-09-30。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kpis" id="kpis"></div>
|
||||
<article class="card">
|
||||
<div class="filters" id="filters"></div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>验收单</th><th>申请人</th><th>当前节点</th><th>当前处理人</th><th>计时起点</th><th>已停留</th><th>超时</th><th>状态</th><th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="rows"></tbody>
|
||||
</table>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section class="view" id="v-detail">
|
||||
<div class="hero">
|
||||
<div><h1>单据说明</h1><p>累计天数不随节点切换清零。已发送档位保留发送时的人员,未发送档位读取当前岗位配置。</p></div>
|
||||
<button class="btn" id="backLedger" type="button">返回停留情况</button>
|
||||
</div>
|
||||
<article class="card" id="detailBody"></article>
|
||||
</section>
|
||||
|
||||
<section class="view" id="v-batch">
|
||||
<div class="hero">
|
||||
<div>
|
||||
<h1>本周待发送</h1>
|
||||
<p id="batchLead"></p>
|
||||
</div>
|
||||
<button class="btn primary" id="sendBtn">模拟周五发送</button>
|
||||
</div>
|
||||
<article class="card"><table>
|
||||
<thead><tr><th>验收单</th><th>档位</th><th>主送</th><th>抄送</th><th>结果</th></tr></thead>
|
||||
<tbody id="batchRows"></tbody>
|
||||
</table></article>
|
||||
</section>
|
||||
|
||||
<section class="view" id="v-wecom">
|
||||
<div class="hero"><div><h1>企业微信汇总</h1><p>同一收件人本周只收一条。主送和抄送都出现在这条汇总里。</p></div></div>
|
||||
<div class="two">
|
||||
<article class="card"><div class="bd"><div class="person" id="people"></div><p class="muted" id="wecomEmpty"></p></div></article>
|
||||
<div class="phone"><small>企业微信 · 应用消息</small><div class="notice"><h3 id="wxTitle">设备验收停留提醒</h3><p class="wx-meta" id="wxMeta"></p><div id="wxBody"></div></div></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="view" id="v-config">
|
||||
<div class="hero"><div><h1>预警配置</h1><p>天数默认 30、37、44、51,须逐档增大。保存后只影响尚未发送的预警。</p></div></div>
|
||||
<div class="ladder">
|
||||
<label class="rung"><span class="k">第 1 档</span><span class="num"><input id="cfgDay0" type="number" min="1" value="30" /><em>天</em></span><small id="rungWho0">当前处理人</small></label>
|
||||
<label class="rung"><span class="k">第 2 档</span><span class="num"><input id="cfgDay1" type="number" min="1" value="37" /><em>天</em></span><small id="rungWho1">经副理</small></label>
|
||||
<label class="rung"><span class="k">第 3 档</span><span class="num"><input id="cfgDay2" type="number" min="1" value="44" /><em>天</em></span><small id="rungWho2">COO</small></label>
|
||||
<label class="rung"><span class="k">第 4 档</span><span class="num"><input id="cfgDay3" type="number" min="1" value="51" /><em>天</em></span><small id="rungWho3">廖总</small></label>
|
||||
</div>
|
||||
<div class="cfg-split">
|
||||
<article class="card">
|
||||
<div class="hd"><div><h2>固定岗位</h2></div></div>
|
||||
<div class="bd roles">
|
||||
<label class="role"><span>采购经副理</span><input id="cfgBuyer" /></label>
|
||||
<label class="role"><span>COO</span><input id="cfgCoo" /></label>
|
||||
<label class="role"><span>廖总对应岗位</span><input id="cfgBoss" /></label>
|
||||
<label class="role"><span>发送时刻</span><select id="cfgWhen"><option>每周五 18:00</option><option>每周一 09:00</option><option>每天 09:00</option></select></label>
|
||||
</div>
|
||||
<div class="card-foot"><span class="muted">已发送记录保持不变</span><button class="btn primary" id="saveCfg">保存配置</button></div>
|
||||
</article>
|
||||
<article class="card">
|
||||
<div class="hd"><div><h2>取人规则</h2><p class="muted">主送对象不随天数改,只改超过多少天才触发。</p></div></div>
|
||||
<table class="rules">
|
||||
<thead><tr><th>档位</th><th>主送</th><th>抄送</th></tr></thead>
|
||||
<tbody id="ruleBox"></tbody>
|
||||
</table>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<div class="toast" id="toast"></div>
|
||||
<script>
|
||||
/**
|
||||
* 用样例单据演示四档升级、停表、再进入和按收件人汇总。
|
||||
* 核心逻辑:超过阈值且本周期未发过的档位进入待发送;停表单据不再产生新档。
|
||||
*/
|
||||
(() => {
|
||||
const LEVELS = [0, 1, 2, 3];
|
||||
const NODES = ['使用部门担当','使用部门经理','品质担当','品质经理','公用主管','设备管理部','设备管理部经理','固定资产管理人','COO审核','总经理','总务知会','归档'];
|
||||
const $ = (id) => document.getElementById(id);
|
||||
let filter = 'all';
|
||||
let selected = 'YS-2026-0160';
|
||||
let wecomPerson = '';
|
||||
let digest = null;
|
||||
const cfg = { buyer: '赵琴', coo: 'COO', boss: '廖总', when: '每周五 18:00', days: [30, 37, 44, 51] };
|
||||
const orders = [
|
||||
{ id:'YS-2026-0138', applicant:'王磊', node:'设备管理部', handlers:['陈工'], supervisor:'何主管', deputy:'周经副理', entered:'2026-08-08', days:53, cycle:1, state:'watching', sent:[0,1,2], fail:'', stop:'', note:'同一周期已发过前三档,本周只待第 4 档。' },
|
||||
{ id:'YS-2026-0142', applicant:'张敏', node:'品质经理', handlers:['李倩'], supervisor:'钱伟', deputy:'孙经理', entered:'2026-08-15', days:46, cycle:1, state:'watching', sent:[0,1], fail:'', stop:'', note:'换到品质经理后累计不重置。' },
|
||||
{ id:'YS-2026-0155', applicant:'赵丽', node:'使用部门经理', handlers:['周涛'], supervisor:'马主管', deputy:'孙经理', entered:'2026-08-23', days:38, cycle:1, state:'watching', sent:[0], fail:'', stop:'', note:'' },
|
||||
{ id:'YS-2026-0160', applicant:'孙浩', node:'公用主管', handlers:['吴敏','林可'], supervisor:'钱伟', deputy:'孙经理', entered:'2026-08-30', days:31, cycle:1, state:'watching', sent:[], fail:'', stop:'', note:'当前节点两名处理人,直接主管相同,抄送去重为钱伟。' },
|
||||
{ id:'YS-2026-0188', applicant:'刘洋', node:'品质担当', handlers:['郑凯'], supervisor:'', deputy:'孙经理', entered:'2026-08-28', days:33, cycle:1, state:'watching', sent:[], fail:'直接主管缺失', stop:'', note:'第 1 档无法解析直接主管,保持失败,不改发。' },
|
||||
{ id:'YS-2026-0172', applicant:'陈静', node:'品质担当', handlers:['郑凯'], supervisor:'钱伟', deputy:'孙经理', entered:'2026-09-10', days:20, cycle:1, state:'watching', sent:[], fail:'', stop:'', note:'未超过第 1 档,只监控不发。' },
|
||||
{ id:'YS-2026-0098', applicant:'周宁', node:'使用部门担当', handlers:['马超'], supervisor:'钱伟', deputy:'孙经理', entered:'2026-09-26', days:4, cycle:2, state:'watching', sent:[], fail:'', stop:'', note:'上一周期因无法验收停表。再次进入后从 0 计时,四档可再发。' },
|
||||
{ id:'YS-2026-0071', applicant:'吴芳', node:'品质经理', handlers:['李倩'], supervisor:'钱伟', deputy:'孙经理', entered:'2026-08-01', days:40, cycle:1, state:'stopped', sent:[0], fail:'', stop:'无法验收', note:'无法验收说明:到货规格与请购不符。未发送的后续档已取消。' },
|
||||
{ id:'YS-2026-0066', applicant:'郑明', node:'使用部门经理', handlers:['周涛'], supervisor:'马主管', deputy:'孙经理', entered:'2026-08-20', days:18, cycle:1, state:'stopped', sent:[], fail:'', stop:'退回', note:'退回后立即停表。若再次进入使用部门担当,按新周期从 0 计。' },
|
||||
{ id:'YS-2026-0201', applicant:'韩冰', node:'直属上级', handlers:['—'], supervisor:'', deputy:'', entered:'', days:0, cycle:0, state:'out', sent:[], fail:'', stop:'', note:'尚未进入使用部门担当,不计时。' }
|
||||
];
|
||||
|
||||
/**
|
||||
* 按档位序号取主送与抄送。天数读配置,人员规则不随天数变化。
|
||||
* 第 1 档取当前处理人及其主管、申请人;其后三档读固定岗位。
|
||||
*/
|
||||
function audience(order, level) {
|
||||
if (level === 0) {
|
||||
const cc = [];
|
||||
if (order.supervisor) cc.push(order.supervisor);
|
||||
cc.push(order.applicant + '(采购担当)');
|
||||
return { to: order.handlers.slice(), cc, blocked: order.supervisor ? '' : '直接主管缺失' };
|
||||
}
|
||||
if (level === 1) return { to:[order.deputy], cc:[cfg.coo, cfg.buyer], blocked: order.deputy ? '' : '经副理缺失' };
|
||||
if (level === 2) return { to:[cfg.coo], cc:[cfg.buyer], blocked:'' };
|
||||
return { to:[cfg.boss], cc:[cfg.coo, cfg.buyer], blocked:'' };
|
||||
}
|
||||
|
||||
/** 本周期已超过且尚未发送的档位序号。停表和未纳入单据不再产生待发送。 */
|
||||
function pendingTiers(order) {
|
||||
if (order.state !== 'watching') return [];
|
||||
return LEVELS.filter((level) => order.days > cfg.days[level] && !order.sent.includes(level));
|
||||
}
|
||||
|
||||
function tierLabel(days) {
|
||||
const hit = [...LEVELS].reverse().find((level) => days > cfg.days[level]);
|
||||
return hit === undefined ? '未到 ' + cfg.days[0] + ' 天' : '超过 ' + cfg.days[hit] + ' 天';
|
||||
}
|
||||
|
||||
/**
|
||||
* 把单据状态写成业务可读的标签。
|
||||
* 核心逻辑:未进节点、已停止、到点但缺人、已逾期、未超时,分别用不同文案。
|
||||
* @param order - 样例验收单
|
||||
* @returns 状态徽章 HTML
|
||||
*/
|
||||
function statusBadge(order) {
|
||||
if (order.state === 'out') return '<span class="badge gray">未开始</span>';
|
||||
if (order.state === 'stopped') {
|
||||
const reason = order.stop === '无法验收' ? '无法验收' : '已' + order.stop;
|
||||
return '<span class="badge red">' + reason + ',不再提醒</span>';
|
||||
}
|
||||
if (order.fail && pendingTiers(order).length) return '<span class="badge amber">' + order.fail + '</span>';
|
||||
if (pendingTiers(order).length) return '<span class="badge blue">已逾期</span>';
|
||||
if (order.sent.length) return '<span class="badge green">本周不提醒</span>';
|
||||
return '<span class="badge gray">未超时</span>';
|
||||
}
|
||||
|
||||
function visibleOrders() {
|
||||
return orders.filter((order) => {
|
||||
if (filter === 'watching') return order.state === 'watching';
|
||||
if (filter === 'pending') return pendingTiers(order).length > 0;
|
||||
if (filter === 'stopped') return order.state === 'stopped';
|
||||
if (filter === 'out') return order.state === 'out';
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
function toast(text) {
|
||||
$('toast').textContent = text;
|
||||
$('toast').classList.add('show');
|
||||
setTimeout(() => $('toast').classList.remove('show'), 1800);
|
||||
}
|
||||
|
||||
function go(view) {
|
||||
document.querySelectorAll('.view').forEach((item) => item.classList.toggle('active', item.id === 'v-' + view));
|
||||
document.querySelectorAll('#tabs button').forEach((item) => item.classList.toggle('active', item.dataset.v === view));
|
||||
}
|
||||
|
||||
function renderKpis() {
|
||||
const watching = orders.filter((order) => order.state === 'watching').length;
|
||||
const pending = orders.reduce((sum, order) => sum + pendingTiers(order).length, 0);
|
||||
const stopped = orders.filter((order) => order.state === 'stopped').length;
|
||||
const cards = [[watching,'进行中'],[pending,'已逾期'],[stopped,'不再提醒'],[cfg.when,'下次提醒']];
|
||||
$('kpis').innerHTML = cards.map(([value,label]) => '<article class="card metric"><b>' + value + '</b><span>' + label + '</span></article>').join('');
|
||||
}
|
||||
|
||||
function renderFilters() {
|
||||
const items = [['all','全部'],['watching','进行中'],['pending','已逾期'],['stopped','不再提醒'],['out','未开始']];
|
||||
$('filters').innerHTML = items.map(([key,label]) => '<button data-f="' + key + '" class="' + (filter === key ? 'active' : '') + '">' + label + '</button>').join('');
|
||||
}
|
||||
|
||||
/**
|
||||
* 画出停留情况表格,最后一列只放「查看详情」。
|
||||
* 核心逻辑:整行不再跳转,避免和筛选、状态混在一次点击里。
|
||||
*/
|
||||
function renderRows() {
|
||||
$('rows').innerHTML = visibleOrders().map((order) => '<tr><td><b>' + order.id + '</b>' + (order.cycle > 1 ? '<br><span class="badge green">第 ' + order.cycle + ' 周期</span>' : '') + '</td><td>' + order.applicant + '</td><td>' + order.node + '</td><td>' + order.handlers.join('、') + '</td><td>' + (order.entered || '—') + '</td><td>' + (order.state === 'out' ? '—' : order.days + ' 天') + '</td><td>' + (order.state === 'watching' ? tierLabel(order.days) : '—') + '</td><td>' + statusBadge(order) + '</td><td><button class="link" type="button" data-open="' + order.id + '">查看详情</button></td></tr>').join('');
|
||||
}
|
||||
|
||||
/**
|
||||
* 只渲染当前选中的一张验收单,不再列出其他单号。
|
||||
* 核心逻辑:按 selected 取单据,画出停留进度、节点和四档收件人。
|
||||
*/
|
||||
function renderDetail() {
|
||||
const order = orders.find((item) => item.id === selected) || orders[0];
|
||||
const nodeHtml = NODES.map((name) => {
|
||||
const index = NODES.indexOf(name);
|
||||
const current = NODES.indexOf(order.node);
|
||||
const cls = name === order.node ? 'now' : (current > index ? 'done' : '');
|
||||
return '<span class="' + cls + '">' + name + '</span>';
|
||||
}).join('');
|
||||
const scale = Math.max(60, cfg.days[3] + 9, order.days);
|
||||
const width = Math.min(100, Math.round(order.days / scale * 100));
|
||||
const markHtml = [0, ...cfg.days, scale].map((day) => '<span style="left:' + (day / scale * 100) + '%">' + (day === scale ? scale + ' 天' : day) + '</span>').join('');
|
||||
const tierRows = LEVELS.map((level) => {
|
||||
const tier = cfg.days[level];
|
||||
const due = order.days > tier;
|
||||
const sent = order.sent.includes(level);
|
||||
const people = audience(order, level);
|
||||
let state = '未到档';
|
||||
if (order.state === 'stopped' && due && !sent) state = '已取消';
|
||||
else if (sent) state = '已发送';
|
||||
else if (due && people.blocked) state = '失败:' + people.blocked;
|
||||
else if (due) state = '待发送';
|
||||
return '<tr><td>超过 ' + tier + ' 天</td><td>' + people.to.join('、') + '</td><td>' + people.cc.join('、') + '</td><td>' + state + '</td></tr>';
|
||||
}).join('');
|
||||
$('detailBody').innerHTML = '<div class="hd"><div><h2>' + order.id + '</h2><p class="muted">' + order.note + '</p></div>' + statusBadge(order) + '</div><div class="bd"><div class="track"><i style="width:' + width + '%"></i></div><div class="marks">' + markHtml + '</div><div class="nodes">' + nodeHtml + '</div><div class="kv"><b>计时起点</b><span>' + (order.entered || '未进入') + ' · 第 ' + Math.max(order.cycle, 1) + ' 周期</span></div><div class="kv"><b>当前处理人</b><span>' + order.handlers.join('、') + '</span></div><div class="kv"><b>直接主管 / 经副理</b><span>' + (order.supervisor || '缺失') + ' / ' + (order.deputy || '—') + '</span></div><div class="kv"><b>采购担当</b><span>' + order.applicant + '(流程申请人)</span></div>' + (order.stop ? '<div class="kv"><b>停表</b><span>' + order.stop + '</span></div>' : '') + '<table style="margin-top:12px"><thead><tr><th>档位</th><th>主送</th><th>抄送</th><th>本周期</th></tr></thead><tbody>' + tierRows + '</tbody></table></div>';
|
||||
}
|
||||
|
||||
function batchItems() {
|
||||
const items = [];
|
||||
orders.forEach((order) => {
|
||||
pendingTiers(order).forEach((level) => {
|
||||
const people = audience(order, level);
|
||||
items.push({ order, tier: cfg.days[level], level, people });
|
||||
});
|
||||
});
|
||||
return items;
|
||||
}
|
||||
|
||||
function renderBatch() {
|
||||
$('batchLead').textContent = '每日扫描只生成待发送。当前配置为' + cfg.when + ',按收件人合并后推送。';
|
||||
const items = digest || batchItems().map((item) => ({ id:item.order.id, tier:item.tier, to:item.people.to, cc:item.people.cc, blocked:item.people.blocked, sent:false }));
|
||||
$('batchRows').innerHTML = items.length ? items.map((item) => '<tr><td><b>' + item.id + '</b></td><td>超过 ' + item.tier + ' 天</td><td>' + item.to.join('、') + '</td><td>' + item.cc.join('、') + '</td><td>' + (item.blocked ? '<span class="badge amber">' + item.blocked + '</span>' : (item.sent ? '<span class="badge green">已发送</span>' : '<span class="badge blue">待发送</span>')) + '</td></tr>').join('') : '<tr><td colspan="5">本周没有待发送档位</td></tr>';
|
||||
}
|
||||
|
||||
/**
|
||||
* 按收件人归集本周要发的企业微信内容。
|
||||
* 核心逻辑:主送、抄送各记一条结构化单据,避免拼成一行后字段粘在一起。
|
||||
* @returns 收件人姓名到单据列表的映射
|
||||
*/
|
||||
function messages() {
|
||||
const bag = {};
|
||||
const source = digest
|
||||
? digest.filter((item) => item.sent && !item.blocked)
|
||||
: batchItems().filter((item) => !item.people.blocked).map((item) => ({
|
||||
id: item.order.id,
|
||||
tier: item.tier,
|
||||
to: item.people.to,
|
||||
cc: item.people.cc,
|
||||
node: item.order.node,
|
||||
days: item.order.days,
|
||||
handlers: item.order.handlers.join('、'),
|
||||
applicant: item.order.applicant
|
||||
}));
|
||||
source.forEach((item) => {
|
||||
const card = { id: item.id, tier: item.tier, node: item.node, days: item.days, handlers: item.handlers, applicant: item.applicant };
|
||||
item.to.forEach((name) => pushMsg(bag, name, '主送', card));
|
||||
item.cc.forEach((name) => pushMsg(bag, name.replace('(采购担当)', ''), '抄送', card));
|
||||
});
|
||||
return bag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 把一张验收单记到某个收件人的汇总里。
|
||||
* @param bag - 收件人到单据列表的映射
|
||||
* @param name - 收件人姓名
|
||||
* @param role - 主送或抄送
|
||||
* @param card - 单号、超时、节点、处理人和申请人
|
||||
*/
|
||||
function pushMsg(bag, name, role, card) {
|
||||
if (!bag[name]) bag[name] = [];
|
||||
bag[name].push({ role, id: card.id, tier: card.tier, node: card.node, days: card.days, handlers: card.handlers, applicant: card.applicant });
|
||||
}
|
||||
|
||||
/**
|
||||
* 把文本转成可放进消息卡片的 HTML。
|
||||
* @param text - 原始文本
|
||||
* @returns 转义后的字符串
|
||||
*/
|
||||
function esc(text) {
|
||||
return String(text).replace(/[&<>"]/g, (ch) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[ch]));
|
||||
}
|
||||
|
||||
/**
|
||||
* 画出当前收件人的企业微信卡片,每张验收单单独分行。
|
||||
* 核心逻辑:标题下只留接收人和发送时刻,单据用「验收单 / 已停留 / 超时 / 当前节点 / 当前处理人」分列。
|
||||
*/
|
||||
function renderWecom() {
|
||||
const bag = messages();
|
||||
const names = Object.keys(bag);
|
||||
$('wxTitle').textContent = '设备验收停留提醒';
|
||||
if (!names.length) {
|
||||
$('people').innerHTML = '';
|
||||
$('wecomEmpty').textContent = '本周没有可发送的汇总。找不到主管的单据不会改发给别人。';
|
||||
$('wxMeta').textContent = '';
|
||||
$('wxBody').innerHTML = '<p class="wx-empty">暂无消息</p>';
|
||||
return;
|
||||
}
|
||||
$('wecomEmpty').textContent = '找不到直接主管的 YS-2026-0188 不进入任何收件人汇总。';
|
||||
if (!names.includes(wecomPerson)) wecomPerson = names[0];
|
||||
$('people').innerHTML = names.map((name) => '<button data-p="' + name + '" class="' + (name === wecomPerson ? 'active' : '') + '">' + name + ' · ' + bag[name].length + ' 条</button>').join('');
|
||||
const items = bag[wecomPerson];
|
||||
$('wxMeta').textContent = '发给 ' + wecomPerson + ' · ' + cfg.when + ' · 共 ' + items.length + ' 条';
|
||||
$('wxBody').innerHTML = items.map((item) => '<article class="wx-item"><span class="badge ' + (item.role === '主送' ? 'blue' : 'gray') + '">' + item.role + '</span><div class="wx-kv"><b>验收单</b><span>' + esc(item.id) + '</span><b>已停留</b><span>' + item.days + ' 天</span><b>超时</b><span>超过 ' + item.tier + ' 天</span><b>当前节点</b><span>' + esc(item.node) + '</span><b>当前处理人</b><span>' + esc(item.handlers) + '</span><b>申请人</b><span>' + esc(item.applicant) + '</span></div></article>').join('');
|
||||
}
|
||||
|
||||
/**
|
||||
* 用当前已保存的天数和固定岗位重绘右侧规则表,并同步阶梯上的主送简称。
|
||||
* 核心逻辑:四档主送对象固定,只把超过 N 天和抄送姓名换成 cfg 里的值。
|
||||
*/
|
||||
function renderRules() {
|
||||
const rows = [
|
||||
[cfg.days[0], '当前节点处理人', '直接主管、采购担当'],
|
||||
[cfg.days[1], '当前处理人的经副理', cfg.coo + '、' + cfg.buyer],
|
||||
[cfg.days[2], cfg.coo, cfg.buyer],
|
||||
[cfg.days[3], cfg.boss, cfg.coo + '、' + cfg.buyer]
|
||||
];
|
||||
$('ruleBox').innerHTML = rows.map(([day, to, cc]) => '<tr><td><b>超过 ' + day + ' 天</b></td><td>' + to + '</td><td>' + cc + '</td></tr>').join('')
|
||||
+ '<tr><td><b>解析失败</b></td><td colspan="2">保持失败可追查,不改发给别人</td></tr>';
|
||||
['当前处理人', '经副理', cfg.coo, cfg.boss].forEach((text, index) => { $('rungWho' + index).textContent = text; });
|
||||
$('banner').textContent = '从第一次进入「使用部门担当」起按自然日累计,换节点不重新计算。超过 ' + cfg.days.join('/') + ' 天各提醒一次,' + cfg.when + ' 合并成一条企业微信。无法验收、退回、撤回、作废或归档后不再提醒。';
|
||||
}
|
||||
|
||||
function renderConfig() {
|
||||
cfg.days.forEach((day, index) => { $('cfgDay' + index).value = day; });
|
||||
$('cfgBuyer').value = cfg.buyer;
|
||||
$('cfgCoo').value = cfg.coo;
|
||||
$('cfgBoss').value = cfg.boss;
|
||||
$('cfgWhen').value = cfg.when;
|
||||
renderRules();
|
||||
}
|
||||
|
||||
function render() {
|
||||
renderRules();
|
||||
renderKpis();
|
||||
renderFilters();
|
||||
renderRows();
|
||||
renderDetail();
|
||||
renderBatch();
|
||||
renderWecom();
|
||||
}
|
||||
|
||||
$('tabs').addEventListener('click', (event) => {
|
||||
const button = event.target.closest('[data-v]');
|
||||
if (button) go(button.dataset.v);
|
||||
});
|
||||
$('filters').addEventListener('click', (event) => {
|
||||
const button = event.target.closest('[data-f]');
|
||||
if (!button) return;
|
||||
filter = button.dataset.f;
|
||||
renderFilters();
|
||||
renderRows();
|
||||
});
|
||||
$('rows').addEventListener('click', (event) => {
|
||||
const button = event.target.closest('[data-open]');
|
||||
if (!button) return;
|
||||
selected = button.dataset.open;
|
||||
renderDetail();
|
||||
go('detail');
|
||||
});
|
||||
$('backLedger').addEventListener('click', () => go('ledger'));
|
||||
$('people').addEventListener('click', (event) => {
|
||||
const button = event.target.closest('[data-p]');
|
||||
if (!button) return;
|
||||
wecomPerson = button.dataset.p;
|
||||
renderWecom();
|
||||
});
|
||||
$('saveCfg').addEventListener('click', () => {
|
||||
const days = LEVELS.map((level) => Number($('cfgDay' + level).value));
|
||||
if (days.some((day) => !Number.isInteger(day) || day < 1) || days.some((day, index) => index > 0 && day <= days[index - 1])) {
|
||||
toast('四档天数须为逐档增大的正整数。');
|
||||
return;
|
||||
}
|
||||
cfg.days = days;
|
||||
cfg.buyer = $('cfgBuyer').value.trim() || cfg.buyer;
|
||||
cfg.coo = $('cfgCoo').value.trim() || cfg.coo;
|
||||
cfg.boss = $('cfgBoss').value.trim() || cfg.boss;
|
||||
cfg.when = $('cfgWhen').value;
|
||||
render();
|
||||
toast('已保存。尚未发送的档位改用新天数和新岗位,已发送记录不变。');
|
||||
});
|
||||
$('sendBtn').addEventListener('click', () => {
|
||||
if (digest) { toast('本轮示意已经发送过。'); return; }
|
||||
const items = batchItems();
|
||||
digest = items.map((item) => ({ id:item.order.id, tier:item.tier, to:item.people.to.slice(), cc:item.people.cc.slice(), blocked:item.people.blocked, node:item.order.node, days:item.order.days, handlers:item.order.handlers.join('、'), applicant:item.order.applicant, sent:!item.people.blocked }));
|
||||
items.forEach((item) => { if (!item.people.blocked) item.order.sent.push(item.level); });
|
||||
render();
|
||||
go('wecom');
|
||||
toast('示意:已按收件人发送汇总,失败单据仍留在台账。');
|
||||
});
|
||||
renderConfig();
|
||||
render();
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -41,6 +41,13 @@
|
||||
| 合同付款 Agent 授权 | 已实现 | 入口为 Chat builtin Agent `contract_payment`:平台管理员默认可访问;权限组启用后把该 Agent 勾到角色包即可,不再按人授权。旧功能权限 `contract_payment.access` 由迁移写入 Agent 授权后删除。无授权直链提示并回应用管理,API 返回 403。同步 OA、强制覆盖、批量重解析、扫描预警和发送预警仅平台管理员可见并可调用。 |
|
||||
| OA 盖章合同优先 | 已实现 | 合同申请单存在“盖章完成合同上传”时固定优先下载和解析该附件;“合同附件”仅作为失败降级来源。 |
|
||||
|
||||
## 设备验收预警
|
||||
|
||||
| 功能项 | 状态 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 停留预警规则 | 需求已冻结 | 从第一次进入「使用部门担当」起按自然日累计,直到停表。只监控未归档、有效、可以验收的 OA 资产验收单。退回或无法验收后再次进入且重新可以验收时,按新周期从 0 计时。权威:[features/equipment-acceptance-warning/demand.md](features/equipment-acceptance-warning/demand.md)。 |
|
||||
| 四档企业微信升级 | 待 OA 视图 | 超过 30/37/44/51 天各发一次。担当、直接主管、经副理取当前节点处理人及其上级;采购担当取流程申请人。采购经副理、COO、廖总为可配置固定岗位。每日扫描只生成待发送,初始每周五 18:00 按收件人汇总。视图到位前不写同步、计时和推送。 |
|
||||
|
||||
## 知识库同步状态校验
|
||||
|
||||
## 货代发货通知五阶段
|
||||
|
||||
Reference in new issue
Block a user