weaver-work-cli 0.1.42 → 0.1.44

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 (318) hide show
  1. package/README.md +17 -0
  2. package/dist/chunks/{archive-J4I6MCKF.js → archive-P6TBQGKL.js} +13 -5
  3. package/dist/chunks/{archive-oa-BRZKKTO4.js → archive-oa-7TQ2NXOH.js} +12 -5
  4. package/dist/chunks/{asset-L7D4FAOZ.js → asset-3ELRG37G.js} +11 -4
  5. package/dist/chunks/{asset-idle-DADLLV75.js → asset-idle-WIGMUFMD.js} +7 -3
  6. package/dist/chunks/{attachment-content-K4C7VLWQ.js → attachment-content-E3276UOV.js} +5 -4
  7. package/dist/chunks/{blog-BVGQ7NZL.js → blog-C5NMZAAC.js} +11 -4
  8. package/dist/chunks/{caizhilian-SAADNFD6.js → caizhilian-5XSM2DFP.js} +13 -6
  9. package/dist/chunks/{calendar-Q7NQY5Z2.js → calendar-FI2WNSBO.js} +12 -5
  10. package/dist/chunks/{chunk-YRSZQUD2.js → chunk-3YBDYOC4.js} +3 -3
  11. package/dist/chunks/{chunk-OOUTBLZ4.js → chunk-56EZERK4.js} +1 -1
  12. package/dist/chunks/chunk-6N4JPNFL.js +76 -0
  13. package/dist/chunks/{chunk-ZUX3P6BQ.js → chunk-727FH2NI.js} +1 -1
  14. package/dist/chunks/chunk-7BDPM5ST.js +11 -0
  15. package/dist/chunks/{chunk-EKWAQSLU.js → chunk-BCVYBYYT.js} +432 -2248
  16. package/dist/chunks/{chunk-W7BEHOSR.js → chunk-CWYGFU5B.js} +2 -2
  17. package/dist/chunks/{chunk-NOODWMCL.js → chunk-D4ADSZ7H.js} +1 -1
  18. package/dist/chunks/{chunk-SA6VBIHY.js → chunk-ETNJSKMM.js} +214 -16
  19. package/dist/chunks/{chunk-BBKDXQEC.js → chunk-F4E4EM35.js} +3 -3
  20. package/dist/chunks/{chunk-IZ7S7QUS.js → chunk-FAZTGX7S.js} +6 -6
  21. package/dist/chunks/{chunk-NKZRQXST.js → chunk-FRZKBMSW.js} +52 -36
  22. package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
  23. package/dist/chunks/{chunk-GEWYMQME.js → chunk-GAMZLAG2.js} +1 -1
  24. package/dist/chunks/{chunk-R4CHUSKC.js → chunk-GM6J7Q4B.js} +4 -4
  25. package/dist/chunks/{chunk-APVFJUQH.js → chunk-GRDRG6HP.js} +3 -3
  26. package/dist/chunks/{chunk-LDZQPUIA.js → chunk-HIT4Y6OI.js} +1 -1
  27. package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
  28. package/dist/chunks/{chunk-LADPYOWC.js → chunk-IAZ3UPY6.js} +3 -3
  29. package/dist/chunks/{chunk-ZEDWSH32.js → chunk-IC62NFM5.js} +1 -1
  30. package/dist/chunks/{chunk-P26ZWSKU.js → chunk-KIHNAS25.js} +5 -2
  31. package/dist/chunks/{chunk-BIPYLLVS.js → chunk-N4M2DDFE.js} +15 -15
  32. package/dist/chunks/{chunk-QKNKR4RH.js → chunk-OF4S23UB.js} +4 -4
  33. package/dist/chunks/{chunk-JPRO6ER2.js → chunk-PC7VKEB5.js} +57 -60
  34. package/dist/chunks/{chunk-4PD5NWAX.js → chunk-PUQS5MWL.js} +2 -2
  35. package/dist/chunks/{chunk-2LV74IWP.js → chunk-Q4OYAQYH.js} +1 -1
  36. package/dist/chunks/{chunk-72CKAUAG.js → chunk-QVSWRLLU.js} +7 -5
  37. package/dist/chunks/{chunk-4RAE6JXP.js → chunk-TA7FXXJD.js} +6 -3
  38. package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
  39. package/dist/chunks/{chunk-FOAA27U5.js → chunk-UFIT2UU3.js} +16 -4
  40. package/dist/chunks/{chunk-LUSPKZKY.js → chunk-UG5G54VL.js} +1 -0
  41. package/dist/chunks/{chunk-NIAJ5ZCG.js → chunk-UL5XUQ25.js} +5 -2
  42. package/dist/chunks/{chunk-FMPJJYYI.js → chunk-WRXSAVKO.js} +1 -1
  43. package/dist/chunks/{chunk-G4UR6NXN.js → chunk-WSF4NNMR.js} +3 -3
  44. package/dist/chunks/chunk-XHK4MDR5.js +2497 -0
  45. package/dist/chunks/{chunk-3KTFS4IA.js → chunk-XNIK66I4.js} +19 -9
  46. package/dist/chunks/{chunk-3SO6QL6U.js → chunk-YWX377BY.js} +5 -2
  47. package/dist/chunks/{chunk-BYATLLEF.js → chunk-Z3GDFVJR.js} +1 -1
  48. package/dist/chunks/{chunk-GHXCDPTM.js → chunk-Z7VYWPZV.js} +1 -1
  49. package/dist/chunks/{conflict-F2OMZRTO.js → conflict-ARLSZJ6V.js} +4 -3
  50. package/dist/chunks/{continuation-2CKSBLA6.js → continuation-3S37AUSH.js} +4 -3
  51. package/dist/chunks/{continuation-RN6PZN2M.js → continuation-3XLYYTKV.js} +4 -3
  52. package/dist/chunks/{continuation-HZIZRZBX.js → continuation-HFW2YT5S.js} +4 -3
  53. package/dist/chunks/{continuation-NLECEJPX.js → continuation-KI7DRRZN.js} +4 -3
  54. package/dist/chunks/{contract-5BETHRSG.js → contract-DNIIW5VJ.js} +13 -5
  55. package/dist/chunks/{cowork-3MN6EQQO.js → cowork-GMLRGVIW.js} +11 -4
  56. package/dist/chunks/{create-flow-5FQNNMVO.js → create-flow-J22BO65E.js} +8 -7
  57. package/dist/chunks/{ebuilder-form-SBHOYBUD.js → ebuilder-form-ANV2FHYV.js} +12 -7
  58. package/dist/chunks/{ehr-KMOJULKG.js → ehr-GSTGAIY3.js} +266 -24
  59. package/dist/chunks/{employee-SAK2QYXX.js → employee-22BGJ3QS.js} +3 -3
  60. package/dist/chunks/{env-LB7NBL2O.js → env-BX3VRFS7.js} +4 -3
  61. package/dist/chunks/{esb-W2PJCFCX.js → esb-ATAIASX2.js} +12 -7
  62. package/dist/chunks/{factory-6ZFQXQ46.js → factory-PETTFME6.js} +3 -2
  63. package/dist/chunks/{fna-ZQPCUV4R.js → fna-YEKBSFSX.js} +14 -8
  64. package/dist/chunks/{group-chat-2HHAJN46.js → group-chat-BFVXAYFX.js} +5 -4
  65. package/dist/chunks/{host-ATKVNZAT.js → host-HRBXEPDQ.js} +5 -5
  66. package/dist/chunks/{host-BQH22NTQ.js → host-LR55CTHP.js} +5 -5
  67. package/dist/chunks/{host-X2CSLFM6.js → host-SUOY6VYQ.js} +5 -5
  68. package/dist/chunks/{host-4CBHGOHT.js → host-SZGV4UNT.js} +5 -5
  69. package/dist/chunks/{host-YTODKMSL.js → host-WIKN2EJ5.js} +5 -5
  70. package/dist/chunks/{hrm-FFM4UJFS.js → hrm-NRDO4W5G.js} +11 -7
  71. package/dist/chunks/{im-VEHKDQPB.js → im-IQ2HN23S.js} +8 -7
  72. package/dist/chunks/{invoice-LVIKSIIF.js → invoice-MNRW76PP.js} +636 -1768
  73. package/dist/chunks/{jiuchuanhui-X6DINO5P.js → jiuchuanhui-DTRBAX4N.js} +14 -6
  74. package/dist/chunks/{lazy-dispatch-KSWTN5L6.js → lazy-dispatch-ZVWAI25B.js} +7 -6
  75. package/dist/chunks/{mail-VDKRGUD3.js → mail-ZVAUXOJA.js} +16 -14
  76. package/dist/chunks/{meeting-CLC6HP3Z.js → meeting-FEVPZ67S.js} +21 -14
  77. package/dist/chunks/{okr-CHG4OO3U.js → okr-SDH3E5RA.js} +12 -5
  78. package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
  79. package/dist/chunks/{plan-XWR75667.js → plan-E35JFDI7.js} +12 -5
  80. package/dist/chunks/{project-5BXOOKMG.js → project-73QXBAB2.js} +11 -4
  81. package/dist/chunks/reception-UWZVACBN.js +1899 -0
  82. package/dist/chunks/{recruit-stage-DGMFNNDE.js → recruit-stage-4MAOCKFY.js} +320 -57
  83. package/dist/chunks/registry-IM5G23LS.js +24 -0
  84. package/dist/chunks/{registry-RHMW6ANW.js → registry-JDUS4E7D.js} +7 -6
  85. package/dist/chunks/{registry-7FFOXIAW.js → registry-KNKSCJNT.js} +7 -6
  86. package/dist/chunks/{registry-Z43434VG.js → registry-PO7SI256.js} +4 -4
  87. package/dist/chunks/{registry-OZSMDVPP.js → registry-PVUZQDDQ.js} +3 -3
  88. package/dist/chunks/{room-recommend-62H7ZQQ6.js → room-recommend-H7KLXA5R.js} +6 -5
  89. package/dist/chunks/{schedule-FNXKH3DQ.js → schedule-ESZIBAUO.js} +6 -5
  90. package/dist/chunks/{workflow-ADHKCAJK.js → workflow-CWJFJLQU.js} +13 -8
  91. package/dist/cmd/action.js +6 -0
  92. package/dist/cmd/identity/index.js +45 -0
  93. package/dist/cmd/index.js +2 -0
  94. package/dist/core/continuation-ttl.js +18 -0
  95. package/dist/core/error-codes.js +85 -0
  96. package/dist/core/logger.js +11 -0
  97. package/dist/index.js +37 -31
  98. package/dist/internal/e10/auth/commands.js +163 -8
  99. package/dist/internal/e10/auth/error-log.js +182 -0
  100. package/dist/internal/e10/auth/session.js +17 -3
  101. package/dist/internal/e10/auth-recovery.js +39 -12
  102. package/dist/internal/e10/context.js +17 -2
  103. package/dist/internal/skills/install.js +9 -1
  104. package/dist/shortcuts/archive/continuation.js +2 -1
  105. package/dist/shortcuts/archive/index.js +3 -0
  106. package/dist/shortcuts/archive/operations/confirm.js +2 -1
  107. package/dist/shortcuts/archive-oa/continuation.js +2 -1
  108. package/dist/shortcuts/archive-oa/index.js +2 -0
  109. package/dist/shortcuts/archive-oa/operations/confirm.js +2 -1
  110. package/dist/shortcuts/asset/continuation.js +2 -1
  111. package/dist/shortcuts/asset/index.js +2 -0
  112. package/dist/shortcuts/asset-idle/index.js +2 -0
  113. package/dist/shortcuts/blog/continuation.js +2 -1
  114. package/dist/shortcuts/blog/index.js +2 -0
  115. package/dist/shortcuts/caizhilian/continuation.js +2 -1
  116. package/dist/shortcuts/caizhilian/index.js +2 -0
  117. package/dist/shortcuts/caizhilian/operations/confirm.js +3 -2
  118. package/dist/shortcuts/calendar/continuation.js +2 -1
  119. package/dist/shortcuts/calendar/index.js +2 -0
  120. package/dist/shortcuts/calendar/operations/write.js +1 -1
  121. package/dist/shortcuts/contract/continuation.js +2 -1
  122. package/dist/shortcuts/contract/index.js +2 -0
  123. package/dist/shortcuts/contract/operations/write.js +2 -1
  124. package/dist/shortcuts/cowork/continuation.js +2 -1
  125. package/dist/shortcuts/cowork/index.js +2 -0
  126. package/dist/shortcuts/ebuilder-form/continuation.js +2 -1
  127. package/dist/shortcuts/ebuilder-form/index.js +2 -0
  128. package/dist/shortcuts/ebuilder-form/operations/write.js +3 -2
  129. package/dist/shortcuts/ehr/continuation.js +2 -1
  130. package/dist/shortcuts/ehr/index.js +2 -0
  131. package/dist/shortcuts/ehr/operations/attend-write.js +1 -1
  132. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +182 -3
  133. package/dist/shortcuts/ehr/operations/recruit-position.js +134 -2
  134. package/dist/shortcuts/ehr/operations/recruit-write.js +1 -1
  135. package/dist/shortcuts/esb/continuation.js +2 -1
  136. package/dist/shortcuts/esb/index.js +2 -0
  137. package/dist/shortcuts/esb/operations/trigger.js +2 -1
  138. package/dist/shortcuts/fna/continuation.js +2 -1
  139. package/dist/shortcuts/fna/index.js +2 -0
  140. package/dist/shortcuts/fna/operations/invoice-writeoff.js +1 -1
  141. package/dist/shortcuts/fna/operations/loan.js +1 -1
  142. package/dist/shortcuts/hrm/index.js +2 -0
  143. package/dist/shortcuts/im/continuation.js +2 -1
  144. package/dist/shortcuts/index.js +5 -0
  145. package/dist/shortcuts/invoice/continuation.js +2 -1
  146. package/dist/shortcuts/invoice/index.js +14 -15
  147. package/dist/shortcuts/invoice/invoice-record.js +93 -0
  148. package/dist/shortcuts/invoice/manifest.js +190 -393
  149. package/dist/shortcuts/invoice/operations/add.js +2 -1
  150. package/dist/shortcuts/invoice/operations/delete.js +2 -1
  151. package/dist/shortcuts/invoice/operations/import.js +2 -1
  152. package/dist/shortcuts/invoice/operations/issuing-contract-detail.js +86 -0
  153. package/dist/shortcuts/invoice/operations/issuing-contracts.js +210 -0
  154. package/dist/shortcuts/invoice/operations/registry.js +17 -17
  155. package/dist/shortcuts/invoice/operations/reim-auto.js +4 -569
  156. package/dist/shortcuts/invoice/operations/reim.js +52 -341
  157. package/dist/shortcuts/invoice/operations/shared.js +21 -4
  158. package/dist/shortcuts/invoice/operations/update.js +2 -1
  159. package/dist/shortcuts/invoice/projection.js +10 -62
  160. package/dist/shortcuts/jiuchuanhui/continuation.js +2 -1
  161. package/dist/shortcuts/jiuchuanhui/index.js +2 -0
  162. package/dist/shortcuts/jiuchuanhui/operations/datajson.js +2 -1
  163. package/dist/shortcuts/jiuchuanhui/operations/esb.js +2 -1
  164. package/dist/shortcuts/mail/continuation.js +2 -1
  165. package/dist/shortcuts/mail/index.js +2 -0
  166. package/dist/shortcuts/mail/operations/mail-blacklist.js +1 -1
  167. package/dist/shortcuts/mail/operations/mail-contacts.js +1 -1
  168. package/dist/shortcuts/mail/operations/mail-send.js +1 -1
  169. package/dist/shortcuts/mail/operations/mail-sign.js +1 -1
  170. package/dist/shortcuts/mail/operations/mail-template.js +1 -1
  171. package/dist/shortcuts/meeting/continuation.js +2 -1
  172. package/dist/shortcuts/meeting/index.js +2 -0
  173. package/dist/shortcuts/meeting/operations/change.js +1 -1
  174. package/dist/shortcuts/meeting/operations/create.js +1 -1
  175. package/dist/shortcuts/meeting/operations/eb/create-flow.js +16 -7
  176. package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
  177. package/dist/shortcuts/meeting/operations/eb/factory.js +1 -1
  178. package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
  179. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  180. package/dist/shortcuts/meeting/operations/signs.js +1 -1
  181. package/dist/shortcuts/okr/continuation.js +2 -1
  182. package/dist/shortcuts/okr/index.js +2 -0
  183. package/dist/shortcuts/okr/operations/write.js +1 -1
  184. package/dist/shortcuts/plan/continuation.js +2 -1
  185. package/dist/shortcuts/plan/index.js +2 -0
  186. package/dist/shortcuts/plan/operations/write.js +1 -1
  187. package/dist/shortcuts/project/continuation.js +2 -1
  188. package/dist/shortcuts/project/index.js +2 -0
  189. package/dist/shortcuts/reception/constants.js +53 -0
  190. package/dist/shortcuts/reception/errors.js +54 -0
  191. package/dist/shortcuts/reception/host.js +125 -0
  192. package/dist/shortcuts/reception/index.js +198 -0
  193. package/dist/shortcuts/reception/manifest.js +177 -0
  194. package/dist/shortcuts/reception/operations/ask.js +71 -0
  195. package/dist/shortcuts/reception/operations/browsertool.js +58 -0
  196. package/dist/shortcuts/reception/operations/compose.js +129 -0
  197. package/dist/shortcuts/reception/operations/customparams.js +74 -0
  198. package/dist/shortcuts/reception/operations/doc.js +238 -0
  199. package/dist/shortcuts/reception/operations/docrender.js +36 -0
  200. package/dist/shortcuts/reception/operations/panels.js +179 -0
  201. package/dist/shortcuts/reception/operations/registry.js +26 -0
  202. package/dist/shortcuts/reception/operations/render-assets.js +184 -0
  203. package/dist/shortcuts/reception/operations/render.js +123 -0
  204. package/dist/shortcuts/reception/operations/runs.js +38 -0
  205. package/dist/shortcuts/reception/operations/schedule.js +127 -0
  206. package/dist/shortcuts/reception/operations/shared.js +196 -0
  207. package/dist/shortcuts/reception/operations/snapshot.js +68 -0
  208. package/dist/shortcuts/reception/operations/types.js +1 -0
  209. package/dist/shortcuts/reception/operations.js +33 -0
  210. package/dist/shortcuts/reception/upload.js +218 -0
  211. package/dist/shortcuts/recruit-stage/context.js +145 -33
  212. package/dist/shortcuts/recruit-stage/continuation.js +2 -1
  213. package/dist/shortcuts/recruit-stage/operations/jd-create.js +106 -17
  214. package/dist/shortcuts/recruit-stage/operations/resume-import.js +166 -10
  215. package/dist/shortcuts/workflow/continuation.js +2 -1
  216. package/dist/shortcuts/workflow/index.js +2 -0
  217. package/dist/shortcuts/workflow/operations/form.js +32 -8
  218. package/dist/shortcuts/workflow/operations/write.js +1 -1
  219. package/docs/_catalog.md +3 -0
  220. package/docs/agent-invoice.md +1 -1
  221. package/docs/archive-oa.md +1 -1
  222. package/docs/caizhilian.md +1 -1
  223. package/docs/calendar.md +1 -1
  224. package/docs/contract.md +1 -1
  225. package/docs/e10-auth.md +16 -0
  226. package/docs/ehr.md +2 -2
  227. package/docs/esb.md +1 -1
  228. package/docs/im.md +1 -1
  229. package/docs/invoice.md +8 -12
  230. package/docs/okr.md +1 -1
  231. package/docs/reception.md +119 -0
  232. package/package.json +1 -1
  233. package/scripts/clean.mjs +43 -2
  234. package/skill-template/business-info.json +18 -2
  235. package/skill-template/domains/caizhilian.md +1 -1
  236. package/skill-template/domains/reception-flow.md +18 -0
  237. package/skill-template/domains/yepiaotong.md +4 -7
  238. package/skills/weaver-e10-archive-oa/references/source-manifest.json +14 -14
  239. package/skills/weaver-e10-blog/references/blog-publish.md +1 -1
  240. package/skills/weaver-e10-blog/references/source-manifest.json +7 -7
  241. package/skills/weaver-e10-caizhilian/references/source-manifest.json +21 -21
  242. package/skills/weaver-e10-caizhilian/references/write-protocol.md +2 -2
  243. package/skills/weaver-e10-calendar/references/calendar-write.md +1 -1
  244. package/skills/weaver-e10-cowork/SKILL.md +1 -1
  245. package/skills/weaver-e10-ebuilder-form/SKILL.md +1 -1
  246. package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -1
  247. package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -1
  248. package/skills/weaver-e10-esb/SKILL.md +2 -2
  249. package/skills/weaver-e10-esb/references/source-manifest.json +22 -22
  250. package/skills/weaver-e10-esb/references/trigger.md +2 -2
  251. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
  252. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +1 -1
  253. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
  254. package/skills/weaver-e10-jinchengda/references/source-manifest.json +29 -29
  255. package/skills/weaver-e10-jucailin/SKILL.md +1 -1
  256. package/skills/weaver-e10-jucailin/references/attend-write.md +2 -2
  257. package/skills/weaver-e10-jucailin/references/recruit-create.md +12 -3
  258. package/skills/weaver-e10-jucailin/references/recruit-write.md +1 -1
  259. package/skills/weaver-e10-meeting/SKILL.md +8 -6
  260. package/skills/weaver-e10-meeting/references/meeting-change.md +1 -1
  261. package/skills/weaver-e10-meeting/references/meeting-create.md +1 -1
  262. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +1 -1
  263. package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
  264. package/skills/weaver-e10-okr/references/okr-align.md +1 -1
  265. package/skills/weaver-e10-okr/references/okr-keyresult.md +1 -1
  266. package/skills/weaver-e10-okr/references/okr-write.md +1 -1
  267. package/skills/weaver-e10-okr/references/source-manifest.json +8 -8
  268. package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
  269. package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
  270. package/skills/weaver-e10-qiyecheng/references/loan-management.md +1 -1
  271. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +18 -18
  272. package/skills/weaver-e10-reception-flow/SKILL.md +173 -0
  273. package/skills/weaver-e10-reception-flow/assets//350/241/214/347/250/213/345/215/225/346/250/241/346/235/277-/346/263/233/345/276/256.docx +0 -0
  274. package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +213 -0
  275. package/skills/weaver-e10-reception-flow/references/browsertool.md +68 -0
  276. package/skills/weaver-e10-reception-flow/references/env-pitfalls.md +51 -0
  277. package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +227 -0
  278. package/skills/weaver-e10-reception-flow/references/guide.md +179 -0
  279. package/skills/weaver-e10-reception-flow/scripts/locate.sh +14 -0
  280. package/skills/weaver-e10-reception-flow/scripts/render.py +724 -0
  281. package/skills/weaver-e10-recruit-stage/SKILL.md +9 -5
  282. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +1 -1
  283. package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +66 -0
  284. package/skills/weaver-e10-recruit-stage/references/position-templates.md +202 -0
  285. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +22 -0
  286. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +14 -1
  287. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +6 -0
  288. package/skills/weaver-e10-shijingran/SKILL.md +5 -5
  289. package/skills/weaver-e10-shijingran/references/source-manifest.json +37 -36
  290. package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +2 -0
  291. package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
  292. package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
  293. package/skills/weaver-e10-yepiaotong/SKILL.md +19 -26
  294. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +13 -10
  295. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
  296. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +194 -155
  297. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +28 -32
  298. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +5 -1
  299. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +8 -10
  300. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +211 -616
  301. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +149 -117
  302. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +17 -20
  303. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +20 -39
  304. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +55 -22
  305. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -17
  306. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +88 -92
  307. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +144 -354
  308. package/skills/weaver-e10-yimiaoban/SKILL.md +1 -1
  309. package/skills/weaver-e10-yimiaoban/references/msg-write.md +1 -1
  310. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
  311. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +7 -7
  312. package/dist/chunks/chunk-TTPJJJC4.js +0 -465
  313. package/dist/chunks/registry-BKBZPBAJ.js +0 -23
  314. package/dist/shortcuts/invoice/markdown.js +0 -172
  315. package/dist/shortcuts/invoice/operations/issuing-qys.js +0 -424
  316. package/skills/weaver-e10-meeting.zip +0 -0
  317. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +0 -131
  318. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +0 -179
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 本文件说明报销**数据准备**阶段各 CLI operation 的入参、返回字段和填单用法。
4
4
  > 实际调用必须通过 `weaver-work-cli --json invoice run <operation>` 执行。认证由 `weaver-work-cli auth` 管理,不要手动传 token / eteamsId。
