weaver-work-cli 0.1.6 → 0.1.8
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 +14 -9
- package/dist/cmd/skills/index.js +60 -0
- package/dist/internal/e10/auth/commands.js +44 -31
- package/dist/internal/e10/auth/session.js +44 -3
- package/dist/internal/e10/auth/xiaoe.js +363 -11
- package/dist/internal/e10/context.js +4 -2
- package/dist/internal/skills/detector.js +42 -0
- package/dist/internal/skills/install.js +50 -3
- package/dist/shortcuts/archive/render/search-format.js +12 -3
- package/dist/shortcuts/ebuilder-form/continuation.js +70 -0
- package/dist/shortcuts/ebuilder-form/errors.js +54 -0
- package/dist/shortcuts/ebuilder-form/host.js +1238 -0
- package/dist/shortcuts/ebuilder-form/index.js +108 -0
- package/dist/shortcuts/ebuilder-form/manifest.js +347 -0
- package/dist/shortcuts/ebuilder-form/operations/read.js +157 -0
- package/dist/shortcuts/ebuilder-form/operations/registry.js +56 -0
- package/dist/shortcuts/ebuilder-form/operations/shared.js +132 -0
- package/dist/shortcuts/ebuilder-form/operations/types.js +19 -0
- package/dist/shortcuts/ebuilder-form/operations/write.js +277 -0
- package/dist/shortcuts/ebuilder-form/operations.js +8 -0
- package/dist/shortcuts/ehr/operations/salary.js +2 -140
- package/dist/shortcuts/im/continuation.js +70 -0
- package/dist/shortcuts/{yimiaoban → im}/errors.js +14 -14
- package/dist/shortcuts/{yimiaoban → im}/host.js +26 -26
- package/dist/shortcuts/{yimiaoban → im}/index.js +42 -42
- package/dist/shortcuts/{yimiaoban → im}/manifest.js +7 -6
- package/dist/shortcuts/{yimiaoban → im}/operations/file-user.js +54 -41
- package/dist/shortcuts/{yimiaoban → im}/operations/group-read.js +46 -44
- package/dist/shortcuts/{yimiaoban → im}/operations/group-write.js +113 -66
- package/dist/shortcuts/{yimiaoban → im}/operations/msg-sync.js +164 -141
- package/dist/shortcuts/{yimiaoban → im}/operations/msg-write.js +47 -47
- package/dist/shortcuts/{yimiaoban → im}/operations/person.js +10 -10
- package/dist/shortcuts/{yimiaoban → im}/operations/registry.js +10 -8
- package/dist/shortcuts/{yimiaoban → im}/operations/session.js +82 -83
- package/dist/shortcuts/im/operations/shared.js +442 -0
- package/dist/shortcuts/{yimiaoban → im}/operations/types.js +1 -1
- package/dist/shortcuts/im/operations/user-remind.js +201 -0
- package/dist/shortcuts/{yimiaoban → im}/operations/write-util.js +7 -7
- package/dist/shortcuts/{yimiaoban → im}/operations.js +3 -3
- package/dist/shortcuts/index.js +10 -2
- package/dist/shortcuts/invoice/manifest.js +113 -10
- package/dist/shortcuts/invoice/operations/import.js +39 -14
- package/dist/shortcuts/invoice/operations/reim.js +38 -18
- package/dist/shortcuts/invoice/operations/shared.js +35 -6
- package/dist/shortcuts/jiuchuanhui/manifest.js +3 -3
- package/dist/shortcuts/jiuchuanhui/operations/registry.js +2 -2
- package/dist/shortcuts/{yimiaoban → okr}/continuation.js +10 -10
- package/dist/shortcuts/okr/errors.js +70 -0
- package/dist/shortcuts/okr/host.js +169 -0
- package/dist/shortcuts/okr/index.js +155 -0
- package/dist/shortcuts/okr/manifest.js +70 -0
- package/dist/shortcuts/okr/operations/link.js +305 -0
- package/dist/shortcuts/okr/operations/read.js +481 -0
- package/dist/shortcuts/okr/operations/registry.js +31 -0
- package/dist/shortcuts/okr/operations/shared.js +381 -0
- package/dist/shortcuts/okr/operations/types.js +88 -0
- package/dist/shortcuts/okr/operations/write.js +838 -0
- package/dist/shortcuts/okr/operations.js +8 -0
- package/dist/shortcuts/project/continuation.js +70 -0
- package/dist/shortcuts/project/errors.js +53 -0
- package/dist/shortcuts/project/host.js +160 -0
- package/dist/shortcuts/project/index.js +106 -0
- package/dist/shortcuts/project/manifest.js +36 -0
- package/dist/shortcuts/project/operations/read.js +551 -0
- package/dist/shortcuts/project/operations/registry.js +31 -0
- package/dist/shortcuts/project/operations/shared.js +68 -0
- package/dist/shortcuts/project/operations/types.js +39 -0
- package/dist/shortcuts/project/operations/write.js +266 -0
- package/dist/shortcuts/project/operations.js +8 -0
- package/dist/shortcuts/workflow/continuation.js +508 -0
- package/dist/shortcuts/workflow/endpoints.js +149 -0
- package/dist/shortcuts/workflow/errors.js +112 -0
- package/dist/shortcuts/workflow/host.js +224 -0
- package/dist/shortcuts/workflow/index.js +116 -0
- package/dist/shortcuts/workflow/manifest.js +30 -0
- package/dist/shortcuts/workflow/operations/form.js +4215 -0
- package/dist/shortcuts/workflow/operations/read.js +4236 -0
- package/dist/shortcuts/workflow/operations/registry.js +33 -0
- package/dist/shortcuts/workflow/operations/shared.js +190 -0
- package/dist/shortcuts/workflow/operations/types.js +44 -0
- package/dist/shortcuts/workflow/operations/write.js +1997 -0
- package/dist/shortcuts/workflow/operations.js +119 -0
- package/dist/shortcuts/workflow/state.js +182 -0
- package/docs/SKILL.md +5 -3
- package/docs/_catalog.md +10 -1
- package/docs/agent-invoice.md +2 -2
- package/docs/agent-skill-install.md +2 -2
- package/docs/e10-auth.md +3 -1
- package/docs/ebuilder-form.md +38 -0
- package/docs/im.md +104 -0
- package/docs/invoice.md +5 -5
- package/docs/okr.md +122 -0
- package/docs/operation-manual.md +10 -7
- package/docs/project.md +69 -0
- package/docs/skill-review-2026-09-19.md +68 -0
- package/package.json +3 -2
- package/scripts/package-skill.mjs +39 -11
- package/scripts/sync-connector-skills.mjs +172 -0
- package/skill-template/business-info.json +357 -16
- package/skill-template/domains/ebuilder-form.md +5 -0
- package/skill-template/domains/okr.md +18 -0
- package/skill-template/domains/shijingran.md +3 -0
- package/skill-template/domains/skill-maker.md +4 -4
- package/skill-template/domains/workflow.md +22 -0
- package/skill-template/domains/yepiaotong.md +4 -2
- package/skill-template/domains/yimiaoban.md +13 -10
- package/skill-template/product.json +5 -0
- package/skill-template/skill-template.md +1 -0
- package/skills/weaver-e10-calendar/SKILL.md +5 -1
- package/skills/weaver-e10-calendar/references/calendar-query.md +7 -0
- package/skills/weaver-e10-calendar/references/source-manifest.json +314 -32
- package/skills/weaver-e10-ebuilder-form/SKILL.md +123 -0
- package/skills/weaver-e10-ebuilder-form/references/context-routing.md +90 -0
- package/skills/weaver-e10-ebuilder-form/references/custom-api.md +86 -0
- package/skills/weaver-e10-ebuilder-form/references/disabled-capabilities.md +50 -0
- package/skills/weaver-e10-ebuilder-form/references/fields-browser.md +100 -0
- package/skills/weaver-e10-ebuilder-form/references/list-nlist.md +91 -0
- package/skills/weaver-e10-ebuilder-form/references/openapi-read.md +74 -0
- package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +86 -0
- package/skills/weaver-e10-ebuilder-form/references/source-manifest.json +107 -0
- package/skills/weaver-e10-esb/SKILL.md +1 -1
- package/skills/weaver-e10-esb/references/source-manifest.json +15 -14
- package/skills/weaver-e10-hrm/SKILL.md +1 -1
- package/skills/weaver-e10-hrm/references/source-manifest.json +357 -38
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +22 -4
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +4 -2
- package/skills/weaver-e10-jiuchuanhui/references/contact.md +1 -1
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +3 -3
- package/skills/weaver-e10-jiuchuanhui/references/disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +10 -10
- package/skills/weaver-e10-jiuchuanhui/references/general-helpers.md +3 -3
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +7 -7
- package/skills/weaver-e10-jiuchuanhui/references/source-manifest.json +3 -3
- package/skills/weaver-e10-jucailin/SKILL.md +2 -2
- package/skills/weaver-e10-mail/SKILL.md +22 -6
- package/skills/weaver-e10-meeting/SKILL.md +22 -1
- package/skills/weaver-e10-okr/SKILL.md +139 -0
- package/skills/weaver-e10-okr/references/okr-align.md +59 -0
- package/skills/weaver-e10-okr/references/okr-keyresult.md +68 -0
- package/skills/weaver-e10-okr/references/okr-link-routing.md +67 -0
- package/skills/weaver-e10-okr/references/okr-query.md +105 -0
- package/skills/weaver-e10-okr/references/okr-write.md +94 -0
- package/skills/weaver-e10-okr/references/source-manifest.json +672 -0
- package/skills/weaver-e10-plan/SKILL.md +3 -3
- package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
- package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
- package/skills/weaver-e10-qiyecheng/SKILL.md +21 -1
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +17 -17
- package/skills/weaver-e10-shared/SKILL.md +79 -11
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +41 -8
- package/skills/weaver-e10-shared/references/non-interactive-environment.md +78 -0
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +39 -0
- package/skills/weaver-e10-shijingran/SKILL.md +83 -0
- package/skills/weaver-e10-shijingran/references/field-resolution.md +105 -0
- package/skills/weaver-e10-shijingran/references/operations.md +154 -0
- package/skills/weaver-e10-shijingran/references/source-manifest.json +1380 -0
- package/skills/weaver-e10-shijingran/references/write-operations.md +90 -0
- package/skills/weaver-e10-skill-maker/SKILL.md +26 -9
- package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +39 -8
- package/skills/weaver-e10-skill-maker/references/detector-validation.md +25 -8
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +66 -5
- package/skills/weaver-e10-skill-maker/references/module-gap-audit-and-repair.md +86 -0
- package/skills/weaver-e10-skill-maker/references/source-update-detection.md +59 -5
- package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +16 -8
- package/skills/weaver-e10-wenshuding/SKILL.md +28 -4
- package/skills/weaver-e10-wenshuding/references/archive-search.md +14 -0
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +27 -26
- package/skills/weaver-e10-workflow/SKILL.md +250 -0
- package/skills/weaver-e10-workflow/references/source-manifest.json +1061 -0
- package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +96 -0
- package/skills/weaver-e10-workflow/references/workflow-batch.md +275 -0
- package/skills/weaver-e10-workflow/references/workflow-create.md +182 -0
- package/skills/weaver-e10-workflow/references/workflow-edit.md +106 -0
- package/skills/weaver-e10-workflow/references/workflow-memory.md +165 -0
- package/skills/weaver-e10-workflow/references/workflow-operate.md +153 -0
- package/skills/weaver-e10-workflow/references/workflow-query.md +820 -0
- package/skills/weaver-e10-workflow/references/workflow-share.md +117 -0
- package/skills/weaver-e10-workflow/references/workflow-view.md +190 -0
- package/skills/weaver-e10-yepiaotong/SKILL.md +28 -28
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +11 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +14 -8
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +9 -43
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +13 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +13 -17
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +7 -8
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +1155 -553
- package/skills/weaver-e10-yimiaoban/SKILL.md +56 -38
- package/skills/weaver-e10-yimiaoban/references/ding-write.md +8 -8
- package/skills/weaver-e10-yimiaoban/references/error-codes.md +16 -0
- package/skills/weaver-e10-yimiaoban/references/field-resolution.md +10 -10
- package/skills/weaver-e10-yimiaoban/references/file-user-i18n.md +12 -12
- package/skills/weaver-e10-yimiaoban/references/group-read.md +16 -16
- package/skills/weaver-e10-yimiaoban/references/group-write.md +17 -15
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +21 -17
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +10 -10
- package/skills/weaver-e10-yimiaoban/references/person.md +6 -6
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +15 -11
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +11 -10
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +2164 -154
- package/skills/weaver-e10-yimiaoban/references/user-remind.md +75 -0
- package/skills/weaver-e10-ziguanjia/SKILL.md +4 -2
- package/skills/weaver-e10-ziguanjia/references/source-manifest.json +99 -29
- package/tools/weaver-skill-detector-1.0.13/SKILL.md +253 -0
- package/tools/weaver-skill-detector-1.0.13/_meta.json +6 -0
- package/tools/weaver-skill-detector-1.0.13/references/checklist.md +298 -0
- package/tools/weaver-skill-detector-1.0.13/scripts/validate_skill.py +4190 -0
- package/dist/shortcuts/yimiaoban/operations/shared.js +0 -236
- package/docs/yimiaoban.md +0 -86
- package/skills/weaver-e10-calendar/product.json +0 -8
- package/skills/weaver-e10-esb/product.json +0 -8
- package/skills/weaver-e10-hrm/product.json +0 -8
- package/skills/weaver-e10-jiuchuanhui/product.json +0 -8
- package/skills/weaver-e10-jucailin/product.json +0 -8
- package/skills/weaver-e10-mail/product.json +0 -8
- package/skills/weaver-e10-meeting/product.json +0 -8
- package/skills/weaver-e10-plan/product.json +0 -8
- package/skills/weaver-e10-qiyecheng/product.json +0 -8
- package/skills/weaver-e10-skill-maker/product.json +0 -8
- package/skills/weaver-e10-wenshuding/product.json +0 -8
- package/skills/weaver-e10-yepiaotong/product.json +0 -8
- package/skills/weaver-e10-yepiaotong/references/invoice-red.md +0 -261
- package/skills/weaver-e10-yimiaoban/product.json +0 -8
- package/skills/weaver-e10-ziguanjia/product.json +0 -8
- /package/dist/shortcuts/{yimiaoban → im}/operations/msg-parse.js +0 -0
|
@@ -20,7 +20,15 @@
|
|
|
20
20
|
|
|
21
21
|
`payload` 是已整理好的 `MakeInvoiceReqDTO`。核心字段至少包括购方名称、发票类型、外部单号、金额合计和一条商品明细。专票或全电纸质专票必须提供购方税号。
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
### 购方信息补齐
|
|
24
|
+
|
|
25
|
+
修正后的资料包没有提供客户档案查询 operation。组装 payload 前,Agent 只能从用户输入、附件内容或对话上下文提取购方信息;资料不足时必须追问用户补齐,不要调用 `invoice.customer.*` 或绕过 CLI 查询原始接口。
|
|
26
|
+
|
|
27
|
+
- 个人普票:`invoiceType="7"`,`personLogo="1"`,无需税号。
|
|
28
|
+
- 企业专票或需要企业抬头时:必须由用户或附件提供购方名称、税号;地址、电话、开户行和账号有明确来源时才填入,没有来源不要编造。
|
|
29
|
+
- 从附件提取购方信息前,必须先提醒用户文件内容可能进入当前大模型上下文,并可能发送到解析服务,等待明确确认后再处理。
|
|
30
|
+
|
|
31
|
+
销方为 CLI 内置固定值(当前版本固定为销方名称 `上海泛微网络科技股份有限公司`、销方税号 `9131000070322836XD`,非按当前 E10 租户动态解析),Agent 无需也不应自行构造或改写销方字段;CLI 会一并补齐 `billingType="0"`、`sourceType="4"`、`asyncCallFlag="1"`、`invoiceMethod="5"`、`taxSign="1"`。Agent 不要把 Cookie、ETEAMSID、业务 Token 或认证字段放入 payload。
|
|
24
32
|
|
|
25
33
|
## 命令
|
|
26
34
|
|
|
@@ -29,13 +37,13 @@ CLI 会固定销方名称 `上海泛微网络科技股份有限公司`、销方
|
|
|
29
37
|
Windows PowerShell:
|
|
30
38
|
|
|
31
39
|
```powershell
|
|
32
|
-
weaver-work-cli --json invoice run invoice.issuing.make.prepare --input-json '{"mode":"ledger","payload":{"invoiceType":"8","externalDocumentNo":"AI-
|
|
40
|
+
weaver-work-cli --json invoice run invoice.issuing.make.prepare --input-json '{"mode":"ledger","payload":{"invoiceType":"8","externalDocumentNo":"AI-EXAMPLE-001","purchaserName":"XX科技有限公司","purchaserTaxNo":"91310000MA1234AB56","totalAmount":100,"taxAmount":6,"totalAmountWithTax":106,"details":[{"goodsName":"信息技术咨询服务","revenueCode":"3040205","taxRate":0.06,"amount":100,"amountWithTax":106,"taxAmount":6,"quantity":"1","unit":"项"}]}}'
|
|
33
41
|
```
|
|
34
42
|
|
|
35
43
|
macOS/Linux(bash/zsh):
|
|
36
44
|
|
|
37
45
|
```bash
|
|
38
|
-
weaver-work-cli --json invoice run invoice.issuing.make.prepare --input-json '{"mode":"ledger","payload":{"invoiceType":"8","externalDocumentNo":"AI-
|
|
46
|
+
weaver-work-cli --json invoice run invoice.issuing.make.prepare --input-json '{"mode":"ledger","payload":{"invoiceType":"8","externalDocumentNo":"AI-EXAMPLE-001","purchaserName":"XX科技有限公司","purchaserTaxNo":"91310000MA1234AB56","totalAmount":100,"taxAmount":6,"totalAmountWithTax":106,"details":[{"goodsName":"信息技术咨询服务","revenueCode":"3040205","taxRate":0.06,"amount":100,"amountWithTax":106,"taxAmount":6,"quantity":"1","unit":"项"}]}}'
|
|
39
47
|
```
|
|
40
48
|
|
|
41
49
|
复杂 payload 建议保存为 UTF-8 JSON 文件。
|
|
@@ -48,7 +56,7 @@ Set-Content -Encoding utf8 -LiteralPath .\issuing.json -Value @'
|
|
|
48
56
|
"mode": "issue",
|
|
49
57
|
"payload": {
|
|
50
58
|
"invoiceType": "8",
|
|
51
|
-
"externalDocumentNo": "AI-
|
|
59
|
+
"externalDocumentNo": "AI-EXAMPLE-001",
|
|
52
60
|
"purchaserName": "XX科技有限公司",
|
|
53
61
|
"purchaserTaxNo": "91310000MA1234AB56",
|
|
54
62
|
"totalAmount": 100,
|
|
@@ -69,7 +77,7 @@ cat > ./issuing.json <<'JSON'
|
|
|
69
77
|
"mode": "issue",
|
|
70
78
|
"payload": {
|
|
71
79
|
"invoiceType": "8",
|
|
72
|
-
"externalDocumentNo": "AI-
|
|
80
|
+
"externalDocumentNo": "AI-EXAMPLE-001",
|
|
73
81
|
"purchaserName": "XX科技有限公司",
|
|
74
82
|
"purchaserTaxNo": "91310000MA1234AB56",
|
|
75
83
|
"totalAmount": 100,
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
3. 用 `invoice.reim.requests.list` 获取事前申请,再按时间、费用类型和标题做匹配;原始 ID、日期、金额必须逐字符保留。
|
|
26
26
|
4. 用 `invoice.reim.workflow.resolve` 得到报销工作流,必要时按工作流分组。
|
|
27
27
|
5. 对每组并行读取 `invoice.reim.form.structure`、`invoice.reim.row-info` 和 `invoice.reim.employee-superiors`;只有需要用户修正关联字段时才用 `invoice.reim.field.search`。
|
|
28
|
-
6. Agent
|
|
28
|
+
6. Agent 按表单结构组装报销单 JSON,先调用 `invoice.reim.flow.create.prepare`,展示标题、主表字段数、明细行数、发票和风险;用户明确确认后再调用 `.apply`。
|
|
29
29
|
7. 报销单创建成功后,后续修正使用 `invoice.reim.flow.update.prepare/apply`,不要重复创建同一组发票的报销单。
|
|
30
30
|
|
|
31
31
|
## 命令
|
|
@@ -44,20 +44,18 @@ macOS/Linux(bash/zsh):
|
|
|
44
44
|
weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":20,"requestname":"交通","cusCreateDateStart":"2026-07-01","cusCreateDateEnd":"2026-07-31"}'
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
创建报销单建议用 UTF-8 JSON
|
|
47
|
+
创建报销单建议用 UTF-8 JSON 文件传入完整报销单 JSON。
|
|
48
48
|
|
|
49
49
|
Windows PowerShell:
|
|
50
50
|
|
|
51
51
|
```powershell
|
|
52
52
|
Set-Content -Encoding utf8 -LiteralPath .\reim-create.json -Value @'
|
|
53
53
|
{
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"detail_rows": [{"dataIndex":1,"subFormId":"1181057741029227992","invoiceId":"12345","fields":[]}]
|
|
60
|
-
}
|
|
54
|
+
"work_flow_id": "1181057526276915214",
|
|
55
|
+
"mainFormId": "1181057741029226975",
|
|
56
|
+
"request_name": "交通费报销-示例-2026-08-04",
|
|
57
|
+
"main_fields": [],
|
|
58
|
+
"detail_rows": [{"dataIndex":1,"subFormId":"1181057741029227992","invoiceId":"12345","fields":[]}]
|
|
61
59
|
}
|
|
62
60
|
'@
|
|
63
61
|
weaver-work-cli --json invoice run invoice.reim.flow.create.prepare --input .\reim-create.json
|
|
@@ -68,19 +66,17 @@ macOS/Linux(bash/zsh):
|
|
|
68
66
|
```bash
|
|
69
67
|
cat > ./reim-create.json <<'JSON'
|
|
70
68
|
{
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"detail_rows": [{"dataIndex":1,"subFormId":"1181057741029227992","invoiceId":"12345","fields":[]}]
|
|
77
|
-
}
|
|
69
|
+
"work_flow_id": "1181057526276915214",
|
|
70
|
+
"mainFormId": "1181057741029226975",
|
|
71
|
+
"request_name": "交通费报销-示例-2026-08-04",
|
|
72
|
+
"main_fields": [],
|
|
73
|
+
"detail_rows": [{"dataIndex":1,"subFormId":"1181057741029227992","invoiceId":"12345","fields":[]}]
|
|
78
74
|
}
|
|
79
75
|
JSON
|
|
80
76
|
weaver-work-cli --json invoice run invoice.reim.flow.create.prepare --input ./reim-create.json
|
|
81
77
|
```
|
|
82
78
|
|
|
83
|
-
确认后把 prepare 返回的 continuation 原样放入 apply
|
|
79
|
+
确认后把 prepare 返回的 continuation 原样放入 apply 输入,并在同一个顶层 JSON 中加入 `"confirm": true`。`invoice.reim.flow.create.*` 的 `inputSchema` 会逐字段暴露 `work_flow_id`、`mainFormId`、`request_name`、`main_fields`、`detail_rows`、`need_user_confirm` 和 `unable_to_fill`,不要再包一层通用 `payload`。
|
|
84
80
|
|
|
85
81
|
## 输出处理
|
|
86
82
|
|
|
@@ -194,7 +194,7 @@ CLI 信封中列表在 `data.items`。下面是单条发票的票面结构(对
|
|
|
194
194
|
},
|
|
195
195
|
"buyer": {
|
|
196
196
|
"tcode": "9131000070322836XD",
|
|
197
|
-
"company": "
|
|
197
|
+
"company": "上海泛微网络科技股份有限公司"
|
|
198
198
|
},
|
|
199
199
|
"payer": {
|
|
200
200
|
"tcode": "91460200348073438U",
|
|
@@ -1065,11 +1065,11 @@ CLI operation:`invoice.reim.flow.create.prepare` → 用户确认 → `invoice
|
|
|
1065
1065
|
|
|
1066
1066
|
> **⚠️ 禁止重复创建:同一组发票数据只能创建一次。创建成功后,修改报销单请用 `invoice.reim.flow.update.prepare/apply`,不要再次调用 create。**
|
|
1067
1067
|
|
|
1068
|
-
将填单结构化 JSON 作为
|
|
1068
|
+
将填单结构化 JSON 作为 operation 顶层入参提交到 CLI,生成报销单流程。不要再包一层通用 `payload`。
|
|
1069
1069
|
|
|
1070
1070
|
### 入参
|
|
1071
1071
|
|
|
1072
|
-
入参即 Step 4 组装的完整填单 JSON(结构定义见 [form-fill-rules.md](reim-form-fill-rules.md#最终输出结构)
|
|
1072
|
+
入参即 Step 4 组装的完整填单 JSON(结构定义见 [form-fill-rules.md](reim-form-fill-rules.md#最终输出结构)),字段会在 `inputSchema.properties` 中逐项暴露,并作为请求体(JSON Body)提交到 E10。
|
|
1073
1073
|
|
|
1074
1074
|
|
|
1075
1075
|
| 字段 | 类型 | 必填 | 说明 |
|
|
@@ -1085,7 +1085,7 @@ CLI operation:`invoice.reim.flow.create.prepare` → 用户确认 → `invoice
|
|
|
1085
1085
|
|
|
1086
1086
|
### 命令
|
|
1087
1087
|
|
|
1088
|
-
将 Step 4 的 JSON
|
|
1088
|
+
将 Step 4 的 JSON 作为 operation 顶层输入写入文件,先 prepare,用户确认后再 apply。
|
|
1089
1089
|
|
|
1090
1090
|
Windows PowerShell:
|
|
1091
1091
|
|
|
@@ -1099,7 +1099,7 @@ macOS/Linux(bash/zsh):
|
|
|
1099
1099
|
weaver-work-cli --json invoice run invoice.reim.flow.create.prepare --input ./reim-create.json
|
|
1100
1100
|
```
|
|
1101
1101
|
|
|
1102
|
-
|
|
1102
|
+
顶层输入示例:
|
|
1103
1103
|
|
|
1104
1104
|
```json
|
|
1105
1105
|
{
|
|
@@ -1229,9 +1229,9 @@ CLI operation:`invoice.reim.flow.update.prepare` → 用户确认 → `invoice
|
|
|
1229
1229
|
|
|
1230
1230
|
### 命令
|
|
1231
1231
|
|
|
1232
|
-
将以下 JSON
|
|
1232
|
+
将以下 JSON 作为 operation 顶层输入写入文件,先 `invoice.reim.flow.update.prepare`,用户确认后再 `.apply`。
|
|
1233
1233
|
|
|
1234
|
-
###
|
|
1234
|
+
### 顶层输入示例
|
|
1235
1235
|
|
|
1236
1236
|
#### 场景1:同时删除明细第2行 + 修改主表 + 更新第1行明细
|
|
1237
1237
|
|
|
@@ -1337,4 +1337,3 @@ CLI operation:`invoice.reim.flow.update.prepare` → 用户确认 → `invoice
|
|
|
1337
1337
|
- `fieldName` 仅用于可读性,不参与业务逻辑
|
|
1338
1338
|
- 如果只删除不修改,只传 `requestId` + `deleteDetailRows` 即可
|
|
1339
1339
|
- `value` 为空、`unable_to_fill=true`、`need_search=true` 的字段会被自动跳过
|
|
1340
|
-
|
|
@@ -451,7 +451,7 @@ macOS/Linux(bash/zsh):
|
|
|
451
451
|
weaver-work-cli --json invoice run invoice.reim.flow.create.apply --input ./reim-create-apply.json
|
|
452
452
|
```
|
|
453
453
|
|
|
454
|
-
> apply 的 JSON
|
|
454
|
+
> apply 的 JSON 需包含与 prepare 一致的顶层报销单字段、`continuation`(prepare 返回的 token)、`confirm: true`。
|
|
455
455
|
|
|
456
456
|
**返回:**
|
|
457
457
|
|
|
@@ -651,7 +651,7 @@ Step 5 创建时,"相关项目"字段有多个候选,放入了 `need_user_co
|
|
|
651
651
|
|
|
652
652
|
用户选择了"智慧园区一期"(id=P001),调用 `invoice.reim.flow.update.prepare` → 用户确认 → `invoice.reim.flow.update.apply` 补充:
|
|
653
653
|
|
|
654
|
-
> 将以下 JSON 写入 `reim-update.json`,然后执行 `weaver-work-cli --json invoice run invoice.reim.flow.update.prepare --input ./reim-update.json`,用户确认后再执行 `.apply
|
|
654
|
+
> 将以下 JSON 写入 `reim-update.json`,然后执行 `weaver-work-cli --json invoice run invoice.reim.flow.update.prepare --input ./reim-update.json`,用户确认后再执行 `.apply`(传入顶层更新字段 + continuation + confirm:true)。
|
|
655
655
|
|
|
656
656
|
```json
|
|
657
657
|
{
|