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.
Files changed (219) hide show
  1. package/dist/chunks/archive-U766FTFH.js +2537 -0
  2. package/dist/chunks/archive-oa-DMWEKX3L.js +1317 -0
  3. package/dist/chunks/asset-TCR7VDEV.js +2109 -0
  4. package/dist/chunks/attachment-content-AQNX5N3S.js +23 -0
  5. package/dist/chunks/blog-EVZWGDVM.js +2157 -0
  6. package/dist/chunks/caizhilian-JOWS6SL5.js +10087 -0
  7. package/dist/chunks/calendar-5WNCV66Q.js +1195 -0
  8. package/dist/chunks/chunk-2DUV44UX.js +15606 -0
  9. package/dist/chunks/chunk-324YPTC2.js +1607 -0
  10. package/dist/chunks/chunk-65QMVWHS.js +231 -0
  11. package/dist/chunks/chunk-6V7ZLF34.js +387 -0
  12. package/dist/chunks/chunk-AC7KJWC5.js +358 -0
  13. package/dist/chunks/chunk-AJ62BGAW.js +29 -0
  14. package/dist/chunks/chunk-BUSC6UAE.js +43 -0
  15. package/dist/chunks/chunk-CVZ2JOSW.js +62 -0
  16. package/dist/chunks/chunk-D4LTJSJD.js +477 -0
  17. package/dist/chunks/chunk-EG6ZU444.js +654 -0
  18. package/dist/chunks/chunk-EZALDOQH.js +383 -0
  19. package/dist/chunks/chunk-FMPJJYYI.js +106 -0
  20. package/dist/chunks/chunk-G2JSIUWF.js +769 -0
  21. package/dist/chunks/chunk-GCG2NMWR.js +703 -0
  22. package/dist/chunks/chunk-GPMFD4RD.js +75 -0
  23. package/dist/chunks/chunk-H3WDBYJW.js +508 -0
  24. package/dist/chunks/chunk-H6XSTSLM.js +2357 -0
  25. package/dist/chunks/chunk-J7RJTZSV.js +5556 -0
  26. package/dist/chunks/chunk-LUSPKZKY.js +53 -0
  27. package/dist/chunks/chunk-NIAJ5ZCG.js +73 -0
  28. package/dist/chunks/chunk-NOODWMCL.js +584 -0
  29. package/dist/chunks/chunk-OOUTBLZ4.js +51 -0
  30. package/dist/chunks/chunk-P26ZWSKU.js +73 -0
  31. package/dist/chunks/chunk-QWY6PGL6.js +3472 -0
  32. package/dist/chunks/chunk-R2IJAK7T.js +464 -0
  33. package/dist/chunks/chunk-R7O5PUWO.js +205 -0
  34. package/dist/chunks/chunk-RCGYCOMG.js +6962 -0
  35. package/dist/chunks/chunk-VZTXRG6X.js +403 -0
  36. package/dist/chunks/chunk-WHD4XMRP.js +161 -0
  37. package/dist/chunks/chunk-YLCYX7LE.js +371 -0
  38. package/dist/chunks/chunk-ZEDWSH32.js +68 -0
  39. package/dist/chunks/continuation-2CKSBLA6.js +11 -0
  40. package/dist/chunks/continuation-HZIZRZBX.js +13 -0
  41. package/dist/chunks/continuation-NLECEJPX.js +11 -0
  42. package/dist/chunks/ebuilder-form-NJ4YK6CC.js +2276 -0
  43. package/dist/chunks/ehr-MMYN36VA.js +5241 -0
  44. package/dist/chunks/employee-SAK2QYXX.js +11 -0
  45. package/dist/chunks/esb-HIWHOU7Q.js +141 -0
  46. package/dist/chunks/fna-KBACQTA5.js +1444 -0
  47. package/dist/chunks/host-3OHS5QUX.js +21 -0
  48. package/dist/chunks/host-IG6KEH5Q.js +19 -0
  49. package/dist/chunks/host-KQL5N4HO.js +23 -0
  50. package/dist/chunks/host-LLSZQCWR.js +17 -0
  51. package/dist/chunks/hrm-LYEC67ZQ.js +244 -0
  52. package/dist/chunks/im-RN2UKAEU.js +252 -0
  53. package/dist/chunks/invoice-EEPHLAF6.js +5179 -0
  54. package/dist/chunks/jiuchuanhui-WVVZYSJE.js +1940 -0
  55. package/dist/chunks/lazy-dispatch-MDOFFL2S.js +28 -0
  56. package/dist/chunks/mail-LNQLTF6L.js +2695 -0
  57. package/dist/chunks/meeting-XSD3BDVQ.js +504 -0
  58. package/dist/chunks/msg-parse-4GSQ2WTO.js +41 -0
  59. package/dist/chunks/okr-TMWTIU2K.js +2482 -0
  60. package/dist/chunks/plan-A2FSFA7T.js +2025 -0
  61. package/dist/chunks/project-T26QLBQF.js +1361 -0
  62. package/dist/chunks/registry-2VLUAESA.js +14 -0
  63. package/dist/chunks/registry-JCFEYXOE.js +18 -0
  64. package/dist/chunks/registry-NYPYMZXG.js +16 -0
  65. package/dist/chunks/registry-Q7OQJ3SU.js +19 -0
  66. package/dist/chunks/registry-ZJMJVWFA.js +19 -0
  67. package/dist/chunks/room-recommend-UR4ZDZS6.js +20 -0
  68. package/dist/chunks/schedule-5L2PM4M6.js +24 -0
  69. package/dist/chunks/state-Y2XBP6YE.js +15 -0
  70. package/dist/chunks/workflow-TR6PG2SL.js +245 -0
  71. package/dist/cmd/argv.js +45 -0
  72. package/dist/cmd/docs/index.js +3 -3
  73. package/dist/cmd/lazy-dispatch.js +20 -0
  74. package/dist/cmd/root.js +2 -4
  75. package/dist/cmd/setup/index.js +2 -2
  76. package/dist/cmd/skills/index.js +2 -2
  77. package/dist/core/package-paths.js +47 -0
  78. package/dist/index.js +163 -7
  79. package/dist/internal/e10/auth/xiaoe.js +3 -3
  80. package/dist/internal/e10/request-runtime.js +18 -62
  81. package/dist/internal/skills/detector.js +2 -2
  82. package/dist/shortcuts/contract/data/performance-catalog.js +1306 -0
  83. package/dist/shortcuts/contract/host.js +91 -35
  84. package/dist/shortcuts/contract/index.js +213 -0
  85. package/dist/shortcuts/contract/manifest.js +928 -0
  86. package/dist/shortcuts/contract/ooxml/docx.js +295 -0
  87. package/dist/shortcuts/contract/ooxml/xlsx.js +221 -0
  88. package/dist/shortcuts/contract/ooxml/zip.js +158 -0
  89. package/dist/shortcuts/contract/operations/assistant.js +1156 -0
  90. package/dist/shortcuts/contract/operations/clause-library.js +522 -0
  91. package/dist/shortcuts/contract/operations/compare.js +193 -0
  92. package/dist/shortcuts/contract/operations/credit-page.js +34 -0
  93. package/dist/shortcuts/contract/operations/flow.js +98 -0
  94. package/dist/shortcuts/contract/operations/page.js +66 -0
  95. package/dist/shortcuts/contract/operations/performance.js +733 -0
  96. package/dist/shortcuts/contract/operations/quote.js +557 -0
  97. package/dist/shortcuts/contract/operations/recommend.js +78 -0
  98. package/dist/shortcuts/contract/operations/registry.js +18 -0
  99. package/dist/shortcuts/contract/operations/review.js +83 -0
  100. package/dist/shortcuts/contract/operations/shared.js +37 -0
  101. package/dist/shortcuts/contract/operations/upload.js +108 -0
  102. package/dist/shortcuts/contract/operations/write.js +3 -2
  103. package/dist/shortcuts/index.js +140 -40
  104. package/dist/shortcuts/invoice/host.js +2 -1
  105. package/dist/shortcuts/invoice/manifest.js +36 -12
  106. package/dist/shortcuts/invoice/operations/issuing-qys.js +132 -36
  107. package/dist/shortcuts/invoice/operations/reim-auto.js +9 -0
  108. package/dist/shortcuts/invoice/operations/reim.js +81 -5
  109. package/dist/shortcuts/invoice/operations/shared.js +12 -5
  110. package/dist/shortcuts/meeting/host.js +45 -3
  111. package/dist/shortcuts/meeting/invitation/docx.js +442 -0
  112. package/dist/shortcuts/meeting/operations/attachment-content.js +418 -0
  113. package/dist/shortcuts/meeting/operations/attachment.js +442 -0
  114. package/dist/shortcuts/meeting/operations/eb/cache.js +57 -0
  115. package/dist/shortcuts/meeting/operations/eb/catalog.js +343 -28
  116. package/dist/shortcuts/meeting/operations/eb/conflict.js +372 -11
  117. package/dist/shortcuts/meeting/operations/eb/create-flow.js +710 -0
  118. package/dist/shortcuts/meeting/operations/eb/decision.js +47 -1
  119. package/dist/shortcuts/meeting/operations/eb/factory.js +129 -11
  120. package/dist/shortcuts/meeting/operations/eb/index.js +122 -2
  121. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +378 -0
  122. package/dist/shortcuts/meeting/operations/eb/room-summary.js +84 -0
  123. package/dist/shortcuts/meeting/operations/eb/schedule.js +450 -0
  124. package/dist/shortcuts/meeting/operations/from-group-chat.js +576 -0
  125. package/dist/shortcuts/meeting/operations/invitation.js +458 -0
  126. package/dist/shortcuts/meeting/operations/minute-content.js +266 -0
  127. package/dist/shortcuts/meeting/operations/pipeline.js +489 -0
  128. package/dist/shortcuts/meeting/operations/qrcode.js +131 -0
  129. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  130. package/dist/shortcuts/meeting/operations/registry.js +18 -0
  131. package/dist/shortcuts/meeting/operations/summary.js +276 -0
  132. package/dist/shortcuts/meeting/operations/task-notify.js +325 -0
  133. package/dist/shortcuts/meeting/operations.js +42 -1
  134. package/dist/shortcuts/meeting/qr/encoder.js +427 -0
  135. package/dist/shortcuts/meeting/qr/render.js +103 -0
  136. package/dist/shortcuts/workflow/index.js +3 -0
  137. package/dist/shortcuts/workflow/operations/form.js +17 -5
  138. package/dist/shortcuts/workflow/operations/read.js +13 -6
  139. package/dist/shortcuts/workflow/operations/registry.js +2 -0
  140. package/dist/shortcuts/workflow/operations/todoSmartConvert/businessRules.js +331 -0
  141. package/dist/shortcuts/workflow/operations/todoSmartConvert/detailFieldRules.js +133 -0
  142. package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +326 -0
  143. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailCache.js +113 -0
  144. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailFetcher.js +259 -0
  145. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +64 -0
  146. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoOutputPlanner.js +28 -0
  147. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.aggregate.js +70 -0
  148. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +267 -0
  149. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +392 -0
  150. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.js +165 -0
  151. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +448 -0
  152. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +348 -0
  153. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +222 -0
  154. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.pipeline.js +66 -0
  155. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +502 -0
  156. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +540 -0
  157. package/docs/_catalog.md +1 -0
  158. package/docs/contract.md +39 -4
  159. package/docs/invoice.md +7 -7
  160. package/docs/todo-smart-convert/README.md +171 -0
  161. package/docs/todo-smart-convert/data-contract.md +236 -0
  162. package/docs/todo-smart-convert/mock/ai-todo-query-target.json +209 -0
  163. package/docs/todo-smart-convert/subgroup-rules.md +245 -0
  164. package/package.json +3 -2
  165. package/scripts/bundle.mjs +63 -0
  166. package/scripts/package-skill.mjs +1 -1
  167. package/skill-template/business-info.json +25 -4
  168. package/skill-template/domains/jinchengda.md +16 -3
  169. package/skill-template/domains/yepiaotong.md +3 -3
  170. package/skills/weaver-e10-jinchengda/SKILL.md +111 -31
  171. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -13
  172. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +150 -0
  173. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +87 -0
  174. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +111 -0
  175. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +0 -15
  176. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +0 -13
  177. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +50 -0
  178. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +4 -2
  179. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +74 -0
  180. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +84 -0
  181. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +29 -0
  182. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +28 -0
  183. package/skills/weaver-e10-jinchengda/references/contract-request-status.md +2 -21
  184. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +0 -24
  185. package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +0 -15
  186. package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +0 -17
  187. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +70 -0
  188. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -15
  189. package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +0 -15
  190. package/skills/weaver-e10-jinchengda/references/source-manifest.json +1168 -152
  191. package/skills/weaver-e10-meeting/SKILL.md +493 -17
  192. package/skills/weaver-e10-meeting/references/meeting-change.md +4 -4
  193. package/skills/weaver-e10-meeting/references/meeting-create.md +6 -6
  194. package/skills/weaver-e10-meeting/references/meeting-eb.md +503 -27
  195. package/skills/weaver-e10-meeting/references/meeting-invitation.md +113 -0
  196. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +6 -6
  197. package/skills/weaver-e10-meeting/references/meeting-minute-file.md +425 -0
  198. package/skills/weaver-e10-meeting/references/meeting-queries.md +4 -4
  199. package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +15 -15
  200. package/skills/weaver-e10-meeting/references/meeting-verification.md +19 -11
  201. package/skills/weaver-e10-meeting.zip +0 -0
  202. package/skills/weaver-e10-workflow/SKILL.md +23 -1
  203. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +282 -0
  204. package/skills/weaver-e10-workflow/scripts/todo-summary.cjs +695 -0
  205. package/skills/weaver-e10-yepiaotong/SKILL.md +15 -11
  206. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
  207. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +10 -7
  208. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +41 -14
  209. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +54 -26
  210. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +6 -5
  211. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +14 -11
  212. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +97 -56
  213. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +84 -60
  214. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +142 -105
  215. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +53 -194
  216. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -7
  217. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +164 -72
  218. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +8 -2
  219. package/templates/meeting/invitation.docx +0 -0