5
- > 报销单的创建与修改不在本文件:统一走 `weaver-e10-workflow` 的 `workflow.createForm` / `workflow.createRequest` / `workflow.edit*`,见第 6 节。
5
+ > 报销单的创建与修改不在本文件:统一走 `weaver-e10-workflow` 的 `workflow.createForm` / `workflow.createRequest` / `workflow.edit*`,见第 8 节。
6
6
 
7
7
  ---
8
8
 
@@ -57,26 +57,22 @@ weaver-work-cli --json invoice run invoice.reim.file-ocr.preview --input-json '{
57
57
 
58
58
  ### 返回字段说明
59
59
 
60
-
61
- | 字段 | 说明 |
62
- | ----------------- | --------------------------- |
63
- | `fileId` | 原始文件/附件ID |
64
- | `fileName` | 文件名 |
65
- | `status` | 识别状态:`"success"` 或 `"fail"` |
66
- | `errorMsg` | 识别结果消息 |
67
- | `invoiceId` | 发票唯一ID(后续匹配和填单使用) |
68
- | `invoiceType` | 发票类型名称 |
69
- | `invoiceTypeCode` | 发票类型编码 |
70
- | `amount` | 发票金额(价税合计) |
71
- | `consumeContent` | 消费内容/商品名称 |
72
- | `invoiceDate` | 开票日期(yyyy-MM-dd) |
73
- | `invoiceNumber` | 发票号码 |
74
- | `buyerName` | 购方公司名称 |
75
- | `sellerName` | 销方公司名称 |
76
- | `expenseType` | 费用类型名称 |
77
-
78
-
79
- > 返回的发票数据结构与 `invoice.list` 一致,可直接用于后续匹配和填单流程。
60
+ | 字段 | 说明 |
61
+ | --- | --- |
62
+ | `fileId` | 原始文件/附件ID |
63
+ | `fileName` | 文件名 |
64
+ | `status` | 识别状态:`"success"` 或 `"fail"` |
65
+ | `errorMsg` | 识别结果消息 |
66
+ | `invoiceId` | 发票唯一ID(后续匹配和填单使用) |
67
+ | `invoiceType` | 发票类型名称 |
68
+ | `invoiceTypeCode` | 发票类型编码 |
69
+ | `amount` | 发票金额(价税合计) |
70
+ | `consumeContent` | 消费内容/商品名称 |
71
+ | `invoiceDate` | 开票日期(yyyy-MM-dd) |
72
+ | `invoiceNumber` | 发票号码 |
73
+ | `buyerName` | 购方公司名称 |
74
+ | `sellerName` | 销方公司名称 |
75
+ | `expenseType` | 费用类型名称 |
80
76
 
