weaver-work-cli 0.1.28 → 0.1.31
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/dist/chunks/archive-U766FTFH.js +2537 -0
- package/dist/chunks/archive-oa-DMWEKX3L.js +1317 -0
- package/dist/chunks/asset-TCR7VDEV.js +2109 -0
- package/dist/chunks/attachment-content-AQNX5N3S.js +23 -0
- package/dist/chunks/blog-EVZWGDVM.js +2157 -0
- package/dist/chunks/caizhilian-JOWS6SL5.js +10087 -0
- package/dist/chunks/calendar-5WNCV66Q.js +1195 -0
- package/dist/chunks/chunk-2DUV44UX.js +15606 -0
- package/dist/chunks/chunk-324YPTC2.js +1607 -0
- package/dist/chunks/chunk-65QMVWHS.js +231 -0
- package/dist/chunks/chunk-6V7ZLF34.js +387 -0
- package/dist/chunks/chunk-AC7KJWC5.js +358 -0
- package/dist/chunks/chunk-AJ62BGAW.js +29 -0
- package/dist/chunks/chunk-BUSC6UAE.js +43 -0
- package/dist/chunks/chunk-CVZ2JOSW.js +62 -0
- package/dist/chunks/chunk-D4LTJSJD.js +477 -0
- package/dist/chunks/chunk-EG6ZU444.js +654 -0
- package/dist/chunks/chunk-EZALDOQH.js +383 -0
- package/dist/chunks/chunk-FMPJJYYI.js +106 -0
- package/dist/chunks/chunk-G2JSIUWF.js +769 -0
- package/dist/chunks/chunk-GCG2NMWR.js +703 -0
- package/dist/chunks/chunk-GPMFD4RD.js +75 -0
- package/dist/chunks/chunk-H3WDBYJW.js +508 -0
- package/dist/chunks/chunk-H6XSTSLM.js +2357 -0
- package/dist/chunks/chunk-J7RJTZSV.js +5556 -0
- package/dist/chunks/chunk-LUSPKZKY.js +53 -0
- package/dist/chunks/chunk-NIAJ5ZCG.js +73 -0
- package/dist/chunks/chunk-NOODWMCL.js +584 -0
- package/dist/chunks/chunk-OOUTBLZ4.js +51 -0
- package/dist/chunks/chunk-P26ZWSKU.js +73 -0
- package/dist/chunks/chunk-QWY6PGL6.js +3472 -0
- package/dist/chunks/chunk-R2IJAK7T.js +464 -0
- package/dist/chunks/chunk-R7O5PUWO.js +205 -0
- package/dist/chunks/chunk-RCGYCOMG.js +6962 -0
- package/dist/chunks/chunk-VZTXRG6X.js +403 -0
- package/dist/chunks/chunk-WHD4XMRP.js +161 -0
- package/dist/chunks/chunk-YLCYX7LE.js +371 -0
- package/dist/chunks/chunk-ZEDWSH32.js +68 -0
- package/dist/chunks/continuation-2CKSBLA6.js +11 -0
- package/dist/chunks/continuation-HZIZRZBX.js +13 -0
- package/dist/chunks/continuation-NLECEJPX.js +11 -0
- package/dist/chunks/ebuilder-form-NJ4YK6CC.js +2276 -0
- package/dist/chunks/ehr-MMYN36VA.js +5241 -0
- package/dist/chunks/employee-SAK2QYXX.js +11 -0
- package/dist/chunks/esb-HIWHOU7Q.js +141 -0
- package/dist/chunks/fna-KBACQTA5.js +1444 -0
- package/dist/chunks/host-3OHS5QUX.js +21 -0
- package/dist/chunks/host-IG6KEH5Q.js +19 -0
- package/dist/chunks/host-KQL5N4HO.js +23 -0
- package/dist/chunks/host-LLSZQCWR.js +17 -0
- package/dist/chunks/hrm-LYEC67ZQ.js +244 -0
- package/dist/chunks/im-RN2UKAEU.js +252 -0
- package/dist/chunks/invoice-EEPHLAF6.js +5179 -0
- package/dist/chunks/jiuchuanhui-WVVZYSJE.js +1940 -0
- package/dist/chunks/lazy-dispatch-MDOFFL2S.js +28 -0
- package/dist/chunks/mail-LNQLTF6L.js +2695 -0
- package/dist/chunks/meeting-XSD3BDVQ.js +504 -0
- package/dist/chunks/msg-parse-4GSQ2WTO.js +41 -0
- package/dist/chunks/okr-TMWTIU2K.js +2482 -0
- package/dist/chunks/plan-A2FSFA7T.js +2025 -0
- package/dist/chunks/project-T26QLBQF.js +1361 -0
- package/dist/chunks/registry-2VLUAESA.js +14 -0
- package/dist/chunks/registry-JCFEYXOE.js +18 -0
- package/dist/chunks/registry-NYPYMZXG.js +16 -0
- package/dist/chunks/registry-Q7OQJ3SU.js +19 -0
- package/dist/chunks/registry-ZJMJVWFA.js +19 -0
- package/dist/chunks/room-recommend-UR4ZDZS6.js +20 -0
- package/dist/chunks/schedule-5L2PM4M6.js +24 -0
- package/dist/chunks/state-Y2XBP6YE.js +15 -0
- package/dist/chunks/workflow-TR6PG2SL.js +245 -0
- package/dist/cmd/argv.js +45 -0
- package/dist/cmd/docs/index.js +3 -3
- package/dist/cmd/lazy-dispatch.js +20 -0
- package/dist/cmd/root.js +2 -4
- package/dist/cmd/setup/index.js +2 -2
- package/dist/cmd/skills/index.js +2 -2
- package/dist/core/package-paths.js +47 -0
- package/dist/index.js +163 -7
- package/dist/internal/e10/auth/xiaoe.js +3 -3
- package/dist/internal/e10/request-runtime.js +18 -62
- package/dist/internal/skills/detector.js +2 -2
- package/dist/shortcuts/contract/data/performance-catalog.js +1306 -0
- package/dist/shortcuts/contract/host.js +91 -35
- package/dist/shortcuts/contract/index.js +213 -0
- package/dist/shortcuts/contract/manifest.js +928 -0
- package/dist/shortcuts/contract/ooxml/docx.js +295 -0
- package/dist/shortcuts/contract/ooxml/xlsx.js +221 -0
- package/dist/shortcuts/contract/ooxml/zip.js +158 -0
- package/dist/shortcuts/contract/operations/assistant.js +1156 -0
- package/dist/shortcuts/contract/operations/clause-library.js +522 -0
- package/dist/shortcuts/contract/operations/compare.js +193 -0
- package/dist/shortcuts/contract/operations/credit-page.js +34 -0
- package/dist/shortcuts/contract/operations/flow.js +98 -0
- package/dist/shortcuts/contract/operations/page.js +66 -0
- package/dist/shortcuts/contract/operations/performance.js +733 -0
- package/dist/shortcuts/contract/operations/quote.js +557 -0
- package/dist/shortcuts/contract/operations/recommend.js +78 -0
- package/dist/shortcuts/contract/operations/registry.js +18 -0
- package/dist/shortcuts/contract/operations/review.js +83 -0
- package/dist/shortcuts/contract/operations/shared.js +37 -0
- package/dist/shortcuts/contract/operations/upload.js +108 -0
- package/dist/shortcuts/contract/operations/write.js +3 -2
- package/dist/shortcuts/index.js +140 -40
- package/dist/shortcuts/invoice/host.js +2 -1
- package/dist/shortcuts/invoice/manifest.js +36 -12
- package/dist/shortcuts/invoice/operations/issuing-qys.js +132 -36
- package/dist/shortcuts/invoice/operations/reim-auto.js +9 -0
- package/dist/shortcuts/invoice/operations/reim.js +81 -5
- package/dist/shortcuts/invoice/operations/shared.js +12 -5
- package/dist/shortcuts/meeting/host.js +45 -3
- package/dist/shortcuts/meeting/invitation/docx.js +442 -0
- package/dist/shortcuts/meeting/operations/attachment-content.js +418 -0
- package/dist/shortcuts/meeting/operations/attachment.js +442 -0
- package/dist/shortcuts/meeting/operations/eb/cache.js +57 -0
- package/dist/shortcuts/meeting/operations/eb/catalog.js +343 -28
- package/dist/shortcuts/meeting/operations/eb/conflict.js +372 -11
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +710 -0
- package/dist/shortcuts/meeting/operations/eb/decision.js +47 -1
- package/dist/shortcuts/meeting/operations/eb/factory.js +129 -11
- package/dist/shortcuts/meeting/operations/eb/index.js +122 -2
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +378 -0
- package/dist/shortcuts/meeting/operations/eb/room-summary.js +84 -0
- package/dist/shortcuts/meeting/operations/eb/schedule.js +450 -0
- package/dist/shortcuts/meeting/operations/from-group-chat.js +576 -0
- package/dist/shortcuts/meeting/operations/invitation.js +458 -0
- package/dist/shortcuts/meeting/operations/minute-content.js +266 -0
- package/dist/shortcuts/meeting/operations/pipeline.js +489 -0
- package/dist/shortcuts/meeting/operations/qrcode.js +131 -0
- package/dist/shortcuts/meeting/operations/receipts.js +1 -1
- package/dist/shortcuts/meeting/operations/registry.js +18 -0
- package/dist/shortcuts/meeting/operations/summary.js +276 -0
- package/dist/shortcuts/meeting/operations/task-notify.js +325 -0
- package/dist/shortcuts/meeting/operations.js +42 -1
- package/dist/shortcuts/meeting/qr/encoder.js +427 -0
- package/dist/shortcuts/meeting/qr/render.js +103 -0
- package/dist/shortcuts/workflow/index.js +3 -0
- package/dist/shortcuts/workflow/operations/form.js +17 -5
- package/dist/shortcuts/workflow/operations/read.js +13 -6
- package/dist/shortcuts/workflow/operations/registry.js +2 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/businessRules.js +331 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/detailFieldRules.js +133 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +326 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailCache.js +113 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailFetcher.js +259 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +64 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoOutputPlanner.js +28 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.aggregate.js +70 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +267 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +392 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.js +165 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +448 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +348 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +222 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.pipeline.js +66 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +502 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +540 -0
- package/docs/_catalog.md +1 -0
- package/docs/contract.md +39 -4
- package/docs/invoice.md +7 -7
- package/docs/todo-smart-convert/README.md +171 -0
- package/docs/todo-smart-convert/data-contract.md +236 -0
- package/docs/todo-smart-convert/mock/ai-todo-query-target.json +209 -0
- package/docs/todo-smart-convert/subgroup-rules.md +245 -0
- package/package.json +3 -2
- package/scripts/bundle.mjs +63 -0
- package/scripts/package-skill.mjs +1 -1
- package/skill-template/business-info.json +25 -4
- package/skill-template/domains/jinchengda.md +16 -3
- package/skill-template/domains/yepiaotong.md +3 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +111 -31
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -13
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +150 -0
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +87 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +111 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +0 -15
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +0 -13
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +50 -0
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +4 -2
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +74 -0
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +84 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +29 -0
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +28 -0
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +2 -21
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +0 -24
- package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +0 -15
- package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +0 -17
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +70 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -15
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +0 -15
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +1168 -152
- package/skills/weaver-e10-meeting/SKILL.md +493 -17
- package/skills/weaver-e10-meeting/references/meeting-change.md +4 -4
- package/skills/weaver-e10-meeting/references/meeting-create.md +6 -6
- package/skills/weaver-e10-meeting/references/meeting-eb.md +503 -27
- package/skills/weaver-e10-meeting/references/meeting-invitation.md +113 -0
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +6 -6
- package/skills/weaver-e10-meeting/references/meeting-minute-file.md +425 -0
- package/skills/weaver-e10-meeting/references/meeting-queries.md +4 -4
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +15 -15
- package/skills/weaver-e10-meeting/references/meeting-verification.md +19 -11
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-workflow/SKILL.md +23 -1
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +282 -0
- package/skills/weaver-e10-workflow/scripts/todo-summary.cjs +695 -0
- package/skills/weaver-e10-yepiaotong/SKILL.md +15 -11
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +10 -7
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +41 -14
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +54 -26
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +6 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +14 -11
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +97 -56
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +84 -60
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +142 -105
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +53 -194
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -7
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +164 -72
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +8 -2
- package/templates/meeting/invitation.docx +0 -0
|
@@ -81,7 +81,7 @@ weaver-work-cli --json invoice run invoice.reim.file-ocr.preview --input-json '{
|
|
|
81
81
|
|
|
82
82
|
利用发票的 `invoiceDate`(2026-07-28 ~ 2026-07-29)筛选事前申请:
|
|
83
83
|
- `cusCreateDateStart` = "2026-04-29"(往前推90天)
|
|
84
|
-
- `cusCreateDateEnd` = "2026-07-29"
|
|
84
|
+
- `cusCreateDateEnd` = "2026-07-29"(业务结束日;CLI 再 + 1 天后发给接口)
|
|
85
85
|
|
|
86
86
|
→ 继续 Step 1B → Step 2 匹配 → Step 2.5 → Step 3 → Step 4 → Step 5(流程同示例1/2)
|
|
87
87
|
|
|
@@ -101,8 +101,8 @@ AI 直接计算(UTC+8):begin = 今天00:00:00秒时间戳 - 7*86400, end =
|
|
|
101
101
|
{
|
|
102
102
|
"page_size": 10,
|
|
103
103
|
"start_pos": 0,
|
|
104
|
-
"
|
|
105
|
-
"
|
|
104
|
+
"consumption_tm_begin": 1786291200,
|
|
105
|
+
"consumption_tm_end": 1786982399
|
|
106
106
|
}
|
|
107
107
|
```
|
|
108
108
|
|
|
@@ -111,13 +111,13 @@ AI 直接计算(UTC+8):begin = 今天00:00:00秒时间戳 - 7*86400, end =
|
|
|
111
111
|
Windows PowerShell:
|
|
112
112
|
|
|
113
113
|
```powershell
|
|
114
|
-
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"
|
|
114
|
+
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"consumption_tm_begin":1786291200,"consumption_tm_end":1786982399}'
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
macOS/Linux(bash/zsh):
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
|
-
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"
|
|
120
|
+
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"consumption_tm_begin":1786291200,"consumption_tm_end":1786982399}'
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
**返回(CLI 信封中列表在 `data.items`,下面是单条票面结构):**
|
|
@@ -186,7 +186,7 @@ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"s
|
|
|
186
186
|
### Step 1B: 获取事前申请(基于发票日期预筛选)
|
|
187
187
|
|
|
188
188
|
> 已知发票 invoiceDate = "2026-07-30"
|
|
189
|
-
> 事前申请日期一定在开票日期之前 → cusCreateDateEnd = "2026-07-30"
|
|
189
|
+
> 事前申请日期一定在开票日期之前 → cusCreateDateEnd = "2026-07-30"(业务结束日;CLI 再 + 1 天后发给接口)
|
|
190
190
|
> 往前推90天 → cusCreateDateStart = "2026-05-01"
|
|
191
191
|
|
|
192
192
|
**命令:**
|
|
@@ -194,13 +194,13 @@ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"s
|
|
|
194
194
|
Windows PowerShell:
|
|
195
195
|
|
|
196
196
|
```powershell
|
|
197
|
-
weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":
|
|
197
|
+
weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":100,"cusCreateDateStart":"2026-05-01","cusCreateDateEnd":"2026-07-30"}'
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
macOS/Linux(bash/zsh):
|
|
201
201
|
|
|
202
202
|
```bash
|
|
203
|
-
weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":
|
|
203
|
+
weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":100,"cusCreateDateStart":"2026-05-01","cusCreateDateEnd":"2026-07-30"}'
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
**返回:**
|
|
@@ -213,28 +213,18 @@ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pa
|
|
|
213
213
|
"requestid": "1298294241967177729",
|
|
214
214
|
"workflowid": "1181057526276915214",
|
|
215
215
|
"requestname": "交通费报销-后端开发111-2026-07-25",
|
|
216
|
-
"requestnametitle": "交通费报销-后端开发111-2026-07-25 (相关客户:, 相关项目:, 承担主体: , 流程编号:Weaver-FYBX202607000069, 报销总金额:14.47 , 费用承担公司:)",
|
|
217
216
|
"flowStatus": 6,
|
|
218
217
|
"creatorId": "1201729946891231232",
|
|
219
218
|
"creatorName": "后端开发111",
|
|
220
|
-
"creatorDepartmentId": "1201729461554241537",
|
|
221
|
-
"nodeid": "1181057741029220917",
|
|
222
219
|
"createTime": "2026-07-25 10:30:00"
|
|
223
220
|
}
|
|
224
221
|
]
|
|
225
222
|
}
|
|
226
223
|
```
|
|
227
224
|
|
|
228
|
-
### Step 2:
|
|
225
|
+
### Step 2: 按时间关联
|
|
229
226
|
|
|
230
|
-
|
|
231
|
-
- 时间硬约束:invoiceDate "2026-07-30" >= createTime "2026-07-25" → ✅ 满足
|
|
232
|
-
- 费用类型匹配:发票 expenseType="市内交通" ↔ 事前申请 requestname 含"交通费" → +40
|
|
233
|
-
- 时间匹配:invoiceDate 在 createTime 后 5 天(7天内) → +30
|
|
234
|
-
- 同一申请人 → +10
|
|
235
|
-
- 总分 80 → confidence = "high"
|
|
236
|
-
|
|
237
|
-
匹配结果:
|
|
227
|
+
只看日期:invoiceDate `2026-07-30` 晚于 createTime `2026-07-25`,并且在 90 天内。本次只有这一条事前申请,直接绑定,不问用户。
|
|
238
228
|
|
|
239
229
|
```json
|
|
240
230
|
{
|
|
@@ -243,16 +233,17 @@ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pa
|
|
|
243
233
|
"invoiceId": "1295366637717012482",
|
|
244
234
|
"preApprovalId": "1298294241967177729",
|
|
245
235
|
"preApprovalWorkflowId": "1181057526276915214",
|
|
246
|
-
"
|
|
247
|
-
"
|
|
248
|
-
"matchReasons": ["费用类型匹配:交通费", "时间匹配:开票日期在事前申请后5天内", "同一申请人"]
|
|
236
|
+
"preApprovalName": "交通费报销-后端开发111-2026-07-25",
|
|
237
|
+
"matchReason": "开票日期 2026-07-30 只落在 2026-07-25 这一条的 90 天内"
|
|
249
238
|
}
|
|
250
239
|
],
|
|
251
|
-
"
|
|
252
|
-
"
|
|
240
|
+
"pendingChoice": [],
|
|
241
|
+
"unmatchedInvoices": []
|
|
253
242
|
}
|
|
254
243
|
```
|
|
255
244
|
|
|
245
|
+
若同一天还能对上另一条发起日也在 90 天内的事前申请,先把两条列给用户选,选定后再继续。
|
|
246
|
+
|
|
256
247
|
### Step 2.5: 获取报销单工作流
|
|
257
248
|
|
|
258
249
|
**命令:**
|
|
@@ -353,28 +344,25 @@ weaver-work-cli --json invoice run invoice.reim.row-info-batch --input-json '{"i
|
|
|
353
344
|
|
|
354
345
|
**③ 交通类发票取行程:** `invoice.get`(`{"fid":"1295366637717012482"}`)→ `from`=「仁济医院南院区门诊部(南门)南侧」、`to`=「浦江瑞和城柒街区30号」。
|
|
355
346
|
|
|
356
|
-
**④ 取发票对象:**
|
|
347
|
+
**④ 取发票对象:** 只传发票。`itinerary` 返回的凭证 `1298798990831518001` 不传,明细「相关凭证」由发票联动带出。
|
|
357
348
|
|
|
358
349
|
Windows PowerShell:
|
|
359
350
|
|
|
360
351
|
```powershell
|
|
361
|
-
weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482"
|
|
352
|
+
weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482"]}'
|
|
362
353
|
```
|
|
363
354
|
|
|
364
355
|
macOS/Linux(bash/zsh):
|
|
365
356
|
|
|
366
357
|
```bash
|
|
367
|
-
weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482"
|
|
358
|
+
weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482"]}'
|
|
368
359
|
```
|
|
369
360
|
|
|
370
|
-
> `itinerary` 与 `browse-field.data` 同时发起时还不知道凭证 ID:先只传发票 `fid`,`row-info-batch` 返回新的凭证 ID 后再补调一次只传凭证。
|
|
371
|
-
|
|
372
361
|
### Step 4: 组装 `data`
|
|
373
362
|
|
|
374
363
|
```json
|
|
375
364
|
{
|
|
376
365
|
"main": {
|
|
377
|
-
"1256786432515129369": "交通费报销-后端开发111-2026-07-25(1298294241967177729)",
|
|
378
366
|
"100003720000000088": "上海市内交通费(滴滴出行)",
|
|
379
367
|
"100003720000000687": "泛微上海(100504500000311504)"
|
|
380
368
|
},
|
|
@@ -385,10 +373,8 @@ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fid
|
|
|
385
373
|
"100003720000016373": "108.2",
|
|
386
374
|
"100003720000052200": "人民币(100001050000000001)",
|
|
387
375
|
"100003720000000360": "市内交通费(100502270000000006)",
|
|
388
|
-
"100003720000000361": "仁济医院南院-浦江瑞和城",
|
|
389
376
|
"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 返回的其余键原样保留"}]
|
|
377
|
+
"100003720000077896": [{"optionId": "1295366637717012482", "id": "1295366637717012482", "fid": "1295366637717012482", "content": "增值税电子普通发票-36901189", "...": "browse-field.data 返回的其余键原样保留"}]
|
|
392
378
|
}
|
|
393
379
|
]
|
|
394
380
|
}
|
|
@@ -430,27 +416,29 @@ weaver-work-cli --json workflow run workflow.createRequest --input ./reim-create
|
|
|
430
416
|
|
|
431
417
|
**场景**:2 张发票(交通+住宿)均匹配到同一条出差事前申请。
|
|
432
418
|
|
|
433
|
-
**出差拦截**:`workFlowName` 含「差旅」或事前申请名称含「出差」→
|
|
419
|
+
**出差拦截**:`workFlowName` 含「差旅」或事前申请名称含「出差」→ **一次**请用户一起填写相关客户和相关项目。问清之前禁止 `createRequest`。不要另问合同号。
|
|
420
|
+
**相关流程**:差旅 / 外出报销每一行明细「相关流程」必须是 `{requestname}({requestid})`。没有事前申请就先让用户选,不能空着建单。
|
|
434
421
|
**话费拦截**:`workFlowName` 含「话费补贴标准审批流程」或「话费报销」→ **必须先按 [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md) 核对账单截图、账单构成和岗位上限,再按标准计算实报金额**。
|
|
435
422
|
|
|
436
423
|
```markdown
|
|
437
|
-
|
|
424
|
+
当前为出差报销。请一起填写:
|
|
425
|
+
相关客户(必须是具体客户名称)、相关项目(没有可以说「不填」)。
|
|
426
|
+
合同号不用填。
|
|
438
427
|
```
|
|
439
428
|
|
|
440
|
-
用户给出客户名称(如「XX科技」)→
|
|
429
|
+
用户给出客户名称(如「XX科技」)→ 先 `invoice.reim.field.search`:`match=unique` 直接填 `名称(ID)`,`match=multiple` 把候选列给用户选,`match=none` 请用户换名称。**不要**把未消歧简称直接丢给 `createRequest`。用户不提供客户 → **不允许报销,不创建报销单**。
|
|
441
430
|
|
|
442
431
|
**`data` 关键点**:
|
|
443
432
|
|
|
444
433
|
```json
|
|
445
434
|
{
|
|
446
435
|
"main": {
|
|
447
|
-
"<事前申请流程id>": "北京出差申请-张三-2026-07-20(1299854672520364033)",
|
|
448
436
|
"<相关客户id>": "XX科技"
|
|
449
437
|
},
|
|
450
438
|
"details": {
|
|
451
439
|
"<费用明细subFormId>": [
|
|
452
|
-
{"<申请金额id>": "76.80", "<币种id>": "人民币(100001050000000001)", "<相关发票id>": [{"fid": "INV001", "...": "..."}]},
|
|
453
|
-
{"<申请金额id>": "480.00", "<币种id>": "人民币(100001050000000001)", "<相关发票id>": [{"fid": "INV002", "...": "..."}]}
|
|
440
|
+
{"<申请金额id>": "76.80", "<币种id>": "人民币(100001050000000001)", "<相关流程id>": "北京出差申请-张三-2026-07-20(1299854672520364033)", "<相关发票id>": [{"fid": "INV001", "...": "..."}]},
|
|
441
|
+
{"<申请金额id>": "480.00", "<币种id>": "人民币(100001050000000001)", "<相关流程id>": "北京出差申请-张三-2026-07-20(1299854672520364033)", "<相关发票id>": [{"fid": "INV002", "...": "..."}]}
|
|
454
442
|
]
|
|
455
443
|
}
|
|
456
444
|
}
|
|
@@ -458,7 +446,7 @@ weaver-work-cli --json workflow run workflow.createRequest --input ./reim-create
|
|
|
458
446
|
|
|
459
447
|
**要点**:
|
|
460
448
|
- 一张发票一行,数组顺序就是明细行顺序(行程单有多段行程也不拆,见示例13)
|
|
461
|
-
-
|
|
449
|
+
- 两行都绑定同一个事前申请(明细「相关流程」同值);主表「事前申请流程」不赋值
|
|
462
450
|
- 每行「相关发票」只放该行发票的 1 个对象
|
|
463
451
|
|
|
464
452
|
---
|
|
@@ -469,7 +457,7 @@ weaver-work-cli --json workflow run workflow.createRequest --input ./reim-create
|
|
|
469
457
|
|
|
470
458
|
**差异点**:
|
|
471
459
|
- 候选只有1个 → 直接使用;多个 → 自动匹配最相关的
|
|
472
|
-
-
|
|
460
|
+
- 明细「相关流程」不传(主表「事前申请流程」任何情况都不赋值)。若选定的工作流是差旅 / 外出,不能走这条:必须先让用户选定事前申请,再给每一行明细「相关流程」赋值
|
|
473
461
|
- 其他流程与示例1 一致
|
|
474
462
|
|
|
475
463
|
---
|
|
@@ -579,8 +567,8 @@ weaver-work-cli --json workflow run workflow.editApply --input-json '{"context":
|
|
|
579
567
|
|
|
580
568
|
| 轮次 | 用户 | AI 操作 |
|
|
581
569
|
|------|------|---------|
|
|
582
|
-
| 1 | "查下我的事前申请" | 调用 `invoice.reim.requests.list
|
|
583
|
-
| 2 | "查下对应的发票" | 复用事前申请日期,`
|
|
570
|
+
| 1 | "查下我的事前申请" | 调用 `invoice.reim.requests.list`(不传 `cusCreateDateEnd`,CLI 按东八区当天 + 1 天填入;若传入结束日,CLI 再 + 1 天后发给接口),展示列表 |
|
|
571
|
+
| 2 | "查下对应的发票" | 复用事前申请日期,`consumption_tm_begin` = 最早 createTime 的秒级时间戳,调用 `invoice.list` 展示 |
|
|
584
572
|
| 3 | "报销吧" | 上下文已有两组数据 → 跳过 1A/1B,直接 Step 2 → 2.5 → 3 → 4 → 5 |
|
|
585
573
|
|
|
586
574
|
### 示例9:查询后选部分报销
|
|
@@ -631,9 +619,11 @@ AI 操作:
|
|
|
631
619
|
用户说:"帮我报销一下去重庆的发票,承担主体:边宝,合同编号:20250104933"
|
|
632
620
|
|
|
633
621
|
- 流程标题:`"龚为明8月去重庆交通费报销"`(「去重庆」取用户原话,没说从哪出发就不写出发城市;月份取发票费用日期 2026-08-19)
|
|
634
|
-
- 合同号传 `"20250104933"
|
|
635
|
-
-
|
|
636
|
-
-
|
|
622
|
+
- 合同号传 `"20250104933"`;**承担主体不传**(「边宝」也不传,等合同联动)
|
|
623
|
+
- **相关客户、相关项目还没确认 → 一次请用户一起填写,禁止直接存草稿,也不要再问合同号。** 这是出差,「去重庆」必须给具体客户;项目可以说「不填」。用户给出名称后先 `invoice.reim.field.search` 消歧,写入 `data` 再 `createRequest`。明细「费用说明」不传,由发票联动带出
|
|
624
|
+
- 若用户已确认客户 / 项目,创建后 `linkageResult` 返回(2026-10-21 真机,合同本身带出客户项目时):`字段联动带出:…实报金额=50.07、承担主体=朱洪磊、相关客户=中国航空集团有限公司、合同号=20250104933、相关项目=中航集团办公平台改造及升级项目。`
|
|
625
|
+
- 原样粘贴 `finalMarkdown` 后补一句:「承担主体已按合同 20250104933 联动带出:朱洪磊;你提到的承担主体「边宝」与合同不一致,已按合同联动为准。」客户 / 项目若被联动改写,同样如实告诉用户
|
|
626
|
+
- 联动把已确认的客户 / 项目冲空了 → 用已确认值 `workflow.edit*` 写回,不要再问、不要另建一张单
|
|
637
627
|
|
|
638
628
|
---
|
|
639
629
|
|
|
@@ -653,11 +643,11 @@ AI 操作:
|
|
|
653
643
|
}
|
|
654
644
|
```
|
|
655
645
|
|
|
656
|
-
`itineraryData` 有 3 段,**仍然只填 1 行**:费用日期取外层 `date
|
|
646
|
+
`itineraryData` 有 3 段,**仍然只填 1 行**:费用日期取外层 `date`,金额取发票金额,科目取外层科目。「费用说明」不传,不要把 `fysm` 或 `invoice.get` 的起止点写进去。「相关凭证」也不传,`itinerary` 的行程单由发票联动带出。
|
|
657
647
|
|
|
658
648
|
```json
|
|
659
649
|
"100003690000000011": [
|
|
660
|
-
{"100003720000000419": "2026-08-19", "100003720000016373": "50.07", "100003720000000360": "5301滴滴车票(100502270000000177)", "
|
|
650
|
+
{"100003720000000419": "2026-08-19", "100003720000016373": "50.07", "100003720000000360": "5301滴滴车票(100502270000000177)", "100003720000052200": "人民币(100001050000000001)", "100003720000077896": [<发票对象>]}
|
|
661
651
|
]
|
|
662
652
|
```
|
|
663
653
|
|
|
@@ -679,6 +669,34 @@ AI 操作:
|
|
|
679
669
|
|
|
680
670
|
---
|
|
681
671
|
|
|
672
|
+
## 示例15:总部费用报销按项目带出合同号
|
|
673
|
+
|
|
674
|
+
用户说「帮我报销」,发票已确认,工作流是「总部费用报销」。`historyRequestData` 最近一条:相关客户「中国航空集团有限公司」,相关项目「中航集团办公平台改造及升级项目」,合同号 `20250104933`。
|
|
675
|
+
|
|
676
|
+
一次问用户:
|
|
677
|
+
|
|
678
|
+
> 请一起填写相关客户和相关项目。上次是:中国航空集团有限公司 / 中航集团办公平台改造及升级项目。回复「用上次的」,或直接写下客户和项目。合同号不用填。
|
|
679
|
+
|
|
680
|
+
- 用户说「用上次的」→ 写入历史客户和项目;合同号用同一条历史的 `20250104933`,不问。承担主体不传。然后存草稿,建单后告诉用户带出的合同号。
|
|
681
|
+
- 用户写下新的客户和项目 → 先 `invoice.reim.field.search` 消歧。合同号按这个项目在历史里最近一条带出;历史没有这个项目就用 `20260999`,不问。
|
|
682
|
+
- 不要把合同号列进提问,也不要再 `workflow.search` / `workflow.detail`。
|
|
683
|
+
|
|
684
|
+
---
|
|
685
|
+
|
|
686
|
+
## 示例16:草稿落库后检查客户、项目和相关凭证
|
|
687
|
+
|
|
688
|
+
`workflow.createRequest` 返回 `CREATED`。先原样贴出 `finalMarkdown`,再看 `previewDetails` / `linkageResult`。看不清时用返回的 `requestId` 调一次 `workflow.editLoad`。
|
|
689
|
+
|
|
690
|
+
本单是出差。第 1 行是火车票,「相关凭证」落库后为空。主表「相关客户」有值(建单前已确认)。主表「相关项目」为空,但用户建单前已说「不填」→ 项目不算缺项。
|
|
691
|
+
|
|
692
|
+
在 `finalMarkdown` 后面只补一句:
|
|
693
|
+
|
|
694
|
+
> 第 1 行「相关凭证」发票联动没有带出,需要的话可以在表单里自己挂。
|
|
695
|
+
|
|
696
|
+
不补写「相关凭证」,也不向用户要行程单,不要再建一张报销单。若联动把建单前已确认的客户冲空了,用已确认的 `名称(ID)` 直接 `editPrepare` → `editApply`,不要再问。`editPrepare` 返回多个候选时,才让用户选一个。
|
|
697
|
+
|
|
698
|
+
---
|
|
699
|
+
|
|
682
700
|
## 关键检查清单
|
|
683
701
|
|
|
684
702
|
调用 `workflow.createRequest` 前确认:
|
|
@@ -689,17 +707,23 @@ AI 操作:
|
|
|
689
707
|
4. [ ] `data` 的键全部来自本次 `createForm` 的 `fields[].id`,没有 `fields` 之外的字段(实报金额、附件数、承担人所有上级等不传)
|
|
690
708
|
5. [ ] 带 `initialValue` 且不需改写的字段没有重复传;**例外:每行明细都显式传了「币种」`人民币(100001050000000001)`**(不传会让「申请金额」联动失效)
|
|
691
709
|
6. [ ] 浏览按钮写 `名称(ID)`,没有裸 ID;Select 写选项名,不是 optionValue
|
|
692
|
-
7. [ ] 每行「相关发票」是 `invoice.browse-field.data` 返回的 1
|
|
693
|
-
8. [ ]
|
|
694
|
-
9. [ ]
|
|
695
|
-
10. [ ]
|
|
696
|
-
11. [ ]
|
|
697
|
-
12. [ ]
|
|
698
|
-
13. [ ]
|
|
699
|
-
14. [ ]
|
|
710
|
+
7. [ ] 每行「相关发票」是 `invoice.browse-field.data` 返回的 1 个发票对象;`browse-field.data` 只传了发票,没有传凭证
|
|
711
|
+
8. [ ] 明细「费用说明」「费用明细」「相关凭证」都没有写入 `data`,留给「相关发票」联动带出
|
|
712
|
+
9. [ ] 相关凭证(17/18/57/58)没有单独成行;行程单有多段行程也是一张发票一行。没有用 `fysm`、起止点或账单说明生成费用说明
|
|
713
|
+
10. [ ] 每行「费用类型(科目)」有值,匹配不到填 `其他-管理费用(100502270000000104)`
|
|
714
|
+
11. [ ] 文本字段没有 `*` 号
|
|
715
|
+
12. [ ] **相关客户、相关项目已在同一次提问里确认**(客户有消歧后的 `名称(ID)` 或非出差默认「泛微上海」;项目有名称或用户已说「不填」)。没确认不允许调用 `workflow.createRequest`。没有向用户要合同号
|
|
716
|
+
13. [ ] 合同号按已确认项目从历史带出;对不上或项目「不填」用 `20260999`。不是 `20260999` 时承担主体不传,客户 / 项目仍写入 `data`
|
|
717
|
+
14. [ ] 总部费用报销没有把合同号列进提问。用户自己说了合同号才用用户的
|
|
718
|
+
15. [ ] 话费报销:金额字段填的是核算后的实报金额
|
|
719
|
+
16. [ ] `action` 是 `"draft"`,没有问用户「存草稿 / 提交审批」,也没有传 `"submit"`
|
|
720
|
+
|
|
721
|
+
草稿落库后确认:
|
|
722
|
+
|
|
723
|
+
17. [ ] 明细「费用说明」「费用明细」「相关凭证」仍空时已告诉用户是发票联动没带出,没有补写,也没有向用户要行程单,也没有向用户要起点和终点。客户 / 项目被冲空则写回。没有另建报销单,也没有补问合同号
|
|
700
724
|
|
|
701
725
|
修改报销单前确认:
|
|
702
726
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
727
|
+
18. [ ] `requestId` 来自 `workflow.createRequest` 的返回结果
|
|
728
|
+
19. [ ] 走 `workflow.editLoad` → `workflow.editPrepare` → 用户确认 → `workflow.editApply`,只传要改的字段。Step 5.3 里用户刚给的值不再二次确认
|
|
729
|
+
20. [ ] 只改 `editableFields` 里的字段,遇 `notEditable` 如实转述,不换字段 id 绕过。明细「费用说明」「费用明细」「相关凭证」不在修改范围内
|