@@ -17,6 +17,7 @@
17
17
  | 获取发票明细行预填信息 | `invoice.reim.row-info` / `invoice.reim.row-info-batch` | yepiaotong | read |
18
18
  | 取发票字段对象 | `invoice.browse-field.data` | yepiaotong | read |
19
19
  | 获取当前人员及上级(兜底) | `invoice.reim.employee-superiors` | yepiaotong | read |
20
+ | 相关客户 / 相关项目模糊搜索 | `invoice.reim.field.search` | yepiaotong | read |
20
21
  | 载入报销表单 | `workflow.createForm` | workflow | read |
21
22
  | 创建报销单(固定存草稿) | `workflow.createRequest` | workflow | high-risk-write |
22
23
  | 修改已创建的报销单 | `workflow.editLoad` / `workflow.editPrepare` / `workflow.editApply` | workflow | read / read-before-write / high-risk-write |
@@ -25,30 +26,30 @@
25
26
 
26
27
  ## 处理链
27
28
 
28
- 1. 获取发票:已有 `fid` 时可用 `invoice.get`;已有 E10 `fileId` 时用 `invoice.reim.file-ocr.preview`;按日期批量报销用 `invoice.reim.candidates.list`(只取 `available`),按关键词/号码筛选用 `invoice.list`,默认未报销发票。
29
+ 1. 获取发票:已有 `fid` 时可用 `invoice.get`;已有 E10 `fileId` 时用 `invoice.reim.file-ocr.preview`;按日期批量报销用 `invoice.reim.candidates.list`(只取 `available`),按关键词/号码筛选用 `invoice.list`,默认未报销发票。日期筛选默认用消费日期 `consumption_tm_begin` / `consumption_tm_end`。
29
30
  2. 展示发票汇总,让用户确认哪些发票进入报销。