81
77
  ### 多 fileId 处理
82
78
 
@@ -84,12 +80,10 @@ weaver-work-cli --json invoice run invoice.reim.file-ocr.preview --input-json '{
84
80
 
85
81
  ### 异常处理
86
82
 
87
-
88
- | 场景 | 处理方式 |
89
- | ------------------------- | ---------------- |
83
+ | 场景 | 处理方式 |
84
+ | --- | --- |
90
85
  | 某个文件识别失败(`status="fail"`) | 跳过该文件,用成功的发票继续流程 |
91
- | 全部文件识别失败 | 提示用户识别失败,无法继续 |
92
-
86
+ | 全部文件识别失败 | 提示用户识别失败,无法继续 |
93
87
 
94
88
  ---
95
89
 
@@ -105,211 +99,114 @@ CLI 已固定 `flag`(个人票夹=0 / 企业票夹=6),默认 `sreim="3"`
105
99
  | --- | --- | --- | --- |
106
100
  | `page_size` | Integer | 否 | 每页条数,默认 `10`,建议不超过 `20` |
107
101
  | `start_pos` | Integer | 否 | 分页起始位置,默认 `0` |
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 按东八区零点换算)。仅用户明确说开票日期时使用 |
110
- | `create_tm_begin` / `create_tm_end` | Integer \| String | 否 | 录入/创建日期范围,写法同上。仅用户明确说录入/创建日期时使用 |
102
+ | `consumption_tm_begin` / `consumption_tm_end` | String | 否 | **消费日期范围(报销默认)**。直接传 `"YYYY-MM-DD"`:起始日按东八区零点,结束日按当天 `23:59:59`,CLI 换算成秒级时间戳。用户未指定日期时,默认最近一周 |
103
+ | `date_begin` / `date_end` | String | 否 | 开票日期范围,传 `"YYYY-MM-DD"`(起止都按东八区零点换算)。仅用户明确说开票日期时使用 |
104
+ | `create_tm_begin` / `create_tm_end` | String | 否 | 录入/创建日期范围,写法同开票日期。仅用户明确说录入/创建日期时使用 |
111
105
  | `content` | String | 否 | 消费内容关键词(如 `"滴滴"`、`"住宿"`) |
112
106
  | `number` | String | 否 | 发票号码精确匹配 |
113
107
  | `types` | Array\<Integer\> | 否 | 发票类型 ID 数组(见下方映射表) |
114
108
 
