weaver-work-cli 0.1.25 → 0.1.28
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 +35 -30
- package/dist/cmd/root.js +1 -0
- package/dist/cmd/setup/index.js +1 -1
- package/dist/core/runtime-agent.js +19 -0
- package/dist/internal/e10/auth/commands.js +48 -33
- package/dist/internal/e10/auth/messages.js +3 -0
- package/dist/internal/e10/auth/session.js +8 -0
- package/dist/internal/e10/auth/xiaoe.js +62 -43
- package/dist/internal/e10/auth-recovery.js +148 -0
- package/dist/internal/e10/client.js +47 -15
- package/dist/internal/e10/context.js +9 -31
- package/dist/internal/e10/index.js +1 -0
- package/dist/internal/e10/request-runtime.js +51 -9
- package/dist/shortcuts/archive/host.js +3 -2
- package/dist/shortcuts/archive/manifest.js +1 -1
- package/dist/shortcuts/archive-oa/constants.js +66 -0
- package/dist/shortcuts/archive-oa/continuation.js +70 -0
- package/dist/shortcuts/archive-oa/errors.js +53 -0
- package/dist/shortcuts/archive-oa/host.js +158 -0
- package/dist/shortcuts/archive-oa/index.js +225 -0
- package/dist/shortcuts/archive-oa/manifest.js +62 -0
- package/dist/shortcuts/archive-oa/operations/borrow-car.js +159 -0
- package/dist/shortcuts/archive-oa/operations/borrow-url.js +108 -0
- package/dist/shortcuts/archive-oa/operations/confirm.js +48 -0
- package/dist/shortcuts/archive-oa/operations/contract.js +120 -0
- package/dist/shortcuts/archive-oa/operations/locate.js +50 -0
- package/dist/shortcuts/archive-oa/operations/registry.js +40 -0
- package/dist/shortcuts/archive-oa/operations/shared.js +181 -0
- package/dist/shortcuts/archive-oa/operations/types.js +45 -0
- package/dist/shortcuts/archive-oa/operations.js +13 -0
- package/dist/shortcuts/asset/host.js +7 -6
- package/dist/shortcuts/blog/host.js +4 -3
- package/dist/shortcuts/caizhilian/host.js +3 -2
- package/dist/shortcuts/caizhilian/manifest.js +1 -1
- package/dist/shortcuts/calendar/host.js +2 -1
- package/dist/shortcuts/contract/host.js +34 -59
- package/dist/shortcuts/ehr/host.js +2 -1
- package/dist/shortcuts/esb/host.js +2 -1
- package/dist/shortcuts/fna/host.js +6 -3
- package/dist/shortcuts/fna/manifest.js +10 -5
- package/dist/shortcuts/fna/operations/expense-chart.js +162 -0
- package/dist/shortcuts/fna/operations/registry.js +2 -0
- package/dist/shortcuts/hrm/host.js +2 -1
- package/dist/shortcuts/im/host.js +3 -2
- package/dist/shortcuts/index.js +2 -0
- package/dist/shortcuts/invoice/host.js +9 -7
- package/dist/shortcuts/invoice/manifest.js +38 -47
- package/dist/shortcuts/invoice/operations/issuing-qys.js +328 -0
- package/dist/shortcuts/invoice/operations/registry.js +2 -3
- package/dist/shortcuts/jiuchuanhui/host.js +2 -1
- package/dist/shortcuts/mail/host.js +2 -1
- package/dist/shortcuts/meeting/host.js +2 -1
- package/dist/shortcuts/meeting/operations/eb/conflict.js +78 -12
- package/dist/shortcuts/okr/host.js +2 -1
- package/dist/shortcuts/plan/host.js +2 -1
- package/dist/shortcuts/project/host.js +2 -1
- package/dist/shortcuts/workflow/endpoints.js +11 -0
- package/dist/shortcuts/workflow/host.js +5 -7
- package/dist/shortcuts/workflow/index.js +6 -36
- package/dist/shortcuts/workflow/operations/chatscene.js +252 -0
- package/dist/shortcuts/workflow/operations/form.js +1047 -191
- package/dist/shortcuts/workflow/operations/read.js +137 -8
- package/dist/shortcuts/workflow/operations/sign-input.js +106 -0
- package/dist/shortcuts/workflow/operations/write.js +9 -1
- package/dist/shortcuts/workflow/stdout-compact.js +16 -1
- package/docs/SKILL.md +1 -1
- package/docs/_catalog.md +1 -1
- package/docs/agent-invoice.md +1 -1
- package/docs/archive-oa.md +79 -0
- package/docs/caizhilian.md +1 -1
- package/docs/e10-auth.md +7 -6
- package/docs/fna.md +7 -3
- package/docs/invoice.md +4 -6
- package/package.json +1 -1
- package/skill-template/business-info.json +20 -1
- package/skill-template/domains/archive-oa.md +19 -0
- package/skill-template/domains/caizhilian.md +2 -1
- package/skill-template/domains/qiyecheng.md +1 -0
- package/skill-template/domains/yepiaotong.md +8 -4
- package/skill-template/skill-template.md +1 -0
- package/skills/weaver-e10-archive-oa/SKILL.md +159 -0
- package/skills/weaver-e10-archive-oa/references/archive-locate.md +49 -0
- package/skills/weaver-e10-archive-oa/references/borrow-car.md +76 -0
- package/skills/weaver-e10-archive-oa/references/borrow-flow.md +53 -0
- package/skills/weaver-e10-archive-oa/references/contract-search.md +63 -0
- package/skills/weaver-e10-archive-oa/references/disabled-capabilities.md +29 -0
- package/skills/weaver-e10-archive-oa/references/qys-contract-search.md +47 -0
- package/skills/weaver-e10-archive-oa/references/source-manifest.json +400 -0
- package/skills/weaver-e10-blog/SKILL.md +6 -1
- package/skills/weaver-e10-blog/references/blog-query.md +3 -1
- package/skills/weaver-e10-builder/SKILL.md +22 -0
- package/skills/weaver-e10-caizhilian/SKILL.md +47 -16
- package/skills/weaver-e10-caizhilian/references/action-flow.md +70 -0
- package/skills/weaver-e10-caizhilian/references/agent-entry.md +12 -4
- package/skills/weaver-e10-caizhilian/references/auth-and-install.md +207 -0
- package/skills/weaver-e10-caizhilian/references/collaboration.md +5 -3
- package/skills/weaver-e10-caizhilian/references/document.md +33 -11
- package/skills/weaver-e10-caizhilian/references/file-collection.md +57 -54
- package/skills/weaver-e10-caizhilian/references/file-upload.md +5 -6
- package/skills/weaver-e10-caizhilian/references/files.md +9 -3
- package/skills/weaver-e10-caizhilian/references/folder.md +48 -16
- package/skills/weaver-e10-caizhilian/references/host-executor-prompt.md +32 -0
- package/skills/weaver-e10-caizhilian/references/host-platform-integration.md +46 -0
- package/skills/weaver-e10-caizhilian/references/rule-index.md +56 -0
- package/skills/weaver-e10-caizhilian/references/setting-attach.md +17 -54
- package/skills/weaver-e10-caizhilian/references/setting-backup.md +16 -63
- package/skills/weaver-e10-caizhilian/references/setting-encrypt.md +24 -64
- package/skills/weaver-e10-caizhilian/references/setting-storage-docs-summary.md +126 -0
- package/skills/weaver-e10-caizhilian/references/setting-storage-field-map.md +57 -0
- package/skills/weaver-e10-caizhilian/references/setting-storage.md +143 -548
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +7 -7
- package/skills/weaver-e10-caizhilian/references/task-workflow.md +87 -0
- package/skills/weaver-e10-caizhilian/references/withheld.md +21 -45
- package/skills/weaver-e10-caizhilian/references/write-protocol.md +7 -0
- package/skills/weaver-e10-calendar/SKILL.md +6 -1
- package/skills/weaver-e10-esb/SKILL.md +8 -0
- package/skills/weaver-e10-esb/references/input-format.md +3 -1
- package/skills/weaver-e10-esb/references/source-manifest.json +5 -5
- package/skills/weaver-e10-hrm/SKILL.md +6 -1
- package/skills/weaver-e10-hrm/references/employee.md +1 -1
- package/skills/weaver-e10-hrm/references/org.md +1 -1
- package/skills/weaver-e10-hrm/references/position.md +1 -1
- package/skills/weaver-e10-jinchengda/SKILL.md +2 -1
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +1 -1
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +6 -1
- package/skills/weaver-e10-jucailin/SKILL.md +6 -1
- package/skills/weaver-e10-jucailin/references/hr-contact.md +1 -1
- package/skills/weaver-e10-jucailin/references/salary.md +1 -1
- package/skills/weaver-e10-mail/SKILL.md +6 -1
- package/skills/weaver-e10-meeting/SKILL.md +11 -6
- package/skills/weaver-e10-meeting/references/meeting-eb.md +7 -3
- package/skills/weaver-e10-meeting/references/meeting-queries.md +3 -1
- package/skills/weaver-e10-meeting/references/meeting-verification.md +4 -2
- package/skills/weaver-e10-okr/SKILL.md +6 -1
- package/skills/weaver-e10-okr/references/source-manifest.json +5 -5
- package/skills/weaver-e10-plan/SKILL.md +6 -1
- package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +3 -1
- package/skills/weaver-e10-plan/references/plan-report-query.md +3 -1
- package/skills/weaver-e10-plan/references/source-manifest.json +7 -7
- package/skills/weaver-e10-qiyecheng/SKILL.md +16 -6
- package/skills/weaver-e10-qiyecheng/references/catalog.md +6 -3
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +2 -0
- package/skills/weaver-e10-qiyecheng/references/expense-chart.md +78 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +87 -33
- package/skills/weaver-e10-shared/SKILL.md +53 -28
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +22 -20
- package/skills/weaver-e10-shared/references/non-interactive-environment.md +13 -13
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +3 -1
- package/skills/weaver-e10-wenshuding/SKILL.md +6 -1
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
- package/skills/weaver-e10-workflow/references/source-manifest.json +33 -24
- package/skills/weaver-e10-workflow/references/workflow-create.md +41 -26
- package/skills/weaver-e10-yepiaotong/SKILL.md +23 -18
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +87 -45
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +152 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +210 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +59 -36
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +63 -512
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +205 -346
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +4 -5
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +231 -344
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +5 -5
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +201 -162
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +121 -145
- package/skills/weaver-e10-yimiaoban/SKILL.md +9 -2
- package/skills/weaver-e10-yimiaoban/references/file-user-i18n.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +9 -9
- package/skills/weaver-e10-ziguanjia/SKILL.md +6 -1
- package/dist/shortcuts/invoice/operations/issuing.js +0 -198
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-field-rules.md +0 -161
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +0 -107
- package/skills/weaver-e10-yepiaotong/references/reim-fast-path.md +0 -119
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 完整端到端示例
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 数据准备通过 `weaver-work-cli --json invoice run <operation> --input-json '<json>'` 执行;报销单创建/修改通过 `weaver-work-cli --json workflow run workflow.createForm|createRequest|editLoad|editPrepare|editApply` 执行(`weaver-e10-workflow` 技能)。
|
|
4
4
|
> 认证由 `weaver-work-cli auth` 管理,无需手动传 token/eteamsId。
|
|
5
5
|
> 复杂 JSON 建议先写入 UTF-8 文件再用 `--input <path>` 传入。
|
|
6
6
|
|
|
@@ -253,7 +253,7 @@ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pa
|
|
|
253
253
|
}
|
|
254
254
|
```
|
|
255
255
|
|
|
256
|
-
### Step 2.5: 获取报销单工作流
|
|
256
|
+
### Step 2.5: 获取报销单工作流
|
|
257
257
|
|
|
258
258
|
**命令:**
|
|
259
259
|
|
|
@@ -277,217 +277,151 @@ weaver-work-cli --json invoice run invoice.reim.workflow.resolve --input-json '{
|
|
|
277
277
|
"data": {
|
|
278
278
|
"requestWorkflowMap": {
|
|
279
279
|
"1298294241967177729": {
|
|
280
|
-
"workFlowId": "
|
|
281
|
-
"workFlowName": "
|
|
280
|
+
"workFlowId": "100003460000000060",
|
|
281
|
+
"workFlowName": "总部费用报销"
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
```
|
|
287
287
|
|
|
288
|
-
**决策:** 有事前申请 →
|
|
288
|
+
**决策:** 有事前申请 → 用 `总部费用报销(100003460000000060)` 载入表单。
|
|
289
289
|
|
|
290
|
-
### Step 3:
|
|
290
|
+
### Step 3: 并行载入表单 + 预填信息 + 发票对象
|
|
291
291
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
Windows PowerShell:
|
|
295
|
-
|
|
296
|
-
```powershell
|
|
297
|
-
weaver-work-cli --json invoice run invoice.reim.form.structure --input-json '{"workflowId":"1181057526276915214"}'
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
macOS/Linux(bash/zsh):
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
weaver-work-cli --json invoice run invoice.reim.form.structure --input-json '{"workflowId":"1181057526276915214"}'
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
**返回(简化):**
|
|
307
|
-
|
|
308
|
-
```json
|
|
309
|
-
{
|
|
310
|
-
"code": 200,
|
|
311
|
-
"data": {
|
|
312
|
-
"mainFormId": "1181057741029226975",
|
|
313
|
-
"mainFields": [
|
|
314
|
-
{"fieldId": "1181057741029227445", "fieldName": "申请人", "fieldType": "Employee", "single": true, "marked": true},
|
|
315
|
-
{"fieldId": "1181057741029227446", "fieldName": "部门", "fieldType": "Department", "single": true, "marked": true},
|
|
316
|
-
{"fieldId": "1181057741029227447", "fieldName": "报销日期", "fieldType": "DateComponent", "single": true, "marked": false},
|
|
317
|
-
{"fieldId": "1181057741029227454", "fieldName": "报销方式", "fieldType": "Select", "single": true, "marked": false, "options": [
|
|
318
|
-
{"optionId": "1181057741029227903", "optionName": "银行(个人报销)", "optionValue": "7"},
|
|
319
|
-
{"optionId": "1181057741029227900", "optionName": "冲销借款", "optionValue": "4"},
|
|
320
|
-
{"optionId": "1181057741029227904", "optionName": "银行(付公司)", "optionValue": "6"}
|
|
321
|
-
]},
|
|
322
|
-
{"fieldId": "1181057741029227456", "fieldName": "报销事由", "fieldType": "TextArea", "single": false, "marked": false},
|
|
323
|
-
{"fieldId": "1181057741029227470", "fieldName": "相关流程", "fieldType": "Workflow", "single": false, "marked": true}
|
|
324
|
-
],
|
|
325
|
-
"subTables": [
|
|
326
|
-
{
|
|
327
|
-
"subFormId": "1181057741029227992",
|
|
328
|
-
"subFormName": "费用明细",
|
|
329
|
-
"subFields": [
|
|
330
|
-
{"fieldId": "1181057741029227449", "fieldName": "相关客户", "fieldType": "Ebuilder", "single": true, "marked": true},
|
|
331
|
-
{"fieldId": "1181057741029227450", "fieldName": "相关项目", "fieldType": "Ebuilder", "single": true, "marked": true},
|
|
332
|
-
{"fieldId": "1181057741029227459", "fieldName": "实报金额", "fieldType": "Money", "single": true, "marked": false},
|
|
333
|
-
{"fieldId": "1181057741029227463", "fieldName": "费用类型(科目)", "fieldType": "RelateBrowser", "single": true, "marked": true},
|
|
334
|
-
{"fieldId": "1181057741029227464", "fieldName": "费用说明", "fieldType": "Text", "single": false, "marked": false},
|
|
335
|
-
{"fieldId": "1181057741029227465", "fieldName": "附件数", "fieldType": "NumberComponent", "single": true, "marked": false},
|
|
336
|
-
{"fieldId": "1181057741029227467", "fieldName": "费用日期", "fieldType": "DateComponent", "single": true, "marked": false},
|
|
337
|
-
{"fieldId": "1181057741029227468", "fieldName": "相关发票", "fieldType": "EinvoiceComponent", "single": false, "marked": false},
|
|
338
|
-
{"fieldId": "1181057741029227469", "fieldName": "相关凭证", "fieldType": "EinvoiceComponent", "single": true, "marked": false}
|
|
339
|
-
]
|
|
340
|
-
}
|
|
341
|
-
]
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
### Step 3.5: 获取预填信息 + 费用科目匹配
|
|
292
|
+
以下四条命令互相独立,**同时发起**。
|
|
347
293
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
**调用 `invoice.reim.row-info` 获取预填信息:**
|
|
294
|
+
**① 载入报销表单(`weaver-e10-workflow`):**
|
|
351
295
|
|
|
352
296
|
Windows PowerShell:
|
|
353
297
|
|
|
354
298
|
```powershell
|
|
355
|
-
weaver-work-cli --json
|
|
299
|
+
weaver-work-cli --json workflow run workflow.createForm --input-json '{"workflow":["总部费用报销(100003460000000060)"]}'
|
|
356
300
|
```
|
|
357
301
|
|
|
358
302
|
macOS/Linux(bash/zsh):
|
|
359
303
|
|
|
360
304
|
```bash
|
|
361
|
-
weaver-work-cli --json
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
**返回:**
|
|
365
|
-
|
|
366
|
-
```json
|
|
367
|
-
{
|
|
368
|
-
"code": 200,
|
|
369
|
-
"status": true,
|
|
370
|
-
"data": {
|
|
371
|
-
"date": "2026-07-30",
|
|
372
|
-
"fysm": "交通运输服务",
|
|
373
|
-
"itinerary": "",
|
|
374
|
-
"subjectId": "100502270000000006"
|
|
375
|
-
}
|
|
376
|
-
}
|
|
305
|
+
weaver-work-cli --json workflow run workflow.createForm --input-json '{"workflow":["总部费用报销(100003460000000060)"]}'
|
|
377
306
|
```
|
|
378
307
|
|
|
379
|
-
`
|
|
380
|
-
|
|
381
|
-
> 如果 `subjectId` 为空,则按 [expense-subject-rules.md](reim-expense-subject-rules.md) 静态科目列表匹配:
|
|
382
|
-
> `sellerName` 含"滴滴" → `"100502270000000173"`;`expenseType`="市内交通" → `"100502270000000006"`;匹配不到 → 兜底 `"100502270000000104"`。
|
|
383
|
-
|
|
384
|
-
### Step 4: 组装填单 JSON
|
|
308
|
+
**返回(`fields` 节选,2026-10-21 真实表单):**
|
|
385
309
|
|
|
386
310
|
```json
|
|
387
311
|
{
|
|
388
|
-
"
|
|
389
|
-
"
|
|
390
|
-
"
|
|
391
|
-
"
|
|
392
|
-
{"
|
|
393
|
-
{"
|
|
394
|
-
{"
|
|
395
|
-
{"
|
|
396
|
-
{"
|
|
397
|
-
{"
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
{
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
{"fieldId": "1181057741029227464", "value": "交通运输服务", "fieldName": "费用说明"},
|
|
409
|
-
{"fieldId": "1181057741029227465", "value": "1", "fieldName": "附件数"},
|
|
410
|
-
{"fieldId": "1181057741029227468", "value": "1295366637717012482", "fieldName": "相关发票"},
|
|
411
|
-
{"fieldId": "1181057741029227449", "value": "100504500000311504", "fieldName": "相关客户"}
|
|
412
|
-
]
|
|
413
|
-
}
|
|
414
|
-
],
|
|
415
|
-
"need_user_confirm": [],
|
|
416
|
-
"unable_to_fill": [
|
|
417
|
-
{"fieldId": "1181057741029227450", "fieldName": "相关项目", "reason": "事前申请中无相关项目信息"}
|
|
312
|
+
"status": "FORM_READY",
|
|
313
|
+
"continuation": "wc-9834fa828b86aed3",
|
|
314
|
+
"requestName": "总部费用报销-后端开发111-2026-08-04",
|
|
315
|
+
"fields": [
|
|
316
|
+
{"id": "1256786432515129369", "name": "事前申请流程", "componentKey": "Workflow", "isBrowser": true},
|
|
317
|
+
{"id": "100003720000008409", "name": "承担主体", "componentKey": "Employee", "initialValue": "后端开发111", "isBrowser": true},
|
|
318
|
+
{"id": "100003720000000088", "name": "报销事由", "componentKey": "TextArea"},
|
|
319
|
+
{"id": "100003720000000073", "name": "申请人", "componentKey": "Employee", "initialValue": "后端开发111", "isBrowser": true},
|
|
320
|
+
{"id": "100003720000001376", "name": "合同号", "componentKey": "Text", "initialValue": "20260999"},
|
|
321
|
+
{"id": "100003720000076596", "name": "报销人直接上级", "componentKey": "Employee", "initialValue": "直属主管王五", "isBrowser": true},
|
|
322
|
+
{"id": "100003720000000084", "name": "报销方式", "componentKey": "Select", "initialValue": "银行(个人报销)", "isSelect": true},
|
|
323
|
+
{"id": "100003720000000687", "name": "相关客户", "componentKey": "Ebuilder", "isBrowser": true},
|
|
324
|
+
{"id": "100003720000016373", "name": "申请金额", "subFormId": "100003690000000011", "componentKey": "NumberComponent"},
|
|
325
|
+
{"id": "100003720000000684", "name": "相关流程", "subFormId": "100003690000000011", "componentKey": "Workflow", "isBrowser": true},
|
|
326
|
+
{"id": "100003720000000360", "name": "费用类型(科目)", "subFormId": "100003690000000011", "componentKey": "RelateBrowser", "isBrowser": true},
|
|
327
|
+
{"id": "100003720000077896", "name": "相关发票", "subFormId": "100003690000000011", "componentKey": "EinvoiceComponent", "isEinvoice": true},
|
|
328
|
+
{"id": "100003720000052200", "name": "币种", "subFormId": "100003690000000011", "componentKey": "RelateBrowser", "initialValue": "人民币", "isBrowser": true},
|
|
329
|
+
{"id": "100003720000000361", "name": "费用说明", "subFormId": "100003690000000011", "componentKey": "Text"},
|
|
330
|
+
{"id": "100003720000000419", "name": "费用日期", "subFormId": "100003690000000011", "componentKey": "DateComponent"},
|
|
331
|
+
{"id": "100003720000079682", "name": "相关凭证", "subFormId": "100003690000000011", "componentKey": "EinvoiceComponent", "isEinvoice": true}
|
|
418
332
|
]
|
|
419
333
|
}
|
|
420
334
|
```
|
|
421
335
|
|
|
422
|
-
|
|
336
|
+
> 承担主体、申请人、报销人直接上级、合同号、报销方式都带 `initialValue` → **不传**。明细「币种」虽然也有默认值,但**每行必须显式传** `人民币(100001050000000001)`,否则「申请金额」联动会失效。实报金额、附件数、承担人所有上级等不在 `fields` 里 → **不传**。
|
|
423
337
|
|
|
424
|
-
|
|
338
|
+
**② 批量预填信息:**
|
|
425
339
|
|
|
426
340
|
Windows PowerShell:
|
|
427
341
|
|
|
428
342
|
```powershell
|
|
429
|
-
weaver-work-cli --json invoice run invoice.reim.
|
|
343
|
+
weaver-work-cli --json invoice run invoice.reim.row-info-batch --input-json '{"invoiceIds":["1295366637717012482"],"requestid":"1298294241967177729"}'
|
|
430
344
|
```
|
|
431
345
|
|
|
432
346
|
macOS/Linux(bash/zsh):
|
|
433
347
|
|
|
434
348
|
```bash
|
|
435
|
-
weaver-work-cli --json invoice run invoice.reim.
|
|
349
|
+
weaver-work-cli --json invoice run invoice.reim.row-info-batch --input-json '{"invoiceIds":["1295366637717012482"],"requestid":"1298294241967177729"}'
|
|
436
350
|
```
|
|
437
351
|
|
|
438
|
-
|
|
352
|
+
返回 `results[0].data`:`{"date":"2026-07-30","fysm":"交通运输服务","itinerary":"1298798990831518001","subjectId":"100502270000000006","subjectName":"市内交通费"}`
|
|
353
|
+
|
|
354
|
+
**③ 交通类发票取行程:** `invoice.get`(`{"fid":"1295366637717012482"}`)→ `from`=「仁济医院南院区门诊部(南门)南侧」、`to`=「浦江瑞和城柒街区30号」。
|
|
439
355
|
|
|
440
|
-
|
|
356
|
+
**④ 取发票对象:** 发票 + `itinerary` 返回的凭证一起传。
|
|
441
357
|
|
|
442
358
|
Windows PowerShell:
|
|
443
359
|
|
|
444
360
|
```powershell
|
|
445
|
-
weaver-work-cli --json invoice run invoice.
|
|
361
|
+
weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482","1298798990831518001"]}'
|
|
446
362
|
```
|
|
447
363
|
|
|
448
364
|
macOS/Linux(bash/zsh):
|
|
449
365
|
|
|
450
366
|
```bash
|
|
451
|
-
weaver-work-cli --json invoice run invoice.
|
|
367
|
+
weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482","1298798990831518001"]}'
|
|
452
368
|
```
|
|
453
369
|
|
|
454
|
-
>
|
|
370
|
+
> `itinerary` 与 `browse-field.data` 同时发起时还不知道凭证 ID:先只传发票 `fid`,`row-info-batch` 返回新的凭证 ID 后再补调一次只传凭证。
|
|
455
371
|
|
|
456
|
-
|
|
372
|
+
### Step 4: 组装 `data`
|
|
457
373
|
|
|
458
374
|
```json
|
|
459
375
|
{
|
|
460
|
-
"
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
376
|
+
"main": {
|
|
377
|
+
"1256786432515129369": "交通费报销-后端开发111-2026-07-25(1298294241967177729)",
|
|
378
|
+
"100003720000000088": "上海市内交通费(滴滴出行)",
|
|
379
|
+
"100003720000000687": "泛微上海(100504500000311504)"
|
|
380
|
+
},
|
|
381
|
+
"details": {
|
|
382
|
+
"100003690000000011": [
|
|
383
|
+
{
|
|
384
|
+
"100003720000000419": "2026-07-30",
|
|
385
|
+
"100003720000016373": "108.2",
|
|
386
|
+
"100003720000052200": "人民币(100001050000000001)",
|
|
387
|
+
"100003720000000360": "市内交通费(100502270000000006)",
|
|
388
|
+
"100003720000000361": "仁济医院南院-浦江瑞和城",
|
|
389
|
+
"100003720000000684": "交通费报销-后端开发111-2026-07-25(1298294241967177729)",
|
|
390
|
+
"100003720000077896": [{"optionId": "1295366637717012482", "id": "1295366637717012482", "fid": "1295366637717012482", "content": "增值税电子普通发票-36901189", "...": "browse-field.data 返回的其余键原样保留"}],
|
|
391
|
+
"100003720000079682": [{"optionId": "1298798990831518001", "id": "1298798990831518001", "fid": "1298798990831518001", "content": "滴滴行程单-...", "...": "browse-field.data 返回的其余键原样保留"}]
|
|
392
|
+
}
|
|
393
|
+
]
|
|
465
394
|
}
|
|
466
395
|
}
|
|
467
396
|
```
|
|
468
397
|
|
|
469
|
-
|
|
398
|
+
### Step 5: 直接存草稿
|
|
470
399
|
|
|
471
|
-
|
|
472
|
-
✅ 报销单创建成功!
|
|
400
|
+
组装完直接写入 `reim-create-request.json` 并调用,**不展示预览、不问「存草稿 / 提交审批」**:
|
|
473
401
|
|
|
474
|
-
|
|
402
|
+
```json
|
|
403
|
+
{
|
|
404
|
+
"context": "wc-9834fa828b86aed3",
|
|
405
|
+
"requestName": "后端开发111 7月上海交通费报销",
|
|
406
|
+
"action": "draft",
|
|
407
|
+
"data": {"main": {"...": "Step 4 的 main"}, "details": {"...": "Step 4 的 details"}}
|
|
408
|
+
}
|
|
409
|
+
```
|
|
475
410
|
|
|
476
|
-
|
|
477
|
-
**报销事由**:2026-07-30 市内交通 - 滴滴出行
|
|
478
|
-
**汇总金额**:¥108.20
|
|
479
|
-
**查看链接**:[点击查看报销单](viewUrl)
|
|
411
|
+
Windows PowerShell:
|
|
480
412
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
413
|
+
```powershell
|
|
414
|
+
weaver-work-cli --json workflow run workflow.createRequest --input .\reim-create-request.json
|
|
415
|
+
```
|
|
484
416
|
|
|
485
|
-
|
|
417
|
+
macOS/Linux(bash/zsh):
|
|
486
418
|
|
|
487
|
-
|
|
488
|
-
-
|
|
419
|
+
```bash
|
|
420
|
+
weaver-work-cli --json workflow run workflow.createRequest --input ./reim-create-request.json
|
|
489
421
|
```
|
|
490
422
|
|
|
423
|
+
**返回 `CREATED`** → 把返回的 `finalMarkdown` **原样粘贴**作为回复(已含流程编号、链接、已填内容、明细表),不要自己重拼。
|
|
424
|
+
|
|
491
425
|
---
|
|
492
426
|
|
|
493
427
|
## 示例2:多张发票 + 有事前申请(要点说明)
|
|
@@ -503,42 +437,29 @@ weaver-work-cli --json invoice run invoice.reim.flow.create.apply --input ./reim
|
|
|
503
437
|
当前为出差报销,必须填写相关客户。请提供本次出差对应的具体客户名称,否则无法继续报销。
|
|
504
438
|
```
|
|
505
439
|
|
|
506
|
-
用户给出客户名称(如「XX科技」)→ `
|
|
507
|
-
用户不提供 → **不允许报销,不创建报销单**。
|
|
440
|
+
用户给出客户名称(如「XX科技」)→ 直接把 `"XX科技"` 填进「相关客户」,由 `createRequest` 解析;唯一命中即可,多候选按 `ambiguities` 让用户选。用户不提供 → **不允许报销,不创建报销单**。
|
|
508
441
|
|
|
509
|
-
|
|
442
|
+
**`data` 关键点**:
|
|
510
443
|
|
|
511
444
|
```json
|
|
512
445
|
{
|
|
513
|
-
"
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
{"fieldId": "...", "value": "INV001", "fieldName": "相关发票(EinvoiceComponent+single=false)"},
|
|
524
|
-
{"fieldId": "...", "value": "76.80", "fieldName": "实报金额"}
|
|
525
|
-
]
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"dataIndex": 2, "subFormId": "...", "invoiceId": "INV002",
|
|
529
|
-
"fields": [
|
|
530
|
-
{"fieldId": "...", "value": "INV002", "fieldName": "相关发票(EinvoiceComponent+single=false)"},
|
|
531
|
-
{"fieldId": "...", "value": "480.00", "fieldName": "实报金额"}
|
|
532
|
-
]
|
|
533
|
-
}
|
|
534
|
-
]
|
|
446
|
+
"main": {
|
|
447
|
+
"<事前申请流程id>": "北京出差申请-张三-2026-07-20(1299854672520364033)",
|
|
448
|
+
"<相关客户id>": "XX科技"
|
|
449
|
+
},
|
|
450
|
+
"details": {
|
|
451
|
+
"<费用明细subFormId>": [
|
|
452
|
+
{"<申请金额id>": "76.80", "<币种id>": "人民币(100001050000000001)", "<相关发票id>": [{"fid": "INV001", "...": "..."}]},
|
|
453
|
+
{"<申请金额id>": "480.00", "<币种id>": "人民币(100001050000000001)", "<相关发票id>": [{"fid": "INV002", "...": "..."}]}
|
|
454
|
+
]
|
|
455
|
+
}
|
|
535
456
|
}
|
|
536
457
|
```
|
|
537
458
|
|
|
538
459
|
**要点**:
|
|
539
|
-
-
|
|
540
|
-
-
|
|
541
|
-
-
|
|
460
|
+
- 一张发票一行,数组顺序就是明细行顺序(行程单有多段行程也不拆,见示例13)
|
|
461
|
+
- 两行都绑定同一个事前申请(明细「相关流程」同值)
|
|
462
|
+
- 每行「相关发票」只放该行发票的 1 个对象
|
|
542
463
|
|
|
543
464
|
---
|
|
544
465
|
|
|
@@ -548,65 +469,33 @@ weaver-work-cli --json invoice run invoice.reim.flow.create.apply --input ./reim
|
|
|
548
469
|
|
|
549
470
|
**差异点**:
|
|
550
471
|
- 候选只有1个 → 直接使用;多个 → 自动匹配最相关的
|
|
551
|
-
-
|
|
472
|
+
- 「事前申请流程」「相关流程」不传
|
|
552
473
|
- 其他流程与示例1 一致
|
|
553
474
|
|
|
554
475
|
---
|
|
555
476
|
|
|
556
|
-
## 示例4
|
|
557
|
-
|
|
558
|
-
> **注意:非出差流程的相关客户固定填 `"100504500000311504"`(泛微上海)。出差/差旅流程必须先让用户提供具体客户,未提供则不允许报销。以下以"相关项目"字段为例说明多候选处理。**
|
|
559
|
-
|
|
560
|
-
当搜索"相关项目"字段返回多个结果时:
|
|
561
|
-
|
|
562
|
-
**搜索命令:**
|
|
563
|
-
|
|
564
|
-
Windows PowerShell:
|
|
565
|
-
|
|
566
|
-
```powershell
|
|
567
|
-
weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"智慧园区","fieldId":"1181057741029227450","workflowId":"1181057526276915214"}'
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
macOS/Linux(bash/zsh):
|
|
571
|
-
|
|
572
|
-
```bash
|
|
573
|
-
weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"智慧园区","fieldId":"1181057741029227450","workflowId":"1181057526276915214"}'
|
|
574
|
-
```
|
|
477
|
+
## 示例4:浏览按钮返回多个候选
|
|
575
478
|
|
|
576
|
-
|
|
479
|
+
`createRequest` 返回 `NEEDS_CONFIRMATION`,`ambiguities` 里 `kind = "BROWSER"`、`reason = "MULTIPLE_MATCHES"`(例如「相关项目」填了 `"智慧园区"`):
|
|
577
480
|
|
|
578
481
|
```json
|
|
579
482
|
{
|
|
580
|
-
"
|
|
581
|
-
"
|
|
582
|
-
{"name": "智慧园区一期", "id": "P001", "value": "P001"},
|
|
583
|
-
{"name": "智慧园区二期", "id": "P002", "value": "P002"},
|
|
584
|
-
{"name": "智慧园区运维", "id": "P003", "value": "P003"}
|
|
585
|
-
]
|
|
586
|
-
}
|
|
587
|
-
```
|
|
588
|
-
|
|
589
|
-
**处理方式**:该字段不放入 main_fields/detail_rows 的 fields 中,而是放入 `need_user_confirm`:
|
|
590
|
-
|
|
591
|
-
```json
|
|
592
|
-
{
|
|
593
|
-
"need_user_confirm": [
|
|
483
|
+
"status": "NEEDS_CONFIRMATION",
|
|
484
|
+
"ambiguities": [
|
|
594
485
|
{
|
|
595
|
-
"
|
|
486
|
+
"kind": "BROWSER",
|
|
596
487
|
"fieldName": "相关项目",
|
|
597
|
-
"
|
|
598
|
-
"reason": "模糊搜索返回多个候选",
|
|
488
|
+
"reason": "MULTIPLE_MATCHES",
|
|
599
489
|
"candidates": [
|
|
600
490
|
{"id": "P001", "name": "智慧园区一期"},
|
|
601
|
-
{"id": "P002", "name": "智慧园区二期"}
|
|
602
|
-
{"id": "P003", "name": "智慧园区运维"}
|
|
491
|
+
{"id": "P002", "name": "智慧园区二期"}
|
|
603
492
|
]
|
|
604
493
|
}
|
|
605
494
|
]
|
|
606
495
|
}
|
|
607
496
|
```
|
|
608
497
|
|
|
609
|
-
|
|
498
|
+
**处理方式**:把候选原样列给用户选;用户选「智慧园区一期」后,该字段改为 `{"id":"P001","name":"智慧园区一期"}`,用**同一 `context`** 重发 `createRequest`。不要向用户索取 ID。
|
|
610
499
|
|
|
611
500
|
---
|
|
612
501
|
|
|
@@ -623,134 +512,56 @@ weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"key
|
|
|
623
512
|
|
|
624
513
|
---
|
|
625
514
|
|
|
626
|
-
## 示例6
|
|
627
|
-
|
|
628
|
-
假设 Step 5 `invoice.reim.flow.create.apply` 成功,返回 `requestId = "1250065066476052001"`。
|
|
515
|
+
## 示例6:创建后修改报销单(Step 6)
|
|
629
516
|
|
|
630
|
-
|
|
517
|
+
假设 Step 5 `workflow.createRequest` 返回 `requestId = "1300266422434136064"`,用户说"报销事由改成 7 月份上海出差交通费"。
|
|
631
518
|
|
|
632
|
-
|
|
519
|
+
**① 加载当前表单:**
|
|
633
520
|
|
|
634
|
-
|
|
521
|
+
Windows PowerShell:
|
|
635
522
|
|
|
636
|
-
```
|
|
637
|
-
{
|
|
638
|
-
"need_user_confirm": [
|
|
639
|
-
{
|
|
640
|
-
"fieldId": "1181057741029227450",
|
|
641
|
-
"fieldName": "相关项目",
|
|
642
|
-
"dataIndex": 1,
|
|
643
|
-
"reason": "模糊搜索返回多个候选",
|
|
644
|
-
"candidates": [
|
|
645
|
-
{"id": "P001", "name": "智慧园区一期"},
|
|
646
|
-
{"id": "P002", "name": "智慧园区二期"}
|
|
647
|
-
]
|
|
648
|
-
}
|
|
649
|
-
]
|
|
650
|
-
}
|
|
523
|
+
```powershell
|
|
524
|
+
weaver-work-cli --json workflow run workflow.editLoad --input-json '{"requestId":"1300266422434136064"}'
|
|
651
525
|
```
|
|
652
526
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
> 将以下 JSON 写入 `reim-update.json`,然后执行 `weaver-work-cli --json invoice run invoice.reim.flow.update.prepare --input ./reim-update.json`,用户确认后再执行 `.apply`(传入顶层更新字段 + continuation + confirm:true)。
|
|
527
|
+
macOS/Linux(bash/zsh):
|
|
656
528
|
|
|
657
|
-
```
|
|
658
|
-
{
|
|
659
|
-
"requestId": 1300266422434136064,
|
|
660
|
-
"mainFormId": "1181057741029226975",
|
|
661
|
-
"detail_rows": [
|
|
662
|
-
{
|
|
663
|
-
"subFormId": "1181057741029227992",
|
|
664
|
-
"dataIndex": 1,
|
|
665
|
-
"fields": [
|
|
666
|
-
{"fieldId": "1181057741029227450", "fieldName": "相关项目", "value": "P001"}
|
|
667
|
-
]
|
|
668
|
-
}
|
|
669
|
-
]
|
|
670
|
-
}
|
|
529
|
+
```bash
|
|
530
|
+
weaver-work-cli --json workflow run workflow.editLoad --input-json '{"requestId":"1300266422434136064"}'
|
|
671
531
|
```
|
|
672
532
|
|
|
673
|
-
|
|
533
|
+
**② 准备修改**(只传要改的字段,字段须在 `editableFields` 里):
|
|
674
534
|
|
|
675
|
-
|
|
535
|
+
Windows PowerShell:
|
|
676
536
|
|
|
677
|
-
```
|
|
678
|
-
{
|
|
679
|
-
"requestId": 1300266422434136064,
|
|
680
|
-
"mainFormId": "1181057741029226975",
|
|
681
|
-
"deleteDetailRows": [
|
|
682
|
-
{"subFormId": "1181057741029227992", "dataIndex": 2}
|
|
683
|
-
],
|
|
684
|
-
"detail_rows": [
|
|
685
|
-
{
|
|
686
|
-
"subFormId": "1181057741029227992",
|
|
687
|
-
"dataIndex": 1,
|
|
688
|
-
"fields": [
|
|
689
|
-
{"fieldId": "1181057741029227459", "fieldName": "实报金额", "value": "120.00"}
|
|
690
|
-
]
|
|
691
|
-
}
|
|
692
|
-
]
|
|
693
|
-
}
|
|
537
|
+
```powershell
|
|
538
|
+
weaver-work-cli --json workflow run workflow.editPrepare --input-json '{"context":"<editLoad返回的context>","data":{"main":{"100003720000000088":"7月份上海出差交通费"}}}'
|
|
694
539
|
```
|
|
695
540
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
Step 5 创建时,"报销事由"无法自动推断:
|
|
541
|
+
macOS/Linux(bash/zsh):
|
|
699
542
|
|
|
700
|
-
```
|
|
701
|
-
|
|
543
|
+
```bash
|
|
544
|
+
weaver-work-cli --json workflow run workflow.editPrepare --input-json '{"context":"<editLoad返回的context>","data":{"main":{"100003720000000088":"7月份上海出差交通费"}}}'
|
|
702
545
|
```
|
|
703
546
|
|
|
704
|
-
|
|
547
|
+
修改明细行(金额、科目、发票等)时,`data.details` 的结构与行定位以 [`workflow-edit.md`](../../weaver-e10-workflow/references/workflow-edit.md) 为准,并对照 `editLoad` 返回的 `currentValues` 确认要改的是哪一行。
|
|
705
548
|
|
|
706
|
-
|
|
707
|
-
{
|
|
708
|
-
"requestId": 1300266422434136064,
|
|
709
|
-
"mainFormId": "1181057741029226975",
|
|
710
|
-
"main_fields": [
|
|
711
|
-
{"fieldId": "1181057741029227456", "fieldName": "报销事由", "value": "7月份上海出差交通费"}
|
|
712
|
-
]
|
|
713
|
-
}
|
|
714
|
-
```
|
|
549
|
+
**③ 向用户展示 `changedFields` 与 `linkageResult`,确认后保存:**
|
|
715
550
|
|
|
716
|
-
|
|
551
|
+
Windows PowerShell:
|
|
717
552
|
|
|
718
|
-
```
|
|
719
|
-
{
|
|
720
|
-
"requestId": 1300266422434136064,
|
|
721
|
-
"mainFormId": "1181057741029226975",
|
|
722
|
-
"deleteDetailRows": [
|
|
723
|
-
{"subFormId": "1181057741029227992", "dataIndex": -1}
|
|
724
|
-
],
|
|
725
|
-
"detail_rows": [
|
|
726
|
-
{
|
|
727
|
-
"subFormId": "1181057741029227992",
|
|
728
|
-
"dataIndex": 1,
|
|
729
|
-
"fields": [
|
|
730
|
-
{"fieldId": "1181057741029227467", "fieldName": "费用日期", "value": "2026-07-30"},
|
|
731
|
-
{"fieldId": "1181057741029227459", "fieldName": "实报金额", "value": "108.20"},
|
|
732
|
-
{"fieldId": "1181057741029227468", "fieldName": "相关发票", "value": "1295366637717012482"}
|
|
733
|
-
]
|
|
734
|
-
}
|
|
735
|
-
]
|
|
736
|
-
}
|
|
553
|
+
```powershell
|
|
554
|
+
weaver-work-cli --json workflow run workflow.editApply --input-json '{"context":"<同一context>","confirm":true}'
|
|
737
555
|
```
|
|
738
556
|
|
|
739
|
-
|
|
557
|
+
macOS/Linux(bash/zsh):
|
|
740
558
|
|
|
741
|
-
```
|
|
742
|
-
{
|
|
743
|
-
"code": 200,
|
|
744
|
-
"status": true,
|
|
745
|
-
"msg": "更新成功",
|
|
746
|
-
"data": {
|
|
747
|
-
"requestId": "1300266422434136064",
|
|
748
|
-
"deleteDetailSuccess": true,
|
|
749
|
-
"updateFormSuccess": true
|
|
750
|
-
}
|
|
751
|
-
}
|
|
559
|
+
```bash
|
|
560
|
+
weaver-work-cli --json workflow run workflow.editApply --input-json '{"context":"<同一context>","confirm":true}'
|
|
752
561
|
```
|
|
753
562
|
|
|
563
|
+
返回 `EDIT_SAVED` 即成功。流程已流转到不可编辑节点时返回"失去操作权限",如实转述。
|
|
564
|
+
|
|
754
565
|
---
|
|
755
566
|
|
|
756
567
|
## 示例7-10:多轮对话与组合条件(精简)
|
|
@@ -815,32 +626,80 @@ AI 操作:
|
|
|
815
626
|
|
|
816
627
|
---
|
|
817
628
|
|
|
629
|
+
## 示例12:用户给了合同号(以合同联动为准)
|
|
630
|
+
|
|
631
|
+
用户说:"帮我报销一下去重庆的发票,承担主体:边宝,合同编号:20250104933"
|
|
632
|
+
|
|
633
|
+
- 流程标题:`"龚为明8月去重庆交通费报销"`(「去重庆」取用户原话,没说从哪出发就不写出发城市;月份取发票费用日期 2026-08-19)
|
|
634
|
+
- 合同号传 `"20250104933"`;**承担主体、相关客户、相关项目都不传**(「边宝」也不传),直接存草稿
|
|
635
|
+
- 创建后 `linkageResult` 返回(2026-10-21 真机):`字段联动带出:…实报金额=50.07、承担主体=朱洪磊、相关客户=中国航空集团有限公司、合同号=20250104933、相关项目=中航集团办公平台改造及升级项目。`
|
|
636
|
+
- 原样粘贴 `finalMarkdown` 后补一句:「承担主体、相关客户、相关项目已按合同 20250104933 联动带出:朱洪磊 / 中国航空集团有限公司 / 中航集团办公平台改造及升级项目;你提到的承担主体「边宝」与合同不一致,已按合同联动为准。」
|
|
637
|
+
|
|
638
|
+
---
|
|
639
|
+
|
|
640
|
+
## 示例13:行程单有多段行程(不拆行)
|
|
641
|
+
|
|
642
|
+
还是示例12那张滴滴发票(¥50.07,发票 ID `1328381858116714513`,行程单 `1328381883894906889`)。`row-info-batch` 返回(2026-10-21 真机):
|
|
643
|
+
|
|
644
|
+
```json
|
|
645
|
+
{
|
|
646
|
+
"date": "2026-08-19", "sqje": "50.07", "fysm": "交通运输服务",
|
|
647
|
+
"itinerary": "1328381883894906889", "containsItinerary": true,
|
|
648
|
+
"itineraryData": [
|
|
649
|
+
{"date": "2025-12-31", "sqje": "14.67", "fysm": "大道|重庆财经学院-西门 - 鱼胡路-地铁站", "subjectName": "5301滴滴车票", "subjectId": "100502270000000177", "itinerary": "1328381883894906889"},
|
|
650
|
+
{"date": "2026-01-22", "sqje": "10.40", "fysm": "大道|重庆财经学院-西门 - 鱼胡路-地铁站", "subjectName": "5301滴滴车票", "subjectId": "100502270000000177", "itinerary": "1328381883894906889"},
|
|
651
|
+
{"date": "2026-04-09", "sqje": "25.00", "fysm": "大道|重庆财经学院-西门 - 大渡口区|重庆工业博物馆", "subjectName": "5301滴滴车票", "subjectId": "100502270000000177", "itinerary": "1328381883894906889"}
|
|
652
|
+
]
|
|
653
|
+
}
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
`itineraryData` 有 3 段,**仍然只填 1 行**:费用日期取外层 `date`,金额取发票金额,费用说明取 `invoice.get` 的起止点(from=`大道|重庆财经学院-西门`,to=`鱼胡路-地铁站`),取不到时才用 `itineraryData` 第一段起点 - 最后一段终点。
|
|
657
|
+
|
|
658
|
+
```json
|
|
659
|
+
"100003690000000011": [
|
|
660
|
+
{"100003720000000419": "2026-08-19", "100003720000016373": "50.07", "100003720000000360": "5301滴滴车票(100502270000000177)", "100003720000000361": "重庆财经学院-鱼胡路站", "100003720000052200": "人民币(100001050000000001)", "100003720000077896": [<发票对象>], "100003720000079682": [<行程单对象>]}
|
|
661
|
+
]
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
- 流程标题:`龚为明8月去重庆交通费报销`
|
|
665
|
+
|
|
666
|
+
---
|
|
667
|
+
|
|
668
|
+
## 示例14:按出差时间 + 城市查票(「报销上周去北京的费用」)
|
|
669
|
+
|
|
670
|
+
今天 2026-10-21,用户说"帮我报销上周去北京的费用"(2026-10-21 真机):
|
|
671
|
+
|
|
672
|
+
1. 出差时间 = 上周 2026-10-12 ~ 10-18 → 开票日期查 **2026-10-12 ~ 今天**
|
|
673
|
+
2. 查到 1 张火车票(10-19,¥166):`invoice.get` 起止站 杭州东 → 全椒,与北京无关
|
|
674
|
+
3. 没有与北京相关的票 → 回复用户:
|
|
675
|
+
|
|
676
|
+
> 你的票夹里没找到上周去北京的发票,所以没有往下建报销单。我按开票日期 2026-10-12 到今天查的,只有 1 张火车票(10-19,¥166),但它是杭州东 → 全椒,跟北京无关。可能是北京的发票还没导进票夹,或者日期不在上周。
|
|
677
|
+
|
|
678
|
+
- 不要因为这期间有票就拿来报;也不要自己把时间放宽到几个月前
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
818
682
|
## 关键检查清单
|
|
819
683
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
1. [ ] `
|
|
823
|
-
2. [ ] `
|
|
824
|
-
3. [ ] `
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
14. [ ] `detail_rows` 中每行必须包含 `subFormId`(明细表ID)
|
|
843
|
-
15. [ ] `dataIndex` 是 1-based,`-1` 表示删除该明细表全部行
|
|
844
|
-
16. [ ] 只传需要更新的字段,无需传完整表单
|
|
845
|
-
17. [ ] `fieldName` 仅用于可读性,不影响逻辑
|
|
846
|
-
18. [ ] `value` 为空 / `unable_to_fill=true` / `need_search=true` 的字段会被跳过
|
|
684
|
+
调用 `workflow.createRequest` 前确认:
|
|
685
|
+
|
|
686
|
+
1. [ ] `context` 是本组 `workflow.createForm` 返回的 `continuation`,没有复用别的报销单的句柄
|
|
687
|
+
2. [ ] `workflow.createForm` 传的是 Step 2.5 得到的 `{workFlowName}({workFlowId})`,**没有传 `userQuestion`**,也没用 `workflow.createRequestDirect`
|
|
688
|
+
3. [ ] `requestName` 是 `{申请人}{月份}{行程}{费用类型}报销`(如 `严玥宸10月上海去北京费用报销`):月份取费用日期(不是今天),出发城市没有凭猜,没有「(共N笔)」、金额、具体日期,不超过30字
|
|
689
|
+
4. [ ] `data` 的键全部来自本次 `createForm` 的 `fields[].id`,没有 `fields` 之外的字段(实报金额、附件数、承担人所有上级等不传)
|
|
690
|
+
5. [ ] 带 `initialValue` 且不需改写的字段没有重复传;**例外:每行明细都显式传了「币种」`人民币(100001050000000001)`**(不传会让「申请金额」联动失效)
|
|
691
|
+
6. [ ] 浏览按钮写 `名称(ID)`,没有裸 ID;Select 写选项名,不是 optionValue
|
|
692
|
+
7. [ ] 每行「相关发票」是 `invoice.browse-field.data` 返回的 1 个发票对象;有凭证时「相关凭证」也是 1 个对象,无凭证不传
|
|
693
|
+
8. [ ] 相关凭证(17/18/57/58)没有单独成行;行程单有多段行程也是一张发票一行;**有行程单 / 交通类 / 出差报销的明细,费用说明是精简后的 `起点-终点`:**整串最多 1 个 `-`、没有 `|` 和空格**,不是原样抄的 `from` / `to` / `fysm`
|
|
694
|
+
9. [ ] 每行「费用类型(科目)」有值,匹配不到填 `其他-管理费用(100502270000000104)`
|
|
695
|
+
10. [ ] 文本字段没有 `*` 号
|
|
696
|
+
11. [ ] **出差/差旅流程:相关客户已由用户提供具体名称;未提供则不允许调用 `workflow.createRequest`**
|
|
697
|
+
12. [ ] 非出差流程:相关客户填 `泛微上海(100504500000311504)`;**用户给了合同号时承担主体 / 相关客户 / 相关项目都不传,以合同联动为准**
|
|
698
|
+
13. [ ] 话费报销:金额字段填的是核算后的实报金额
|
|
699
|
+
14. [ ] `action` 是 `"draft"`,没有问用户「存草稿 / 提交审批」,也没有传 `"submit"`
|
|
700
|
+
|
|
701
|
+
修改报销单前确认:
|
|
702
|
+
|
|
703
|
+
15. [ ] `requestId` 来自 `workflow.createRequest` 的返回结果
|
|
704
|
+
16. [ ] 走 `workflow.editLoad` → `workflow.editPrepare` → 用户确认 → `workflow.editApply`,只传要改的字段
|
|
705
|
+
17. [ ] 只改 `editableFields` 里的字段,遇 `notEditable` 如实转述,不换字段 id 绕过
|