30
- 3. 用 `invoice.reim.requests.list` 获取事前申请,再按时间、费用类型和标题做匹配;原始 ID、日期、金额必须逐字符保留。
31
+ 3. 用 `invoice.reim.requests.list` 获取事前申请,再只按开票日期和事前申请发起日期关联。一张发票时间上只落在一条里就直接绑定;落在多条里,或没有开票日期,先让用户选。原始 ID、日期、金额必须逐字符保留。用户没有指定结束日期时不要传 `cusCreateDateEnd`,CLI 按东八区当天 + 1 天填入。传入的结束日 CLI 也会再 + 1 天后发给接口。
31
32
  4. 用 `invoice.reim.workflow.resolve` 得到报销工作流,必要时按工作流分组。
32
- 5. 对每组并行调用 `workflow.createForm`(`workflow` 传 `{workFlowName}({workFlowId})`)、`invoice.reim.row-info-batch`、`invoice.browse-field.data`(发票 + 配对凭证的 `fid`)。
33
- 6. 按 [`reim-form-fill-rules.md`](reim-form-fill-rules.md) 组装 `createRequest` 的 `data`,直接调用 `workflow.createRequest` 存草稿(`action` 固定 `"draft"`,不问用户),结果原样粘贴 `finalMarkdown`。命中「话费补贴标准审批流程」或「话费报销」时,必须先读 [`reim-phone-subsidy-rules.md`](reim-phone-subsidy-rules.md),按月度标准核算实报金额,不能直接用发票金额填单。
34
- 7. 报销单创建成功后,后续修正使用 `workflow.editLoad` → `workflow.editPrepare` → 用户确认 → `workflow.editApply`,不要重复创建同一组发票的报销单。
33
+ 5. 对每组并行调用 `workflow.createForm`(`workflow` 传 `{workFlowName}({workFlowId})`)、`invoice.reim.row-info-batch`、`invoice.browse-field.data`(只传发票的 `fid`,不传凭证)。
34
+ 6. 按 [`reim-form-fill-rules.md`](reim-form-fill-rules.md) 组装 `createRequest` 的 `data`。差旅 / 外出报销时,每一行明细「相关流程」必须是 `{requestname}({requestid})`,没有事前申请就先让用户选,禁止空着建单。**相关客户和相关项目同一次让用户一起输入**(项目可「不填」),不要先建空草稿,也不要拆成两轮,不要询问合同号。用户给出名称时,先 `invoice.reim.field.search`:一条直接填 `名称(ID)`,多条让用户选,零条请用户换名称。合同号按已确认的项目从 `historyRequestData` 最近一条带出,对不上则用 `20260999`(见 [`reim-workflow.md`](reim-workflow.md) Step 4.4、Step 4.5)。明细「费用说明」「费用明细」「相关凭证」禁止写入,由「相关发票」联动自动填充。然后直接调用 `workflow.createRequest` 存草稿(`action` 固定 `"draft"`,不问用户「存草稿 / 提交审批」),结果原样粘贴 `finalMarkdown`。命中「话费补贴标准审批流程」或「话费报销」时,必须先读 [`reim-phone-subsidy-rules.md`](reim-phone-subsidy-rules.md),按月度标准核算实报金额,不能直接用发票金额填单。
35
+ 7. 报销单创建成功后,先按 [reim-workflow.md](reim-workflow.md) Step 5.3 检查落库结果:客户 / 项目是否被联动冲空。已确认过的名称直接写回,不要再问。再用 `workflow.editLoad` → `workflow.editPrepare` → `workflow.editApply` 写回。不要重复创建同一组发票的报销单。用户主动改已有报销单时同样走这条修改链。
35
36
 