115
- 不支持 `fylxs`。报销日期筛选默认用 `consumption_tm_begin` / `consumption_tm_end`,不要和开票日期混用。
116
-
117
- ### 时间戳计算
118
-
119
- > **所有日期参数的秒级时间戳由 AI 按内联公式直接计算(UTC+8 时区)。**
120
- > 0.1.15 起日期字段也直接接受 `"YYYY-MM-DD"`(CLI 转成秒级时间戳)。`consumption_tm_end` 按东八区当天 `23:59:59` 换算,其余按零点。日期区间不跨时区歧义时优先写 `"YYYY-MM-DD"`;已经算好的秒级时间戳可原样传入。
121
- > 完整公式和 Fallback 见 [reim-workflow.md - 时间戳内联计算](reim-workflow.md#时间戳内联计算零工具调用)。
122
-
123
- 示例(最近一周,只传必要字段):
124
-
125
- ```json
126
- {
127
- "page_size": 10,
128
- "start_pos": 0,
129
- "consumption_tm_begin": 1785513600,
130
- "consumption_tm_end": 1786982399
131
- }
132
- ```
133
-
134
- > 上方示例中的时间戳仅为示意,实际使用时由 AI 按内联公式动态计算。
109
+ 日期一律写 `"YYYY-MM-DD"`,不要自己算时间戳;已有的秒级时间戳也可以原样传。不支持 `fylxs`。报销日期筛选默认用 `consumption_tm_begin` / `consumption_tm_end`,不要和开票日期混用。
135
110
 
136
111
  ### 命令
137
112
 
113
+ 示例:最近一周(今天 2026-08-04)。
114
+
138
115
  Windows PowerShell:
139
116
 
140
117
  ```powershell
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}'
118
+ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"consumption_tm_begin":"2026-07-28","consumption_tm_end":"2026-08-04"}'
142
119
  ```
143
120
 
144
121
  macOS/Linux(bash/zsh):
145
122
 
146
123
  ```bash
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}'
124
+ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"consumption_tm_begin":"2026-07-28","consumption_tm_end":"2026-08-04"}'
148
125
  ```
149
126
 
150
- ### 预筛选入参(先获取到事前申请时使用)
127
+ 要给人看或按城市 / 行程逐张判断就加 `--view summary`,见 [invoice-output-view.md](invoice-output-view.md)。
151
128
 
152
- > **前提:消费日期一定不早于事前申请日期。** CLI 用 `consumption_tm_begin` / `consumption_tm_end`(消费日期,秒级时间戳)筛选。
129
+ ### 预筛选入参(先获取到事前申请时使用)
153
130
 
154
- 如果已有事前申请数据,利用事前申请的 `createTime` 来缩小查询范围:
131
+ 消费日期一定不早于事前申请日期。已有事前申请时:
155
132
 
156
- - `consumption_tm_begin` = 最早事前申请 createTime 对应的秒级时间戳
157
- - `consumption_tm_end` = 当前日期 23:59:59 对应的秒级时间戳
133
+ - `consumption_tm_begin` = 最早事前申请 `createTime` 的日期部分
134
+ - `consumption_tm_end` = 今天
158
135
 
159
136
  ### 返回示例
160
137
 
161
- CLI 信封中列表在 `data.items`。下面是单条发票的票面结构(对应 `items[]` 元素,不是顶层 `infos`):
138
+ CLI 信封中列表在 `data.items`,每项是**平铺**的发票对象(`invoice.get` 才是 `infos[].info` 包装)。下面是一条精简后的 `items[]` 元素:
162
139
 
163
140
  ```json
164
141
  {
165
- "infos": [
166
- {
167
- "info": {
168
- "id": "1301239558731259905",
169
- "fid": "1301239558731259905",
170
- "code": "",
171
- "number": "26467000000088899841",
172
- "ext": "{\"ttax\":\"54\",\"trate\":\"6.0\",\"pcontact\":\"海南省三亚市海棠区海棠北路36号亚特兰蒂斯酒店 0898-88986666\",\"totalBig\":\"玖佰伍拾肆\",\"title\":\"电子发票(普通发票)\",\"bbank\":\"\",\"content\":\"*生产生活服务*水上乐园门票\",\"issuer\":\"张怡\",\"products\":[{\"tprice\":\"54\",\"taxClassifyCode\":\"3070101000000000000\",\"price\":\"900.00\",\"qty\":\"1\",\"name\":\"*生产生活服务*水上乐园门票\",\"no\":\"1\",\"trate\":\"6.0\",\"amount\":\"900\",\"smodel\":\"\",\"muint\":\"张\"}],\"province\":\"海南省\",\"bcontact\":\"上海市闵行区三鲁公路3419号021-52262600\",\"pbank\":\"462601500018800030539\",\"comment\":\"0808+5737268\",\"category\":\"电子发票(普通发票)\",\"corp_seal\":\"1\"}",
173
- "rb": { "trace": "", "ret": 0, "lang": "53512" },
174
- "fylx": "897092516517920775",
175
- "total": 0,
176
- "currency": "CNY",
177
- "currencyName": "人民币",
178
- "empId": "9080972482706531342",
179
- "province": "海南省",
180
- "modify_info": {
181
- "ctm": 1786168444,
182
- "utm": 1786168444,
183
- "cstm": 1786118400,
184
- "source": 4
185
- },
186
- "comm_info": {
187
- "pro": {
188
- "cname": "电子发票(普通发票)",
189
- "type": 33,
190
- "date": "2026-08-08",
191
- "status": 0
192
- },
193
- "price": {
194
- "amount": "900",
195
- "total": "954",
196
- "treim": ""
197
- },
198
- "buyer": {
199
- "tcode": "9131000070322836XD",
200
- "company": "上海泛微网络科技股份有限公司"
201
- },
202
- "payer": {
203
- "tcode": "91460200348073438U",
204
- "company": "海南亚特兰蒂斯商旅发展有限公司亚特兰蒂斯酒店"
205
- }
206
- },
207
- "relative_fids": [],
208
- "bill_type": 0
209
- },
210
- "ret": { "trace": "", "ret": 0, "message": "执行成功", "lang": "53512" },
211
- "is_valid": 0
212
- }
213
- ],
214
- "res_base": { "trace": "", "ret": 0, "message": "执行成功", "lang": "53512" }
142
+ "fid": "1301239558731259905",
143
+ "number": "26467000000088899841",
144
+ "code": "",
145
+ "detailUrl": "https://e10.example.com/sp/inc/incDetail?fid=1301239558731259905",
146
+ "ext": "{\"content\":\"*生产生活服务*水上乐园门票\",\"province\":\"海南省\",\"comment\":\"0808+5737268\",\"issuer\":\"张怡\",\"products\":[...]}",
147
+ "extInfo": {
148
+ "content": "*生产生活服务*水上乐园门票",
149
+ "province": "海南省",
150
+ "comment": "0808+5737268"
151
+ },
152
+ "fylx": "897092516517920775",
153
+ "province": "海南省",
154
+ "modify_info": { "ctm": 1786168444, "utm": 1786168444, "cstm": 1786118400, "source": 4 },
155
+ "comm_info": {
156
+ "pro": { "cname": "电子发票(普通发票)", "type": 33, "date": "2026-08-08", "status": 0 },
157
+ "price": { "amount": "900", "total": "954" },
158
+ "buyer": { "tcode": "9131000070322836XD", "company": "上海泛微网络科技股份有限公司" },
159
+ "payer": { "tcode": "91460200348073438U", "company": "海南亚特兰蒂斯商旅发展有限公司亚特兰蒂斯酒店" }
160
+ },
161
+ "relative_fids": [],
162
+ "bill_type": 0
215
163
  }
216
164
  ```
217
165
 
218
166
  ### 返回字段说明
219
167
 
220
- > **⚠️ `ext` 是 JSON 字符串,使用前需先 `JSON.parse(ext)` 解析。**
221
-
222
- | 字段路径 | 对应标准字段名 | 说明 |
168
+ | 字段路径(`items[]`) | 对应标准字段名 | 说明 |
223
169
  | --- | --- | --- |
224
- | `info.fid` | `invoiceId` | 发票唯一 ID(后续匹配和填单使用) |
225
- | `info.number` | `invoiceNumber` | 发票号码 |
226
- | `info.code` | — | 发票代码 |
227
- | `info.comm_info.pro.cname` | `invoiceType` | 发票类型名称 |
228
- | `info.comm_info.pro.type` | `invoiceTypeCode` | 发票类型编码(见下方分类说明) |
229
- | `info.comm_info.pro.date` | `invoiceDate` | 开票日期(yyyy-MM-dd) |
230
- | `info.comm_info.pro.status` | — | 发票状态(**8=全额红冲,必须过滤掉**) |
231
- | `info.comm_info.price.total` | `amount` | **价税合计(发票金额)**——报销金额一律用它 |
232
- | `info.comm_info.price.amount` | — | 不含税金额,**不要拿来填报销金额**(字段名虽叫 `amount`) |
233
-
234
- > ⚠️ 原始返回里叫 `amount` 的字段**不一定是价税合计**:`invoice.list` / `invoice.get` 的 `price.amount`、`invoice.get` 里的 `amount` 都是**不含税**金额(实测滴滴票 `price.amount=48.61`、`price.total=50.07`)。本技能文档里说的「发票 `amount`」专指上表映射后的**价税合计 `price.total`**。
235
- | `info.comm_info.buyer.company` | `buyerName` | 购方公司名称 |
236
- | `info.comm_info.payer.company` | `sellerName` | 销方公司名称 |
237
- | `info.fylx` | — | 费用类型 ID(需根据 ID 查找对应 `expenseType` 名称) |
238
- | `info.province` | — | 省份 |
239
- | `info.modify_info.cstm` | — | 消费日期(秒级时间戳) |
240
- | `info.modify_info.source` | — | 来源(4=邮箱等) |
241
- | `ext`(解析后)`.content` | `consumeContent` | 消费内容/商品名称 |
242
- | `ext`(解析后)`.products` | — | 商品明细列表 |
243
- | `ext`(解析后)`.province` | — | 省份 |
244
- | `ext`(解析后)`.comment` | — | 备注 |
245
- | `ext`(解析后)`.issuer` | — | 开票人 |
246
- | `ext`(解析后)`.pcontact` | — | 销售方地址及电话 |
247
- | `ext`(解析后)`.bcontact` | — | 购买方地址及电话 |
248
-
249
- ### ext 字段详细结构
250
-
251
- `ext` 是 JSON 字符串,解析后结构如下:
252
-
253
- ```json
254
- {
255
- "ttax": "54",
256
- "trate": "6.0",
257
- "pcontact": "海南省三亚市海棠区海棠北路36号亚特兰蒂斯酒店 0898-88986666",
258
- "totalBig": "玖佰伍拾肆",
259
- "title": "电子发票(普通发票)",
260
- "bbank": "",
261
- "content": "*生产生活服务*水上乐园门票",
262
- "issuer": "张怡",
263
- "products": [
264
- {
265
- "tprice": "54",
266
- "taxClassifyCode": "3070101000000000000",
267
- "price": "900.00",
268
- "qty": "1",
269
- "name": "*生产生活服务*水上乐园门票",
270
- "no": "1",
271
- "trate": "6.0",
272
- "amount": "900",
273
- "smodel": "",
274
- "muint": "张"
275
- }
276
- ],
277
- "province": "海南省",
278
- "bcontact": "上海市闵行区三鲁公路3419号021-52262600",
279
- "pbank": "462601500018800030539",
280
- "comment": "0808+5737268",
281
- "category": "电子发票(普通发票)"
282
- }
283
- ```
284
-
285
- ### 数据过滤规则(重要,前置处理)
286
-
287
- > **⚠️ 获取到发票数据后,必须先过滤掉不允许报销的发票,再进行后续分类和填单。**
288
-
289
- | 过滤条件 | 字段路径 | 值 | 说明 |
290
- | --- | --- | --- | --- |
291
- | **全额红冲发票** | `info.comm_info.pro.status` | `8` | 该发票已被全额红冲,**必须过滤掉,不允许报销** |
292
-
293
- 过滤后的发票才进入后续的 invoiceTypeCode 分类和填单流程。
294
-
295
- ---
296
-
297
- ### invoiceTypeCode 分类(重要)
298
-
299
- 返回的 `info.comm_info.pro.type` 按值分为两类,**填单时处理方式完全不同**:
170
+ | `fid` | `invoiceId` | 发票唯一 ID(后续匹配和填单使用) |
171
+ | `number` | `invoiceNumber` | 发票号码 |
172
+ | `code` | — | 发票代码 |
173
+ | `detailUrl` | — | 发票详情页链接,展示发票号码时做成超链接 |
174
+ | `comm_info.pro.cname` | `invoiceType` | 发票类型名称 |
175
+ | `comm_info.pro.type` | `invoiceTypeCode` | 发票类型编码(见下方分类说明) |
176
+ | `comm_info.pro.date` | `invoiceDate` | 开票日期(yyyy-MM-dd) |
177
+ | `comm_info.pro.status` | — | 发票状态 |
178
+ | `comm_info.price.total` | `amount` | **价税合计(发票金额)**——报销金额一律用它 |
179
+ | `comm_info.price.amount` | — | 不含税金额,**不要拿来填报销金额**(字段名虽叫 `amount`) |
180
+ | `comm_info.buyer.company` | `buyerName` | 购方公司名称 |
181
+ | `comm_info.payer.company` | `sellerName` | 销方公司名称 |
182
+ | `fylx` | — | 费用类型 ID |
183
+ | `province` | — | 省份 |
184
+ | `modify_info.cstm` | — | 消费日期(秒级时间戳)。`--view summary` 和 `candidates.list` 都不带,需要时用 `--fields fid,modify_info.cstm` 取 |
185
+ | `modify_info.source` | — | 来源(4=邮箱等) |
186
+ | `extInfo.content` | `consumeContent` | 消费内容(没有时取商品名称) |
187
+ | `extInfo.expenseNote` | — | 票面费用说明(`ext.expenseDesc`,如「上海-武汉」),只用来判断行程,不写进报销单 |
188
+ | `extInfo.city` / `extInfo.province` | — | 开票方所在城市 / 省份 |
189
+ | `extInfo.comment` | — | 备注,常写出差地和行程(如「2026/10/25上海-武汉 CZ3580」) |
190
+ | `extInfo.from` / `extInfo.to` | — | 起止地(打车、火车、机票) |
191
+ | `extInfo.stationGetOn` / `extInfo.stationGetOff` | — | 上下车站点 |
192
+
193
+ > `ext` 是 JSON 字符串。`invoice.list` 已默认取回完整 `ext`,并解析成上面的 `extInfo`(空值不出现),直接读 `extInfo` 或用 `--view summary`,不要自己解析 `ext`。
194
+ > ⚠️ 原始返回里叫 `amount` 的字段**不一定是价税合计**:`price.amount`、`invoice.get` 里的 `amount` 都是**不含税**金额(实测滴滴票 `price.amount=48.61`、`price.total=50.07`)。本技能文档里说的「发票 `amount`」专指价税合计 `price.total`。
195
+
196
+ ### invoiceTypeCode 分类
197
+
198
+ `comm_info.pro.type` 按值分为两类,**填单时处理方式完全不同**:
300
199
 
301
200
  | 分类 | type 值 | 说明 | 填单位置 |
302
201
  | --- | --- | --- | --- |
303
202
  | **发票** | 除 17/18/57/58 以外的所有值 | 正式发票,每张独立成一行明细 | 明细「相关发票」(`EinvoiceComponent`) |
304
203
  | **相关凭证** | 17, 18, 57, 58 | 行程单、小票/水单、电子支付凭证、其他支付凭证,不能独立成行 | 明细「相关凭证」不赋值,由发票联动带出 |
305
204
 
306
- **关键规则:相关凭证不能单独成行,也不写入明细「相关凭证」,由「相关发票」联动带出。**
307
-
308
- 详细规则见 [form-fill-rules.md](reim-form-fill-rules.md#3-相关凭证不赋值由联动带出)
205
+ 详细规则见 [reim-form-fill-rules.md](reim-form-fill-rules.md#1-发票与相关凭证分类)。
309
206
 
310
207
  ### 发票类型 ID 映射表
311
208
 
312
- > 用于 `types` 入参筛选,`info.comm_info.pro.type` 返回值也对应此表。
209
+ > 用于 `types` 入参筛选,`comm_info.pro.type` 返回值也对应此表。
313
210
 
314
211
  | ID | 名称 |
315
212
  | --- | --- |
@@ -363,72 +260,50 @@ CLI 信封中列表在 `data.items`。下面是单条发票的票面结构(对
363
260
  | 57 | 支付凭证 |
364
261
  | 58 | 其他票据凭证 |
365
262
 
366
- > **相关凭证类型**(不能独立成行,也不写入"相关凭证"字段,由发票联动带出):17(小票/水单)、18(滴滴行程单——注意:滴滴开具的增值税电子普通发票 type=3,是正式发票可独立成行;type=18 仅指滴滴的支付行程凭证)、57(支付凭证)、58(其他票据凭证)
263
+ > **相关凭证类型**:17(小票/水单)、18(滴滴行程单)、57(支付凭证)、58(其他票据凭证)。滴滴开具的增值税电子普通发票 type=3,是正式发票,可独立成行;type=18 仅指滴滴的支付行程凭证。
367
264
 
368
265
  ---
369
266
 
370
- ## 1b. 报销候选发票分类
267
+ ## 2. 报销候选发票分类
371
268
 
372
269
  CLI operation:`invoice.reim.candidates.list`(read)
373
270
 
374
- 自动翻页拉取未报销(sreim=3)发票,并按 `oreim.list_reim` / 红冲状态分组,**不再需要手动翻页和逐条剔重**。
271
+ 自动翻页拉取未报销(sreim=3)发票,并按 `oreim.list_reim` 分组,**不再需要手动翻页和逐条剔重**。
375
272
 
376
- macOS/Linux(bash/zsh):
273
+ Windows PowerShell:
377
274
 
378
- ```bash
275
+ ```powershell
379
276
  weaver-work-cli --json invoice run invoice.reim.candidates.list --input-json '{"consumption_tm_begin":"2026-09-14","consumption_tm_end":"2026-09-21"}'
380
277
  ```
381
278
 
382
- Windows PowerShell:
279
+ macOS/Linux(bash/zsh):
383
280
 
384
- ```powershell
281
+ ```bash
385
282
  weaver-work-cli --json invoice run invoice.reim.candidates.list --input-json '{"consumption_tm_begin":"2026-09-14","consumption_tm_end":"2026-09-21"}'
386
283
  ```
387
284
 
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` 或秒级时间戳。
389
- - **红冲票默认已过滤**:全额红冲发票(`status=8`)不出现在任何一组,被过滤的张数由 `summary.filteredRedReversedCount` 告知。需要看红冲票时传 `include_red_reversed: true`,此时它们进 `redReversed` 组。
390
- - 输出:`available` / `assigned` / `redReversed` 三组,每组元素含 `fid`、`number`、`date`、`total`、`buyer`、`payer`、`typeName`、`status`、`valid`、`reimRequests`;`summary` 给出三组的张数与金额合计;`warnings` 含截断与金额解析告警。
285
+ - 入参(全部可选):`consumption_tm_begin`/`consumption_tm_end`(消费日期范围,报销默认)、`date_begin`/`date_end`(开票日期范围,仅用户明确说开票日期时用)、`page_size`(10-200,默认 50)、`max_items`(1-500,默认 200,超出截断并产生 warning)。日期字段传 `YYYY-MM-DD`。
286
+ - 输出:`available` / `assigned` 两组,每组元素含 `fid`、`number`、`date`、`total`、`buyer`、`payer`、`typeName`、`status`、`valid`、`reimRequests`;`summary` 给出两组的张数与金额合计;`warnings` 含截断与金额解析告警。分组元素不带 `ext`,要按城市 / 行程判断时改用 `invoice.list --view summary`。
391
287
  - **报销范围永远从 `available` 里选**;`assigned` 是已挂在报销单上的(再报 = 重复报销)。
392
288
  - `sreim="3"`(未报销)**不会**排除已挂单的发票,判断是否已挂单必须看分组结果(即 `list_reim`)。
393
289
  - 两次查询之间发票从 `assigned` 翻到 `available`,通常是原报销单被删除、发票被真实释放,分类本身是准的;只有对某张票的归属存疑时,才用 `weaver-work-cli workflow run workflow.detail --input-json '{"requestId":"<id>"}'` 核实原单是否还在,不要每次报销都逐张复核。
394
290
 
395
291
  ---
396
292
 
397
- ## 2. 查询事前申请流程列表
293
+ ## 3. 查询事前申请流程列表
398
294
 
399
295
  CLI operation:`invoice.reim.requests.list`
400
296
 
401
297
  ### 入参
402
298
 
403
- #### 分页参数
404
-
405
-
406
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
407
- | ---------- | ------- | --- | --- | ------- |
408
- | `pageNo` | Integer | 是 | 1 | 页码,从1开始 |
409
- | `pageSize` | Integer | 否 | 100 | 每页条数。不传时 CLI 默认 100,显式传入则覆盖 |
410
-
411
-
412
- #### 筛选条件
413
-
414
-
415
- | 参数 | 类型 | 说明 | 示例 |
416
- | -------------------- | ------ | -------------------- | --------------- |
417
- | `requestname` | String | 流程标题模糊搜索 | `"差旅"`, `"交通费"` |
418
- | `cusCreateDateStart` | String | 发起日期-开始 (yyyy-MM-dd)。不传则不限开始日期 | `"2026-07-01"` |
419
- | `cusCreateDateEnd` | String | 发起日期结束 (yyyy-MM-dd)。**不传时 CLI 按东八区当天 + 1 天填入;传入时 CLI 用该日期再 + 1 天后发给接口。** 调用方传业务结束日本身,不要自己再加 1 天 | `"2026-07-31"` |
420
-
421
-
422
- ### 推荐默认入参
423
-
424
- 查事前申请、用户没有指定结束日期时,用下面这份入参。不传 `pageSize` 时 CLI 也按 100 填入。不要自己计算或传入 `cusCreateDateEnd`,CLI 会按东八区当天 + 1 天写入。如果传了 `cusCreateDateEnd`,CLI 会用传入日期再 + 1 天后发给接口,调用方不要自己先加 1 天。
425
-
426
- ```json
427
- {
428
- "pageNo": 1,
429
- "pageSize": 100
430
- }
431
- ```
299
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
300
+ | --- | --- | --- | --- | --- |
301
+ | `pageNo` | Integer | 是 | 1 | 页码,从1开始 |
302
+ | `pageSize` | Integer | 否 | 100 | 每页条数 |
303
+ | `requestname` | String | 否 | — | 流程标题模糊搜索,如 `"差旅"`、`"交通费"` |
304
+ | `cusCreateDateStart` | String | 否 | 结束日前 7 天,查不到放宽到前 1 个月;话费前 90 天 | 发起日期开始(yyyy-MM-dd)。**用户没指定开始日期时不要传**,由 CLI 按下方「默认日期窗口」取值 |
305
+ | `cusCreateDateEnd` | String | 否 | 东八区当天 + 1 天 | 发起日期结束(yyyy-MM-dd)。**传入时 CLI 用该日期再 + 1 天后发给接口**,调用方传业务结束日本身,不要自己再加 1 天;用户没指定结束日期时不要传 |
306
+ | `scene` | String | 否 | — | 话费报销传 `"phone"`,默认开始日改为结束日前 90 天;其他场景不传 |
432
307
 
433
308
  ### 命令
434
309
 
@@ -444,29 +319,24 @@ macOS/Linux(bash/zsh):
444
319
  weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":100}'
445
320
  ```
446
321
 
447
- ### 预筛选入参(先获取到发票时使用)
322
+ ### 默认日期窗口(CLI 内置)
448
323
 
449
- > **前提:事前申请日期一定在开票日期之前。**
324
+ 日期由 CLI 算,Agent 不要自己推算 `cusCreateDateStart` / `cusCreateDateEnd`,只在用户明确说了日期时传。
450
325
 
451
- 如果已有发票数据,利用发票的 `invoiceDate` 来缩小事前申请查询范围:
452
-
453
- ```json
454
- {
455
- "pageNo": 1,
456
- "pageSize": 100,
457
- "cusCreateDateStart": "2026-04-21",
458
- "cusCreateDateEnd": "2026-07-30"
459
- }
460
- ```
326
+ | 情况 | 开始日 | 结束日(发给接口时 CLI 再 + 1 天) |
327
+ | --- | --- | --- |
328
+ | 默认 | 结束日前 7 天;第 1 页一条都没有时,CLI 自动放宽到结束日前 1 个月再查一次 | 用户指定的日期,没指定为东八区当天 |
329
+ | 话费报销(`scene="phone"`) | 结束日前 90 天,不再放宽 | 同上 |
330
+ | 用户指定了开始日 | 用户指定的日期,不再放宽 | 同上 |
461
331
 
462
- - `cusCreateDateEnd` = 最晚发票 invoiceDate(事前申请不会晚于开票日期)。CLI 会再 + 1 天后发给接口;不需要按开票日收窄时不要传,交给「东八区当天 + 1 天」默认值
463
- - `cusCreateDateStart` = 最早发票 invoiceDate 往前推 90 天(合理的事前申请窗口期)
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)。
332
+ - 返回的 `data.query` 写明本次实际用的窗口:`cusCreateDateStart`、`cusCreateDateEnd`(业务结束日,未加 1 天)、`widened`(是否放宽到 1 个月)。
333
+ - 翻页(`pageNo` ≥ 2)时把第 1 页 `data.query.cusCreateDateStart` 原样传回,保证各页窗口一致。
334
+ - 放宽后仍为空:告诉用户「最近一个月(话费为最近 90 天)没有查到事前申请」,请用户给出发起时间范围后按指定日期再查。
335
+ - 取回列表后只按时间关联:开票日期落在发起日之后 90 天内(话费不设上限)。正好 1 条就绑定;2 条及以上先问用户。见 [reim-matching-rules.md](reim-matching-rules.md)。
466
336
 
467
337
  ### 返回示例
468
338
 
469
- CLI 只保留下面 7 个字段,接口原文里的 `requestnametitle`、部门、节点、URL 等不再输出。
339
+ CLI 只保留下面 7 个字段。
470
340
 
471
341
  ```json
472
342
  {
@@ -488,39 +358,70 @@ CLI 只保留下面 7 个字段,接口原文里的 `requestnametitle`、部门
488
358
  }
489
359
  ```
490
360
 
491
- ### 返回字段说明
361
+ | 字段 | 说明 |
362
+ | --- | --- |
363
+ | `requestid` | 事前申请流程ID(用于匹配绑定和填单) |
364
+ | `workflowid` | 事前申请自己的工作流ID |
365
+ | `requestname` | 流程标题 |
366
+ | `flowStatus` | 流程状态(6=已完成) |
367
+ | `creatorId` | 发起人ID |
368
+ | `creatorName` | 发起人姓名 |
369
+ | `createTime` | 发起时间 |
492
370
 
371
+ 列表里没有出差起止日期,`createTime` 是发起时间,常常晚于出差(先出差后补单)。按出差流程查票时,用下面的 `workflow.summary` 读表单。
493
372
 
494
- | 字段 | 说明 |
495
- | ------------- | ------------------- |
496
- | `requestid` | 事前申请流程ID(用于匹配绑定和填单) |
497
- | `workflowid` | 工作流ID(用于获取表单结构) |
498
- | `requestname` | 流程标题 |
499
- | `flowStatus` | 流程状态(6=已完成) |
500
- | `creatorId` | 发起人ID |
501
- | `creatorName` | 发起人姓名 |
502
- | `createTime` | 发起时间 |
373
+ ### 读取出差流程的起止日期(`workflow.summary`)
503
374
 
375
+ 调用 `weaver-e10-workflow` 的 `workflow.summary`(只读,**不标记已读**;不要用 `workflow.detail`,它会把流程标成已读)。多条出差流程时并行调用:
504
376
 
505
- ---
377
+ Windows PowerShell:
378
+
379
+ ```powershell
380
+ weaver-work-cli --json workflow run workflow.summary --input-json '{"requestId":"1331357089254367304","summaryFields":20}'
381
+ ```
506
382
 
507
- ## 5. 获取报销单工作流ID
383
+ macOS/Linux(bash/zsh):
508
384
 
509
- CLI operation:`invoice.reim.workflow.resolve`
385
+ ```bash
386
+ weaver-work-cli --json workflow run workflow.summary --input-json '{"requestId":"1331357089254367304","summaryFields":20}'
387
+ ```
510
388
 
511
- 根据事前申请流程ID获取对应的报销单工作流ID;若无事前申请则返回候选报销单工作流列表。
389
+ 返回(2026-10-30 真机,「出差/外出流程」节选):
512
390
 
513
- ### 入参
391
+ ```json
392
+ {
393
+ "basicInfo": { "requestTitle": "出差/外出流程-龚为明-2026-10-26(测试)", "createdAt": "2026-10-28 17:46:49", "flowStatus": "审批中" },
394
+ "summaryFields": [
395
+ { "fieldName": "起始日期", "componentKey": "DateComponent", "value": "2026-10-26 00:00" },
396
+ { "fieldName": "结束日期", "componentKey": "DateComponent", "value": "2026-10-26 23:56" },
397
+ { "fieldName": "出差城市", "componentKey": "City", "value": "中国/湖北/武汉" },
398
+ { "fieldName": "出差原因", "componentKey": "TextArea", "value": "武汉星辰项目关于违规数据处理方案的沟通" }
399
+ ]
400
+ }
401
+ ```
514
402
 
403
+ | 取值 | 字段 |
404
+ | --- | --- |
405
+ | 出差开始日 | `summaryFields` 里 `fieldName` 是「起始日期」(或「开始日期」「出差开始日期」)的 `value`,只取日期部分 `YYYY-MM-DD` |
406
+ | 出差结束日 | `fieldName` 是「结束日期」(或「出差结束日期」)的 `value`,只取日期部分 |
407
+ | 出差城市 | `fieldName` 是「出差城市」的 `value`,取最后一级(`中国/湖北/武汉` → 武汉) |
408
+ | 状态 | `basicInfo.flowStatus`(中文,原样展示) |
515
409
 
516
- | 参数 | 类型 | 必填 | 说明 |
517
- | ------------ | ----------- | --- | -------------------------- |
518
- | `requestIds` | ArrayString | 是 | 事前申请流程ID列表。无事前申请时传空数组 `[]` |
410
+ 起止日期任一取不到 → 不猜,按 [reim-workflow.md](reim-workflow.md)「按出差流程查票」第 3 步处理。
411
+
412
+ ---
519
413
 
414
+ ## 4. 获取报销单工作流
520
415
 
521
- ### 场景A:有事前申请
416
+ CLI operation:`invoice.reim.workflow.resolve`
417
+
418
+ 根据事前申请流程ID获取对应的报销单工作流;无事前申请时返回候选报销单工作流列表。
419
+
420
+ | 参数 | 类型 | 必填 | 说明 |
421
+ | --- | --- | --- | --- |
422
+ | `requestIds` | Array\<String\> | 是 | 事前申请流程ID列表。无事前申请时传空数组 `[]` |
522
423
 
523
- **命令:**
424
+ ### 有事前申请
524
425
 
525
426
  Windows PowerShell:
526
427
 
@@ -534,38 +435,25 @@ macOS/Linux(bash/zsh):
534
435
  weaver-work-cli --json invoice run invoice.reim.workflow.resolve --input-json '{"requestIds":["1299854672520364033"]}'
535
436
  ```
536
437
 
537
- **返回:**
438
+ 返回:
538
439
 
539
440
  ```json
540
441
  {
541
442
  "code": 200,
542
- "msg": "接口返回成功",
543
- "status": true,
544
443
  "data": {
545
444
  "requestWorkflowMap": {
546
445
  "1299854672520364033": {
547
- "workFlowId": "1250064959163990031",
548
- "workFlowName": "差旅事前申请"
446
+ "workFlowId": "100003460000000060",
447
+ "workFlowName": "总部费用报销"
549
448
  }
550
449
  }
551
- },
552
- "fail": false
450
+ }
553
451
  }
554
452
  ```
555
453
 
556
- **返回字段说明:**
557
-
558
-
559
- | 字段 | 说明 |
560
- | -------------------------------------------- | ----------------------------------------------- |
561
- | `requestWorkflowMap` | 事前申请ID → 对应报销单工作流的映射 |
562
- | `requestWorkflowMap[requestId].workFlowId` | 对应的报销单工作流ID(与 `workFlowName` 拼成 `名称(ID)` 传给 `workflow.createForm`) |
563
- | `requestWorkflowMap[requestId].workFlowName` | 报销单流程名称 |
564
-
454
+ `requestWorkflowMap[requestId]` 的 `workFlowName` 和 `workFlowId` 拼成 `{workFlowName}({workFlowId})` 传给 `workflow.createForm`。
565
455
 
566
- ### 场景B:无事前申请
567
-
568
- **命令:**
456
+ ### 无事前申请
569
457
 
570
458
  Windows PowerShell:
571
459
 
@@ -579,59 +467,36 @@ macOS/Linux(bash/zsh):
579
467
  weaver-work-cli --json invoice run invoice.reim.workflow.resolve --input-json '{"requestIds":[]}'
580
468
  ```
581
469
 
582
- **返回:**
470
+ 返回:
583
471
 
584
472
  ```json
585
473
  {
586
474
  "code": 200,
587
- "msg": "接口返回成功",
588
- "status": true,
589
475
  "data": {
590
476
  "candidateWorkflows": [
591
- {
592
- "workFlowId": "1255675973064196097",
593
- "workFlowName": "报销流程666【活动版本V1】"
594
- },
595
- {
596
- "workFlowId": "1250064959163990031",
597
- "workFlowName": "差旅事前申请"
598
- }
477
+ { "workFlowId": "100003460000000060", "workFlowName": "总部费用报销" },
478
+ { "workFlowId": "1250064959163990031", "workFlowName": "差旅费用报销" }
599
479
  ]
600
- },
601
- "fail": false
480
+ }
602
481
  }
603
482
  ```
604
483
 
605
- **返回字段说明:**
606
-
607
-
608
- | 字段 | 说明 |
609
- | ----------------------------------- | ---------- |
610
- | `candidateWorkflows` | 候选报销单工作流列表 |
611
- | `candidateWorkflows[].workFlowId` | 报销单工作流ID |
612
- | `candidateWorkflows[].workFlowName` | 报销单流程名称 |
613
-
614
-
615
484
  ### 使用策略
616
485
 
617
-
618
- | 场景 | 处理方式 |
619
- | ------------------------------- | ------------------------------ |
620
- | 有事前申请 → 所有事前申请对应同一 workFlowId | 创建 1 个报销单 |
621
- | 有事前申请 → 事前申请对应不同 workFlowId | 按 workFlowId 分组,**每组各创建一个报销单** |
622
- | 无事前申请 → candidateWorkflows 只有1个 | 创建 1 个报销单 |
623
- | 无事前申请 → candidateWorkflows 有多个 | 将发票按匹配分配到各工作流,**每组各创建一个报销单** |
624
-
486
+ | 场景 | 处理方式 |
487
+ | --- | --- |
488
+ | 有事前申请 → 所有事前申请对应同一 workFlowId | 创建 1 个报销单 |
489
+ | 有事前申请 → 事前申请对应不同 workFlowId | 按 workFlowId 分组,**每组各创建一个报销单** |
490
+ | 无事前申请 → candidateWorkflows 只有1个 | 创建 1 个报销单 |
491
+ | 无事前申请 → candidateWorkflows 有多个 | 将发票按 [reim-workflow.md](reim-workflow.md) Step 2.5 的规则分配到各工作流,**每组各创建一个报销单** |
625
492
 
626
493
  ---
627
494
 
628
- ## 5.5 获取当前人员及上级信息
495
+ ## 5. 获取当前人员及上级信息(兜底)
629
496
 
630
497
  CLI operation:`invoice.reim.employee-superiors`
631
498
 
632
- 获取当前登录人员的基本信息及其所有上级人员列表。**兜底用**:承担主体、报销人上级、承担人直接上级、承担人所有上级通常由报销表单默认值带出;只有 `workflow.createForm` 的 `fields` 里这些字段没有 `initialValue`,或 `createRequest` 的 `missingFields` 列出它们时才调用(见 [reim-workflow.md](reim-workflow.md) Step 3.7)。
633
-
634
- ### 命令
499
+ 承担主体、报销人上级、承担人直接上级、承担人所有上级通常由报销表单默认值带出;只有 `workflow.createForm` 的 `fields` 里这些字段没有 `initialValue`,或 `createRequest` 的 `missingFields` 列出它们时才调用(见 [reim-workflow.md](reim-workflow.md) Step 3.6)。无入参。
635
500
 
636
501
  Windows PowerShell:
637
502
 
@@ -645,367 +510,97 @@ macOS/Linux(bash/zsh):
645
510
  weaver-work-cli --json invoice run invoice.reim.employee-superiors --input-json '{}'
646
511
  ```
647
512
 
648
- ### 入参
649
-
650
- 无。
651
-
652
- ### 返回示例
513
+ 返回:
653
514
 
654
515
  ```json
655
516
  {
656
517
  "code": 200,
657
- "msg": "接口返回成功",
658
- "status": true,
659
518
  "data": {
660
- "currentEmployee": {
661
- "id": "1201729946891231232",
662
- "name": "后端开发111"
663
- },
664
- "directSuperior": {
665
- "id": "1201729946891231233",
666
- "name": "直属主管王五"
667
- },
519
+ "currentEmployee": { "id": "1201729946891231232", "name": "后端开发111" },
520
+ "directSuperior": { "id": "1201729946891231233", "name": "直属主管王五" },
668
521
  "allSuperiors": [
669
- {
670
- "id": "1201729946891231111",
671
- "name": "分管领导熊总"
672
- },
673
- {
674
- "id": "1201729946891231233",
675
- "name": "直属主管王五"
676
- }
522
+ { "id": "1201729946891231111", "name": "分管领导熊总" },
523
+ { "id": "1201729946891231233", "name": "直属主管王五" }
677
524
  ]
678
- },
679
- "fail": false
525
+ }
680
526
  }
681
527
  ```
682
528
 
683
- ### 返回字段说明
684
-
685
- | 字段 | 说明 |
686
- | --- | --- |
687
- | `currentEmployee.id` | 当前人员 ID(**字符串**,避免雪花 ID 超过 JS 安全整数精度) |
688
- | `currentEmployee.name` | 当前人员名称 |
689
- | `allSuperiors` | 所有上级列表(直接上级 + 间接上级,按层级从高到低排列),每项含 `id` 和 `name` |
690
- | `directSuperior` | **直接上级**(对象,含 `id` 和 `name`)。⚠️ **与 `allSuperiors[0]` 不是同一人**:`allSuperiors[0]` 是上级链中最高层(如分管领导),直接上级必须取 `directSuperior` |
691
- | `allSuperiors[].id` | 上级人员 ID(**字符串**) |
692
-
693
- ### 填单字段对应关系
529
+ ID 都是**字符串**(避免雪花 ID 超过 JS 安全整数精度)。`allSuperiors` 按层级从高到低排列。
694
530
 
695
531
  | 表单字段 | 取值方式 |
696
532
  | --- | --- |
697
533
  | 承担主体 / 申请人 | `{currentEmployee.name}({currentEmployee.id})` |
698
- | 报销人上级 / 承担人直接上级 | `{directSuperior.name}({directSuperior.id})`(**不是 `allSuperiors[0]`**) |
534
+ | 报销人上级 / 承担人直接上级 | `{directSuperior.name}({directSuperior.id})`(⚠️ **不是 `allSuperiors[0]`**,后者是上级链最高层) |
699
535
  | 承担人所有上级 | `allSuperiors` 每项写成 `名称(ID)` 组成的数组 |
700
536
 
701
537
  ---
702
538
 
703
- ## 5.6 获取发票明细行预填信息
704
-
705
- CLI operation:`invoice.reim.row-info`
706
-
707
- 根据发票 ID 获取该发票在明细行中应填写的费用日期、关联凭证、费用科目。`fysm` 只作返回字段,**不要写入明细「费用说明」**,该列由发票联动带出。关联凭证 `itinerary` 也不写入「相关凭证」,`subjectId` / `subjectName` 也不写入「费用类型(科目)」,`date` 也不写入「费用日期」。**报销建单不再调用本 operation**:明细只写「相关发票」(及「相关流程」),其余列都由发票联动带出。
708
-
709
- ### 入参
710
-
711
-
712
- | 参数 | 类型 | 必填 | 说明 |
713
- | ----------- | ------ | --- | ------------------ |
714
- | `cdzt` | String | 否 | 当前用户/人员 ID,不传则 CLI 使用当前登录用户 |
715
- | `requestid` | String | 否 | 事前申请流程 ID(无可不传或留空) |
716
- | `invoiceId` | String | 是 | 发票 ID |
717
-
718
-
719
- ### 命令
720
-
721
- Windows PowerShell:
722
-
723
- ```powershell
724
- weaver-work-cli --json invoice run invoice.reim.row-info --input-json '{"invoiceId":"1297093330645237792","requestid":""}'
725
- ```
726
-
727
- macOS/Linux(bash/zsh):
728
-
729
- ```bash
730
- weaver-work-cli --json invoice run invoice.reim.row-info --input-json '{"invoiceId":"1297093330645237792","requestid":""}'
731
- ```
732
-
733
- ### 返回字段
734
-
735
-
736
- | 字段 | 说明 | 对应明细行字段 |
737
- | ----------- | ---------------- | ---------------------------------------- |
738
- | `date` | 费用日期 | **建单不写入**,明细「费用日期」由发票联动带出 |
739
- | `fysm` | 费用说明原文 | **不写入**明细「费用说明」。该列由发票联动带出 |
740
- | `itinerary` | 关联凭证 ID(多个用逗号拼接) | **不写入**,明细「相关凭证」由发票联动带出 |
741
- | `subjectId` | 费用科目 ID | **建单不写入**,明细「费用类型(科目)」由发票联动带出 |
742
- | `subjectName` | 费用科目名称 | 同上;用户明确要求改科目时,与 `subjectId` 拼成 `名称(ID)` 走修改链 |
743
- | `sqje` / `sbje` | 整张发票的申请金额 | 仅参考;明细金额不写,由发票联动带出 |
744
- | `containsItinerary` | 是否关联了行程单 | — |
745
- | `itineraryData` | **行程单逐段明细**数组,每段含 `date`、`sqje`(该段金额)、`fysm`、`subjectId` / `subjectName`、`itinerary`(凭证 ID)、`invoiceId` | **暂不拆行**,也不要用其中的 `fysm` 生成费用说明。见 [reim-form-fill-rules.md](reim-form-fill-rules.md#4-行程单多段行程暂不拆行) |
746
-
747
-
748
- ### 返回示例
749
-
750
- ```json
751
- {
752
- "code": 200,
753
- "status": true,
754
- "data": {
755
- "date": "2026-07-29",
756
- "fysm": "交通运输服务",
757
- "itinerary": "1298798990831518001",
758
- "subjectId": "100502270000000006"
759
- }
760
- }
761
- ```
762
-
763
- ### 使用场景与优先级
764
-
765
- - **调用时机**:报销建单不调用;只在用户单独要查某张发票的预填信息时调用
766
- - **报销建单不调用**:返回的 `date`、`fysm`、`subjectId`、`itinerary` 都不写入明细,对应列由发票联动带出
767
- - 只在用户单独要查某张发票的预填信息时使用
768
- - **itinerary 处理**:不用来写「相关凭证」,也不拿它去 `invoice.browse-field.data` 取凭证对象。明细「相关凭证」由发票联动带出(见 [reim-form-fill-rules.md](reim-form-fill-rules.md#3-相关凭证不赋值由联动带出))
769
- - **itineraryData 处理**:暂不拆行,不管几段都是一张发票一行。不要拿第一段和最后一段去写费用说明
770
-
771
- ---
772
-
773
- ## 5.6b 批量获取发票预填信息(0.1.19 新增)
774
-
775
- CLI operation:`invoice.reim.row-info-batch`
776
-
777
- 一次调用获取多张发票的预填信息,内部并行处理(并发度 4),避免 Agent 逐张串行调用 `invoice.reim.row-info` 导致 N-1 次额外 CLI 启动与网络往返。
778
-
779
- ### 入参
780
-
781
- | 参数 | 类型 | 必填 | 说明 |
782
- | --- | --- | --- | --- |
783
- | `invoiceIds` | Array\<String\> | 是 | 发票 ID 列表,1-100 个 |
784
- | `requestid` | String | 否 | 事前申请流程 ID(无可不传或留空) |
785
- | `cdzt` | String | 否 | 当前用户/人员 ID,不传则 CLI 使用当前登录用户 |
786
-
787
- ### 命令
788
-
789
- macOS/Linux(bash/zsh):
790
-
791
- ```bash
792
- weaver-work-cli --json invoice run invoice.reim.row-info-batch --input-json '{"invoiceIds":["1297093330645237792","1297093330645237793"]}'
793
- ```
794
-
795
- Windows PowerShell:
796
-
797
- ```powershell
798
- weaver-work-cli --json invoice run invoice.reim.row-info-batch --input-json '{"invoiceIds":["1297093330645237792","1297093330645237793"]}'
799
- ```
800
-
801
- ### 返回示例
802
-
803
- ```json
804
- {
805
- "results": [
806
- {
807
- "invoiceId": "1297093330645237792",
808
- "status": "success",
809
- "data": {
810
- "date": "2026-07-29",
811
- "fysm": "交通运输服务",
812
- "itinerary": "1298798990831518001",
813
- "subjectId": "100502270000000006"
814
- }
815
- },
816
- {
817
- "invoiceId": "1297093330645237793",
818
- "status": "fail",
819
- "error": "获取发票 1297093330645237793 行预填失败"
820
- }
821
- ],
822
- "succeeded": 1,
823
- "failed": 1,
824
- "total": 2,
825
- "workflow": { "workflow": "invoice.reim.row-info-batch", "version": 1, "state": "PARTIAL" }
826
- }
827
- ```
828
-
829
- ### 返回字段说明
830
-
831
- | 字段 | 说明 |
832
- | --- | --- |
833
- | `results[].invoiceId` | 对应的发票 ID |
834
- | `results[].status` | `"success"` 或 `"fail"` |
835
- | `results[].data` | 成功时返回,结构与单张 `row-info` 一致(`date`、`fysm`、`itinerary`、`subjectId`) |
836
- | `results[].error` | 失败时返回错误信息 |
837
- | `succeeded` / `failed` / `total` | 成功/失败/总数统计 |
539
+ ## 6. 取发票字段对象
838
540
 
839
- ### 使用场景
840
-
841
- - 报销建单不调用;需要一次查多张发票的预填信息时,用 `row-info-batch` 替代 N 次 `row-info` 调用
842
- - 部分失败不影响其他发票,失败的回退到 AI 推断逻辑
843
- ---
844
-
845
- ## 5.7 获取发票详情(交通类发票行程信息)
846
-
847
- CLI operation:`invoice.get`
848
-
849
- 根据发票 ID 获取发票完整详情。报销填单时不要为了生成费用说明去取出发地、目的地。
541
+ CLI operation:`invoice.browse-field.data`(read)
850
542
 
851
- ### 命令
543
+ 报销单明细的「相关发票」是 `EinvoiceComponent`,**只接受发票对象,不接受文本或裸 ID**。一次传入本组全部发票的 `fid`(不传凭证,「相关凭证」由发票联动带出),按 `fid` 把返回对象放进对应行。入参与对象结构见 [invoice-browse-field-data.md](invoice-browse-field-data.md)。
852
544
 
853
545
  Windows PowerShell:
854
546
 
855
547
  ```powershell
856
- weaver-work-cli --json invoice run invoice.get --input-json '{"fid":"1301956959986835460"}'
548
+ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482","1295366637717012483"]}'
857
549
  ```
858
550
 
859
551
  macOS/Linux(bash/zsh):
860
552
 
861
553
  ```bash
862
- weaver-work-cli --json invoice run invoice.get --input-json '{"fid":"1301956959986835460"}'
863
- ```
864
-
865
- | 参数 | 类型 | 必填 | 说明 |
866
- | --- | --- | --- | --- |
867
- | `fid` | String | 与 `number` 二选一 | 发票 fid |
868
- | `number` | String | 与 `fid` 二选一 | 发票号码 |
869
-
870
-
871
- ### 调用时机
872
-
873
- **仅当发票为交通类时调用**。判断条件(满足任一):
874
-
875
- - `expenseType` 包含"交通"、"出行"、"打车"、"出租车"
876
- - `consumeContent` 包含"客运服务费"、"运输服务"
877
- - `invoiceTypeCode` 为 17(行程单)或 57(客运凭证)等交通相关类型
878
- - `sellerName` 包含"滴滴"、"享道"、"高德"、"曹操"等出行平台
879
-
880
- ### 返回值关键字段
881
-
882
- 从 `infos[].info` 中提取:
883
-
884
-
885
- | 字段路径 | 说明 | 示例 |
886
- | ----------------------------------------------------- | ------- | -------------------- |
887
- | `from` | 出发地 | `"仁济医院南院区门诊部(南门)南侧"` |
888
- | `to` | 目的地 | `"浦江瑞和城柒街区30号"` |
889
- | `ext` (JSON字符串) → `passengersService[].from` | 出发地(详细) | `"仁济医院南院区门诊部(南门)南侧"` |
890
- | `ext` (JSON字符串) → `passengersService[].to` | 目的地(详细) | `"浦江瑞和城柒街区30号"` |
891
- | `ext` (JSON字符串) → `passengersService[].transportType` | 交通方式 | `"出租车"` |
892
-
893
-
894
- > **优先取 `info.from` 和 `info.to`**(顶层字段),如为空则从 `ext.passengersService[0]` 中提取。
895
-
896
- ### 出发地/目的地精简规则
897
-
898
- 原始地址可能很长,需要精简后使用:
899
-
900
-
901
- | 原始值 | 精简后 |
902
- | -------------------- | ---------------- |
903
- | `"仁济医院南院区门诊部(南门)南侧"` | `"仁济医院南院"` |
904
- | `"浦江瑞和城柒街区30号"` | `"浦江瑞和城"` |
905
- | `"上海虹桥国际机场T2航站楼出发层"` | `"虹桥机场T2"` |
906
- | `"北京南站"` | `"北京南站"`(已够短,保留) |
907
-
908
-
909
- 精简原则:
910
-
911
- - 去掉括号及括号内内容(如 `(南门)`)
912
- - 去掉"侧"、"层"、"出发层"、"到达层"等方位后缀
913
- - 去掉门牌号(如 `30号`、`3419号`)
914
- - 保留核心地标名称,控制在 **10 个字以内**
915
-
916
- ### 返回示例(精简)
917
-
918
- ```json
919
- {
920
- "infos": [
921
- {
922
- "info": {
923
- "id": "1301956959986835460",
924
- "from": "仁济医院南院区门诊部(南门)南侧",
925
- "to": "浦江瑞和城柒街区30号",
926
- "ext": "{...\"passengersService\":[{\"from\":\"仁济医院南院区门诊部(南门)南侧\",\"to\":\"浦江瑞和城柒街区30号\",\"transportType\":\"出租车\"}]...}"
927
- }
928
- }
929
- ]
930
- }
554
+ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482","1295366637717012483"]}'
931
555
  ```
932
556
 
933
557
  ---
934
558
 
935
- ## 5.8 取发票字段对象
936
-
937
- CLI operation:`invoice.browse-field.data`(read)
938
-
939
- 报销单明细的「相关发票」是 `EinvoiceComponent`,**只接受发票对象,不接受文本或裸 ID**。一次传入本组全部发票的 `fid`(不传凭证,「相关凭证」由发票联动带出),按 `fid` 把返回对象放进对应行。入参与对象结构见 [invoice-browse-field-data.md](invoice-browse-field-data.md)。
940
-
941
- macOS/Linux(bash/zsh):
942
-
943
- ```bash
944
- weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482","1298798990831518001"]}'
945
- ```
946
-
947
- Windows PowerShell:
948
-
949
- ```powershell
950
- weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fids":["1295366637717012482","1298798990831518001"]}'
951
- ```
952
-
953
- ---
954
-
955
- ## 5.9 相关客户 / 相关项目模糊搜索
559
+ ## 7. 相关客户 / 相关项目模糊搜索
956
560
 
957
561
  CLI operation:`invoice.reim.field.search`(read)
958
562
 
959
- 用户给出相关客户或相关项目名称后、写入之前调用。封装 `GET /api/government/formStructure/fieldRelateSearch`(参数走 query)。编排见 [reim-form-fill-rules.md](reim-form-fill-rules.md#相关客户模糊搜索)。**必须在建草稿前搜完确认,不要先建空单再搜。**
960
-
961
- ### 入参
563
+ 用户给出相关客户或相关项目名称后、写入之前调用。编排见 [reim-form-fill-rules.md](reim-form-fill-rules.md#相关客户模糊搜索)。**必须在建草稿前搜完确认,不要先建空单再搜。**
962
564
 
963
565
  | 参数 | 类型 | 必填 | 说明 |
964
566
  | --- | --- | --- | --- |
965
- | `keywords` | String | 是 | 用户原话,不要改写 |
567
+ | `keywords` | String | 是 | 用户原话,不要改写。⚠️ 是 `keywords`,不是 `keyword` |
966
568
  | `fieldId` | String | 是 | 本次 `createForm` 里对应字段 id(相关客户或相关项目) |
967
569
  | `workflowId` | String | 是 | 本次报销工作流 ID |
968
570
  | `nodeId` | String | 否 | 默认 `100004140000000271` |
969
571
 
970
- ### 命令
971
-
972
- macOS/Linux(bash/zsh):
572
+ Windows PowerShell:
973
573
 
974
- ```bash
574
+ ```powershell
975
575
  weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"学院","fieldId":"100003720000000687","workflowId":"100003460000000060"}'
976
576
  ```
977
577
 
978
- Windows PowerShell:
578
+ macOS/Linux(bash/zsh):
979
579
 
980
- ```powershell
580
+ ```bash
981
581
  weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"学院","fieldId":"100003720000000687","workflowId":"100003460000000060"}'
