weaver-work-cli 0.1.50 → 0.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunks/{attachment-content-EJYIOJPH.js → attachment-content-W3TSJC3Y.js} +3 -3
- package/dist/chunks/{chunk-BFKLQLBK.js → chunk-2J3XY4ED.js} +7 -7
- package/dist/chunks/{chunk-K67FODVC.js → chunk-6GCXWKG6.js} +1 -1
- package/dist/chunks/{chunk-WNJUGI2F.js → chunk-76PRVYH4.js} +1 -1
- package/dist/chunks/{chunk-RYFRGTUV.js → chunk-DEHJ7PMA.js} +4 -4
- package/dist/chunks/{chunk-3NCFFHB2.js → chunk-IF33CG4V.js} +1 -1
- package/dist/chunks/{chunk-YB3AJYPY.js → chunk-PE334WL3.js} +4 -4
- package/dist/chunks/{chunk-MCZG6HPM.js → chunk-QQXMHM3J.js} +2 -2
- package/dist/chunks/{chunk-7ECB22G3.js → chunk-U7ROML5E.js} +23 -23
- package/dist/chunks/{chunk-7AYQJSFY.js → chunk-WTLQGS6D.js} +2 -2
- package/dist/chunks/{chunk-6T53BSWZ.js → chunk-XPQN4E5O.js} +50 -19
- package/dist/chunks/{chunk-HARQF5IP.js → chunk-Z4G7LLDD.js} +25 -25
- package/dist/chunks/{conflict-C4UDHCWV.js → conflict-57WDJWL7.js} +2 -2
- package/dist/chunks/{contract-VUC6JOPG.js → contract-LJRAXVZU.js} +8587 -1421
- package/dist/chunks/{create-flow-6OG2LYBD.js → create-flow-3FMMZBCA.js} +6 -6
- package/dist/chunks/{data-QO7QWOIV.js → data-WK5CQXNF.js} +17 -32
- package/dist/chunks/{env-WP57TF2S.js → env-JYZE3BZB.js} +2 -2
- package/dist/chunks/{factory-VUXI7N5C.js → factory-66SCIKW3.js} +1 -1
- package/dist/chunks/{group-chat-UQRGXILK.js → group-chat-MNRYMLNG.js} +3 -3
- package/dist/chunks/{invoice-E7GOITEU.js → invoice-V7ZTITUO.js} +725 -205
- package/dist/chunks/{meeting-4BBLVAWM.js → meeting-IIY4UAJL.js} +10 -10
- package/dist/chunks/{recruit-stage-FKWS5UQF.js → recruit-stage-XCMVEQA2.js} +718 -131
- package/dist/chunks/{registry-V4CHRQDI.js → registry-CJOVECZD.js} +1 -1
- package/dist/chunks/{registry-5CRCN2TV.js → registry-METZ2LWE.js} +10 -10
- package/dist/chunks/{room-recommend-AYR3UG7R.js → room-recommend-YFY7HTOF.js} +4 -4
- package/dist/chunks/{schedule-JZEFIXUS.js → schedule-6I63TERA.js} +4 -4
- package/dist/chunks/smart-extract-FOUYNIG3.js +2882 -0
- package/dist/chunks/{workflow-3ZAF2J5E.js → workflow-YHXFIU63.js} +1 -1
- package/dist/index.js +11 -6
- package/dist/shortcuts/contract/manifest.js +251 -0
- package/dist/shortcuts/contract/ooxml/docx-table.js +233 -0
- package/dist/shortcuts/contract/operations/card-action.js +1165 -0
- package/dist/shortcuts/contract/operations/card-ebdf-list.js +571 -0
- package/dist/shortcuts/contract/operations/card-plan.js +327 -0
- package/dist/shortcuts/contract/operations/card-risk-report.js +565 -0
- package/dist/shortcuts/contract/operations/card.js +6 -5
- package/dist/shortcuts/contract/operations/docx-fillfromquote.js +532 -0
- package/dist/shortcuts/contract/operations/docx-verify.js +258 -0
- package/dist/shortcuts/contract/operations/elements-build.js +761 -0
- package/dist/shortcuts/contract/operations/elements-spec.js +216 -0
- package/dist/shortcuts/contract/operations/first-screen.js +588 -0
- package/dist/shortcuts/contract/operations/flow.js +81 -25
- package/dist/shortcuts/contract/operations/ledger.js +438 -0
- package/dist/shortcuts/contract/operations/modeltext.js +132 -0
- package/dist/shortcuts/contract/operations/op-resolver.js +22 -0
- package/dist/shortcuts/contract/operations/performance.js +104 -3
- package/dist/shortcuts/contract/operations/quote.js +131 -25
- package/dist/shortcuts/contract/operations/quotescreen.js +529 -0
- package/dist/shortcuts/contract/operations/registry.js +30 -0
- package/dist/shortcuts/contract/operations/review.js +73 -58
- package/dist/shortcuts/contract/operations/summary-validate.js +293 -0
- package/dist/shortcuts/contract/operations/summary.js +4 -2
- package/dist/shortcuts/contract/operations/triage.js +1100 -0
- package/dist/shortcuts/contract/operations/upload.js +48 -7
- package/dist/shortcuts/contract/prewarm-cache.js +90 -0
- package/dist/shortcuts/contract/prewarm.js +88 -0
- package/dist/shortcuts/contract/upload-cache.js +49 -4
- package/dist/shortcuts/data/index.js +1 -6
- package/dist/shortcuts/data/manifest.js +2 -2
- package/dist/shortcuts/data/operations/index.js +1 -1
- package/dist/shortcuts/data/operations/query.js +23 -46
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/invoice/index.js +0 -12
- package/dist/shortcuts/invoice/manifest.js +200 -49
- package/dist/shortcuts/invoice/operations/registry.js +4 -2
- package/dist/shortcuts/invoice/operations/reim-relation.js +438 -0
- package/dist/shortcuts/invoice/operations/shared.js +3 -19
- package/dist/shortcuts/invoice/operations/upload-and-validate.js +109 -73
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +4 -2
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +6 -2
- package/dist/shortcuts/recruit-stage/operations/list.js +217 -1
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +144 -158
- package/dist/shortcuts/recruit-stage/operations/search.js +348 -0
- package/dist/shortcuts/recruit-stage/shared.js +5 -0
- package/dist/shortcuts/recruit-stage/tag-lookup.js +136 -0
- package/dist/shortcuts/smart-extract/constants.js +79 -0
- package/dist/shortcuts/smart-extract/continuation.js +71 -0
- package/dist/shortcuts/smart-extract/errors.js +68 -0
- package/dist/shortcuts/smart-extract/host.js +191 -0
- package/dist/shortcuts/smart-extract/index.js +105 -0
- package/dist/shortcuts/smart-extract/ledger.js +70 -0
- package/dist/shortcuts/smart-extract/manifest.js +35 -0
- package/dist/shortcuts/smart-extract/operations/attachment.js +212 -0
- package/dist/shortcuts/smart-extract/operations/batch.js +67 -0
- package/dist/shortcuts/smart-extract/operations/config.js +118 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +492 -0
- package/dist/shortcuts/smart-extract/operations/preview.js +174 -0
- package/dist/shortcuts/smart-extract/operations/registry.js +34 -0
- package/dist/shortcuts/smart-extract/operations/save.js +355 -0
- package/dist/shortcuts/smart-extract/operations/shared.js +191 -0
- package/dist/shortcuts/smart-extract/operations/structure.js +401 -0
- package/dist/shortcuts/smart-extract/operations/target.js +167 -0
- package/dist/shortcuts/smart-extract/operations/types.js +22 -0
- package/dist/shortcuts/smart-extract/operations/validate.js +454 -0
- package/dist/shortcuts/workflow/operations/form.js +68 -33
- package/dist/shortcuts/workflow/operations/read.js +19 -1
- package/docs/SKILL.md +1 -1
- package/docs/_catalog.md +3 -0
- package/docs/agent-invoice.md +5 -7
- package/docs/data.md +5 -1
- package/docs/fna.md +14 -1
- package/docs/invoice.md +7 -5
- package/docs/smart-extract.md +156 -0
- package/package.json +1 -1
- package/skill-template/business-info.json +16 -1
- package/skill-template/domains/qiyecheng.md +2 -0
- package/skill-template/domains/smart-extract.md +16 -0
- package/skill-template/domains/yepiaotong.md +2 -2
- package/skills/weaver-e10-data/references/scene-and-misc.md +4 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +223 -35
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +47 -481
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +11 -11
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +32 -16
- package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +478 -0
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +39 -61
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +18 -13
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +21 -6
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +6 -4
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +263 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +525 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +36 -0
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +128 -0
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +87 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +80 -54
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +110 -14
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +19 -21
- package/skills/weaver-e10-jinchengda/references/orchestration.md +12 -12
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +1 -6
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +2 -1
- package/skills/weaver-e10-qiyecheng/SKILL.md +37 -0
- package/skills/weaver-e10-qiyecheng/references/ai-check-audit.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +25 -0
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +8 -0
- package/skills/weaver-e10-qiyecheng/references/expense-chart.md +9 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +13 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/self-hosted-mode.md +239 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +34 -27
- package/skills/weaver-e10-recruit-stage/SKILL.md +62 -4
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +42 -8
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +79 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +11 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +3 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +153 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +7 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +66 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +156 -42
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +122 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +36 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +157 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +35 -0
- package/skills/weaver-e10-smart-extract/SKILL.md +180 -0
- package/skills/weaver-e10-smart-extract/references/api-contract.md +71 -0
- package/skills/weaver-e10-smart-extract/references/result-format.md +102 -0
- package/skills/weaver-e10-smart-extract/references/troubleshooting.md +106 -0
- package/skills/weaver-e10-workflow/references/workflow-create.md +6 -5
- package/skills/weaver-e10-workflow/references/workflow-edit.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
- package/skills/weaver-e10-yepiaotong/SKILL.md +46 -33
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +19 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +8 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +407 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +12 -8
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +97 -39
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +91 -2
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +12 -12
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +8 -4
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +136 -91
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +109 -23
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +110 -43
- package/dist/shortcuts/invoice/operations/validate-preview.js +0 -40
- package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +0 -279
- package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +0 -450
- package/skills/weaver-e10-jinchengda/scripts/render_ebdf_list_card.py +0 -265
- package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +0 -358
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +0 -588
- package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +0 -118
- package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +0 -40
|
@@ -1,46 +1,52 @@
|
|
|
1
1
|
# 话费 / 油费补贴报销规范
|
|
2
2
|
|
|
3
3
|
> **话费(电话费)和油费补贴报销按本文件走**,不走普通报销的「查最近一周发票 → 用户确认 → 按日期匹配事前申请」。
|
|
4
|
-
>
|
|
4
|
+
> 事前申请先用上传发票时登记的,没登记再自动查固定流程,都不问用户,**提交了就能报,不用等审批通过**;都没有就给出发起事前申请的链接。**不走表单填单、不拦金额**:报销金额按发票价税合计,超过事前申请的「月补贴额度」时按额度报,直接用 `invoice.reim.subsidy.submit` 创建并提交报销流程,最后只给用户一个流程链接。
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## 何时适用(满足任一即可)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
10
|
+
|
|
11
|
+
| 判断依据 | 话费 | 油费 |
|
|
12
|
+
| ------------ | ------------------------ | ------------------------ |
|
|
13
|
+
| 用户表述 | 话费、电话费、手机费、通讯费 + 报销 / 补贴 | 油费、加油费、油票、私车公用 + 报销 / 补贴 |
|
|
14
|
+
| 事前申请或报销工作流名称 | 含「话费」 | 含「油费」或「私车公用」 |
|
|
15
|
+
|
|
14
16
|
|
|
15
17
|
用户常见说法(以 11 月为例):「帮我报销上月的话费补贴」「帮我发起本月我的话费补贴报销」「报一下油费补贴」。话里的「上月 / 本月 / 10 月」**只决定标题和事由里的月份,不用来筛发票**。
|
|
16
18
|
|
|
17
|
-
普通报销查到的发票里混有话费 / 油费发票时,这几张单独按本文件第 3、4
|
|
19
|
+
普通报销查到的发票里混有话费 / 油费发票时,这几张单独按本文件第 3、4 步处理(按第 3 步找事前申请,用 `invoice.reim.subsidy.submit` 单独提交),其余发票照普通报销走。
|
|
18
20
|
|
|
19
21
|
---
|
|
20
22
|
|
|
23
|
+
|
|
24
|
+
|
|
21
25
|
## 第 1 步:查票夹里的话费 / 油费发票(全部历史,不按月份筛)
|
|
22
26
|
|
|
23
|
-
`invoice.list` 加 `--view summary`,**不传任何日期参数**(不传 `consumption_tm_
|
|
27
|
+
`invoice.list` 加 `--view summary`,**不传任何日期参数**(不传 `consumption_tm_`* / `date_*`),只按消费内容关键词查;CLI 默认只查未报销发票。各关键词并行查,按 `fid` 合并去重:
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
| 场景 | `content` 关键词 |
|
|
31
|
+
| ------------ | ---------------- |
|
|
32
|
+
| 话费(电信服务、通讯类) | `通讯`、`通信`、`电信服务` |
|
|
33
|
+
| 油费 | `汽油`、`柴油` |
|
|
24
34
|
|
|
25
|
-
| 场景 | `content` 关键词 |
|
|
26
|
-
| --- | --- |
|
|
27
|
-
| 话费(电信服务、通讯类) | `电信服务`、`通讯`、`通信` |
|
|
28
|
-
| 油费 | `汽油`、`柴油` |
|
|
29
35
|
|
|
30
36
|
macOS/Linux(bash/zsh):
|
|
31
37
|
|
|
32
38
|
```bash
|
|
33
|
-
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"content":"电信服务"}'
|
|
34
39
|
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"content":"通讯"}'
|
|
35
40
|
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"content":"通信"}'
|
|
41
|
+
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"content":"电信服务"}'
|
|
36
42
|
```
|
|
37
43
|
|
|
38
44
|
Windows PowerShell:
|
|
39
45
|
|
|
40
46
|
```powershell
|
|
41
|
-
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"content":"电信服务"}'
|
|
42
47
|
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"content":"通讯"}'
|
|
43
48
|
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"content":"通信"}'
|
|
49
|
+
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"content":"电信服务"}'
|
|
44
50
|
```
|
|
45
51
|
|
|
46
52
|
油费把 `content` 换成 `汽油`、`柴油`。
|
|
@@ -48,10 +54,12 @@ weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"p
|
|
|
48
54
|
- `hasMore=true` 就按 `start_pos += 50` 翻页直到取完。**上个月及更早的发票都要带上,不能只取当月。**
|
|
49
55
|
- 合并后逐张核对,对不上的剔掉:话费票的 `content` 含「电信服务」「通信」「通讯」「话费」,或销方 `payer` 是中国移动 / 中国联通 / 中国电信 / 中国广电;油费票的 `content` 含「汽油」「柴油」「成品油」「燃油」。
|
|
50
56
|
- `reimRequests` 不为空的已挂在别的报销单上,不列入,避免重复报销。
|
|
51
|
-
- 票夹(台账)里已有的发票**不做查验**:不看 `valid
|
|
57
|
+
- 票夹(台账)里已有的发票**不做查验**:不看 `valid`,也不重新查验,查验状态不影响列入。
|
|
52
58
|
- 剩下的发票**全部传给第 4 步,不让用户挑、不等用户确认**(超过月补贴额度时,额度用完后的发票由 CLI 留到下次,见第 4 步)。
|
|
53
59
|
- 用户说票夹里有、但关键词都没查到时,再按销方 `payer_company` 查一次(如 `中国移动`),不要放宽成全票夹。
|
|
54
60
|
|
|
61
|
+
|
|
62
|
+
|
|
55
63
|
## 第 2 步:票夹里没有 → 提醒用户上传,上传的发票必须查验
|
|
56
64
|
|
|
57
65
|
一张可报的都没有时,告诉用户「票夹里没有可报销的{话费 / 油费}发票,请上传发票」,然后停下等用户。
|
|
@@ -59,38 +67,53 @@ weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"p
|
|
|
59
67
|
用户发来发票文件后:
|
|
60
68
|
|
|
61
69
|
1. 先按 SKILL 提醒:文件会上传到 E10 业票通和 OCR / 查验服务,也可能进入大模型上下文;等用户明确确认。
|
|
62
|
-
2. 按 [invoice-
|
|
63
|
-
3.
|
|
70
|
+
2. 按 [invoice-upload-and-validate.md](invoice-upload-and-validate.md) 每个文件调用一次 `invoice.upload-and-validate`,一步完成上传、识别、查验并进票夹。
|
|
71
|
+
3. 上传后重跑第 1 步的查询。**本次上传的发票**(`invoice.upload-and-validate` 返回的 `invoices[].fid`)按下表逐张校验;查询结果里原本就在票夹的发票按第 1 步处理,不查验。报销意图下上传的发票不走 [invoice-reim-relation.md](invoice-reim-relation.md) 的上传登记(不要问要不要登记),事前申请照第 3 步找:
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
| 校验项 | 通过条件 | 不通过时怎么告诉用户 |
|
|
75
|
+
| ---------- | ---------------------------------------------------------------------------------------------- | -------------------------------- |
|
|
76
|
+
| 查验 | 上传返回的 `ret.ret=0`(识别并查验成功),**或** `ret.ret=6022` **/** `ret.message` **含「每天最多查验」**(见下方「查验次数用完」) | 这张发票查验没通过(附上 `ret.message`),不能报销 |
|
|
77
|
+
| 是话费 / 油费发票 | 按第 1 步的核对规则 | 这张不是{话费 / 油费}发票,不能走{话费 / 油费}报销 |
|
|
78
|
+
| 没挂在其他报销单上 | `reimRequests` 为空 | 这张已挂在「{报销单名称}」上,不能重复报销 |
|
|
64
79
|
|
|
65
|
-
| 校验项 | 通过条件 | 不通过时怎么告诉用户 |
|
|
66
|
-
| --- | --- | --- |
|
|
67
|
-
| 查验 | `valid=1`(有效已查验);`valid` 不是 1(如 `3` 查验失败、`2` 有效未查验)时,用 `invoice.validate.preview`(`fid`、`scope:"personal"`)补查一次,返回 `valid=1` **或返回「单张发票每天最多查验5次」**都算通过(见下方「查验次数用完」) | 这张发票查验没通过,不能报销 |
|
|
68
|
-
| 是话费 / 油费发票 | 按第 1 步的核对规则 | 这张不是{话费 / 油费}发票,不能走{话费 / 油费}报销 |
|
|
69
|
-
| 没挂在其他报销单上 | `reimRequests` 为空 | 这张已挂在「{报销单名称}」上,不能重复报销 |
|
|
70
80
|
|
|
71
|
-
用户说已经在 E10 票夹里传好了 → 这些是台账里的发票,直接重跑第 1 步,按第 1
|
|
81
|
+
用户说已经在 E10 票夹里传好了 → 这些是台账里的发票,直接重跑第 1 步,按第 1 步处理,**不查验**。
|
|
72
82
|
|
|
73
|
-
|
|
83
|
+
上传返回「发票已被您添加,请前往票夹确认」(`1705`)时,这张已经在票夹里,不是上传失败,也不要重复上传。第 1 步没查到它,说明它不是话费 / 油费发票,或已经在报销中 / 已报销。用 `invoice.list` 传发票号码 `number` 和 `sreim:"0"` 查一次,把它的状态告诉用户。
|
|
74
84
|
|
|
75
85
|
### 查验次数用完:视为查验通过
|
|
76
86
|
|
|
77
87
|
同一张发票每天最多查验 5 次。查验时返回「单张发票每天最多查验5次」(错误码 `6022`)**不算查验失败,视为查验通过**,继续后面的报销,不要重试查验。
|
|
78
88
|
|
|
79
|
-
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
| `invoice.upload-and-validate` 的 `
|
|
89
|
+
|
|
90
|
+
| 在哪里遇到 | 怎么继续 |
|
|
91
|
+
| ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
92
|
+
| `invoice.upload-and-validate` 的 `invoices[].ret.ret=6022`,或 `ret.message` 含「每天最多查验」 | `fid` 非空就算查验通过。`fid` 为空说明没进票夹:这个文件一张都没进票夹时,对它 `invoice.import.prepare`(`validate=false`、`syncToOa=true`),告诉用户原因并确认后 `invoice.import.apply`,导入后算查验通过;同一文件里已有别的发票进了票夹,不要重传整个文件,请用户把这张单独上传 |
|
|
83
93
|
| `invoice.import.apply` 的失败项(`error.details.failed[]`,部分成功时是返回里的 `failed[]`)`ret.ret=6022`,或 `ret.message` 含「每天最多查验」 | 失败项带 `info.fid` 就用这个 `fid`,算查验通过。没有 `fid` 说明没进票夹:如果这个文件一张都没导入成功,就对它重新 `invoice.import.prepare`(`validate=false`、`syncToOa=true`),告诉用户原因并确认后 `invoice.import.apply`,导入后算查验通过;如果同一文件里已有别的发票导入成功,不要重导整个文件,请用户把这张单独上传 |
|
|
84
94
|
|
|
85
|
-
## 第 3 步:自动找固定的事前申请流程(不用确认)
|
|
86
95
|
|
|
87
|
-
话费、油费的事前申请流程是固定的,用 `weaver-e10-workflow` 的 `workflow.search` 查「我发起的」。调用前先读 [`../../weaver-e10-workflow/SKILL.md`](../../weaver-e10-workflow/SKILL.md) 和 [`workflow-query.md`](../../weaver-e10-workflow/references/workflow-query.md);发起链接用的 `workflow.pageOpen` 读 [`workflow-view.md`](../../weaver-e10-workflow/references/workflow-view.md)(workflow 使用契约,不能省略):
|
|
88
96
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
97
|
+
|
|
98
|
+
## 第 3 步:找事前申请流程(先用登记的,不用确认)
|
|
99
|
+
|
|
100
|
+
按下面的顺序找,找到就用,**不问用户**:
|
|
101
|
+
|
|
102
|
+
1. **上传发票时登记的事前申请**([invoice-reim-relation.md](invoice-reim-relation.md)「三、话费 / 油费」):第 1 步返回后,用列入的发票 `fid` 调一次 `invoice.reim.relation.list`,看 `groups.preApprovals`。
|
|
103
|
+
2. **没登记** → 用 `workflow.search` 查固定的事前申请流程(我发起的)兜底。
|
|
104
|
+
3. **都没有** → 给出发起事前申请的链接(见下方「发起事前申请链接」),停止。
|
|
105
|
+
|
|
106
|
+
`workflow.search` 有没有登记都要调:月补贴额度、是不是草稿只能从它的结果里看。它和第 1 步都是只读,**同时发起**;`invoice.reim.relation.list` 要等第 1 步拿到 `fid`,查询失败(`failed` 非空)的发票按没登记处理,不告诉用户。第 2 步在报销流程里上传的发票没有登记,按 `workflow.search` 结果找。
|
|
107
|
+
|
|
108
|
+
`workflow.search` 属于 `weaver-e10-workflow`,调用前先读 `[../../weaver-e10-workflow/SKILL.md](../../weaver-e10-workflow/SKILL.md)` 和 `[workflow-query.md](../../weaver-e10-workflow/references/workflow-query.md)`;要用 `workflow.pageOpen` 取 `{baseUrl}` 时读 `[workflow-view.md](../../weaver-e10-workflow/references/workflow-view.md)`(workflow 使用契约,不能省略):
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
| 场景 | 事前申请流程 |
|
|
112
|
+
| ---- | --------------------------------------- |
|
|
113
|
+
| 话费 | `流程(100003460000002556)` |
|
|
92
114
|
| 油费补贴 | `流程(100003460000001017)`(流程名「私车公用补贴申请」) |
|
|
93
115
|
|
|
116
|
+
|
|
94
117
|
macOS/Linux(bash/zsh):
|
|
95
118
|
|
|
96
119
|
```bash
|
|
@@ -105,13 +128,18 @@ weaver-work-cli --json workflow run workflow.search --input-json '{"category":"m
|
|
|
105
128
|
weaver-work-cli --json workflow run workflow.search --input-json '{"category":"mine","workflow":["流程(100003460000001017)"]}'
|
|
106
129
|
```
|
|
107
130
|
|
|
108
|
-
第一条查话费,第二条查油费补贴,按场景只调对应的一条。按返回的 `data.cards` 处理,`finalMarkdown`
|
|
131
|
+
第一条查话费,第二条查油费补贴,按场景只调对应的一条。按返回的 `data.cards` 处理,`finalMarkdown` 不展示给用户。卡片没有 `草稿` 徽标就是已提交。**事前申请提交了就能报销,不用等审批通过**:审批中、已结束的都能用。
|
|
109
132
|
|
|
110
|
-
|
|
|
133
|
+
| 情况 | 怎么做 |
|
|
111
134
|
| --- | --- |
|
|
112
|
-
|
|
|
135
|
+
| 登记了事前申请,它在 `cards` 里且不是草稿 | 直接用登记的这条,**不问用户**,不管审批到哪一步。不同发票登记了不同的事前申请时,用其中不是草稿、发起时间最新的一条(本次发票都绑它) |
|
|
136
|
+
| 登记了,但 `cards` 里没有它 | 在上面的入参里加 `"requestId":"<preApproval.requestId>"` 再查一次;查到且不是草稿就用它,否则按没登记处理 |
|
|
137
|
+
| 登记的是草稿,或没登记,`cards` 里有已提交的 | 用发起时间最新的已提交一条(`finalMarkdown` 的卡片里有发起时间),**不问用户** |
|
|
113
138
|
| 只有草稿(`finalMarkdown` 卡片带 `草稿` 徽标) | 告诉用户「{话费 / 油费}事前申请「{flowName}」还是草稿,请先在 E10 提交,提交后就能报销」,停止 |
|
|
114
|
-
| `cards`
|
|
139
|
+
| `cards` 为空,也没有可用的登记 | 用户还没有事前申请:给出发起链接(见下方),告诉用户先发起并提交事前申请,提交后再来报销,停止 |
|
|
140
|
+
|
|
141
|
+
定下的事前申请记下 `flowName`、`requestId` 和「月补贴额度」(见下方)。用的是登记的那条时,提交成功后不用另外说明。
|
|
142
|
+
|
|
115
143
|
|
|
116
144
|
**月补贴额度**不在 `cards` 的字段里,而在 `finalMarkdown` 里这条事前申请标题下面的摘要行,例如:
|
|
117
145
|
|
|
@@ -122,53 +150,54 @@ weaver-work-cli --json workflow run workflow.search --input-json '{"category":"m
|
|
|
122
150
|
|
|
123
151
|
取「月补贴额度」后面的数字(上例是 `100`),第 4 步传给 `monthlyAllowance`。摘要行里没有「月补贴额度」时(如目前油费的「私车公用补贴申请」),第 4 步不传 `monthlyAllowance`,按发票合计报,不封顶。
|
|
124
152
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
macOS/Linux(bash/zsh):
|
|
153
|
+
### 发起事前申请链接
|
|
128
154
|
|
|
129
|
-
|
|
130
|
-
weaver-work-cli --json workflow run workflow.pageOpen --input-json '{"page":"create","workflowId":"100003460000002556","noOpen":true}'
|
|
131
|
-
```
|
|
155
|
+
登记的、`workflow.search` 查到的都没有可用的事前申请时,按固定模板给出发起链接:
|
|
132
156
|
|
|
133
|
-
|
|
157
|
+
| 场景 | 链接 |
|
|
158
|
+
| --- | --- |
|
|
159
|
+
| 话费 | `{baseUrl}/sp/workflow/flowpage/create/100003460000002556?workflowId=100003460000002556&isCreate=1` |
|
|
160
|
+
| 油费 / 私车公用补贴 | `{baseUrl}/sp/workflow/flowpage/create/100003460000001017?workflowId=100003460000001017&isCreate=1` |
|
|
134
161
|
|
|
135
|
-
|
|
136
|
-
weaver-work-cli --json workflow run workflow.pageOpen --input-json '{"page":"create","workflowId":"100003460000002556","noOpen":true}'
|
|
137
|
-
```
|
|
162
|
+
`{baseUrl}` 取本轮 CLI 返回的任一链接里 `/sp/` 前面的部分(如第 1 步 `invoice.list` 的 `detailUrl` `https://e10.example.com/sp/inc/incDetail?fid=…` → `https://e10.example.com`),不要猜域名。本轮还没有任何链接时,调一次 `workflow.pageOpen`(`{"page":"create","workflowId":"100003460000002556","noOpen":true}`,油费换 `100003460000001017`,只生成地址、不打开页面),取返回 `url` 里 `/sp/` 前面的部分。
|
|
138
163
|
|
|
139
|
-
|
|
164
|
+
链接写成 `[发起话费事前申请](链接)`,油费写 `[发起油费事前申请](链接)`。例如:
|
|
140
165
|
|
|
141
166
|
```markdown
|
|
142
|
-
你还没有话费事前申请,请先发起并提交:[发起话费事前申请](https://e10.example.com/sp/workflow/flowpage/create/100003460000002556)
|
|
167
|
+
你还没有话费事前申请,请先发起并提交:[发起话费事前申请](https://e10.example.com/sp/workflow/flowpage/create/100003460000002556?workflowId=100003460000002556&isCreate=1)
|
|
143
168
|
提交后就可以让我帮你报销话费补贴,不用等审批通过。
|
|
144
169
|
```
|
|
145
170
|
|
|
146
171
|
> 话费 / 油费不用 `invoice.reim.requests.list` 找事前申请,也不按开票日期和发起日期做时间匹配:本次所有发票都绑这条事前申请,历史发票早于事前申请发起日也照样绑。
|
|
147
172
|
|
|
148
|
-
第 1 步和第 3
|
|
173
|
+
第 1 步和第 3 步的 `workflow.search` 都是只读,**同时发起**;`invoice.reim.relation.list` 在第 1 步返回后调。事前申请缺失和票夹没票同时发生时,一次把两件事都告诉用户。
|
|
149
174
|
|
|
150
175
|
## 第 4 步:直接提交报销(`invoice.reim.subsidy.submit`)
|
|
151
176
|
|
|
152
177
|
> 话费 / 油费**不走表单填单**(不调 `invoice.reim.workflow.resolve`、`workflow.createForm`、`workflow.createRequest`),**不拦金额**,也**不需要用户确认**:拿到发票和事前申请后,直接调用本命令创建并提交报销流程。
|
|
153
178
|
|
|
154
|
-
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
159
|
-
| `
|
|
160
|
-
| `
|
|
161
|
-
| `
|
|
162
|
-
| `
|
|
179
|
+
|
|
180
|
+
| 入参 | 取值 |
|
|
181
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
182
|
+
| `processTitle` | 流程标题,见下方「标题与事由」 |
|
|
183
|
+
| `reason` | 报销事由,见下方「标题与事由」 |
|
|
184
|
+
| `relatedProcessId` | 第 3 步事前申请的 `requestId` |
|
|
185
|
+
| `invoices` | 第 1、2 步列入的全部发票,每张写成 `{"fid":"…","total":"…"}`:`fid`、`total` 直接抄 `invoice.list` 返回的这两个字段(`total` 是价税合计,不是不含税的 `amount`)。每张生成一行明细,最多 100 张;按开票日期从早到晚排 |
|
|
186
|
+
| `monthlyAllowance` | 第 3 步读到的「月补贴额度」,如 `"100"`;读不到就**不传** |
|
|
187
|
+
| `customerId` | 相关客户 ID。用户没指定就**不传**,CLI 默认 `100504500000311504`(泛微上海) |
|
|
188
|
+
| `projectId` | 相关项目 ID。用户没指定就**不传**,CLI 发空字符串 |
|
|
189
|
+
|
|
163
190
|
|
|
164
191
|
每行明细的报销金额 `reimbursedAmount`(和 `relatedProcessId`、`relatedInvoiceId` 同一层)由 CLI 算,不要自己传。规则:**所有明细行的报销金额加起来不能超过「月补贴额度」**。
|
|
165
192
|
|
|
166
|
-
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
| 发票价税合计之和
|
|
170
|
-
|
|
|
171
|
-
|
|
|
193
|
+
|
|
194
|
+
| 情况 | 每行报销金额 |
|
|
195
|
+
| --------------------- | ------------------------------------------------------------------ |
|
|
196
|
+
| 发票价税合计之和 ≤ 月补贴额度 | 每行报这张发票的 `total` |
|
|
197
|
+
| 发票价税合计之和 > 月补贴额度 | 前面的行照常报发票 `total`;**最后一行 = 月补贴额度 − 前面明细行累加的金额** |
|
|
198
|
+
| 前面几行已经把额度用完 | 用完额度的那一行就是最后一行,同样报「额度 − 前面累加」;**剩下的发票不放进本次报销**,留在票夹,下次报销时第 1 步会再查到 |
|
|
199
|
+
| 没传 `monthlyAllowance` | 每行报发票全额,不封顶 |
|
|
200
|
+
|
|
172
201
|
|
|
173
202
|
例如月补贴额度 100:一张 106.68 → `100`;30、40、50 三张 → `30`、`40`、`30`(100 − 70);60、55.5、20 三张 → 明细只有前两张,报 `60`、`40`,20 元那张留到下次。超过额度**不拦**,照常提交。没进明细的发票在返回的 `skippedInvoices` 里,不用告诉用户。
|
|
174
203
|
|
|
@@ -186,6 +215,8 @@ Windows PowerShell:
|
|
|
186
215
|
weaver-work-cli --json invoice run invoice.reim.subsidy.submit --input-json '{"processTitle":"龚为明10月话费报销","reason":"话费报销","relatedProcessId":"1334602834841272343","invoices":[{"fid":"1334657621380382760","total":"106.68"}],"monthlyAllowance":"100"}'
|
|
187
216
|
```
|
|
188
217
|
|
|
218
|
+
|
|
219
|
+
|
|
189
220
|
### 相关客户与相关项目
|
|
190
221
|
|
|
191
222
|
**不主动问用户**。只有用户这次自己说了客户或项目名称(如「话费报销,项目是 XX 平台二期」)时,才先把名称换成 ID:用 `invoice.reim.field.search` 搜「总部费用报销」(`workflowId` `100003460000000060`)的对应字段,客户 `fieldId` 传 `100003720000000687`,项目 `fieldId` 传 `100003720000006720`,`keywords` 用用户原话。
|
|
@@ -202,28 +233,36 @@ Windows PowerShell:
|
|
|
202
233
|
weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"<用户说的项目名称>","fieldId":"100003720000006720","workflowId":"100003460000000060"}'
|
|
203
234
|
```
|
|
204
235
|
|
|
205
|
-
|
|
206
|
-
|
|
|
207
|
-
|
|
|
208
|
-
| `
|
|
209
|
-
| `
|
|
236
|
+
|
|
237
|
+
| 搜索结果 `match` | 怎么做 |
|
|
238
|
+
| ------------ | -------------------------------------------------- |
|
|
239
|
+
| `unique` | 用 `selected.id` 作为 `customerId` / `projectId`,不问用户 |
|
|
240
|
+
| `multiple` | 把 `items` 的名称列给用户选,选定后用那条的 `id`;选定前不提交 |
|
|
241
|
+
| `none` | 告诉用户没搜到「{用户原话}」,请换更完整的名称;不要悄悄退回默认值提交 |
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
210
245
|
|
|
211
246
|
### 标题与事由
|
|
212
247
|
|
|
213
|
-
|
|
214
|
-
|
|
|
248
|
+
|
|
249
|
+
| 组成 | 话费 | 油费 |
|
|
250
|
+
| ------------------- | ------------------------------ | ------------------------------ |
|
|
215
251
|
| 流程标题 `processTitle` | `{申请人}{月份}话费报销`,如 `龚为明10月话费报销` | `{申请人}{月份}油费报销`,如 `龚为明10月油费报销` |
|
|
216
|
-
| 报销事由 `reason`
|
|
252
|
+
| 报销事由 `reason` | 固定写 `话费报销` | 固定写 `油费报销` |
|
|
253
|
+
|
|
217
254
|
|
|
218
255
|
报销事由就是上面这两个固定值,不带月份、申请人或其他内容。流程标题里的月份按用户原话、以东八区今天为准:「上月」→ 上个月;「本月」或没说月份 → 本月;说了具体月份就用它。不是今年时带年份(`2025年12月`)。**不按发票开票日期算**(发票可能是历史的)。申请人姓名以数字结尾时,姓名和月份之间加一个空格。
|
|
219
256
|
|
|
220
257
|
### 返回处理
|
|
221
258
|
|
|
222
|
-
|
|
223
|
-
|
|
|
224
|
-
|
|
|
225
|
-
| `
|
|
226
|
-
| `
|
|
259
|
+
|
|
260
|
+
| 返回 | 怎么做 |
|
|
261
|
+
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
262
|
+
| `ok=true` | **只把** `data.finalMarkdown` **展示给用户**(`[流程标题]({baseUrl}/sp/workflow/flowpage/view/{requestId})`,点击打开流程详情),不加其他内容 |
|
|
263
|
+
| `api/reim_subsidy_submit_failed`、`api/business_error` | 把 `error.message`(接口返回的失败原因)告诉用户,停止;不要改走表单建单 |
|
|
264
|
+
| `partial/write_uncertain`(连接中断,或返回成功但没有 `requestId`) | **禁止重发**,重发会重复提交。只读回查一次:按第 1 步的关键词查 `invoice.list`,加 `sreim:"0"`,看这些发票的 `reimRequests` 里有没有本次标题。有就说明已提交,请用户到 E10「我的请求」查看;没有就告诉用户结果不确定,请在 E10 确认后再决定是否重报 |
|
|
265
|
+
|
|
227
266
|
|
|
228
267
|
成功时回复用户的全部内容,例如:
|
|
229
268
|
|
|
@@ -231,23 +270,29 @@ weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"key
|
|
|
231
270
|
[龚为明10月话费报销](https://e10.example.com/sp/workflow/flowpage/view/1335460101534752798)
|
|
232
271
|
```
|
|
233
272
|
|
|
273
|
+
|
|
274
|
+
|
|
234
275
|
## 后台模式
|
|
235
276
|
|
|
236
277
|
后台模式指任务由定时任务、自动化流程触发,或宿主声明本次是后台 / 无人值守执行,没有人能实时回答提问。提交和前台一样直接调用 `invoice.reim.subsidy.submit`;区别只在需要用户处理时(票夹没票、没有事前申请或只有草稿、用户点名的客户 / 项目搜出多条或搜不到)不提问,把原因写进结果后结束。
|
|
237
278
|
|
|
238
279
|
## 拦截汇总
|
|
239
280
|
|
|
240
|
-
|
|
241
|
-
|
|
|
242
|
-
|
|
|
243
|
-
|
|
|
244
|
-
|
|
|
245
|
-
|
|
|
246
|
-
|
|
|
247
|
-
|
|
|
248
|
-
|
|
|
249
|
-
|
|
|
250
|
-
|
|
|
251
|
-
|
|
|
252
|
-
|
|
|
253
|
-
|
|
|
281
|
+
|
|
282
|
+
| 情况 | 结果 |
|
|
283
|
+
| --------------------------------- | --------------------------------------------- |
|
|
284
|
+
| 上传发票时登记了事前申请,且不是草稿 | **不拦,也不问**:直接用登记的这条提交 |
|
|
285
|
+
| 登记的和固定流程里都没有事前申请 | 停止,按固定模板给出发起链接;提交后就能报,不用等审批 |
|
|
286
|
+
| 事前申请只有草稿 | 停止,请用户先提交 |
|
|
287
|
+
| 事前申请审批中 | **不拦**,直接绑定继续报销 |
|
|
288
|
+
| 票夹没有可报的发票,用户也没上传 | 停止,提醒用户上传 |
|
|
289
|
+
| 票夹(台账)里已有的发票 | **不查验**,查验状态不影响报销 |
|
|
290
|
+
| 上传的发票查验不通过、不是话费 / 油费发票、或已挂在其他报销单上 | 该张不报,告诉用户原因 |
|
|
291
|
+
| 查验返回「单张发票每天最多查验5次」 | **不拦**,视为查验通过,继续报销 |
|
|
292
|
+
| 发票合计超过月补贴额度 | **不拦**,CLI 把各行明细 `reimbursedAmount` 按顺序扣到额度为止 |
|
|
293
|
+
| 用户没说客户 / 项目 | **不拦,也不问**:客户默认泛微上海,项目为空 |
|
|
294
|
+
| 用户点名的客户 / 项目搜出多条或搜不到 | 让用户选定或换名称,确定 ID 前不提交 |
|
|
295
|
+
| 提交接口返回失败 | 告诉用户接口返回的原因,停止 |
|
|
296
|
+
| 提交结果不确定 | 禁止重发,只读回查一次 |
|
|
297
|
+
|
|
298
|
+
|