36
37
  完整编排见 [`reim-workflow.md`](reim-workflow.md)。
37
38
 
38
39
  ## 命令
39
40
 
40
- 查询事前申请:
41
+ 查询事前申请。下面示例里的 `cusCreateDateEnd` 是业务结束日,CLI 会再 + 1 天后发给接口。只查列表、用户没指定结束日期时,去掉该字段,CLI 按东八区当天 + 1 天填入:
41
42
 
42
43
  Windows PowerShell:
43
44
 
44
45
  ```powershell
45
- 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"}'
46
+ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":100,"requestname":"交通","cusCreateDateStart":"2026-07-01","cusCreateDateEnd":"2026-07-31"}'
46
47
  ```
47
48
 
48
49
  macOS/Linux(bash/zsh):
49
50
 
50
51
  ```bash
51
- 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"}'
52
+ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":100,"requestname":"交通","cusCreateDateStart":"2026-07-01","cusCreateDateEnd":"2026-07-31"}'
52
53
  ```
53
54
 
54
55
  载入报销表单(拿 `continuation` 与可写字段 `fields`):
@@ -101,16 +102,18 @@ JSON
101
102
  weaver-work-cli --json workflow run workflow.createRequest --input ./reim-create-request.json
102
103
  ```
103
104
 
104
- 示例里的字段 id 来自「总部费用报销」,实际一律以本次 `createForm` 返回的 `fields` 为准;明细行的「相关发票」「相关凭证」要放 `invoice.browse-field.data` 返回的发票对象数组。
105
+ 示例里的字段 id 来自「总部费用报销」,实际一律以本次 `createForm` 返回的 `fields` 为准;明细行的「相关发票」要放 `invoice.browse-field.data` 返回的发票对象数组;「相关凭证」不传,由发票联动带出。
105
106
 
106
107
  ## 输出处理
107
108
 
108
- `workflow.createRequest` 在成功(`CREATED` / `CREATED_SUBMITTED`)、提交失败(`CREATED_SUBMIT_FAILED`)和缺必填(`NEEDS_INPUT`)时返回 `finalMarkdown`,**原样粘贴给用户**,不要自己重拼表格;链接只出现在回复文本里,不要主动打开。若返回 `partial/write_uncertain`,停止,不要重放;最多做一次只读查询或请用户在 E10 页面核对。
109
+ `workflow.createRequest` 在成功(`CREATED` / `CREATED_SUBMITTED`)、提交失败(`CREATED_SUBMIT_FAILED`)和缺必填(`NEEDS_INPUT`)时返回 `finalMarkdown`,**原样粘贴给用户**,不要自己重拼表格;链接只出现在回复文本里,不要主动打开。`CREATED` / `CREATED_SUBMIT_FAILED` 贴完后按 [reim-workflow.md](reim-workflow.md) Step 5.3 检查客户 / 项目是否被联动冲空。若返回 `partial/write_uncertain`,停止,不要重放;最多做一次只读查询或请用户在 E10 页面核对。
109
110
 
110
111
  ## 注意
111
112
 
112
113
  载入表单的 `workflow.createForm` **不传 `userQuestion`**、也不用 `workflow.createRequestDirect`:报销的 `data` 由本技能规则组装,不用流程侧智能填参。AI 报销**一律存草稿**(`action:"draft"`),组装完直接调用 `workflow.createRequest`,不让用户选「存草稿 / 提交审批」;草稿由用户在 E10 里核对后自己提交。同一组发票创建成功后禁止再次创建,修改只能走 `workflow.edit*`。
113
114
 
114
- 出差/差旅流程需要具体相关客户。未拿到用户提供的客户前,不要调用 `workflow.createRequest`。
115
+ 相关客户和相关项目必须在建单前**一次**让用户一起填写(项目可「不填」),**禁止先建空草稿再问,也不要询问合同号**。出差/差旅流程需要具体相关客户,不能用「泛微上海」顶替。用户给出的名称先用 `invoice.reim.field.search` 消歧后再写入。合同号按已确认的项目从历史报销单带出,对不上则用 `20260999`。
116
+
117
+ 明细「费用说明」「费用明细」禁止自己生成,由「相关发票」联动自动填充;落库后仍空也只告知,不要补写。
115
118
 
116
119
  `invoice.reim.file-ocr.preview` 会让 E10 侧文件进入发票识别流程;如果 fileId 来自用户新上传或附件解析,先提醒用户文件内容可能进入大模型上下文,也可能发送到 E10/OCR 服务,并等待明确确认。
@@ -105,18 +105,19 @@ CLI 已固定 `flag`(个人票夹=0 / 企业票夹=6),默认 `sreim="3"`
105
105
  | --- | --- | --- | --- |
106
106
  | `page_size` | Integer | 否 | 每页条数,默认 `10`,建议不超过 `20` |
107
107
  | `start_pos` | Integer | 否 | 分页起始位置,默认 `0` |
108
- | `date_begin` / `date_end` | Integer \| String | 否 | 开票日期范围。可传秒级时间戳,也可直接传 `"YYYY-MM-DD"`(0.1.15 起 CLI 按东八区零点换算)。用户未指定日期时,默认最近一周 |
108
+ | `consumption_tm_begin` / `consumption_tm_end` | Integer \| String | 否 | **消费日期范围(报销默认)**。可传秒级时间戳,也可直接传 `"YYYY-MM-DD"`(CLI 转成秒级时间戳:起始日东八区零点,结束日当天 `23:59:59`)。用户未指定日期时,默认最近一周 |
109
+ | `date_begin` / `date_end` | Integer \| String | 否 | 开票日期范围。可传秒级时间戳,也可直接传 `"YYYY-MM-DD"`(0.1.15 起 CLI 按东八区零点换算)。仅用户明确说开票日期时使用 |
109
110
  | `create_tm_begin` / `create_tm_end` | Integer \| String | 否 | 录入/创建日期范围,写法同上。仅用户明确说录入/创建日期时使用 |
110
111
  | `content` | String | 否 | 消费内容关键词(如 `"滴滴"`、`"住宿"`) |
111
112
  | `number` | String | 否 | 发票号码精确匹配 |
112
113
  | `types` | Array\<Integer\> | 否 | 发票类型 ID 数组(见下方映射表) |
113
114
 
114
- 不支持 `fylxs`、`consumption_tm_begin`、`consumption_tm_end`;日期筛选一律用 `date_begin` / `date_end`。
115
+ 不支持 `fylxs`。报销日期筛选默认用 `consumption_tm_begin` / `consumption_tm_end`,不要和开票日期混用。
115
116
 
116
117
  ### 时间戳计算
117
118
 
118
119
  > **所有日期参数的秒级时间戳由 AI 按内联公式直接计算(UTC+8 时区)。**
119
- > 0.1.15 起 `date_begin` / `date_end` / `create_tm_begin` / `create_tm_end` 也直接接受 `"YYYY-MM-DD"`(CLI 按东八区零点换算),日期区间不跨时区歧义时优先写 `"YYYY-MM-DD"`,更省一次心算;需要精确到时分秒的边界(如 `23:59:59`)时才用秒级时间戳。
120
+ > 0.1.15 起日期字段也直接接受 `"YYYY-MM-DD"`(CLI 转成秒级时间戳)。`consumption_tm_end` 按东八区当天 `23:59:59` 换算,其余按零点。日期区间不跨时区歧义时优先写 `"YYYY-MM-DD"`;已经算好的秒级时间戳可原样传入。
120
121
  > 完整公式和 Fallback 见 [reim-workflow.md - 时间戳内联计算](reim-workflow.md#时间戳内联计算零工具调用)。
121
122
 
122
123
  示例(最近一周,只传必要字段):
@@ -125,8 +126,8 @@ CLI 已固定 `flag`(个人票夹=0 / 企业票夹=6),默认 `sreim="3"`
125
126
  {
126
127
  "page_size": 10,
127
128
  "start_pos": 0,
128
- "date_begin": 1785513600,
129
- "date_end": 1786982399
129
+ "consumption_tm_begin": 1785513600,
130
+ "consumption_tm_end": 1786982399
130
131
  }
131
132
  ```