982
582
  ```
983
583
 
984
- ### 返回
985
-
986
- | 字段 | 说明 |
584
+ | 返回字段 | 说明 |
987
585
  | --- | --- |
988
586
  | `keywords` | 本次搜索词 |
989
587
  | `match` | `unique` / `multiple` / `none` |
990
588
  | `items` | `{id,name,value}` 列表,`value` 与 `id` 相同 |
991
589
  | `selected` | `match=unique` 时是那一条;否则 `null` |
992
590
 
993
- `match=unique` → 直接填 `"名称(ID)"`,不问用户。`match=multiple` → 把 `items` 的名称列给用户选。`match=none` → 请用户换更完整的名称。不要把未消歧简称直接丢给 `createRequest`。
591
+ `match=unique` → 直接填 `"名称(ID)"`,不问用户。`match=multiple` → 把 `items` 的名称列给用户选。`match=none` → 请用户换更完整的名称。
994
592
 
995
593
  ---
996
594
 
997
- ## 6. 创建 / 修改报销单(`weaver-e10-workflow`)
595
+ ## 8. 创建 / 修改报销单(`weaver-e10-workflow`)
998
596
 
999
- 报销单创建与修改不再使用本技能的 operation,统一调用 `weaver-e10-workflow` 技能:
597
+ 读取出差流程、创建与修改报销单统一调用 `weaver-e10-workflow` 技能:
1000
598
 
1001
599
  | 动作 | 命令 | 契约 |
1002
600
  | --- | --- | --- |
601
+ | 读取出差流程起止日期 | `workflow.summary`(`requestId`,只读,不标记已读) | [`workflow-view.md`](../../weaver-e10-workflow/references/workflow-view.md),用法见第 3 节 |
1003
602
  | 载入报销表单 | `workflow.createForm`(`workflow` 传 `{workFlowName}({workFlowId})`) | [`workflow-create.md`](../../weaver-e10-workflow/references/workflow-create.md) |
1004
603
  | 创建报销单(固定存草稿) | `workflow.createRequest`(`context` + `data` + `action` + `requestName`) | 同上 |
1005
604
  | 修改已创建的报销单 | `workflow.editLoad` → `workflow.editPrepare` → `workflow.editApply` | [`workflow-edit.md`](../../weaver-e10-workflow/references/workflow-edit.md) |
1006
605
 
1007
606
  `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`。