weaver-work-cli 0.1.40 → 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.
- package/README.md +17 -0
- package/dist/chunks/{archive-JHTONRST.js → archive-P6TBQGKL.js} +13 -5
- package/dist/chunks/{archive-oa-FCHLCPHC.js → archive-oa-7TQ2NXOH.js} +12 -5
- package/dist/chunks/{asset-RLIHC7DB.js → asset-3ELRG37G.js} +11 -4
- package/dist/chunks/{asset-idle-KVOFTLCP.js → asset-idle-WIGMUFMD.js} +7 -3
- package/dist/chunks/{attachment-content-RZYDB3MB.js → attachment-content-E3276UOV.js} +5 -4
- package/dist/chunks/{blog-42OZTJNP.js → blog-C5NMZAAC.js} +11 -4
- package/dist/chunks/{caizhilian-KRK547K5.js → caizhilian-5XSM2DFP.js} +13 -6
- package/dist/chunks/{calendar-RTWAMKHD.js → calendar-FI2WNSBO.js} +71 -26
- package/dist/chunks/{chunk-CXRQWOZ5.js → chunk-3YBDYOC4.js} +3 -3
- package/dist/chunks/{chunk-OOUTBLZ4.js → chunk-56EZERK4.js} +1 -1
- package/dist/chunks/chunk-6N4JPNFL.js +76 -0
- package/dist/chunks/{chunk-ZUX3P6BQ.js → chunk-727FH2NI.js} +1 -1
- package/dist/chunks/chunk-7BDPM5ST.js +11 -0
- package/dist/chunks/{chunk-LN447PY2.js → chunk-BCVYBYYT.js} +432 -2247
- package/dist/chunks/{chunk-7E6MUOEK.js → chunk-CWYGFU5B.js} +2 -2
- package/dist/chunks/{chunk-NOODWMCL.js → chunk-D4ADSZ7H.js} +1 -1
- package/dist/chunks/{chunk-WFFNM65B.js → chunk-ETNJSKMM.js} +281 -29
- package/dist/chunks/{chunk-CAQNBBQA.js → chunk-F4E4EM35.js} +3 -3
- package/dist/chunks/{chunk-4CTESSKI.js → chunk-FAZTGX7S.js} +6 -6
- package/dist/chunks/chunk-FRZKBMSW.js +2562 -0
- package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
- package/dist/chunks/{chunk-NJKREDA3.js → chunk-GAMZLAG2.js} +1 -1
- package/dist/chunks/{chunk-FLS4DPGP.js → chunk-GM6J7Q4B.js} +28 -15
- package/dist/chunks/{chunk-NETCCARD.js → chunk-GRDRG6HP.js} +3 -3
- package/dist/chunks/chunk-HIT4Y6OI.js +1238 -0
- package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
- package/dist/chunks/{chunk-IZSSVYAG.js → chunk-IAZ3UPY6.js} +3 -3
- package/dist/chunks/{chunk-ZEDWSH32.js → chunk-IC62NFM5.js} +1 -1
- package/dist/chunks/{chunk-P26ZWSKU.js → chunk-KIHNAS25.js} +5 -2
- package/dist/chunks/{chunk-57IECMWX.js → chunk-N4M2DDFE.js} +29 -15
- package/dist/chunks/{chunk-JWRZM2H2.js → chunk-OF4S23UB.js} +4 -4
- package/dist/chunks/{chunk-VNBU55SL.js → chunk-PC7VKEB5.js} +80 -2458
- package/dist/chunks/{chunk-G2JSIUWF.js → chunk-PUQS5MWL.js} +91 -2
- package/dist/chunks/{chunk-E7OK5WD5.js → chunk-Q4OYAQYH.js} +5 -5
- package/dist/chunks/{chunk-7BRU4EFH.js → chunk-QVSWRLLU.js} +35 -6
- package/dist/chunks/{chunk-T6EGVBKU.js → chunk-TA7FXXJD.js} +6 -3
- package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
- package/dist/chunks/{chunk-4TEDNCON.js → chunk-UFIT2UU3.js} +354 -56
- package/dist/chunks/{chunk-LUSPKZKY.js → chunk-UG5G54VL.js} +1 -0
- package/dist/chunks/{chunk-NIAJ5ZCG.js → chunk-UL5XUQ25.js} +5 -2
- package/dist/chunks/{chunk-FMPJJYYI.js → chunk-WRXSAVKO.js} +1 -1
- package/dist/chunks/{chunk-7U577Q7U.js → chunk-WSF4NNMR.js} +3 -3
- package/dist/chunks/chunk-XHK4MDR5.js +2497 -0
- package/dist/chunks/{chunk-LFMSDBZN.js → chunk-XNIK66I4.js} +326 -161
- package/dist/chunks/{chunk-3SO6QL6U.js → chunk-YWX377BY.js} +5 -2
- package/dist/chunks/{chunk-BYATLLEF.js → chunk-Z3GDFVJR.js} +1 -1
- package/dist/chunks/{chunk-I566ZYNF.js → chunk-Z7VYWPZV.js} +1 -1
- package/dist/chunks/{conflict-VR55AOOO.js → conflict-ARLSZJ6V.js} +4 -3
- package/dist/chunks/{continuation-2CKSBLA6.js → continuation-3S37AUSH.js} +4 -3
- package/dist/chunks/{continuation-RN6PZN2M.js → continuation-3XLYYTKV.js} +4 -3
- package/dist/chunks/{continuation-HZIZRZBX.js → continuation-HFW2YT5S.js} +4 -3
- package/dist/chunks/{continuation-NLECEJPX.js → continuation-KI7DRRZN.js} +4 -3
- package/dist/chunks/{contract-HI4FNPYE.js → contract-DNIIW5VJ.js} +13 -5
- package/dist/chunks/{cowork-HJLI353D.js → cowork-GMLRGVIW.js} +31 -14
- package/dist/chunks/create-flow-J22BO65E.js +56 -0
- package/dist/chunks/{ebuilder-form-HTGI63UU.js → ebuilder-form-ANV2FHYV.js} +12 -7
- package/dist/chunks/{ehr-GYXIYH3A.js → ehr-GSTGAIY3.js} +695 -1255
- package/dist/chunks/{employee-SAK2QYXX.js → employee-22BGJ3QS.js} +3 -3
- package/dist/chunks/{env-DW3G4HUO.js → env-BX3VRFS7.js} +4 -3
- package/dist/chunks/{esb-I5INCEFE.js → esb-ATAIASX2.js} +12 -7
- package/dist/chunks/{factory-TKXGXS6L.js → factory-PETTFME6.js} +3 -2
- package/dist/chunks/{fna-K2MHTQ24.js → fna-YEKBSFSX.js} +14 -8
- package/dist/chunks/{group-chat-VYBNMJLG.js → group-chat-BFVXAYFX.js} +7 -4
- package/dist/chunks/{host-D5SERMAJ.js → host-HRBXEPDQ.js} +5 -5
- package/dist/chunks/{host-JM4YVHFM.js → host-LR55CTHP.js} +5 -5
- package/dist/chunks/{host-L3VLITMT.js → host-SUOY6VYQ.js} +5 -5
- package/dist/chunks/{host-ZUQTJYYK.js → host-SZGV4UNT.js} +5 -5
- package/dist/chunks/{host-256GVCAH.js → host-WIKN2EJ5.js} +5 -5
- package/dist/chunks/{hrm-VLRBKTZB.js → hrm-NRDO4W5G.js} +11 -7
- package/dist/chunks/{im-QK3VTLXK.js → im-IQ2HN23S.js} +11 -10
- package/dist/chunks/{invoice-T5JTA32H.js → invoice-MNRW76PP.js} +636 -1768
- package/dist/chunks/{jiuchuanhui-P2FNEQVZ.js → jiuchuanhui-DTRBAX4N.js} +14 -6
- package/dist/chunks/{lazy-dispatch-XRRI46M6.js → lazy-dispatch-ZVWAI25B.js} +7 -6
- package/dist/chunks/{mail-3Y7MJ6PS.js → mail-ZVAUXOJA.js} +16 -14
- package/dist/chunks/{meeting-M7LTXGJE.js → meeting-FEVPZ67S.js} +21 -13
- package/dist/chunks/{okr-OBC6S67L.js → okr-SDH3E5RA.js} +12 -5
- package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
- package/dist/chunks/{plan-5H6I53SK.js → plan-E35JFDI7.js} +12 -5
- package/dist/chunks/{project-L75QZV4S.js → project-73QXBAB2.js} +49 -25
- package/dist/chunks/reception-UWZVACBN.js +1899 -0
- package/dist/chunks/recruit-stage-4MAOCKFY.js +4770 -0
- package/dist/chunks/registry-IM5G23LS.js +24 -0
- package/dist/chunks/{registry-UGRBCBHO.js → registry-JDUS4E7D.js} +7 -6
- package/dist/chunks/{registry-RXPN6BBT.js → registry-KNKSCJNT.js} +7 -6
- package/dist/chunks/{registry-NYPYMZXG.js → registry-PO7SI256.js} +4 -4
- package/dist/chunks/{registry-QGHFNUWS.js → registry-PVUZQDDQ.js} +3 -3
- package/dist/chunks/{room-recommend-A3UDC3CA.js → room-recommend-H7KLXA5R.js} +6 -5
- package/dist/chunks/{schedule-5GCACCK7.js → schedule-ESZIBAUO.js} +6 -5
- package/dist/chunks/{workflow-M5ZJ7DWF.js → workflow-CWJFJLQU.js} +15 -10
- package/dist/cmd/action.js +6 -0
- package/dist/cmd/identity/index.js +45 -0
- package/dist/cmd/index.js +2 -0
- package/dist/core/continuation-ttl.js +18 -0
- package/dist/core/error-codes.js +85 -0
- package/dist/core/logger.js +11 -0
- package/dist/index.js +41 -30
- package/dist/internal/e10/auth/commands.js +164 -8
- package/dist/internal/e10/auth/error-log.js +182 -0
- package/dist/internal/e10/auth/messages.js +6 -0
- package/dist/internal/e10/auth/session.js +34 -3
- package/dist/internal/e10/auth/xiaoe.js +286 -44
- package/dist/internal/e10/auth-recovery.js +72 -14
- package/dist/internal/e10/context.js +72 -13
- package/dist/internal/e10/index.js +1 -1
- package/dist/internal/e10/network-error.js +93 -0
- package/dist/internal/e10/request-runtime.js +6 -0
- package/dist/internal/skills/install.js +9 -1
- package/dist/shortcuts/archive/continuation.js +2 -1
- package/dist/shortcuts/archive/index.js +3 -0
- package/dist/shortcuts/archive/operations/confirm.js +2 -1
- package/dist/shortcuts/archive-oa/continuation.js +2 -1
- package/dist/shortcuts/archive-oa/index.js +2 -0
- package/dist/shortcuts/archive-oa/operations/confirm.js +2 -1
- package/dist/shortcuts/asset/continuation.js +2 -1
- package/dist/shortcuts/asset/index.js +2 -0
- package/dist/shortcuts/asset-idle/index.js +2 -0
- package/dist/shortcuts/blog/continuation.js +2 -1
- package/dist/shortcuts/blog/index.js +2 -0
- package/dist/shortcuts/caizhilian/continuation.js +2 -1
- package/dist/shortcuts/caizhilian/index.js +2 -0
- package/dist/shortcuts/caizhilian/operations/confirm.js +3 -2
- package/dist/shortcuts/calendar/continuation.js +2 -1
- package/dist/shortcuts/calendar/index.js +2 -0
- package/dist/shortcuts/calendar/operations/read.js +31 -22
- package/dist/shortcuts/calendar/operations/write.js +46 -2
- package/dist/shortcuts/contract/continuation.js +2 -1
- package/dist/shortcuts/contract/index.js +2 -0
- package/dist/shortcuts/contract/operations/write.js +2 -1
- package/dist/shortcuts/cowork/continuation.js +2 -1
- package/dist/shortcuts/cowork/index.js +2 -0
- package/dist/shortcuts/cowork/operations/discuss-write.js +5 -1
- package/dist/shortcuts/cowork/operations/item-write.js +1 -7
- package/dist/shortcuts/cowork/operations/member-write.js +3 -1
- package/dist/shortcuts/cowork/operations/permission-write.js +5 -1
- package/dist/shortcuts/cowork/operations/shared.js +7 -0
- package/dist/shortcuts/ebuilder-form/continuation.js +2 -1
- package/dist/shortcuts/ebuilder-form/index.js +2 -0
- package/dist/shortcuts/ebuilder-form/operations/write.js +3 -2
- package/dist/shortcuts/ehr/continuation.js +2 -1
- package/dist/shortcuts/ehr/index.js +2 -0
- package/dist/shortcuts/ehr/operations/attend-write.js +44 -2
- package/dist/shortcuts/ehr/operations/hr-contact.js +7 -4
- package/dist/shortcuts/ehr/operations/hr-report.js +13 -7
- package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +317 -63
- package/dist/shortcuts/ehr/operations/recruit-position.js +134 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +263 -18
- package/dist/shortcuts/ehr/operations/recruit.js +10 -4
- package/dist/shortcuts/ehr/operations/shared.js +47 -0
- package/dist/shortcuts/esb/continuation.js +2 -1
- package/dist/shortcuts/esb/index.js +2 -0
- package/dist/shortcuts/esb/operations/trigger.js +2 -1
- package/dist/shortcuts/fna/continuation.js +2 -1
- package/dist/shortcuts/fna/index.js +2 -0
- package/dist/shortcuts/fna/operations/invoice-writeoff.js +1 -1
- package/dist/shortcuts/fna/operations/loan.js +1 -1
- package/dist/shortcuts/hrm/index.js +2 -0
- package/dist/shortcuts/hrm/operations/org.js +118 -0
- package/dist/shortcuts/im/continuation.js +2 -1
- package/dist/shortcuts/index.js +10 -0
- package/dist/shortcuts/invoice/continuation.js +2 -1
- package/dist/shortcuts/invoice/index.js +14 -15
- package/dist/shortcuts/invoice/invoice-record.js +93 -0
- package/dist/shortcuts/invoice/manifest.js +190 -393
- package/dist/shortcuts/invoice/operations/add.js +2 -1
- package/dist/shortcuts/invoice/operations/delete.js +2 -1
- package/dist/shortcuts/invoice/operations/import.js +2 -1
- package/dist/shortcuts/invoice/operations/issuing-contract-detail.js +86 -0
- package/dist/shortcuts/invoice/operations/issuing-contracts.js +210 -0
- package/dist/shortcuts/invoice/operations/registry.js +17 -17
- package/dist/shortcuts/invoice/operations/reim-auto.js +4 -569
- package/dist/shortcuts/invoice/operations/reim.js +52 -341
- package/dist/shortcuts/invoice/operations/shared.js +21 -4
- package/dist/shortcuts/invoice/operations/update.js +2 -1
- package/dist/shortcuts/invoice/projection.js +10 -62
- package/dist/shortcuts/jiuchuanhui/continuation.js +2 -1
- package/dist/shortcuts/jiuchuanhui/index.js +2 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +2 -1
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +2 -1
- package/dist/shortcuts/mail/continuation.js +2 -1
- package/dist/shortcuts/mail/index.js +2 -0
- package/dist/shortcuts/mail/operations/mail-blacklist.js +1 -1
- package/dist/shortcuts/mail/operations/mail-contacts.js +1 -1
- package/dist/shortcuts/mail/operations/mail-send.js +1 -1
- package/dist/shortcuts/mail/operations/mail-sign.js +1 -1
- package/dist/shortcuts/mail/operations/mail-template.js +1 -1
- package/dist/shortcuts/meeting/continuation.js +2 -1
- package/dist/shortcuts/meeting/index.js +2 -0
- package/dist/shortcuts/meeting/operations/change.js +1 -1
- package/dist/shortcuts/meeting/operations/create.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/catalog.js +4 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +101 -35
- package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/factory.js +34 -1
- package/dist/shortcuts/meeting/operations/eb/group-chat.js +25 -3
- package/dist/shortcuts/meeting/operations/eb/person-cache.js +96 -0
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +33 -11
- package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
- package/dist/shortcuts/meeting/operations/receipts.js +1 -1
- package/dist/shortcuts/meeting/operations/signs.js +1 -1
- package/dist/shortcuts/okr/continuation.js +2 -1
- package/dist/shortcuts/okr/index.js +2 -0
- package/dist/shortcuts/okr/operations/write.js +1 -1
- package/dist/shortcuts/plan/continuation.js +2 -1
- package/dist/shortcuts/plan/index.js +2 -0
- package/dist/shortcuts/plan/operations/write.js +1 -1
- package/dist/shortcuts/project/continuation.js +2 -1
- package/dist/shortcuts/project/index.js +2 -0
- package/dist/shortcuts/project/operations/read.js +6 -25
- package/dist/shortcuts/project/operations/shared.js +22 -0
- package/dist/shortcuts/project/operations/write.js +28 -2
- package/dist/shortcuts/reception/constants.js +53 -0
- package/dist/shortcuts/reception/errors.js +54 -0
- package/dist/shortcuts/reception/host.js +125 -0
- package/dist/shortcuts/reception/index.js +198 -0
- package/dist/shortcuts/reception/manifest.js +177 -0
- package/dist/shortcuts/reception/operations/ask.js +71 -0
- package/dist/shortcuts/reception/operations/browsertool.js +58 -0
- package/dist/shortcuts/reception/operations/compose.js +129 -0
- package/dist/shortcuts/reception/operations/customparams.js +74 -0
- package/dist/shortcuts/reception/operations/doc.js +238 -0
- package/dist/shortcuts/reception/operations/docrender.js +36 -0
- package/dist/shortcuts/reception/operations/panels.js +179 -0
- package/dist/shortcuts/reception/operations/registry.js +26 -0
- package/dist/shortcuts/reception/operations/render-assets.js +184 -0
- package/dist/shortcuts/reception/operations/render.js +123 -0
- package/dist/shortcuts/reception/operations/runs.js +38 -0
- package/dist/shortcuts/reception/operations/schedule.js +127 -0
- package/dist/shortcuts/reception/operations/shared.js +196 -0
- package/dist/shortcuts/reception/operations/snapshot.js +68 -0
- package/dist/shortcuts/reception/operations/types.js +1 -0
- package/dist/shortcuts/reception/operations.js +33 -0
- package/dist/shortcuts/reception/upload.js +218 -0
- package/dist/shortcuts/recruit-stage/context.js +231 -0
- package/dist/shortcuts/recruit-stage/continuation.js +74 -0
- package/dist/shortcuts/recruit-stage/errors.js +65 -0
- package/dist/shortcuts/recruit-stage/host.js +109 -0
- package/dist/shortcuts/recruit-stage/index.js +115 -0
- package/dist/shortcuts/recruit-stage/manifest.js +29 -0
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +722 -0
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +269 -0
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +719 -0
- package/dist/shortcuts/recruit-stage/operations/list.js +431 -0
- package/dist/shortcuts/recruit-stage/operations/registry.js +38 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +1354 -0
- package/dist/shortcuts/recruit-stage/operations/search.js +158 -0
- package/dist/shortcuts/recruit-stage/operations/types.js +25 -0
- package/dist/shortcuts/recruit-stage/school-tiers.json +318 -0
- package/dist/shortcuts/recruit-stage/shared.js +608 -0
- package/dist/shortcuts/workflow/continuation.js +2 -1
- package/dist/shortcuts/workflow/index.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +32 -8
- package/dist/shortcuts/workflow/operations/todoSmartConvert/detailFieldRules.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +13 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailCache.js +17 -24
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailFetcher.js +14 -9
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +50 -8
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.js +17 -11
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +7 -39
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +3 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +51 -15
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.pipeline.js +16 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +151 -63
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subGroup.js +56 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +39 -14
- package/dist/shortcuts/workflow/operations/write.js +1 -1
- package/docs/_catalog.md +3 -0
- package/docs/agent-invoice.md +1 -1
- package/docs/archive-oa.md +1 -1
- package/docs/caizhilian.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/contract.md +1 -1
- package/docs/e10-auth.md +23 -1
- package/docs/ehr.md +2 -2
- package/docs/esb.md +1 -1
- package/docs/im.md +1 -1
- package/docs/invoice.md +8 -12
- package/docs/okr.md +1 -1
- package/docs/operation-manual.md +8 -0
- package/docs/reception.md +119 -0
- package/package.json +1 -1
- package/scripts/clean.mjs +43 -2
- package/scripts/install-skill-to-xiaoe.mjs +105 -0
- package/scripts/package-skill.mjs +4 -2
- package/skill-template/business-info.json +42 -2
- package/skill-template/domains/caizhilian.md +1 -1
- package/skill-template/domains/reception-flow.md +18 -0
- package/skill-template/domains/recruit-stage.md +29 -0
- package/skill-template/domains/yepiaotong.md +4 -7
- package/skills/weaver-e10-archive-oa/references/source-manifest.json +14 -14
- package/skills/weaver-e10-blog/references/blog-publish.md +1 -1
- package/skills/weaver-e10-blog/references/source-manifest.json +7 -7
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +21 -21
- package/skills/weaver-e10-caizhilian/references/write-protocol.md +2 -2
- package/skills/weaver-e10-calendar/SKILL.md +2 -1
- package/skills/weaver-e10-calendar/references/calendar-write.md +55 -1
- package/skills/weaver-e10-cowork/SKILL.md +1 -1
- package/skills/weaver-e10-cowork/references/cowork-write.md +3 -1
- package/skills/weaver-e10-ebuilder-form/SKILL.md +1 -1
- package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -1
- package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -1
- package/skills/weaver-e10-esb/SKILL.md +2 -2
- package/skills/weaver-e10-esb/references/source-manifest.json +22 -22
- package/skills/weaver-e10-esb/references/trigger.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +29 -29
- package/skills/weaver-e10-jucailin/SKILL.md +1 -1
- package/skills/weaver-e10-jucailin/references/attend-write.md +10 -2
- package/skills/weaver-e10-jucailin/references/hr-contact.md +8 -0
- package/skills/weaver-e10-jucailin/references/hr-report.md +8 -0
- package/skills/weaver-e10-jucailin/references/recruit-create.md +14 -5
- package/skills/weaver-e10-jucailin/references/recruit-read.md +1 -1
- package/skills/weaver-e10-jucailin/references/recruit-write.md +5 -4
- package/skills/weaver-e10-mail/SKILL.md +1 -1
- package/skills/weaver-e10-meeting/SKILL.md +39 -7
- package/skills/weaver-e10-meeting/references/meeting-change.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-create.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
- package/skills/weaver-e10-okr/references/okr-align.md +1 -1
- package/skills/weaver-e10-okr/references/okr-keyresult.md +1 -1
- package/skills/weaver-e10-okr/references/okr-write.md +1 -1
- package/skills/weaver-e10-okr/references/source-manifest.json +8 -8
- package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
- package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +1 -1
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +18 -18
- package/skills/weaver-e10-reception-flow/SKILL.md +173 -0
- 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
- package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +213 -0
- package/skills/weaver-e10-reception-flow/references/browsertool.md +68 -0
- package/skills/weaver-e10-reception-flow/references/env-pitfalls.md +51 -0
- package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +227 -0
- package/skills/weaver-e10-reception-flow/references/guide.md +179 -0
- package/skills/weaver-e10-reception-flow/scripts/locate.sh +14 -0
- package/skills/weaver-e10-reception-flow/scripts/render.py +724 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +230 -0
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +119 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +188 -0
- package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +66 -0
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +202 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +322 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +127 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +65 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +63 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +142 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +95 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +56 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +101 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +148 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +77 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +59 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +69 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +241 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +451 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +128 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +146 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +69 -0
- package/skills/weaver-e10-shared/SKILL.md +1 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +10 -2
- package/skills/weaver-e10-shijingran/SKILL.md +7 -6
- package/skills/weaver-e10-shijingran/references/operations.md +3 -1
- package/skills/weaver-e10-shijingran/references/source-manifest.json +30 -28
- package/skills/weaver-e10-shijingran/references/write-operations.md +2 -0
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +2 -0
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
- package/skills/weaver-e10-workflow/SKILL.md +4 -2
- package/skills/weaver-e10-workflow/aigroup/default.json +11 -9
- package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +23 -13
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +62 -20
- package/skills/weaver-e10-yepiaotong/SKILL.md +28 -36
- package/skills/weaver-e10-yepiaotong/references/invoice-agent-entry.md +6 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +13 -10
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +194 -155
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +28 -32
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +5 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +8 -10
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +211 -616
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +149 -117
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +17 -20
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +20 -39
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +55 -22
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -17
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +88 -92
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +144 -354
- package/skills/weaver-e10-yimiaoban/SKILL.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +7 -7
- package/dist/chunks/chunk-SPRHHSVC.js +0 -465
- package/dist/chunks/registry-KMHCPAAD.js +0 -22
- package/dist/shortcuts/invoice/markdown.js +0 -172
- package/dist/shortcuts/invoice/operations/issuing-qys.js +0 -424
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +0 -131
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +0 -179
|
@@ -1,199 +1,212 @@
|
|
|
1
|
-
# AI
|
|
1
|
+
# AI 开票:查询待开票合同 → 创建开票申请草稿
|
|
2
2
|
|
|
3
3
|
## 什么时候读取
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**本文件是唯一开票链路(0.1.27 起)**:CLI 已移除 `invoice.issuing.make.prepare/apply`、`invoice.issuing.qys.prepare`、`invoice.issuing.result`,不再存在"直接开票""存待开台账"的接口。用户说"直接开票""不走流程""先存台账"时,一律按本链路发起开票流程草稿,并说明开票必须经所选开票流程审批后由流程侧完成;数据不在待开票合同数据里时,提示用户先录入合同商品信息。
|
|
5
|
+
用户问"我有哪些待开票的合同""哪些合同还没开票""帮我开票""给 XX 合同开票"等开票意图时读取本文件。
|
|
8
6
|
|
|
9
7
|
## 链路概览
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
| 步 | 做什么 | 命令 | 所属技能 | 风险 |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| 1 | 查我有权限看的合同审批流程 | `workflow.search` | `weaver-e10-workflow` | read |
|
|
12
|
+
| 2 | 补齐是否开票、合同号、客户名称、开票金额、销售方 | `invoice.issuing.contracts.list` | 本技能 | read |
|
|
13
|
+
| 3 | 列出待开票合同,问用户给哪份开票 | — | — | — |
|
|
14
|
+
| 4 | 读选中合同的客户和合同正文文档 | `invoice.issuing.contract.detail` | 本技能 | read |
|
|
15
|
+
| 5 | 按销售方选开票申请流程,问预计收款时间,向用户确认 | — | — | — |
|
|
16
|
+
| 6 | 载入开票申请表单 | `workflow.createForm` | `weaver-e10-workflow` | read |
|
|
17
|
+
| 7 | 存草稿 | `workflow.createRequest`(`action` 固定 `draft`) | `weaver-e10-workflow` | high-risk-write |
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
| --- | --- | --- | --- |
|
|
15
|
-
| 1 | `invoice.issuing.qys.list` | 本技能 | read |
|
|
16
|
-
| 2 | `workflow.createForm` | `weaver-e10-workflow` | read |
|
|
17
|
-
| 3 | `workflow.createRequest`(`action` 固定 `draft`) | `weaver-e10-workflow` | high-risk-write |
|
|
18
|
-
| 修改 | `workflow.editLoad` → `workflow.editPrepare` → 用户确认 → `workflow.editApply` | `weaver-e10-workflow` | high-risk-write |
|
|
19
|
+
`workflow.*` 由同级的 `weaver-e10-workflow` 技能(`../weaver-e10-workflow/`)提供,命令契约以 [`workflow-query.md`](../../weaver-e10-workflow/references/workflow-query.md)、[`workflow-create.md`](../../weaver-e10-workflow/references/workflow-create.md) 为准。该技能不存在时停止并告知用户需要安装。
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
**只建草稿,不提交。** 用户说"直接提交 / 直接开票"也只建草稿,并告诉用户在 E10 核对后自己提交。
|
|
21
22
|
|
|
22
|
-
##
|
|
23
|
+
## Step 1:查合同审批流程(`workflow.search`)
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
`category`、`workflow`、`pageSize` 固定。`current` 随翻页变化。`requestName` 可选:用户点名了客户、公司、地名、合同号或流程标题里的词时传入,按流程标题做模糊搜索;没点名就不传。
|
|
25
26
|
|
|
26
|
-
|
|
|
27
|
+
| 参数 | 值 |
|
|
27
28
|
| --- | --- |
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
29
|
+
| `category` | `"all"` |
|
|
30
|
+
| `workflow` | `["老客户增值服务合同审批流程","新客户购买合同审批流程","常规二次销售服务合同审批流程"]` |
|
|
31
|
+
| `pageSize` | `10` |
|
|
32
|
+
| `current` | 默认 `1`;用户要下一页时 `+1` |
|
|
33
|
+
| `requestName` | 可选。用户点名的检索词,如 `"鄂尔多斯"`。不传则不带该字段,按上面四项查。传入后对流程标题做 like 模糊匹配。翻页时原样带上 |
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
- 不要增删、改写这三个流程名,也不要把「合同」「开票」这类宽词当作 `requestName`。
|
|
36
|
+
- 不要另传 `requestNameTerm`。不传时就是 like 模糊。
|
|
37
|
+
- 返回澄清信封(流程名多命中 / 未匹配)时按 `workflow-query.md`「澄清后回传」处理,不要自行换流程。
|
|
38
|
+
- 没传 `requestName` 且 `data.cards` 为空:告诉用户当前没有可查看的合同审批流程,**结束**。
|
|
39
|
+
- 传了 `requestName` 且 `data.cards` 为空:告诉用户没有标题里包含该词的合同审批流程,问要不要去掉 `requestName` 再查。不要自动改词重试。
|
|
40
|
+
- 只取 `data.cards` 进入 Step 2,`workflow.search` 的 `finalMarkdown` **不展示**给用户。
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
- 有多个不同名称:列出这些名称,请用户指定一个。没选定之前不建草稿。
|
|
37
|
-
- 全部为空,或名称不在名单里:**不要默认选流程**。只问一句:「台账核算公司是空的(或不在已知名单里,当前是『{名称}』),销售方是哪家?『上海亘岩网络科技有限公司』走契约锁开票流程;泛微网络、泛微软件、上海田亩、成都泛微、泛微国际、北京泛微、浙江泛微走合同收款发票开具及快递申请。」用户给出名称后再按上表选择。
|
|
38
|
-
- 退票、冲红、红冲优先于销售方判断,不按销售方改去上面两个开票流程。
|
|
42
|
+
## Step 2:补齐开票信息(`invoice.issuing.contracts.list`)
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
把 Step 1 的 `data.cards` **原样**作为 `cards` 传入(一次最多 50 条),CLI 逐个 `requestId` 查询合同虚拟表,再把结果拼回每张卡片。只有 `requestId`、没有卡片时传 `requestIds`(字符串数组),二者只能传一个。
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
每张卡片保留 `workflow.search` 的原字段(`requestId`、`flowName`、`workflowName`、`finished` 等),并追加:
|
|
43
47
|
|
|
44
|
-
|
|
|
48
|
+
| 字段 | 含义 |
|
|
45
49
|
| --- | --- |
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
| `
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
| `invoiced` | `false` = 待开票(合同虚拟表有开票明细);`true` = 已开票(查不到明细) |
|
|
51
|
+
| `contractNo` | 合同号 |
|
|
52
|
+
| `customerName` | 客户(购方)名称 |
|
|
53
|
+
| `invoiceAmount` | 开票金额:全部明细金额之和,两位小数字符串 |
|
|
54
|
+
| `invoiceGroups[]` | 按分组标识汇总:`group`、`amount`(该组金额之和)、`items[]`(`name` 开票项目、`amount`) |
|
|
55
|
+
| `buyerTaxNo` / `sellerName` | 购方税号 / 销售方名称(Step 5 按它选开票申请流程) |
|
|
51
56
|
|
|
52
|
-
|
|
53
|
-
- 开票流程的 `fields` 里能按中文名找到主表「合同号」。冲红流程改为能按中文名找到红冲原因或相关开票流程。
|
|
57
|
+
`invoiced=true` 时 `contractNo`、`customerName`、`invoiceAmount` 等都为 `null`,`invoiceGroups` 为空数组。顶层另有 `count`、`pendingCount`(待开票条数)、`invoicedCount`(已开票条数)。
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
- 金额以 CLI 返回为准,**不要自己重新累加**,也不要从 `flowName` 里的「合同总金额」推算开票金额。
|
|
60
|
+
- 返回业务错误时原样转述,不重试,**结束**。
|
|
56
61
|
|
|
57
|
-
|
|
62
|
+
## Step 3:列出待开票合同,问用户给哪份开票
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
- 用户什么线索都没给(只说"帮我开票")→ **只问一句**:"要给哪个合同开票?请提供合同号或客户名称。"不要追问购方、金额、税率——这些都由台账和流程联动带出。
|
|
61
|
-
- 不要传 `limit` 去翻全量;分组看 `groups`,逐行明细才看 `items`。
|
|
62
|
-
- 获取待开票合同数据返回 `api/business_error`「系统错误」(code 500)时,多半是当前登录租户里没有这份待开票合同数据:如实告知并请用户确认登录的 E10 租户,不要重试、不要换关键词再查。
|
|
64
|
+
只列 `invoiced=false` 的卡片,序号按展示顺序重新从 1 编:
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
```text
|
|
67
|
+
你的待开票合同(第 1 页,共 3 条待开票,2 条已开票未列出):
|
|
68
|
+
| 序号 | 合同流程 | 合同号 | 客户名称 | 开票金额 | 流程状态 |
|
|
69
|
+
| 1 | 天洋新材技术服务合同 | 20260100909 | 天洋新材(上海)科技股份有限公司 | 133000.67(分组 1:133000.34;分组 2:0.33) | 审批中 |
|
|
70
|
+
要给哪份合同开票?回序号即可。
|
|
71
|
+
```
|
|
65
72
|
|
|
66
|
-
|
|
73
|
+
- 「合同流程」取 `flowName`,去掉末尾「( 合同号 : … , 合同总金额: … )」括注。
|
|
74
|
+
- 「开票金额」写 `invoiceAmount`;`invoiceGroups` 多于一组时在后面括注各组 `amount`,只有一组时不括注。
|
|
75
|
+
- 「流程状态」:`finished=true` 写"已结束",否则写"审批中"。
|
|
76
|
+
- 本页 `pendingCount=0`:告诉用户"本页的合同都已开票";`hasMore=true` 时问是否看下一页。
|
|
77
|
+
- Step 1 返回 `hasMore=true` 时末尾加一句"回『下一页』看更多";用户要下一页时 `current+1` 重走 Step 1~3,本轮传过 `requestName` 就原样带上,**不要自动翻完所有页**。
|
|
78
|
+
- 用户已经说了客户名、公司名、地名、合同号或标题关键词:Step 1 把该词放进 `requestName` 再查,不要先无条件拉全量再在本地挑。返回后仍按 `customerName` / `contractNo` / `flowName` 核对:只命中一条就直接用这条进 Step 4;命中多条只列命中的让用户选;本页没有且 `hasMore=true` 时带着同一个 `requestName` 翻页,最多查到第 5 页。
|
|
79
|
+
- 用户只是查询、没有要开票时,列完即可,不追问。
|
|
80
|
+
- 用户问某份合同的开票明细时,按 `invoiceGroups[].items` 逐行列出开票项目和金额。
|
|
81
|
+
- **不替用户选合同。** 一次只处理一份;用户要多份时逐份走 Step 4~7。
|
|
67
82
|
|
|
68
|
-
|
|
69
|
-
| --- | --- |
|
|
70
|
-
| 0 | 用 `includeIssued=true` 再查**一次**,按组展示 `blockedRows` 与对应 `items[].blockers`(已开票 / 已关联开票流程 / 开票中 / 已废弃),说明这份合同当前没有可开票的行,**结束**。 |
|
|
71
|
-
| 1 | 直接进 Step 3 确认卡片。 |
|
|
72
|
-
| 多条 | 列出分组让用户选(合同号、合同审批流程、购方、销售方、行数、商品、开票金额合计),**不要替用户选**;一次只处理一组。 |
|
|
83
|
+
## Step 4:读合同客户和合同正文(`invoice.issuing.contract.detail`)
|
|
73
84
|
|
|
74
|
-
`
|
|
85
|
+
入参只有用户选中那条卡片的 `requestId`。CLI 读该合同审批流程的详情(不标记已读),返回:
|
|
75
86
|
|
|
76
|
-
|
|
87
|
+
| 字段 | 含义 |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| `requestName` | 合同审批流程标题 |
|
|
90
|
+
| `customer` | `{id, name}`:取「客户名称」,新客户购买合同没有该字段时取「最终用户卡片」;都没有为 `null` |
|
|
91
|
+
| `customerSource` | `customer` 取自哪个字段 |
|
|
92
|
+
| `contractDocuments[]` | 「合同正文及附件」里的每个文件:`docId`(文档 id)、`fileId`、`name` |
|
|
93
|
+
| `contractDocIds` | 全部 `docId` 用英文逗号连起来;一个都没有为 `null`。开票申请「合同文本」不要填这个字符串 |
|
|
77
94
|
|
|
78
|
-
|
|
79
|
-
- 用户坚持要开专票时,说明专票必须有购方税号,请先在台账补全税号。
|
|
95
|
+
返回业务错误时原样转述,不重试,**结束**。
|
|
80
96
|
|
|
81
|
-
|
|
97
|
+
## Step 5:选开票申请流程,问预计收款时间,向用户确认
|
|
82
98
|
|
|
83
|
-
|
|
99
|
+
按 Step 2 卡片的 `sellerName` 选:
|
|
84
100
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
购方:南昌我爱我家科技有限公司 税号:91360125083909438T
|
|
90
|
-
销售方:上海亘岩网络科技有限公司
|
|
91
|
-
开票流程:契约锁合同收款发票开具及快递申请
|
|
92
|
-
发票类型:全电专票
|
|
93
|
-
| 序号 | 商品 | 税率 | 开票金额(含税) |
|
|
94
|
-
| 1 | 技术服务费 | 6.0% | 20000 |
|
|
95
|
-
开票金额合计(含税):20000.00(共 1 行)
|
|
96
|
-
|
|
97
|
-
本次开票金额:20000(默认按总金额开)
|
|
98
|
-
开票事由:合同20266105541(南昌我爱我家科技有限公司开放平台续购20000元10000份)技术服务费全额开票,金额20000元
|
|
99
|
-
开票内容:技术服务费(按货物名称「技术服务费」匹配)
|
|
100
|
-
预计收款时间:(必填)请选择:本月底 2026-10-31 / 下月底 2026-11-30 / 30 天后 2026-11-22,或直接给一个日期
|
|
101
|
-
请回复预计收款时间并确认发起。
|
|
102
|
-
```
|
|
101
|
+
| `sellerName` | 开票申请流程 |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| 含「亘岩」(上海亘岩网络科技有限公司,合同虚拟表里可能是简称) | `契约锁合同收款发票开具及快递申请(100003460000001852)` |
|
|
104
|
+
| 其他 | `合同收款发票开具及快递申请(100003460000000214)` |
|
|
103
105
|
|
|
104
|
-
|
|
105
|
-
- 「销售方」「开票流程」两行按「选哪个开票流程」填写。核算公司为空、不在名单里,或有多个不同名称时,先按该节问用户,选定前不展示这条确认卡片、不建草稿。
|
|
106
|
-
- 明细表的行取该组 `formDataIds` 对应的 `items[]`:商品取「开票名称」,为空取「商品名称」;金额取 `amount` 原值,不改写。
|
|
107
|
-
- 模板里的「开票内容」行只属于 `契约锁合同收款发票开具及快递申请`。其他流程没有这个字段,确认卡片不写这一行,也不推断、不问。
|
|
108
|
-
- 「开票事由」按填单规则自动生成并展示在卡片里,不问用户;「预计收款时间」由用户决定,卡片里附上按当天日期算好的本月底、下月底、30 天后三个候选日期。**用户没给出日期就不建草稿**:只回"确认 / 继续"时再问一句,拿到日期再往下走;不要自己定默认日期,也不要留空先建(详见填单规则「预计收款时间」)。用户开票时已说了收款时间,卡片里直接展示换算后的日期,末行改为"确认发起吗?"。
|
|
109
|
-
- `warnings` 非空时在卡片末尾逐条列出。命中"同合同另有 N 行已开票…"时追加一句:"流程按合同号联动,可能一并带出这些行,请在 E10 草稿里核对明细。"
|
|
110
|
-
- 用户要改购方、金额、税率或商品 → 告知需先在台账修改,再重新从 Step 1 开始;**不要在流程里手工覆盖这些值**。
|
|
106
|
+
不要让用户改选流程,也不要按宽词"开票"检索流程。
|
|
111
107
|
|
|
112
|
-
###
|
|
108
|
+
### 5.1 问预计收款时间(必问)
|
|
113
109
|
|
|
114
|
-
|
|
115
|
-
- 载入后按「选哪个开票流程」里的两条核对规则检查 `workflow.id` 与「合同号」字段(冲红流程改查红冲原因或相关开票流程);不满足就停止,不往下填,也不要换别的流程凑。
|
|
116
|
-
- `createForm` 返回 OA 业务错误(如表单布局接口报错)时如实转述并停止,不重试、不换流程。
|
|
110
|
+
**用户没给出预计收款时间之前,不进 Step 6。** 用户在前面的对话里还没说过时,先只问这一句:
|
|
117
111
|
|
|
118
|
-
|
|
112
|
+
```text
|
|
113
|
+
这份合同的预计收款时间是哪天?(超期未收回款项的发票会直接作废)例如 2026-12-31。
|
|
114
|
+
```
|
|
119
115
|
|
|
120
|
-
|
|
116
|
+
- 统一转成 `yyyy-MM-dd`。"月底""下个月 15 号"这类说法按今天的日期换算成具体日期,在 5.2 里写出换算结果让用户确认。
|
|
117
|
+
- 不替用户猜,不用开票日期、合同日期或任何默认值代替,也不能留空。用户说"不知道 / 以后再填"时,说明这一项必须先给,没有就不建草稿。
|
|
118
|
+
- 说不清是哪天(如"年底前后")或日期无效时,再问一次具体日期。
|
|
121
119
|
|
|
122
|
-
|
|
123
|
-
- 联动会把数量写成税率选项 id。
|
|
124
|
-
- 联动会把开户行写成名称账号混写串。
|
|
120
|
+
### 5.2 确认(只问这一次)
|
|
125
121
|
|
|
126
|
-
|
|
122
|
+
```text
|
|
123
|
+
将为这份合同创建「合同收款发票开具及快递申请」草稿(只存草稿,不会提交):
|
|
124
|
+
合同流程:深圳市蓝禾技术有限公司-增值服务购买合同-52500-林玉婷-2026-09-18(合同号 20260114549,开票金额 52500.00)
|
|
125
|
+
合同客户:深圳市蓝禾技术有限公司
|
|
126
|
+
合同文本:深圳市蓝禾技术有限公司用户数采购合同_20260914_v1.1.docx
|
|
127
|
+
预计收款时间:2026-12-31
|
|
128
|
+
确认创建吗?
|
|
129
|
+
```
|
|
127
130
|
|
|
128
|
-
|
|
131
|
+
- 「合同文本」列出 `contractDocuments[].name`,多个用"、"连接;`docId` 为 `null` 的文件不列。
|
|
132
|
+
- `customer` 为 `null` 时写"合同客户:未取到,草稿建好后请在 E10 里选择";没有任何 `docId` 非空的合同文件时,「合同文本」同样这样写。
|
|
133
|
+
- 用户确认 → Step 6。用户改了预计收款时间 → 按新日期再确认一次。用户说"取消 / 不开了" → 停止。
|
|
129
134
|
|
|
130
|
-
|
|
131
|
-
- `action` 固定 `"draft"`:用户说"直接提交"也只建草稿,并告诉用户去 E10 核对后提交。
|
|
135
|
+
## Step 6:载入开票申请表单(`workflow.createForm`)
|
|
132
136
|
|
|
133
|
-
`
|
|
137
|
+
- `workflow` 传 Step 5 选定的 `名称(ID)`;**不传 `userQuestion`**,不用 `workflow.createRequestDirect`。
|
|
138
|
+
- 核对 `workflow.id` 与选定的 ID 一致;不一致就停止并告诉用户。
|
|
139
|
+
- 按中文名在 `fields` 里找主表字段 id(下表 id 为当前环境实测值,以 `fields` 为准);某个字段找不到就不填它,建完草稿后提醒用户在 E10 里填。
|
|
134
140
|
|
|
135
|
-
|
|
141
|
+
| 要填的值 | 合同收款发票开具及快递申请 | 契约锁合同收款发票开具及快递申请 |
|
|
142
|
+
| --- | --- | --- |
|
|
143
|
+
| 合同审批流程 | 「合同流程」`100501872195629954` | 「相关合同审批流程」`100003720000056262` |
|
|
144
|
+
| 客户 | 「合同客户」`100501873639686776` | 「合同客户」`100003720000056240` |
|
|
145
|
+
| 合同正文文档 | 「合同文本」`100501873669461025` | 「相关合同(与开票金额相关的合同)」`100003720000056261` |
|
|
146
|
+
| 预计收款时间 | 「预计收款时间(超期未收回款项的发票会直接作废)」`100501870975576757` | 「预计收款时间」`100003720000056250` |
|
|
147
|
+
| 合同号 | 不传(见 Step 7) | 「合同号」`100003720000056343` |
|
|
136
148
|
|
|
137
|
-
|
|
138
|
-
2. `CREATED` 后用返回的 `linkageResult`(一段「字段联动带出:字段=值、…」文本)核对联动结果。明细其余列由联动写入,`previewDetails` 里只有 Agent 自己填的金额,属正常。只核对三项:
|
|
139
|
-
- 含「是否存在合同明细数据=存在」;
|
|
140
|
-
- 含「总开票金额=」和「货物名称=」(明细整行已从台账带出);
|
|
141
|
-
- 「本次开票总金额」等于本次填入各行「金额(含税)」之和;按默认值开时,它等于 `group.totalAmount`。数值比较时 `5900.00` 与 `5900` 视为相等。
|
|
149
|
+
- `createForm` 返回 OA 业务错误时原样转述并停止,不重试。
|
|
142
150
|
|
|
143
|
-
|
|
151
|
+
## Step 7:存草稿(`workflow.createRequest`)
|
|
144
152
|
|
|
145
|
-
|
|
146
|
-
3. `missingFields` 非空时原样转述(提交前需补齐);`finalMarkdown` 末尾已有这段提示时不要重复。
|
|
147
|
-
4. `BROWSER_FILL`(小e 环境)只输出那段 `<browsertool>` 标签块,不做第 2 步核对。
|
|
148
|
-
5. **补正开户行名称与账号**(`CREATED` 后都要做,取值规则见填单规则「创建后补正」):
|
|
149
|
-
- `workflow.editLoad` 读草稿(`requestId` 取创建返回值),从 `currentValues` 取主表「开户行名称」「开户行银行帐号」「开户行及帐号」,以及每行「明细行id」「数量」(第 6 条要用)。
|
|
150
|
-
- 算出补正值:取 `group.purchaserBankName` / `group.purchaserBankAccount`,为空时拆「开户行及帐号」。已经相同就不提交。
|
|
151
|
-
- 有要补的:`workflow.editPrepare` **只传主表这两个字段**,不传任何明细、不传开票内容。然后向用户列出补正项,并问「要把开户行名称和账号分开补进草稿吗?」,用户确认后 `workflow.editApply`。
|
|
152
|
-
- 「开户行及帐号」格式无法拆分时不补这两项,告诉用户原值,请其在 E10 里手工拆填。
|
|
153
|
-
- `editPrepare` / `editApply` 报错时原样转述,不重试;草稿本身已建好,不受影响。
|
|
154
|
-
6. **提醒用户在 E10 里改的项**:在本轮回复末尾加一段「提交前请在 E10 里改」。只有 `契约锁合同收款发票开具及快递申请` 才处理开票内容:已经写入时不提;没推断出来才写「开票内容:明细货物名称没有对应的下拉选项,请在 E10 里选择」。其他流程不要提开票内容。数量按填单规则提醒,如:
|
|
153
|
+
`data.main` **只放下面这几项**:
|
|
155
154
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
| 字段 | 值 | 什么时候传 |
|
|
156
|
+
| --- | --- | --- |
|
|
157
|
+
| 合同审批流程 | `{"id":"<requestId>","name":"<requestName>"}`(Step 4) | 必传 |
|
|
158
|
+
| 客户 | `{"id":"<customer.id>","name":"<customer.name>"}`(Step 4) | `customer` 非 `null` |
|
|
159
|
+
| 合同正文文档 | 与合同流程相同的 `{"id":"<docId>","name":"<文件名>"}`。`id` 取 `contractDocuments[].docId`,`name` 取同项 `name`。只有一个文件时传这一个对象;多个文件时传对象数组 | 至少有一个 `docId` 非空 |
|
|
160
|
+
| 预计收款时间 | 用户在 Step 5 确认的日期,`"yyyy-MM-dd"` | 必传 |
|
|
161
|
+
| 合同号 | Step 2 卡片的 `contractNo`,原样字符串 | 仅契约锁流程,且 `contractNo` 非 `null` |
|
|
160
162
|
|
|
161
|
-
|
|
163
|
+
- 「合同收款发票开具及快递申请」的「合同号」是带浏览按钮的文本字段,`workflow.createRequest` 写不进去:传字符串会在浏览按钮里查不到而返回 `NEEDS_CONFIRMATION`,传 `{id,name}` 草稿里仍为空。这张表**不传合同号**,由「合同流程」联动带出。
|
|
164
|
+
- 其余字段(税号、开票地址、开户行、发票类型等)由联动带出或用表单默认值,**Agent 不填、不算、不覆盖**。
|
|
165
|
+
- `requestName` 不传,用表单自带的标题;`action` 固定 `"draft"`。
|
|
166
|
+
- 返回按 `workflow-create.md`「createRequest 返回后的处置」处理:`CREATED` / `NEEDS_INPUT` / `BROWSER_FILL` 有 `finalMarkdown` 就原样粘贴;`NEEDS_CONFIRMATION` 按 `ambiguities` 处理;`partial` / `write_uncertain` 停止,只读回查一次,**禁止重放 `createRequest`**。
|
|
167
|
+
- 合同文本和合同流程一样传 `{id, name}`,文档控件可以关联上。不要传 `contractDocIds` 逗号串,也不要只传数字 id;`docId` 或 `name` 为空的文件不放进这个值。
|
|
168
|
+
- `finalMarkdown` 提示「合同号」未填时,再补一句"合同号请在 E10 草稿里选择:{contractNo}"。Step 5 里未取到的客户同样补一句提醒。
|
|
162
169
|
|
|
163
|
-
###
|
|
170
|
+
### 之后的操作
|
|
164
171
|
|
|
165
|
-
-
|
|
166
|
-
- 用户问"开出来了吗 / 发票号是多少"
|
|
167
|
-
- 用户中途说"取消 / 不开了" → 立即停止;草稿已创建时告知可在 E10 通过链接删除。
|
|
172
|
+
- **禁止重复创建**:同一份合同 `createRequest` 成功后,不要再次 `createForm` + `createRequest`。要改字段一律走 `workflow.editLoad` → `workflow.editPrepare`(只传要改的字段)→ 用户确认 → `workflow.editApply`。
|
|
173
|
+
- 用户问"开出来了吗 / 发票号是多少":说明开票在草稿提交、审批通过后由流程侧完成,请在 E10 查看该流程。
|
|
168
174
|
|
|
169
175
|
## 命令
|
|
170
176
|
|
|
171
|
-
下面这条是核算公司为「上海亘岩网络科技有限公司」时的开票草稿。核算公司是泛微网络、泛微软件、上海田亩、成都泛微、泛微国际、北京泛微、浙江泛微之一时,把 `workflow.createForm` 的流程换成 `合同收款发票开具及快递申请(100003460000000214)`,`data` 里的字段 id 改成该流程 `createForm` 返回的同中文名 id。
|
|
172
|
-
|
|
173
177
|
macOS/Linux(bash/zsh):
|
|
174
178
|
|
|
175
179
|
```bash
|
|
176
|
-
weaver-work-cli --json
|
|
177
|
-
weaver-work-cli --json workflow run workflow.
|
|
180
|
+
weaver-work-cli --json workflow run workflow.search --input-json '{"category":"all","workflow":["老客户增值服务合同审批流程","新客户购买合同审批流程","常规二次销售服务合同审批流程"],"pageSize":10,"current":1}'
|
|
181
|
+
weaver-work-cli --json workflow run workflow.search --input-json '{"category":"all","workflow":["老客户增值服务合同审批流程","新客户购买合同审批流程","常规二次销售服务合同审批流程"],"pageSize":10,"current":1,"requestName":"鄂尔多斯"}'
|
|
182
|
+
cat > ./issuing-contracts.json <<'JSON'
|
|
183
|
+
{
|
|
184
|
+
"cards": [
|
|
185
|
+
{
|
|
186
|
+
"index": 1,
|
|
187
|
+
"requestId": "1316385507701719135",
|
|
188
|
+
"flowName": "深圳市蓝禾技术有限公司-增值服务购买合同-52500-林玉婷-2026-09-18 ( 合同号 : 20260114549 , 合同总金额 : 52500.00)",
|
|
189
|
+
"workflowId": "1283761687634100307",
|
|
190
|
+
"workflowName": "常规二次销售服务合同审批流程",
|
|
191
|
+
"finished": true
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
JSON
|
|
196
|
+
weaver-work-cli --json invoice run invoice.issuing.contracts.list --input ./issuing-contracts.json
|
|
197
|
+
weaver-work-cli --json invoice run invoice.issuing.contract.detail --input-json '{"requestId":"1316385507701719135"}'
|
|
198
|
+
weaver-work-cli --json workflow run workflow.createForm --input-json '{"workflow":["合同收款发票开具及快递申请(100003460000000214)"]}'
|
|
178
199
|
cat > ./issuing-request.json <<'JSON'
|
|
179
200
|
{
|
|
180
201
|
"context": "<createForm 返回的 continuation>",
|
|
181
|
-
"requestName": "开票申请-深圳市康哲药业有限公司-20266105586",
|
|
182
202
|
"action": "draft",
|
|
183
203
|
"data": {
|
|
184
204
|
"main": {
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
|
|
190
|
-
"100003720000056250": "2026-11-30",
|
|
191
|
-
"100003720000118915": "20266105586",
|
|
192
|
-
"100003720000056252": "合同20266105586(深圳市康哲药业有限公司2026年度维护)年度维护费全额开票,金额5900元"
|
|
193
|
-
},
|
|
194
|
-
"details": {"100003690000001811": [{
|
|
195
|
-
"100003720000118901": "5900"
|
|
196
|
-
}]}
|
|
205
|
+
"100501872195629954": { "id": "1316385507701719135", "name": "深圳市蓝禾技术有限公司-增值服务购买合同-52500-林玉婷-2026-09-18" },
|
|
206
|
+
"100501873639686776": { "id": "100504500000364509", "name": "深圳市蓝禾技术有限公司" },
|
|
207
|
+
"100501873669461025": { "id": "2008969490679427312", "name": "深圳市蓝禾技术有限公司用户数采购合同_20260914_v1.1.docx" },
|
|
208
|
+
"100501870975576757": "2026-12-31"
|
|
209
|
+
}
|
|
197
210
|
}
|
|
198
211
|
}
|
|
199
212
|
JSON
|
|
@@ -203,36 +216,62 @@ weaver-work-cli --json workflow run workflow.createRequest --input ./issuing-req
|
|
|
203
216
|
Windows PowerShell:
|
|
204
217
|
|
|
205
218
|
```powershell
|
|
206
|
-
weaver-work-cli --json
|
|
207
|
-
weaver-work-cli --json workflow run workflow.
|
|
219
|
+
weaver-work-cli --json workflow run workflow.search --input-json '{"category":"all","workflow":["老客户增值服务合同审批流程","新客户购买合同审批流程","常规二次销售服务合同审批流程"],"pageSize":10,"current":1}'
|
|
220
|
+
weaver-work-cli --json workflow run workflow.search --input-json '{"category":"all","workflow":["老客户增值服务合同审批流程","新客户购买合同审批流程","常规二次销售服务合同审批流程"],"pageSize":10,"current":1,"requestName":"鄂尔多斯"}'
|
|
221
|
+
Set-Content -Encoding utf8 -LiteralPath .\issuing-contracts.json -Value @'
|
|
222
|
+
{
|
|
223
|
+
"cards": [
|
|
224
|
+
{
|
|
225
|
+
"index": 1,
|
|
226
|
+
"requestId": "1316385507701719135",
|
|
227
|
+
"flowName": "深圳市蓝禾技术有限公司-增值服务购买合同-52500-林玉婷-2026-09-18 ( 合同号 : 20260114549 , 合同总金额 : 52500.00)",
|
|
228
|
+
"workflowId": "1283761687634100307",
|
|
229
|
+
"workflowName": "常规二次销售服务合同审批流程",
|
|
230
|
+
"finished": true
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
'@
|
|
235
|
+
weaver-work-cli --json invoice run invoice.issuing.contracts.list --input .\issuing-contracts.json
|
|
236
|
+
weaver-work-cli --json invoice run invoice.issuing.contract.detail --input-json '{"requestId":"1316385507701719135"}'
|
|
237
|
+
weaver-work-cli --json workflow run workflow.createForm --input-json '{"workflow":["合同收款发票开具及快递申请(100003460000000214)"]}'
|
|
208
238
|
Set-Content -Encoding utf8 -LiteralPath .\issuing-request.json -Value @'
|
|
209
239
|
{
|
|
210
240
|
"context": "<createForm 返回的 continuation>",
|
|
211
|
-
"requestName": "开票申请-深圳市康哲药业有限公司-20266105586",
|
|
212
241
|
"action": "draft",
|
|
213
242
|
"data": {
|
|
214
243
|
"main": {
|
|
215
|
-
"
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
|
|
220
|
-
"100003720000056250": "2026-11-30",
|
|
221
|
-
"100003720000118915": "20266105586",
|
|
222
|
-
"100003720000056252": "合同20266105586(深圳市康哲药业有限公司2026年度维护)年度维护费全额开票,金额5900元"
|
|
223
|
-
},
|
|
224
|
-
"details": {"100003690000001811": [{
|
|
225
|
-
"100003720000118901": "5900"
|
|
226
|
-
}]}
|
|
244
|
+
"100501872195629954": { "id": "1316385507701719135", "name": "深圳市蓝禾技术有限公司-增值服务购买合同-52500-林玉婷-2026-09-18" },
|
|
245
|
+
"100501873639686776": { "id": "100504500000364509", "name": "深圳市蓝禾技术有限公司" },
|
|
246
|
+
"100501873669461025": { "id": "2008969490679427312", "name": "深圳市蓝禾技术有限公司用户数采购合同_20260914_v1.1.docx" },
|
|
247
|
+
"100501870975576757": "2026-12-31"
|
|
248
|
+
}
|
|
227
249
|
}
|
|
228
250
|
}
|
|
229
251
|
'@
|
|
230
252
|
weaver-work-cli --json workflow run workflow.createRequest --input .\issuing-request.json
|
|
231
253
|
```
|
|
232
254
|
|
|
233
|
-
|
|
255
|
+
`cards` 数组填 Step 1 返回的 `data.cards` 全部条目。上面第一条 `workflow.search` 是默认查询,不传 `requestName`。第二条只在用户点名了检索词时使用,`requestName` 按流程标题模糊搜索,例如「鄂尔多斯」。契约锁流程把 `createForm` 的 `workflow` 换成 `契约锁合同收款发票开具及快递申请(100003460000001852)`,`main` 的键换成 Step 6 表里契约锁那一列的字段 id,并加上合同号 `"100003720000056343": "<contractNo>"`。
|
|
256
|
+
|
|
257
|
+
## 示例
|
|
258
|
+
|
|
259
|
+
**用户**:帮我开票
|
|
260
|
+
|
|
261
|
+
**AI**:`workflow.search`(`category=all`、三个合同审批流程、`pageSize=10`,不传 `requestName`)→ 把 `data.cards` 传给 `invoice.issuing.contracts.list` → 按 Step 3 的格式列出 `invoiced=false` 的合同,问给哪份开票。
|
|
262
|
+
|
|
263
|
+
**用户**:1
|
|
264
|
+
|
|
265
|
+
**AI**:`invoice.issuing.contract.detail`(第 1 条的 `requestId`)→ `sellerName` 是「泛微网络」,选「合同收款发票开具及快递申请」→ 按 Step 5.1 问预计收款时间。
|
|
266
|
+
|
|
267
|
+
**用户**:12 月底
|
|
268
|
+
|
|
269
|
+
**AI**:换算成 `2026-12-31`,按 Step 5.2 的格式(含「预计收款时间:2026-12-31」)请用户确认。
|
|
270
|
+
|
|
271
|
+
**用户**:确认
|
|
272
|
+
|
|
273
|
+
**AI**:`workflow.createForm` → 核对流程 ID、按中文名找到字段 → `workflow.createRequest`(`action="draft"`,`main` 填合同流程、合同客户、合同文本 `{id, name}`、预计收款时间;契约锁流程再加合同号)→ `CREATED` → 原样粘贴 `finalMarkdown`。`finalMarkdown` 提示合同号未填或客户未取到时,再按 Step 7 补提醒。
|
|
274
|
+
|
|
275
|
+
**用户**:给鄂尔多斯开票
|
|
234
276
|
|
|
235
|
-
|
|
236
|
-
- 本链路不读取、不上传任何附件或图片;用户另外提供文件要求"按文件开票"时,说明当前只支持按待开票合同数据发起开票流程,需先把数据录入后再获取。
|
|
237
|
-
- 一次只发起一组(一张流程);用户要求多份合同一起开时,逐组走 Step 3~6,每组各调一次 `createForm`,`continuation` 不跨组复用。
|
|
238
|
-
- 写请求已发出但结果不确定时按 SKILL.md「写操作失败处理」处理,**禁止重放 `createRequest`**。
|
|
277
|
+
**AI**:`workflow.search`(`category=all`、三个合同审批流程、`pageSize=10`、`requestName="鄂尔多斯"`,按流程标题模糊搜索)→ 把 `data.cards` 传给 `invoice.issuing.contracts.list` → 只列 `invoiced=false` 的命中合同。一条就进 Step 4,多条让用户选。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 发票输出投影(--view / --fields)
|
|
2
2
|
|
|
3
3
|
## 什么时候读取
|
|
4
4
|
|
|
@@ -6,48 +6,36 @@
|
|
|
6
6
|
|
|
7
7
|
不读本文件的场景:写操作(导入/新增/编辑/删除/报销填单)——这些按各自 reference 处理;单张发票详情见 `invoice-detail.md`。
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 两种出口:语义视图 / 点路径投影
|
|
10
10
|
|
|
11
11
|
| 出口 | 用途 | 输出形态 |
|
|
12
12
|
|---|---|---|
|
|
13
|
-
| `--
|
|
14
|
-
| `--view summary`(列表)/ `--view detail`(`invoice.get`) | 要给程序消费的语义化数据 | JSON envelope,字段口径已固化 |
|
|
13
|
+
| `--view summary`(列表)/ `--view detail`(`invoice.get`) | **默认首选**:展示给用户或交给下游判断 | JSON envelope,字段口径已固化 |
|
|
15
14
|
| `--fields a,b.c` | 精确控制字段或用于无视图的 operation | JSON envelope,保持原嵌套 |
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
取舍:**默认用 `--view`;只在特殊字段需求下才用 `--fields`。**
|
|
18
17
|
|
|
19
18
|
## 为什么需要投影
|
|
20
19
|
|
|
21
20
|
`invoice.list` / `invoice.enterprise.list` 的默认输出是**面向程序的完整包络**:单条发票 40+ 字段(`custom_field_*`、`oa`、`suser`、`rb`、`agricultural_*` 等),10 条约 35KB,而真正要看的只有 8 个字段(约 3KB)。
|
|
22
21
|
|
|
23
|
-
**不要**因此自己现写解析脚本,也不要把完整 JSON 贴给用户。CLI
|
|
22
|
+
**不要**因此自己现写解析脚本,也不要把完整 JSON 贴给用户。CLI 已原生提供上面两种出口。
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
一次调用直接得到可读表格,列顺序、千分位、票种简称、挂单状态都已内置:
|
|
24
|
+
macOS/Linux(bash/zsh):
|
|
28
25
|
|
|
29
26
|
```bash
|
|
30
|
-
weaver-work-cli invoice list --
|
|
31
|
-
weaver-work-cli invoice get --fid 1310817108299735054 --
|
|
27
|
+
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"consumption_tm_begin":"2026-10-01","consumption_tm_end":"2026-10-31"}'
|
|
28
|
+
weaver-work-cli --json invoice get --fid 1310817108299735054 --view detail
|
|
32
29
|
```
|
|
33
30
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
规则:
|
|
37
|
-
|
|
38
|
-
- **自带字段口径**,不必也不能再传 `--view`(`invoice.list` 固定 summary、`invoice.get` 固定 detail);传了不一致的视图返回 `validation/input_conflict`
|
|
39
|
-
- **与 `--fields` 互斥**(要自定义字段就用 `--fields` 出 JSON)
|
|
40
|
-
- **与全局 `--json` 互斥**:markdown 是渲染档不是数据档,同时传返回 `validation/input_conflict`,提示去掉 `--json`
|
|
41
|
-
- 只支持 `invoice.list` / `invoice.enterprise.list` / `invoice.get`;其他 operation 返回 `validation/format_unsupported`
|
|
42
|
-
- 仍要自行拼表时用下面的 `--view`,不要退回完整 JSON
|
|
43
|
-
|
|
44
|
-
### 拿到输出后怎么展示:贴进正文,别包代码围栏
|
|
31
|
+
Windows PowerShell:
|
|
45
32
|
|
|
46
|
-
|
|
33
|
+
```powershell
|
|
34
|
+
weaver-work-cli --json invoice run invoice.list --view summary --input-json '{"page_size":50,"start_pos":0,"consumption_tm_begin":"2026-10-01","consumption_tm_end":"2026-10-31"}'
|
|
35
|
+
weaver-work-cli --json invoice get --fid 1310817108299735054 --view detail
|
|
36
|
+
```
|
|
47
37
|
|
|
48
|
-
|
|
49
|
-
- **不要改写、不要重新拼表**:CLI 给的就是成品,转录要保真;别自行加反斜杠转义(把 `*` 写成 `\*`)、别调整字符或列顺序。
|
|
50
|
-
- 在终端里直接执行只能看到源码,这属正常;要预览渲染效果,用支持 markdown 的客户端(浏览器、聊天界面),或在本地用 markdown 渲染器(如 `glow`、`mdcat`)。
|
|
38
|
+
展示给用户时按 `--view summary` 的字段拼一张 markdown 表格,直接写在消息正文里(不要包代码围栏,否则链接失效):先一行写票夹口径、`total` 张数和 `totalAmount` 合计,再列 `#`、发票号码(`[number](detailUrl)`)、开票日期、票种、价税合计、购方、销方、费用说明(没有时用 `content`)、行程/备注(起止地或上下车站、城市、备注)、报销(`reimRequests` 为空写"未挂单")。
|
|
51
39
|
|
|
52
40
|
## 语义视图:`--view summary`(列表)/ `--view detail`(详情)
|
|
53
41
|
|
|
@@ -64,6 +52,12 @@ weaver-work-cli invoice get --fid 1310817108299735054 --format markdown
|
|
|
64
52
|
| `amount` / `total` / `taxAmount` | 不含税金额 / 价税合计 / 税额 |
|
|
65
53
|
| `buyer` / `buyerTaxNo` | 购买方名称 / 税号 |
|
|
66
54
|
| `payer` / `payerTaxNo` | 销售方名称 / 税号 |
|
|
55
|
+
| `expenseNote` | 费用说明(`ext.expenseDesc`),如「上海-武汉」「上南六村-三林南」 |
|
|
56
|
+
| `content` | 消费内容(`ext.content`,为空时取商品名称) |
|
|
57
|
+
| `city` / `province` | 城市 / 省份(`ext.city` / `ext.province`,省份为空时取票面 `province`) |
|
|
58
|
+
| `comment` | 备注(`ext.comment`),**常写出差地、订单号和行程**,如「2026/10/25上海-武汉 CZ3580」 |
|
|
59
|
+
| `from` / `to` | 出发地 / 到达地(打车、火车、机票等交通票) |
|
|
60
|
+
| `stationGetOn` / `stationGetOff` | 上车站 / 下车站(`ext.station_geton` / `station_getoff`) |
|
|
67
61
|
| `valid` | 查验状态原始值(`1`=已查验) |
|
|
68
62
|
| `status` | 发票状态原始值 |
|
|
69
63
|
| `reimState` | 票面 `comm_info.pro.sreim` 原始值,**语义未定义,不要自行解读** |
|
|
@@ -71,9 +65,11 @@ weaver-work-cli invoice get --fid 1310817108299735054 --format markdown
|
|
|
71
65
|
| `fileName` | 附件文件名 |
|
|
72
66
|
| `detailUrl` | 发票详情页链接,展示时必须转成可点击超链接 |
|
|
73
67
|
|
|
74
|
-
列表级字段:`total`(票夹总数)、`totalAmount`(价税合计)、`totalAmountExcludingTax`、`hasMore`、`scope`、`itemCount
|
|
68
|
+
列表级字段:`total`(票夹总数)、`totalAmount`(价税合计)、`totalAmountExcludingTax`、`hasMore`、`scope`、`itemCount`(本次返回张数)。`items` 已剔除全额红冲票,`itemCount` 可能少于 `page_size`;`total` 和两个合计是服务端汇总,仍含红冲票。翻页按 `page_size` 递增 `start_pos`,有没有下一页只看 `hasMore`。
|
|
69
|
+
|
|
70
|
+
`expenseNote` 到 `stationGetOff` 这几项来自票面 `ext`。`invoice.list` 默认带 `mext=2147483647` 让服务端返回完整 `ext`(不传 `mext` 时服务端不返回 `ext`);默认完整输出里每条发票还多一个已解析的 `extInfo` 对象(同一套字段名),原始 `ext` 字符串仍保留,可用 `--fields extInfo.comment` 精确取值。
|
|
75
71
|
|
|
76
|
-
`--view summary` 只对 `invoice.list` 与 `invoice.enterprise.list` 生效;`invoice.get` 用 `--view detail`(见 `invoice-detail.md`,在 summary 字段上多出 `attachments` / `
|
|
72
|
+
`--view summary` 只对 `invoice.list` 与 `invoice.enterprise.list` 生效;`invoice.get` 用 `--view detail`(见 `invoice-detail.md`,在 summary 字段上多出 `attachments` / `issuer` / `checkState`)。对其他 operation 传视图参数会返回 `validation/view_unsupported`,此时改用 `--fields` 或默认完整输出。
|
|
77
73
|
|
|
78
74
|
## 备用:`--fields` 点路径投影
|
|
79
75
|
|
|
@@ -86,8 +82,8 @@ weaver-work-cli invoice get --fid 1310817108299735054 --format markdown
|
|
|
86
82
|
|
|
87
83
|
> ⚠️ **`--fields` 里不要写裸 `total` 取金额。** 发票对象顶层的 `total` 是 E10 的独立字段(实测恒为 `0`),**价税合计在 `comm_info.price.total`**,不含税金额在 `comm_info.price.amount`,税额在 `comm_info.price.dtax`。要金额就用 `--fields comm_info.price.total`,或直接用 `--view summary`(那里的 `total` 已是价税合计)。
|
|
88
84
|
|
|
89
|
-
|
|
90
|
-
参数错误会在**发起业务请求之前**就返回(`view_unsupported` / `view_invalid` / `
|
|
85
|
+
两个参数都不属于 operation 的 `inputSchema`,它们只裁剪输出、不改变任何请求参数,因此不违反"列表查询不支持字段"的白名单校验。
|
|
86
|
+
参数错误会在**发起业务请求之前**就返回(`view_unsupported` / `view_invalid` / `input_conflict`),不会先打一次网络请求;只有 `field_not_found` 需要拿到结果才能判断。
|
|
91
87
|
|
|
92
88
|
## 回执:`meta.projection`
|
|
93
89
|
|
|
@@ -106,7 +102,7 @@ weaver-work-cli invoice get --fid 1310817108299735054 --format markdown
|
|
|
106
102
|
|
|
107
103
|
## 兜底:CLI 版本低于 0.1.17
|
|
108
104
|
|
|
109
|
-
旧版 CLI 没有 `--view` / `--fields
|
|
105
|
+
旧版 CLI 没有 `--view` / `--fields`(可用 `weaver-work-cli --version` 确认)。此时用随本 reference 提供的脚本 `invoice-summarize.py`,字段口径与 `--view summary` 完全一致:
|
|
110
106
|
|
|
111
107
|
macOS/Linux(bash/zsh):
|
|
112
108
|
|
|
@@ -131,5 +127,5 @@ python "$env:USERPROFILE\.workbuddy\skills\weaver-e10-yepiaotong\references\invo
|
|
|
131
127
|
|
|
132
128
|
- **发票号码必须用 `detailUrl` 渲染成可点击超链接**,格式为 `[号码](detailUrl)`;`--view summary` 已保留该字段,`--fields` 时记得把它列进字段表,否则详情链接会丢失。
|
|
133
129
|
- 需要完整票面字段(`ext` 里的商品明细、`flist` 附件列表等)时不要用投影,走 `invoice.get`。
|
|
134
|
-
- 统计金额以 `totalAmount` / `totalAmountExcludingTax` 为准,不要用单条 `total` 相加去"复核"
|
|
130
|
+
- 统计金额以 `totalAmount` / `totalAmountExcludingTax` 为准,不要用单条 `total` 相加去"复核"服务端汇总——两者口径可能不同(列表已剔除全额红冲票而服务端汇总仍含;作废票的处理方式未在契约中定义)。
|
|
135
131
|
- `reimState` 与列表筛选参数 `sreim` **不是同一套语义**:`sreim` 是筛选入参(`"0"`=全部、`"1"`=报销中、`"2"`=报销完成、`"3"`=未报销、`"4"`=不可报销),而票面 `comm_info.pro.sreim` 的取值含义未在 CLI 契约里定义,只能原样呈现。
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
|
|
33
33
|
`bill_type` 是票据类型筛选参数:`0` 获取发票,`1` 获取凭证。用户没有明确要求“凭证”时,必须省略 `bill_type`,让 CLI 默认传 `0` 查询发票。
|
|
34
34
|
|
|
35
|
+
`mext` 按位选择服务端返回哪些 `ext` 字段,**不传时 CLI 默认 `2147483647`,返回完整 `ext`**(费用说明、城市、备注、起止地等)。不要自己传 `mext`;只有明确不需要 `ext` 时才传 `0`。
|
|
36
|
+
|
|
35
37
|
## 示例
|
|
36
38
|
|
|
37
39
|
Windows PowerShell:
|
|
@@ -56,7 +58,9 @@ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"s
|
|
|
56
58
|
|
|
57
59
|
## 返回
|
|
58
60
|
|
|
59
|
-
返回 `items`、`total`、`totalAmount`、`totalAmountExcludingTax`、`hasMore` 和 `scope="personal"`。每条 item 包含 `detailUrl`(如 `https://xxx/sp/inc/incDetail?fid=<fid
|
|
61
|
+
返回 `items`、`total`、`totalAmount`、`totalAmountExcludingTax`、`hasMore` 和 `scope="personal"`。每条 item 包含 `detailUrl`(如 `https://xxx/sp/inc/incDetail?fid=<fid>`),以及已解析的 `extInfo`:`expenseNote`(费用说明)、`content`、`city`、`province`、`comment`(备注,常写出差地和行程)、`from` / `to`、`stationGetOn` / `stationGetOff`,空值省键;原始 `ext` 字符串仍保留。`--view summary` 会把这些字段平铺出来,见 [invoice-output-view.md](invoice-output-view.md)。
|
|
62
|
+
|
|
63
|
+
`items` 已剔除全额红冲票(`comm_info.pro.status=8`),所以本页条数可能少于 `page_size`;`total` / `totalAmount` / `totalAmountExcludingTax` 是服务端汇总,仍含被剔除的红冲票,张数对不上时不要自己"修正"。分页时 `start_pos` 按 `page_size` 递增(不要按本页条数递增,否则会重复拉到同一批票),是否还有下一页只看 `hasMore`,保持筛选条件和排序不变。
|
|
60
64
|
|
|
61
65
|
向用户展示发票列表时,**发票号码必须用 markdown 链接格式** `[号码](detailUrl)` 展示,让用户点击直接打开发票详情页。
|
|
62
66
|
|