132
133
 
@@ -137,23 +138,23 @@ CLI 已固定 `flag`(个人票夹=0 / 企业票夹=6),默认 `sreim="3"`
137
138
  Windows PowerShell:
138
139
 
139
140
  ```powershell
140
- weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"date_begin":1785513600,"date_end":1786982399}'
141
+ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"consumption_tm_begin":1785513600,"consumption_tm_end":1786982399}'
141
142
  ```
142
143
 
143
144
  macOS/Linux(bash/zsh):
144
145
 
145
146
  ```bash
146
- weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"date_begin":1785513600,"date_end":1786982399}'
147
+ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"consumption_tm_begin":1785513600,"consumption_tm_end":1786982399}'
147
148
  ```
148
149
 
149
150
  ### 预筛选入参(先获取到事前申请时使用)
150
151
 
151
- > **前提:开票日期一定不早于事前申请日期。** CLI 用 `date_begin` / `date_end`(开票日期,秒级时间戳)筛选。
152
+ > **前提:消费日期一定不早于事前申请日期。** CLI 用 `consumption_tm_begin` / `consumption_tm_end`(消费日期,秒级时间戳)筛选。
152
153
 
153
154
  如果已有事前申请数据,利用事前申请的 `createTime` 来缩小查询范围:
154
155
 
155
- - `date_begin` = 最早事前申请 createTime 对应的秒级时间戳
156
- - `date_end` = 当前日期 23:59:59 对应的秒级时间戳
156
+ - `consumption_tm_begin` = 最早事前申请 createTime 对应的秒级时间戳
157
+ - `consumption_tm_end` = 当前日期 23:59:59 对应的秒级时间戳
157
158
 
158
159
  ### 返回示例
159
160
 
@@ -300,11 +301,11 @@ CLI 信封中列表在 `data.items`。下面是单条发票的票面结构(对
300
301
  | 分类 | type 值 | 说明 | 填单位置 |
301
302
  | --- | --- | --- | --- |
302
303
  | **发票** | 除 17/18/57/58 以外的所有值 | 正式发票,每张独立成一行明细 | 明细「相关发票」(`EinvoiceComponent`) |
303
- | **相关凭证** | 17, 18, 57, 58 | 行程单、小票/水单、电子支付凭证、其他支付凭证,不能独立成行 | 明细「相关凭证」(`EinvoiceComponent`),每行最多 1 张 |
304
+ | **相关凭证** | 17, 18, 57, 58 | 行程单、小票/水单、电子支付凭证、其他支付凭证,不能独立成行 | 明细「相关凭证」不赋值,由发票联动带出 |
304
305
 
305
- **关键规则:相关凭证必须与发票配对,放在同一行明细中,不能单独成行。**
306
+ **关键规则:相关凭证不能单独成行,也不写入明细「相关凭证」,由「相关发票」联动带出。**
306
307
 
307
- 详细的配对和填单规则见 [form-fill-rules.md](reim-form-fill-rules.md#发票与相关凭证分类)
308
+ 详细规则见 [form-fill-rules.md](reim-form-fill-rules.md#3-相关凭证不赋值由联动带出)
308
309
 
309
310
  ### 发票类型 ID 映射表
310
311
 
@@ -362,7 +363,7 @@ CLI 信封中列表在 `data.items`。下面是单条发票的票面结构(对
362
363
  | 57 | 支付凭证 |
363
364
  | 58 | 其他票据凭证 |
364
365
 
365
- > **相关凭证类型**(不能独立成行,填单时放入"相关凭证"字段):17(小票/水单)、18(滴滴行程单——注意:滴滴开具的增值税电子普通发票 type=3,是正式发票可独立成行;type=18 仅指滴滴的支付行程凭证)、57(支付凭证)、58(其他票据凭证)
366
+ > **相关凭证类型**(不能独立成行,也不写入"相关凭证"字段,由发票联动带出):17(小票/水单)、18(滴滴行程单——注意:滴滴开具的增值税电子普通发票 type=3,是正式发票可独立成行;type=18 仅指滴滴的支付行程凭证)、57(支付凭证)、58(其他票据凭证)
366
367
 
367
368
  ---
368
369
 
@@ -375,16 +376,16 @@ CLI operation:`invoice.reim.candidates.list`(read)
375
376
  macOS/Linux(bash/zsh):
376
377
 
377
378
  ```bash
378
- weaver-work-cli --json invoice run invoice.reim.candidates.list --input-json '{"date_begin":"2026-09-14","date_end":"2026-09-21"}'
379
+ weaver-work-cli --json invoice run invoice.reim.candidates.list --input-json '{"consumption_tm_begin":"2026-09-14","consumption_tm_end":"2026-09-21"}'
379
380
  ```
380
381
 
381
382
  Windows PowerShell:
382
383
 
383
384
  ```powershell
384
- weaver-work-cli --json invoice run invoice.reim.candidates.list --input-json '{"date_begin":"2026-09-14","date_end":"2026-09-21"}'
385
+ weaver-work-cli --json invoice run invoice.reim.candidates.list --input-json '{"consumption_tm_begin":"2026-09-14","consumption_tm_end":"2026-09-21"}'
385
386
  ```
386
387
 
387
- - 入参(全部可选):`date_begin`/`date_end`(YYYY-MM-DD,开票日期范围)、`page_size`(10-200,默认 50)、`max_items`(1-500,默认 200,超出截断并产生 warning)、`include_red_reversed`(默认 `false`)。
388
+ - 入参(全部可选):`consumption_tm_begin`/`consumption_tm_end`(消费日期范围,报销默认)、`date_begin`/`date_end`(开票日期范围,仅用户明确说开票日期时用)、`page_size`(10-200,默认 50)、`max_items`(1-500,默认 200,超出截断并产生 warning)、`include_red_reversed`(默认 `false`)。日期字段接受 `YYYY-MM-DD` 或秒级时间戳。
388
389
  - **红冲票默认已过滤**:全额红冲发票(`status=8`)不出现在任何一组,被过滤的张数由 `summary.filteredRedReversedCount` 告知。需要看红冲票时传 `include_red_reversed: true`,此时它们进 `redReversed` 组。
389
390
  - 输出:`available` / `assigned` / `redReversed` 三组,每组元素含 `fid`、`number`、`date`、`total`、`buyer`、`payer`、`typeName`、`status`、`valid`、`reimRequests`;`summary` 给出三组的张数与金额合计;`warnings` 含截断与金额解析告警。
390
391
  - **报销范围永远从 `available` 里选**;`assigned` 是已挂在报销单上的(再报 = 重复报销)。
@@ -405,7 +406,7 @@ CLI operation:`invoice.reim.requests.list`
405
406
  | 参数 | 类型 | 必填 | 默认值 | 说明 |
406
407
  | ---------- | ------- | --- | --- | ------- |
407
408
  | `pageNo` | Integer | 是 | 1 | 页码,从1开始 |
408
- | `pageSize` | Integer | 是 | 20 | 每页条数 |
409
+ | `pageSize` | Integer | 否 | 100 | 每页条数。不传时 CLI 默认 100,显式传入则覆盖 |
409
410
 
410
411
 
411
412
  #### 筛选条件
@@ -414,16 +415,18 @@ CLI operation:`invoice.reim.requests.list`
414
415
  | 参数 | 类型 | 说明 | 示例 |
415
416
  | -------------------- | ------ | -------------------- | --------------- |
416
417
  | `requestname` | String | 流程标题模糊搜索 | `"差旅"`, `"交通费"` |
417
- | `cusCreateDateStart` | String | 发起日期-开始 (yyyy-MM-dd) | `"2026-07-01"` |
418
- | `cusCreateDateEnd` | String | 发起日期-结束 (yyyy-MM-dd) | `"2026-07-31"` |
418
+ | `cusCreateDateStart` | String | 发起日期-开始 (yyyy-MM-dd)。不传则不限开始日期 | `"2026-07-01"` |
419
+ | `cusCreateDateEnd` | String | 发起日期结束 (yyyy-MM-dd)。**不传时 CLI 按东八区当天 + 1 天填入;传入时 CLI 用该日期再 + 1 天后发给接口。** 调用方传业务结束日本身,不要自己再加 1 天 | `"2026-07-31"` |
419
420
 
420
421
 
421
422
  ### 推荐默认入参
422
423
 
424
+ 查事前申请、用户没有指定结束日期时,用下面这份入参。不传 `pageSize` 时 CLI 也按 100 填入。不要自己计算或传入 `cusCreateDateEnd`,CLI 会按东八区当天 + 1 天写入。如果传了 `cusCreateDateEnd`,CLI 会用传入日期再 + 1 天后发给接口,调用方不要自己先加 1 天。
425
+
423
426
  ```json
424
427
  {
425
428
  "pageNo": 1,
426
- "pageSize": 20
429
+ "pageSize": 100
427
430
  }
428
431
  ```
429
432
 
@@ -432,13 +435,13 @@ CLI operation:`invoice.reim.requests.list`
432
435
  Windows PowerShell:
433
436
 
434
437
  ```powershell
435
- weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":20}'
438
+ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":100}'
436
439
  ```
437
440
 
438
441
  macOS/Linux(bash/zsh):
439
442
 
440
443
  ```bash
441
- weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":20}'
444
+ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":100}'
442
445
  ```
443
446
 
444
447
  ### 预筛选入参(先获取到发票时使用)
@@ -450,18 +453,21 @@ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pa
450
453
  ```json
451
454
  {
452
455
  "pageNo": 1,
453
- "pageSize": 20,
456
+ "pageSize": 100,
454
457
  "cusCreateDateStart": "2026-04-21",
455
458
  "cusCreateDateEnd": "2026-07-30"
456
459
  }
457
460
  ```
458
461
 
459
- - `cusCreateDateEnd` = 最晚发票 invoiceDate(事前申请不会晚于开票日期)
462
+ - `cusCreateDateEnd` = 最晚发票 invoiceDate(事前申请不会晚于开票日期)。CLI 会再 + 1 天后发给接口;不需要按开票日收窄时不要传,交给「东八区当天 + 1 天」默认值
460
463
  - `cusCreateDateStart` = 最早发票 invoiceDate 往前推 90 天(合理的事前申请窗口期)
461
464
  - **话费报销例外**:话费补贴事前申请可能在很早以前审批,`cusCreateDateStart` 需往前推 **1095 天(3 年)**,并加 `requestname="话费"` 缩小结果。详见 [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md)。
465
+ - 取回列表后,发票和事前申请**只按时间关联**:开票日期落在发起日之后 90 天内(话费不设 90 天上限)。正好 1 条就绑定;2 条及以上先问用户。见 [reim-matching-rules.md](reim-matching-rules.md)。
462
466
 
463
467
  ### 返回示例
464
468
 
469
+ CLI 只保留下面 7 个字段,接口原文里的 `requestnametitle`、部门、节点、URL 等不再输出。
470
+
465
471
  ```json
466
472
  {
467
473
  "code": 200,
@@ -472,16 +478,10 @@ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pa
472
478
  "requestid": "1298294241967177729",
473
479
  "workflowid": "1181057526276915214",
474
480
  "requestname": "交通费报销-后端开发111-2026-07-31",
475
- "requestnametitle": "交通费报销-后端开发111-2026-07-31 (相关客户:, 相关项目:, 承担主体: , 流程编号:Weaver-FYBX202607000069, 报销总金额:14.47 , 费用承担公司:)",
476
481
  "flowStatus": 6,
477
482
  "creatorId": "1201729946891231232",
478
483
  "creatorName": "后端开发111",
479
- "creatorSubCompanyId": "1169438875220598808",
480
- "creatorDepartmentId": "1201729461554241537",
481
- "createTime": "2026-07-31 15:24:45",
482
- "requestMark": "Weaver-FYBX202607000069",
483
- "userDepartmentId": "1201729461554241537",
484
- "nodeid": "1181057741029220917"
484
+ "createTime": "2026-07-31 15:24:45"
485
485
  }
486
486
  ],
487
487
  "fail": false
@@ -491,20 +491,15 @@ weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pa
491
491
  ### 返回字段说明
492
492
 
493
493
 
494
- | 字段 | 说明 |
495
- | --------------------- | ---------------------- |
496
- | `requestid` | 事前申请流程ID(用于匹配绑定和填单) |
497
- | `workflowid` | 工作流ID(用于获取表单结构) |
498
- | `requestname` | 流程标题 |
499
- | `requestnametitle` | 标题纯文本(含扩展信息:客户、项目、金额等) |
500
- | `flowStatus` | 流程状态(6=已完成) |
501
- | `creatorId` | 发起人ID |
502
- | `creatorName` | 发起人姓名 |
503
- | `creatorDepartmentId` | 发起人部门ID |
504
- | `creatorSubCompanyId` | 发起人分部ID |
505
- | `createTime` | 发起时间 |
506
- | `requestMark` | 流程编号 |
507
- | `nodeid` | 当前节点ID |
494
+ | 字段 | 说明 |
495
+ | ------------- | ------------------- |
496
+ | `requestid` | 事前申请流程ID(用于匹配绑定和填单) |
497
+ | `workflowid` | 工作流ID(用于获取表单结构) |
498
+ | `requestname` | 流程标题 |
499
+ | `flowStatus` | 流程状态(6=已完成) |
500
+ | `creatorId` | 发起人ID |
501
+ | `creatorName` | 发起人姓名 |
502
+ | `createTime` | 发起时间 |
508
503
 
509
504
 
510
505
  ---
@@ -709,7 +704,7 @@ weaver-work-cli --json invoice run invoice.reim.employee-superiors --input-json
709
704
 
710
705
  CLI operation:`invoice.reim.row-info`
711
706
 
712
- 根据发票 ID 获取该发票在明细行中应填写的费用日期、费用说明、关联凭证、费用科目。**返回值优先级高于 AI 自行推断**。
707
+ 根据发票 ID 获取该发票在明细行中应填写的费用日期、关联凭证、费用科目。`fysm` 只作返回字段,**不要写入明细「费用说明」**,该列由发票联动带出。关联凭证 `itinerary` 也不写入「相关凭证」。日期、科目的返回值优先级高于 AI 自行推断。
713
708
 
714
709
  ### 入参
715
710
 
@@ -741,13 +736,13 @@ weaver-work-cli --json invoice run invoice.reim.row-info --input-json '{"invoice
741
736
  | 字段 | 说明 | 对应明细行字段 |
742
737
  | ----------- | ---------------- | ---------------------------------------- |
743
738
  | `date` | 费用日期 | 费用日期/发生日期 |
744
- | `fysm` | 费用说明 | 费用说明/摘要 |
745
- | `itinerary` | 关联凭证 ID(多个用逗号拼接) | 相关凭证(`EinvoiceComponent`,每行最多 1 张) |
739
+ | `fysm` | 费用说明原文 | **不写入**明细「费用说明」。该列由发票联动带出 |
740
+ | `itinerary` | 关联凭证 ID(多个用逗号拼接) | **不写入**,明细「相关凭证」由发票联动带出 |
746
741
  | `subjectId` | 费用科目 ID | 费用类型(科目) |
747
742
  | `subjectName` | 费用科目名称 | 与 `subjectId` 拼成 `名称(ID)` |
748
743
  | `sqje` / `sbje` | 整张发票的申请金额 | 仅参考;金额字段填发票价税合计(`price.total`) |
749
744
  | `containsItinerary` | 是否关联了行程单 | — |
750
- | `itineraryData` | **行程单逐段明细**数组,每段含 `date`、`sqje`(该段金额)、`fysm`(`{起点} - {终点}`)、`subjectId` / `subjectName`、`itinerary`(凭证 ID)、`invoiceId` | **暂不拆行**;只在 `invoice.get` 取不到起止点时给费用说明兜底,见 [reim-form-fill-rules.md](reim-form-fill-rules.md#4-行程单多段行程暂不拆行) |
745
+ | `itineraryData` | **行程单逐段明细**数组,每段含 `date`、`sqje`(该段金额)、`fysm`、`subjectId` / `subjectName`、`itinerary`(凭证 ID)、`invoiceId` | **暂不拆行**,也不要用其中的 `fysm` 生成费用说明。见 [reim-form-fill-rules.md](reim-form-fill-rules.md#4-行程单多段行程暂不拆行) |
751
746
 
752
747
 
753
748
  ### 返回示例
@@ -768,10 +763,10 @@ weaver-work-cli --json invoice run invoice.reim.row-info --input-json '{"invoice
768
763
  ### 使用场景与优先级
769
764
 
770
765
  - **调用时机**:Step 4 组装明细行时,对每张发票调用 `invoice.reim.row-info`
771
- - **优先级**:此 CLI 返回的 `date`、`fysm`、`itinerary`、`subjectId` 四个值**优先于 AI 自行推断的值**
772
- - **容错**:如果某个字段为空/null,则回退到 AI 推断逻辑
773
- - **itinerary 处理**:如果 `itinerary` 有值,直接作为该行的配对凭证,**替代原有的凭证配对逻辑**;先用 `invoice.browse-field.data` 取凭证对象再填入「相关凭证」。逗号分隔返回多个时,每行只挂最匹配的 1 张(规则见 [reim-form-fill-rules.md](reim-form-fill-rules.md#3-凭证与发票配对))
774
- - **itineraryData 处理**:暂不拆行,不管几段都是一张发票一行;只用来给费用说明兜底(第一段起点 - 最后一段终点)
766
+ - **优先级**:此 CLI 返回的 `date`、`subjectId` **优先于 AI 自行推断的值**。`fysm` 不写入「费用说明」
767
+ - **容错**:日期、科目为空/null 时,回退到 AI 推断逻辑。费用说明没有回退,保持不传
768
+ - **itinerary 处理**:不用来写「相关凭证」,也不拿它去 `invoice.browse-field.data` 取凭证对象。明细「相关凭证」由发票联动带出(见 [reim-form-fill-rules.md](reim-form-fill-rules.md#3-相关凭证不赋值由联动带出))
769
+ - **itineraryData 处理**:暂不拆行,不管几段都是一张发票一行。不要拿第一段和最后一段去写费用说明
775
770
 
776
771
  ---
777
772
 
@@ -851,7 +846,7 @@ weaver-work-cli --json invoice run invoice.reim.row-info-batch --input-json '{"i
851
846
 
852
847
  CLI operation:`invoice.get`
853
848
 
854
- 根据发票 ID 获取发票完整详情。**主要用途:交通类发票获取出发地、目的地,用于生成费用说明。**
849
+ 根据发票 ID 获取发票完整详情。报销填单时不要为了生成费用说明去取出发地、目的地。
855
850
 
856
851
  ### 命令
857
852
 
@@ -941,7 +936,7 @@ weaver-work-cli --json invoice run invoice.get --input-json '{"fid":"13019569599
941
936
 
942
937
  CLI operation:`invoice.browse-field.data`(read)
943
938
 
944
- 报销单明细的「相关发票」「相关凭证」都是 `EinvoiceComponent`,**只接受发票对象,不接受文本或裸 ID**。一次传入本组全部发票与配对凭证的 `fid`,按 `fid` 把返回对象放进对应行。入参与对象结构见 [invoice-browse-field-data.md](invoice-browse-field-data.md)。
939
+ 报销单明细的「相关发票」是 `EinvoiceComponent`,**只接受发票对象,不接受文本或裸 ID**。一次传入本组全部发票的 `fid`(不传凭证,「相关凭证」由发票联动带出),按 `fid` 把返回对象放进对应行。入参与对象结构见 [invoice-browse-field-data.md](invoice-browse-field-data.md)。
945
940
 
946
941
  macOS/Linux(bash/zsh):
947
942
 
@@ -957,6 +952,48 @@ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fid
957
952
 
958
953
  ---
959
954
 
955
+ ## 5.9 相关客户 / 相关项目模糊搜索
956
+
957
+ CLI operation:`invoice.reim.field.search`(read)
958
+
959
+ 用户给出相关客户或相关项目名称后、写入之前调用。封装 `GET /api/government/formStructure/fieldRelateSearch`(参数走 query)。编排见 [reim-form-fill-rules.md](reim-form-fill-rules.md#相关客户模糊搜索)。**必须在建草稿前搜完确认,不要先建空单再搜。**
960
+
961
+ ### 入参
962
+
963
+ | 参数 | 类型 | 必填 | 说明 |
964
+ | --- | --- | --- | --- |
965
+ | `keywords` | String | 是 | 用户原话,不要改写 |
966
+ | `fieldId` | String | 是 | 本次 `createForm` 里对应字段 id(相关客户或相关项目) |
967
+ | `workflowId` | String | 是 | 本次报销工作流 ID |
968
+ | `nodeId` | String | 否 | 默认 `100004140000000271` |
969
+
970
+ ### 命令
971
+
972
+ macOS/Linux(bash/zsh):
973
+
974
+ ```bash
975
+ weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"学院","fieldId":"100003720000000687","workflowId":"100003460000000060"}'
976
+ ```
977
+
978
+ Windows PowerShell:
979
+
980
+ ```powershell
981
+ weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"学院","fieldId":"100003720000000687","workflowId":"100003460000000060"}'
982
+ ```
983
+
984
+ ### 返回
985
+
986
+ | 字段 | 说明 |
987
+ | --- | --- |
988
+ | `keywords` | 本次搜索词 |
989
+ | `match` | `unique` / `multiple` / `none` |
990
+ | `items` | `{id,name,value}` 列表,`value` 与 `id` 相同 |
991
+ | `selected` | `match=unique` 时是那一条;否则 `null` |
992
+
993
+ `match=unique` → 直接填 `"名称(ID)"`,不问用户。`match=multiple` → 把 `items` 的名称列给用户选。`match=none` → 请用户换更完整的名称。不要把未消歧简称直接丢给 `createRequest`。
994
+
995
+ ---
996
+
960
997
  ## 6. 创建 / 修改报销单(`weaver-e10-workflow`)
961
998
 
962
999
  报销单创建与修改不再使用本技能的 operation,统一调用 `weaver-e10-workflow` 技能:
@@ -968,3 +1005,7 @@ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fid
968
1005
  | 修改已创建的报销单 | `workflow.editLoad` → `workflow.editPrepare` → `workflow.editApply` | [`workflow-edit.md`](../../weaver-e10-workflow/references/workflow-edit.md) |
969
1006
 
970
1007
  `data` 的组装规则见 [reim-form-fill-rules.md](reim-form-fill-rules.md),编排顺序见 [reim-workflow.md](reim-workflow.md) Step 3 ~ Step 6。
1008
+
1009
+ `workflow.createForm` 的 `historyRequestData` 已是本工作流近一年、非草稿、我发起的前 5 条。总部费用报销用它按已确认的相关项目带出合同号,**不要询问合同号**(见 [reim-workflow.md](reim-workflow.md) Step 4.4)。客户和项目同一次让用户一起输入。不要再调用 `workflow.search` 或 `workflow.detail`。
1010
+
1011
+ 相关客户、相关项目必须在调用 `workflow.createRequest` 前一次问齐(见 Step 4.5),禁止先建空草稿再问,也不要询问合同号。明细「费用说明」「费用明细」「相关凭证」禁止填值,由「相关发票」联动带出,落库后仍空也不要补写。草稿落库后再查客户 / 项目是否被联动冲空(见 Step 5.3)。已确认值被冲空则 `workflow.edit*` 写回。看不清时用 `workflow.editLoad` 读 `currentValues`。