weaver-work-cli 0.1.2 → 0.1.5
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 +176 -78
- package/dist/cmd/setup/index.js +5 -5
- package/dist/cmd/skills/index.js +1 -1
- package/dist/core/hooks.js +7 -0
- package/dist/index.js +0 -0
- package/dist/internal/e10/auth/commands.js +159 -54
- package/dist/internal/e10/auth/xiaoe.js +268 -0
- package/dist/internal/e10/context.js +16 -2
- package/dist/internal/e10/index.js +1 -0
- package/dist/internal/e10/request-runtime.js +345 -0
- package/dist/internal/skills/install.js +48 -6
- package/dist/internal/skills/reader.js +27 -0
- package/dist/shortcuts/archive/continuation.js +70 -0
- package/dist/shortcuts/archive/errors.js +53 -0
- package/dist/shortcuts/archive/host.js +197 -0
- package/dist/shortcuts/archive/index.js +363 -0
- package/dist/shortcuts/archive/manifest.js +45 -0
- package/dist/shortcuts/archive/operations/archive-info.js +55 -0
- package/dist/shortcuts/archive/operations/borrow-car.js +146 -0
- package/dist/shortcuts/archive/operations/borrow-list.js +200 -0
- package/dist/shortcuts/archive/operations/confirm.js +46 -0
- package/dist/shortcuts/archive/operations/download.js +238 -0
- package/dist/shortcuts/archive/operations/flow-url.js +240 -0
- package/dist/shortcuts/archive/operations/fonds.js +95 -0
- package/dist/shortcuts/archive/operations/getPageUrl.js +137 -0
- package/dist/shortcuts/archive/operations/registry.js +43 -0
- package/dist/shortcuts/archive/operations/search.js +88 -0
- package/dist/shortcuts/archive/operations/shared.js +120 -0
- package/dist/shortcuts/archive/operations/types.js +23 -0
- package/dist/shortcuts/archive/operations/upload.js +182 -0
- package/dist/shortcuts/archive/operations.js +13 -0
- package/dist/shortcuts/archive/render/search-format.js +276 -0
- package/dist/shortcuts/archive/render/search-view.js +125 -0
- package/dist/shortcuts/asset/continuation.js +70 -0
- package/dist/shortcuts/asset/errors.js +67 -0
- package/dist/shortcuts/asset/host.js +438 -0
- package/dist/shortcuts/asset/index.js +255 -0
- package/dist/shortcuts/asset/manifest.js +471 -0
- package/dist/shortcuts/asset/operations/query.js +249 -0
- package/dist/shortcuts/asset/operations/registry.js +85 -0
- package/dist/shortcuts/asset/operations/shared.js +100 -0
- package/dist/shortcuts/asset/operations/type-cache.js +49 -0
- package/dist/shortcuts/asset/operations/types.js +1 -0
- package/dist/shortcuts/asset/operations/viewlink.js +117 -0
- package/dist/shortcuts/asset/operations/write.js +435 -0
- package/dist/shortcuts/asset/operations.js +9 -0
- package/dist/shortcuts/calendar/continuation.js +70 -0
- package/dist/shortcuts/calendar/errors.js +53 -0
- package/dist/shortcuts/calendar/host.js +148 -0
- package/dist/shortcuts/calendar/index.js +125 -0
- package/dist/shortcuts/calendar/manifest.js +26 -0
- package/dist/shortcuts/calendar/operations/read.js +259 -0
- package/dist/shortcuts/calendar/operations/registry.js +31 -0
- package/dist/shortcuts/calendar/operations/shared.js +132 -0
- package/dist/shortcuts/calendar/operations/types.js +25 -0
- package/dist/shortcuts/calendar/operations/write.js +439 -0
- package/dist/shortcuts/calendar/operations.js +8 -0
- package/dist/shortcuts/ehr/continuation.js +70 -0
- package/dist/shortcuts/ehr/errors.js +53 -0
- package/dist/shortcuts/ehr/host.js +213 -0
- package/dist/shortcuts/ehr/index.js +205 -0
- package/dist/shortcuts/ehr/manifest.js +47 -0
- package/dist/shortcuts/ehr/operations/attend-read.js +373 -0
- package/dist/shortcuts/ehr/operations/attend-write.js +514 -0
- package/dist/shortcuts/ehr/operations/hr-contact.js +363 -0
- package/dist/shortcuts/ehr/operations/hr-ds.js +298 -0
- package/dist/shortcuts/ehr/operations/hr-report.js +386 -0
- package/dist/shortcuts/ehr/operations/recruit-write.js +1629 -0
- package/dist/shortcuts/ehr/operations/recruit.js +803 -0
- package/dist/shortcuts/ehr/operations/registry.js +43 -0
- package/dist/shortcuts/ehr/operations/salary.js +319 -0
- package/dist/shortcuts/ehr/operations/shared.js +246 -0
- package/dist/shortcuts/ehr/operations/types.js +25 -0
- package/dist/shortcuts/ehr/operations.js +25 -0
- package/dist/shortcuts/esb/continuation.js +70 -0
- package/dist/shortcuts/esb/errors.js +65 -0
- package/dist/shortcuts/esb/host.js +187 -0
- package/dist/shortcuts/esb/index.js +112 -0
- package/dist/shortcuts/esb/manifest.js +91 -0
- package/dist/shortcuts/esb/operations/input-format.js +31 -0
- package/dist/shortcuts/esb/operations/registry.js +48 -0
- package/dist/shortcuts/esb/operations/shared.js +152 -0
- package/dist/shortcuts/esb/operations/trigger.js +76 -0
- package/dist/shortcuts/esb/operations/types.js +21 -0
- package/dist/shortcuts/esb/operations.js +15 -0
- package/dist/shortcuts/fna/continuation.js +70 -0
- package/dist/shortcuts/fna/errors.js +59 -0
- package/dist/shortcuts/fna/host.js +146 -0
- package/dist/shortcuts/fna/index.js +111 -0
- package/dist/shortcuts/fna/manifest.js +41 -0
- package/dist/shortcuts/fna/operations/budget.js +124 -0
- package/dist/shortcuts/fna/operations/expense-center.js +148 -0
- package/dist/shortcuts/fna/operations/invoice-writeoff.js +212 -0
- package/dist/shortcuts/fna/operations/loan.js +195 -0
- package/dist/shortcuts/fna/operations/registry.js +35 -0
- package/dist/shortcuts/fna/operations/shared.js +210 -0
- package/dist/shortcuts/fna/operations/types.js +25 -0
- package/dist/shortcuts/fna/operations.js +19 -0
- package/dist/shortcuts/hrm/errors.js +38 -0
- package/dist/shortcuts/hrm/host.js +156 -0
- package/dist/shortcuts/hrm/index.js +111 -0
- package/dist/shortcuts/hrm/manifest.js +32 -0
- package/dist/shortcuts/hrm/operations/employee.js +338 -0
- package/dist/shortcuts/hrm/operations/org.js +110 -0
- package/dist/shortcuts/hrm/operations/position.js +176 -0
- package/dist/shortcuts/hrm/operations/registry.js +33 -0
- package/dist/shortcuts/hrm/operations/shared.js +143 -0
- package/dist/shortcuts/hrm/operations/types.js +23 -0
- package/dist/shortcuts/hrm/operations.js +19 -0
- package/dist/shortcuts/index.js +24 -0
- package/dist/shortcuts/invoice/host.js +99 -94
- package/dist/shortcuts/invoice/index.js +58 -59
- package/dist/shortcuts/invoice/manifest.js +200 -3
- package/dist/shortcuts/invoice/operations/browse-field.js +17 -0
- package/dist/shortcuts/invoice/operations/issuing.js +198 -0
- package/dist/shortcuts/invoice/operations/registry.js +17 -0
- package/dist/shortcuts/invoice/operations/reim.js +401 -0
- package/dist/shortcuts/invoice/operations/shared.js +247 -0
- package/dist/shortcuts/jiuchuanhui/cache.js +441 -0
- package/dist/shortcuts/jiuchuanhui/continuation.js +70 -0
- package/dist/shortcuts/jiuchuanhui/errors.js +59 -0
- package/dist/shortcuts/jiuchuanhui/host.js +159 -0
- package/dist/shortcuts/jiuchuanhui/index.js +109 -0
- package/dist/shortcuts/jiuchuanhui/manifest.js +469 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +214 -0
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +157 -0
- package/dist/shortcuts/jiuchuanhui/operations/generic.js +146 -0
- package/dist/shortcuts/jiuchuanhui/operations/registry.js +133 -0
- package/dist/shortcuts/jiuchuanhui/operations/shared.js +158 -0
- package/dist/shortcuts/jiuchuanhui/operations/types.js +1 -0
- package/dist/shortcuts/jiuchuanhui/operations.js +8 -0
- package/dist/shortcuts/mail/continuation.js +70 -0
- package/dist/shortcuts/mail/errors.js +53 -0
- package/dist/shortcuts/mail/host.js +182 -0
- package/dist/shortcuts/mail/index.js +519 -0
- package/dist/shortcuts/mail/manifest.js +38 -0
- package/dist/shortcuts/mail/operations/mail-blacklist.js +79 -0
- package/dist/shortcuts/mail/operations/mail-contacts.js +195 -0
- package/dist/shortcuts/mail/operations/mail-manage.js +335 -0
- package/dist/shortcuts/mail/operations/mail-read.js +508 -0
- package/dist/shortcuts/mail/operations/mail-send.js +474 -0
- package/dist/shortcuts/mail/operations/mail-sign.js +203 -0
- package/dist/shortcuts/mail/operations/mail-template.js +170 -0
- package/dist/shortcuts/mail/operations/registry.js +41 -0
- package/dist/shortcuts/mail/operations/shared.js +64 -0
- package/dist/shortcuts/mail/operations/types.js +27 -0
- package/dist/shortcuts/mail/operations.js +19 -0
- package/dist/shortcuts/meeting/continuation.js +70 -0
- package/dist/shortcuts/meeting/errors.js +63 -0
- package/dist/shortcuts/meeting/host.js +167 -0
- package/dist/shortcuts/meeting/index.js +123 -0
- package/dist/shortcuts/meeting/manifest.js +64 -0
- package/dist/shortcuts/meeting/operations/catalogs.js +58 -0
- package/dist/shortcuts/meeting/operations/change.js +242 -0
- package/dist/shortcuts/meeting/operations/conflicts.js +142 -0
- package/dist/shortcuts/meeting/operations/create.js +349 -0
- package/dist/shortcuts/meeting/operations/env.js +191 -0
- package/dist/shortcuts/meeting/operations/lifecycle.js +139 -0
- package/dist/shortcuts/meeting/operations/meetings.js +73 -0
- package/dist/shortcuts/meeting/operations/receipts.js +195 -0
- package/dist/shortcuts/meeting/operations/registry.js +47 -0
- package/dist/shortcuts/meeting/operations/rooms.js +132 -0
- package/dist/shortcuts/meeting/operations/shared.js +112 -0
- package/dist/shortcuts/meeting/operations/signs.js +41 -0
- package/dist/shortcuts/meeting/operations/types.js +25 -0
- package/dist/shortcuts/meeting/operations.js +19 -0
- package/dist/shortcuts/plan/continuation.js +70 -0
- package/dist/shortcuts/plan/errors.js +70 -0
- package/dist/shortcuts/plan/host.js +180 -0
- package/dist/shortcuts/plan/index.js +150 -0
- package/dist/shortcuts/plan/manifest.js +53 -0
- package/dist/shortcuts/plan/operations/link.js +256 -0
- package/dist/shortcuts/plan/operations/read.js +259 -0
- package/dist/shortcuts/plan/operations/registry.js +33 -0
- package/dist/shortcuts/plan/operations/shared.js +246 -0
- package/dist/shortcuts/plan/operations/types.js +49 -0
- package/dist/shortcuts/plan/operations/version.js +49 -0
- package/dist/shortcuts/plan/operations/write.js +710 -0
- package/dist/shortcuts/plan/operations.js +8 -0
- package/dist/shortcuts/yimiaoban/continuation.js +70 -0
- package/dist/shortcuts/yimiaoban/errors.js +61 -0
- package/dist/shortcuts/yimiaoban/host.js +469 -0
- package/dist/shortcuts/yimiaoban/index.js +271 -0
- package/dist/shortcuts/yimiaoban/manifest.js +28 -0
- package/dist/shortcuts/yimiaoban/operations/file-user.js +288 -0
- package/dist/shortcuts/yimiaoban/operations/group-read.js +477 -0
- package/dist/shortcuts/yimiaoban/operations/group-write.js +591 -0
- package/dist/shortcuts/yimiaoban/operations/msg-parse.js +429 -0
- package/dist/shortcuts/yimiaoban/operations/msg-sync.js +519 -0
- package/dist/shortcuts/yimiaoban/operations/msg-write.js +593 -0
- package/dist/shortcuts/yimiaoban/operations/person.js +102 -0
- package/dist/shortcuts/yimiaoban/operations/registry.js +38 -0
- package/dist/shortcuts/yimiaoban/operations/session.js +437 -0
- package/dist/shortcuts/yimiaoban/operations/shared.js +236 -0
- package/dist/shortcuts/yimiaoban/operations/types.js +27 -0
- package/dist/shortcuts/yimiaoban/operations/write-util.js +78 -0
- package/dist/shortcuts/yimiaoban/operations.js +8 -0
- package/docs/SKILL.md +11 -7
- package/docs/_catalog.md +28 -5
- package/docs/agent-invoice.md +19 -9
- package/docs/agent-skill-install.md +141 -22
- package/docs/calendar.md +87 -0
- package/docs/e10-auth.md +28 -9
- package/docs/ehr.md +186 -0
- package/docs/esb.md +64 -0
- package/docs/fna.md +72 -0
- package/docs/hrm.md +89 -0
- package/docs/invoice.md +61 -20
- package/docs/jiuchuanhui.md +131 -0
- package/docs/meeting.md +48 -0
- package/docs/operation-manual.md +443 -0
- package/docs/plan.md +82 -0
- package/docs/wenshuding.md +129 -0
- package/docs/yimiaoban.md +86 -0
- package/docs/ziguanjia.md +89 -0
- package/package.json +4 -4
- package/scripts/package-skill.mjs +127 -34
- package/scripts/postbuild.mjs +13 -0
- package/skill-template/business-info.json +16 -2
- package/skill-template/domains/calendar.md +15 -0
- package/skill-template/domains/esb.md +13 -0
- package/skill-template/domains/hrm.md +16 -0
- package/skill-template/domains/jiuchuanhui.md +23 -0
- package/skill-template/domains/jucailin.md +22 -0
- package/skill-template/domains/mail.md +21 -0
- package/skill-template/domains/meeting.md +3 -0
- package/skill-template/domains/plan.md +17 -0
- package/skill-template/domains/qiyecheng.md +17 -0
- package/skill-template/domains/shared.md +5 -3
- package/skill-template/domains/skill-maker.md +10 -0
- package/skill-template/domains/wenshuding.md +22 -0
- package/skill-template/domains/{invoice.md → yepiaotong.md} +4 -0
- package/skill-template/domains/yimiaoban.md +21 -0
- package/skill-template/domains/ziguanjia.md +21 -0
- package/skill-template/master-skill-template.md +12 -6
- package/skill-template/skill-template.md +26 -10
- package/skills/weaver-e10-calendar/SKILL.md +102 -0
- package/skills/weaver-e10-calendar/product.json +8 -0
- package/skills/weaver-e10-calendar/references/calendar-app-check.md +65 -0
- package/skills/weaver-e10-calendar/references/calendar-dict.md +55 -0
- package/skills/weaver-e10-calendar/references/calendar-query.md +70 -0
- package/skills/weaver-e10-calendar/references/calendar-write.md +97 -0
- package/skills/weaver-e10-calendar/references/source-manifest.json +54 -0
- package/skills/weaver-e10-esb/SKILL.md +103 -0
- package/skills/weaver-e10-esb/product.json +8 -0
- package/skills/weaver-e10-esb/references/input-format.md +52 -0
- package/skills/weaver-e10-esb/references/source-manifest.json +242 -0
- package/skills/weaver-e10-esb/references/trigger.md +99 -0
- package/skills/weaver-e10-hrm/SKILL.md +88 -0
- package/skills/weaver-e10-hrm/product.json +8 -0
- package/skills/weaver-e10-hrm/references/employee.md +109 -0
- package/skills/weaver-e10-hrm/references/org.md +95 -0
- package/skills/weaver-e10-hrm/references/position.md +95 -0
- package/skills/weaver-e10-hrm/references/source-manifest.json +121 -0
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +175 -0
- package/skills/weaver-e10-jiuchuanhui/product.json +8 -0
- package/skills/weaver-e10-jiuchuanhui/references/cache.md +110 -0
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +61 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact-plan.md +56 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact-records.md +48 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact.md +56 -0
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +69 -0
- package/skills/weaver-e10-jiuchuanhui/references/disabled-capabilities.md +24 -0
- package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +60 -0
- package/skills/weaver-e10-jiuchuanhui/references/general-helpers.md +59 -0
- package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +60 -0
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +72 -0
- package/skills/weaver-e10-jiuchuanhui/references/source-manifest.json +2632 -0
- package/skills/weaver-e10-jucailin/SKILL.md +102 -0
- package/skills/weaver-e10-jucailin/product.json +8 -0
- package/skills/weaver-e10-jucailin/references/attend-read.md +73 -0
- package/skills/weaver-e10-jucailin/references/attend-write.md +82 -0
- package/skills/weaver-e10-jucailin/references/hr-contact.md +92 -0
- package/skills/weaver-e10-jucailin/references/hr-datasource.md +104 -0
- package/skills/weaver-e10-jucailin/references/hr-report.md +76 -0
- package/skills/weaver-e10-jucailin/references/recruit-read.md +76 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +70 -0
- package/skills/weaver-e10-jucailin/references/safety-boundaries.md +35 -0
- package/skills/weaver-e10-jucailin/references/salary.md +110 -0
- package/skills/weaver-e10-jucailin/references/source-manifest.json +152 -0
- package/skills/weaver-e10-mail/SKILL.md +152 -0
- package/skills/weaver-e10-mail/product.json +8 -0
- package/skills/weaver-e10-mail/references/mail-agent-entry.md +47 -0
- package/skills/weaver-e10-mail/references/mail-attachment.md +30 -0
- package/skills/weaver-e10-mail/references/mail-blacklist.md +27 -0
- package/skills/weaver-e10-mail/references/mail-contacts.md +33 -0
- package/skills/weaver-e10-mail/references/mail-manage.md +44 -0
- package/skills/weaver-e10-mail/references/mail-read.md +76 -0
- package/skills/weaver-e10-mail/references/mail-send.md +43 -0
- package/skills/weaver-e10-mail/references/mail-sign.md +33 -0
- package/skills/weaver-e10-mail/references/mail-template.md +31 -0
- package/skills/weaver-e10-mail/references/safety-boundaries.md +32 -0
- package/skills/weaver-e10-meeting/SKILL.md +106 -0
- package/skills/weaver-e10-meeting/product.json +8 -0
- package/skills/weaver-e10-meeting/references/meeting-change.md +67 -0
- package/skills/weaver-e10-meeting/references/meeting-create.md +52 -0
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +57 -0
- package/skills/weaver-e10-meeting/references/meeting-queries.md +61 -0
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +48 -0
- package/skills/weaver-e10-meeting/references/meeting-update.md +7 -0
- package/skills/weaver-e10-meeting/references/source-manifest.json +50 -0
- package/skills/weaver-e10-plan/SKILL.md +140 -0
- package/skills/weaver-e10-plan/product.json +8 -0
- package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +123 -0
- package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +138 -0
- package/skills/weaver-e10-plan/references/plan-report-query.md +154 -0
- package/skills/weaver-e10-plan/references/plan-report-remind.md +104 -0
- package/skills/weaver-e10-plan/references/plan-report-write.md +162 -0
- package/skills/weaver-e10-plan/references/source-manifest.json +858 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +119 -0
- package/skills/weaver-e10-qiyecheng/product.json +8 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +65 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +56 -0
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +51 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +57 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +59 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +698 -0
- package/skills/weaver-e10-shared/SKILL.md +90 -0
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +127 -0
- package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/json-output-contract.md +34 -0
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +110 -0
- package/skills/weaver-e10-skill-maker/SKILL.md +78 -0
- package/skills/weaver-e10-skill-maker/product.json +8 -0
- package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +124 -0
- package/skills/weaver-e10-skill-maker/references/detector-validation.md +101 -0
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +230 -0
- package/skills/weaver-e10-skill-maker/references/post-generation-install.md +105 -0
- package/skills/weaver-e10-skill-maker/references/source-update-detection.md +261 -0
- package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +141 -0
- package/skills/weaver-e10-wenshuding/SKILL.md +158 -0
- package/skills/weaver-e10-wenshuding/product.json +8 -0
- package/skills/weaver-e10-wenshuding/references/archive-agent-entry.md +63 -0
- package/skills/weaver-e10-wenshuding/references/archive-borrow-car.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-disabled-capabilities.md +22 -0
- package/skills/weaver-e10-wenshuding/references/archive-download.md +48 -0
- package/skills/weaver-e10-wenshuding/references/archive-flow.md +46 -0
- package/skills/weaver-e10-wenshuding/references/archive-fonds.md +34 -0
- package/skills/weaver-e10-wenshuding/references/archive-info.md +33 -0
- package/skills/weaver-e10-wenshuding/references/archive-search.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-upload.md +41 -0
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +517 -0
- package/skills/weaver-e10-yepiaotong/SKILL.md +184 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-add.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-agent-entry.md +16 -9
- package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +204 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-delete.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-detail.md +13 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +28 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-download.md +9 -2
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-enterprise-list.md +12 -4
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-file-upload.md +9 -2
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-import.md +16 -7
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +120 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-field-rules.md +161 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +99 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-ocr-preview.md +12 -4
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-personal-list.md +12 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-red.md +261 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +97 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-update.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-validation-preview.md +9 -2
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1340 -0
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +845 -0
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +94 -0
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +449 -0
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +266 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +494 -0
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +1103 -0
- package/skills/weaver-e10-yimiaoban/SKILL.md +104 -0
- package/skills/weaver-e10-yimiaoban/product.json +8 -0
- package/skills/weaver-e10-yimiaoban/references/ding-write.md +68 -0
- package/skills/weaver-e10-yimiaoban/references/error-codes.md +85 -0
- package/skills/weaver-e10-yimiaoban/references/field-resolution.md +46 -0
- package/skills/weaver-e10-yimiaoban/references/file-user-i18n.md +54 -0
- package/skills/weaver-e10-yimiaoban/references/group-read.md +55 -0
- package/skills/weaver-e10-yimiaoban/references/group-write.md +72 -0
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +59 -0
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +64 -0
- package/skills/weaver-e10-yimiaoban/references/person.md +44 -0
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +61 -0
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +47 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +485 -0
- package/skills/weaver-e10-ziguanjia/SKILL.md +163 -0
- package/skills/weaver-e10-ziguanjia/product.json +8 -0
- package/skills/weaver-e10-ziguanjia/references/source-manifest.json +147 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +65 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-create.md +45 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-depre.md +48 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +22 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-purch.md +57 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-query.md +62 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-repair.md +83 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-resolve.md +49 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-return.md +70 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-update.md +45 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-use.md +60 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-viewlink.md +81 -0
- package/skills/weaver-work-cli-invoice/SKILL.md +0 -122
- package/skills/weaver-work-cli-invoice/references/invoice-disabled-capabilities.md +0 -26
- package/skills/weaver-work-cli-shared/SKILL.md +0 -63
- package/skills/weaver-work-cli-shared/references/e10-auth-and-session.md +0 -90
- package/skills/weaver-work-cli-shared/references/weaver-work-cli-installation.md +0 -73
- /package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/high-risk-write.md +0 -0
- /package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/product.json +0 -0
|
@@ -0,0 +1,1340 @@
|
|
|
1
|
+
# 报销 CLI operation 参考文档
|
|
2
|
+
|
|
3
|
+
> 本文件说明各报销 CLI operation 的入参、返回字段和填单用法。
|
|
4
|
+
> 实际调用必须通过 `weaver-work-cli --json invoice run <operation>` 执行。认证由 `weaver-work-cli auth` 管理,不要手动传 token / eteamsId。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 0. 文件ID转发票识别
|
|
9
|
+
|
|
10
|
+
CLI operation:`invoice.reim.file-ocr.preview`
|
|
11
|
+
|
|
12
|
+
当用户提供了 `fileId`(文件/附件ID)时,调用此 CLI 一步完成识别,直接返回标准化发票数据。
|
|
13
|
+
|
|
14
|
+
### 命令
|
|
15
|
+
|
|
16
|
+
Windows PowerShell:
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
weaver-work-cli --json invoice run invoice.reim.file-ocr.preview --input-json '{"fileIds":["1290156133724692482","1290156133724692483"]}'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
macOS/Linux(bash/zsh):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
weaver-work-cli --json invoice run invoice.reim.file-ocr.preview --input-json '{"fileIds":["1290156133724692482","1290156133724692483"]}'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 返回示例
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"code": 200,
|
|
33
|
+
"msg": "接口返回成功",
|
|
34
|
+
"status": true,
|
|
35
|
+
"data": [
|
|
36
|
+
{
|
|
37
|
+
"fileId": "1290156133724692482",
|
|
38
|
+
"fileName": "a3b998b49d7cf7d2f9e77f13751d44ee.png",
|
|
39
|
+
"status": "success",
|
|
40
|
+
"errorMsg": "识别成功",
|
|
41
|
+
"invoiceId": "1290156159548506113",
|
|
42
|
+
"invoiceType": "机动车销售统一发票",
|
|
43
|
+
"invoiceTypeCode": 6,
|
|
44
|
+
"amount": "263500.00",
|
|
45
|
+
"consumeContent": "机动车销售统一发票",
|
|
46
|
+
"invoiceDate": "2025-03-11",
|
|
47
|
+
"invoiceNumber": "00393118",
|
|
48
|
+
"buyerName": "杭州杭港地铁五号线有限公司",
|
|
49
|
+
"sellerName": "特斯拉汽车销售服务(杭州)有限公司",
|
|
50
|
+
"expenseType": "日常消费"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"fail": false
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 返回字段说明
|
|
58
|
+
|
|
59
|
+
|
|
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` | 费用类型名称 |
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
> 返回的发票数据结构与 `invoice.list` 一致,可直接用于后续匹配和填单流程。
|
|
79
|
+
|
|
80
|
+
### 多 fileId 处理
|
|
81
|
+
|
|
82
|
+
用户可能提供逗号拼接的多个 fileId(如 `"id1,id2,id3"`),按逗号切割后组装为数组传入 `fileIds` 即可,CLI 会批量处理并返回每个文件的识别结果。
|
|
83
|
+
|
|
84
|
+
### 异常处理
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
| 场景 | 处理方式 |
|
|
88
|
+
| ------------------------- | ---------------- |
|
|
89
|
+
| 某个文件识别失败(`status="fail"`) | 跳过该文件,用成功的发票继续流程 |
|
|
90
|
+
| 全部文件识别失败 | 提示用户识别失败,无法继续 |
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 1. 获取发票数据
|
|
96
|
+
|
|
97
|
+
CLI operation:`invoice.list`(个人票夹)/ `invoice.enterprise.list`(企业票夹)
|
|
98
|
+
|
|
99
|
+
### 入参
|
|
100
|
+
|
|
101
|
+
CLI 已固定 `flag`(个人票夹=0 / 企业票夹=6),默认 `sreim="3"`、`bill_type=0`、`req_type=1`、`page_size=10`、`start_pos=0`。**不要传 `flag`。** 用户未要求查全部发票或凭证时,也不要传 `sreim` / `bill_type`。
|
|
102
|
+
|
|
103
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
104
|
+
| --- | --- | --- | --- |
|
|
105
|
+
| `page_size` | Integer | 否 | 每页条数,默认 `10`,建议不超过 `20` |
|
|
106
|
+
| `start_pos` | Integer | 否 | 分页起始位置,默认 `0` |
|
|
107
|
+
| `date_begin` / `date_end` | Integer | 否 | 开票日期范围(**秒级时间戳**)。用户未指定日期时,默认最近一周 |
|
|
108
|
+
| `create_tm_begin` / `create_tm_end` | Integer | 否 | 录入/创建日期范围(**秒级时间戳**),仅用户明确说录入/创建日期时使用 |
|
|
109
|
+
| `content` | String | 否 | 消费内容关键词(如 `"滴滴"`、`"住宿"`) |
|
|
110
|
+
| `number` | String | 否 | 发票号码精确匹配 |
|
|
111
|
+
| `types` | Array\<Integer\> | 否 | 发票类型 ID 数组(见下方映射表) |
|
|
112
|
+
|
|
113
|
+
不支持 `fylxs`、`consumption_tm_begin`、`consumption_tm_end`;日期筛选一律用 `date_begin` / `date_end`。
|
|
114
|
+
|
|
115
|
+
### 时间戳计算
|
|
116
|
+
|
|
117
|
+
> **所有日期参数的秒级时间戳由 AI 按内联公式直接计算(UTC+8 时区)。**
|
|
118
|
+
> 完整公式和 Fallback 见 [reim-workflow.md - 时间戳内联计算](reim-workflow.md#时间戳内联计算零工具调用)。
|
|
119
|
+
|
|
120
|
+
示例(最近一周,只传必要字段):
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"page_size": 10,
|
|
125
|
+
"start_pos": 0,
|
|
126
|
+
"date_begin": 1785513600,
|
|
127
|
+
"date_end": 1786982399
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
> 上方示例中的时间戳仅为示意,实际使用时由 AI 按内联公式动态计算。
|
|
132
|
+
|
|
133
|
+
### 命令
|
|
134
|
+
|
|
135
|
+
Windows PowerShell:
|
|
136
|
+
|
|
137
|
+
```powershell
|
|
138
|
+
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"date_begin":1785513600,"date_end":1786982399}'
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
macOS/Linux(bash/zsh):
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0,"date_begin":1785513600,"date_end":1786982399}'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 预筛选入参(先获取到事前申请时使用)
|
|
148
|
+
|
|
149
|
+
> **前提:开票日期一定不早于事前申请日期。** CLI 用 `date_begin` / `date_end`(开票日期,秒级时间戳)筛选。
|
|
150
|
+
|
|
151
|
+
如果已有事前申请数据,利用事前申请的 `createTime` 来缩小查询范围:
|
|
152
|
+
|
|
153
|
+
- `date_begin` = 最早事前申请 createTime 对应的秒级时间戳
|
|
154
|
+
- `date_end` = 当前日期 23:59:59 对应的秒级时间戳
|
|
155
|
+
|
|
156
|
+
### 返回示例
|
|
157
|
+
|
|
158
|
+
CLI 信封中列表在 `data.items`。下面是单条发票的票面结构(对应 `items[]` 元素,不是顶层 `infos`):
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"infos": [
|
|
163
|
+
{
|
|
164
|
+
"info": {
|
|
165
|
+
"id": "1301239558731259905",
|
|
166
|
+
"fid": "1301239558731259905",
|
|
167
|
+
"code": "",
|
|
168
|
+
"number": "26467000000088899841",
|
|
169
|
+
"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\"}",
|
|
170
|
+
"rb": { "trace": "", "ret": 0, "lang": "53512" },
|
|
171
|
+
"fylx": "897092516517920775",
|
|
172
|
+
"total": 0,
|
|
173
|
+
"currency": "CNY",
|
|
174
|
+
"currencyName": "人民币",
|
|
175
|
+
"empId": "9080972482706531342",
|
|
176
|
+
"province": "海南省",
|
|
177
|
+
"modify_info": {
|
|
178
|
+
"ctm": 1786168444,
|
|
179
|
+
"utm": 1786168444,
|
|
180
|
+
"cstm": 1786118400,
|
|
181
|
+
"source": 4
|
|
182
|
+
},
|
|
183
|
+
"comm_info": {
|
|
184
|
+
"pro": {
|
|
185
|
+
"cname": "电子发票(普通发票)",
|
|
186
|
+
"type": 33,
|
|
187
|
+
"date": "2026-08-08",
|
|
188
|
+
"status": 0
|
|
189
|
+
},
|
|
190
|
+
"price": {
|
|
191
|
+
"amount": "900",
|
|
192
|
+
"total": "954",
|
|
193
|
+
"treim": ""
|
|
194
|
+
},
|
|
195
|
+
"buyer": {
|
|
196
|
+
"tcode": "9131000070322836XD",
|
|
197
|
+
"company": "泛微网络科技股份有限公司"
|
|
198
|
+
},
|
|
199
|
+
"payer": {
|
|
200
|
+
"tcode": "91460200348073438U",
|
|
201
|
+
"company": "海南亚特兰蒂斯商旅发展有限公司亚特兰蒂斯酒店"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"relative_fids": [],
|
|
205
|
+
"bill_type": 0
|
|
206
|
+
},
|
|
207
|
+
"ret": { "trace": "", "ret": 0, "message": "执行成功", "lang": "53512" },
|
|
208
|
+
"is_valid": 0
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"res_base": { "trace": "", "ret": 0, "message": "执行成功", "lang": "53512" }
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### 返回字段说明
|
|
216
|
+
|
|
217
|
+
> **⚠️ `ext` 是 JSON 字符串,使用前需先 `JSON.parse(ext)` 解析。**
|
|
218
|
+
|
|
219
|
+
| 字段路径 | 对应标准字段名 | 说明 |
|
|
220
|
+
| --- | --- | --- |
|
|
221
|
+
| `info.fid` | `invoiceId` | 发票唯一 ID(后续匹配和填单使用) |
|
|
222
|
+
| `info.number` | `invoiceNumber` | 发票号码 |
|
|
223
|
+
| `info.code` | — | 发票代码 |
|
|
224
|
+
| `info.comm_info.pro.cname` | `invoiceType` | 发票类型名称 |
|
|
225
|
+
| `info.comm_info.pro.type` | `invoiceTypeCode` | 发票类型编码(见下方分类说明) |
|
|
226
|
+
| `info.comm_info.pro.date` | `invoiceDate` | 开票日期(yyyy-MM-dd) |
|
|
227
|
+
| `info.comm_info.pro.status` | — | 发票状态(**8=全额红冲,必须过滤掉**) |
|
|
228
|
+
| `info.comm_info.price.total` | `amount` | 价税合计(发票金额) |
|
|
229
|
+
| `info.comm_info.price.amount` | — | 不含税金额 |
|
|
230
|
+
| `info.comm_info.buyer.company` | `buyerName` | 购方公司名称 |
|
|
231
|
+
| `info.comm_info.payer.company` | `sellerName` | 销方公司名称 |
|
|
232
|
+
| `info.fylx` | — | 费用类型 ID(需根据 ID 查找对应 `expenseType` 名称) |
|
|
233
|
+
| `info.province` | — | 省份 |
|
|
234
|
+
| `info.modify_info.cstm` | — | 消费日期(秒级时间戳) |
|
|
235
|
+
| `info.modify_info.source` | — | 来源(4=邮箱等) |
|
|
236
|
+
| `ext`(解析后)`.content` | `consumeContent` | 消费内容/商品名称 |
|
|
237
|
+
| `ext`(解析后)`.products` | — | 商品明细列表 |
|
|
238
|
+
| `ext`(解析后)`.province` | — | 省份 |
|
|
239
|
+
| `ext`(解析后)`.comment` | — | 备注 |
|
|
240
|
+
| `ext`(解析后)`.issuer` | — | 开票人 |
|
|
241
|
+
| `ext`(解析后)`.pcontact` | — | 销售方地址及电话 |
|
|
242
|
+
| `ext`(解析后)`.bcontact` | — | 购买方地址及电话 |
|
|
243
|
+
|
|
244
|
+
### ext 字段详细结构
|
|
245
|
+
|
|
246
|
+
`ext` 是 JSON 字符串,解析后结构如下:
|
|
247
|
+
|
|
248
|
+
```json
|
|
249
|
+
{
|
|
250
|
+
"ttax": "54",
|
|
251
|
+
"trate": "6.0",
|
|
252
|
+
"pcontact": "海南省三亚市海棠区海棠北路36号亚特兰蒂斯酒店 0898-88986666",
|
|
253
|
+
"totalBig": "玖佰伍拾肆",
|
|
254
|
+
"title": "电子发票(普通发票)",
|
|
255
|
+
"bbank": "",
|
|
256
|
+
"content": "*生产生活服务*水上乐园门票",
|
|
257
|
+
"issuer": "张怡",
|
|
258
|
+
"products": [
|
|
259
|
+
{
|
|
260
|
+
"tprice": "54",
|
|
261
|
+
"taxClassifyCode": "3070101000000000000",
|
|
262
|
+
"price": "900.00",
|
|
263
|
+
"qty": "1",
|
|
264
|
+
"name": "*生产生活服务*水上乐园门票",
|
|
265
|
+
"no": "1",
|
|
266
|
+
"trate": "6.0",
|
|
267
|
+
"amount": "900",
|
|
268
|
+
"smodel": "",
|
|
269
|
+
"muint": "张"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"province": "海南省",
|
|
273
|
+
"bcontact": "上海市闵行区三鲁公路3419号021-52262600",
|
|
274
|
+
"pbank": "462601500018800030539",
|
|
275
|
+
"comment": "0808+5737268",
|
|
276
|
+
"category": "电子发票(普通发票)"
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### 数据过滤规则(重要,前置处理)
|
|
281
|
+
|
|
282
|
+
> **⚠️ 获取到发票数据后,必须先过滤掉不允许报销的发票,再进行后续分类和填单。**
|
|
283
|
+
|
|
284
|
+
| 过滤条件 | 字段路径 | 值 | 说明 |
|
|
285
|
+
| --- | --- | --- | --- |
|
|
286
|
+
| **全额红冲发票** | `info.comm_info.pro.status` | `8` | 该发票已被全额红冲,**必须过滤掉,不允许报销** |
|
|
287
|
+
|
|
288
|
+
过滤后的发票才进入后续的 invoiceTypeCode 分类和填单流程。
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### invoiceTypeCode 分类(重要)
|
|
293
|
+
|
|
294
|
+
返回的 `info.comm_info.pro.type` 按值分为两类,**填单时处理方式完全不同**:
|
|
295
|
+
|
|
296
|
+
| 分类 | type 值 | 说明 | 填单位置 |
|
|
297
|
+
| --- | --- | --- | --- |
|
|
298
|
+
| **发票** | 除 17/18/57/58 以外的所有值 | 正式发票,每张独立成一行明细 | `EinvoiceComponent` + `single=false`(相关发票字段) |
|
|
299
|
+
| **相关凭证** | 17, 18, 57, 58 | 行程单、小票/水单、电子支付凭证、其他支付凭证,不能独立成行 | `EinvoiceComponent` + `single=true`(相关凭证字段) |
|
|
300
|
+
|
|
301
|
+
**关键规则:相关凭证必须与发票配对,放在同一行明细中,不能单独成行。**
|
|
302
|
+
|
|
303
|
+
详细的配对和填单规则见 [form-fill-rules.md](reim-form-fill-rules.md#发票与相关凭证分类)
|
|
304
|
+
|
|
305
|
+
### 发票类型 ID 映射表
|
|
306
|
+
|
|
307
|
+
> 用于 `types` 入参筛选,`info.comm_info.pro.type` 返回值也对应此表。
|
|
308
|
+
|
|
309
|
+
| ID | 名称 |
|
|
310
|
+
| --- | --- |
|
|
311
|
+
| 1 | 增值税专用发票 |
|
|
312
|
+
| 2 | 增值税普通发票 |
|
|
313
|
+
| 3 | 增值税电子普通发票 |
|
|
314
|
+
| 4 | 增值税普通发票(卷票) |
|
|
315
|
+
| 5 | 增值税电子普通发票(通行费) |
|
|
316
|
+
| 6 | 机动车销售统一发票 |
|
|
317
|
+
| 7 | 二手车销售统一发票 |
|
|
318
|
+
| 8 | 定额发票 |
|
|
319
|
+
| 9 | 出租车发票 |
|
|
320
|
+
| 10 | 机打发票 |
|
|
321
|
+
| 11 | 可报销的其他发票 |
|
|
322
|
+
| 12 | 火车票 |
|
|
323
|
+
| 13 | 过路费发票 |
|
|
324
|
+
| 14 | 船票发票 |
|
|
325
|
+
| 15 | 客运汽车发票 |
|
|
326
|
+
| 16 | 航空运输电子客票行程单 |
|
|
327
|
+
| 17 | 小票/水单 |
|
|
328
|
+
| 18 | 滴滴行程单(支付凭证,非增值税发票) |
|
|
329
|
+
| 19 | 完税证明 |
|
|
330
|
+
| 21 | 地铁发票 |
|
|
331
|
+
| 22 | 区块链发票 |
|
|
332
|
+
| 28 | 增值税电子专用发票 |
|
|
333
|
+
| 31 | 火车票退票凭证 |
|
|
334
|
+
| 32 | 电子发票(增值税专用发票) |
|
|
335
|
+
| 33 | 电子发票(普通发票) |
|
|
336
|
+
| 34 | 票据汇总单 |
|
|
337
|
+
| 35 | 通用(电子)发票 |
|
|
338
|
+
| 36 | 门诊收费票据(电子) |
|
|
339
|
+
| 37 | 非税收入统一票据(电子) |
|
|
340
|
+
| 39 | 海关缴款书 |
|
|
341
|
+
| 40 | 出口转内销发票 |
|
|
342
|
+
| 41 | 出口转内销海关缴款书 |
|
|
343
|
+
| 42 | 出口转内销电子专用发票 |
|
|
344
|
+
| 43 | 收购发票 |
|
|
345
|
+
| 44 | 免税自产农产品普通发票 |
|
|
346
|
+
| 45 | 其他普通发票 |
|
|
347
|
+
| 46 | 代扣代缴完税凭证 |
|
|
348
|
+
| 47 | 电子发票(铁路电子客票) |
|
|
349
|
+
| 48 | 电子发票(航空运输电子客票行程单) |
|
|
350
|
+
| 49 | 纸质增值税专用发票(全电纸质专票) |
|
|
351
|
+
| 50 | 纸质增值税普通发票(全电纸质普票) |
|
|
352
|
+
| 51 | 非大陆发票 |
|
|
353
|
+
| 52 | 电子发票(铁路电子客票退票凭证) |
|
|
354
|
+
| 53 | 电子发票(机动车销售统一发票) |
|
|
355
|
+
| 54 | 电子发票(二手车销售统一发票) |
|
|
356
|
+
| 55 | 货物运输电子收款凭证 |
|
|
357
|
+
| 56 | 全电发票通行费 |
|
|
358
|
+
| 57 | 支付凭证 |
|
|
359
|
+
| 58 | 其他票据凭证 |
|
|
360
|
+
|
|
361
|
+
> **相关凭证类型**(不能独立成行,填单时放入"相关凭证"字段):17(小票/水单)、18(滴滴行程单——注意:滴滴开具的增值税电子普通发票 type=3,是正式发票可独立成行;type=18 仅指滴滴的支付行程凭证)、57(支付凭证)、58(其他票据凭证)
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## 2. 查询事前申请流程列表
|
|
366
|
+
|
|
367
|
+
CLI operation:`invoice.reim.requests.list`
|
|
368
|
+
|
|
369
|
+
### 入参
|
|
370
|
+
|
|
371
|
+
#### 分页参数
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|
|
375
|
+
| ---------- | ------- | --- | --- | ------- |
|
|
376
|
+
| `pageNo` | Integer | 是 | 1 | 页码,从1开始 |
|
|
377
|
+
| `pageSize` | Integer | 是 | 20 | 每页条数 |
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
#### 筛选条件
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
| 参数 | 类型 | 说明 | 示例 |
|
|
384
|
+
| -------------------- | ------ | -------------------- | --------------- |
|
|
385
|
+
| `requestname` | String | 流程标题模糊搜索 | `"差旅"`, `"交通费"` |
|
|
386
|
+
| `cusCreateDateStart` | String | 发起日期-开始 (yyyy-MM-dd) | `"2026-07-01"` |
|
|
387
|
+
| `cusCreateDateEnd` | String | 发起日期-结束 (yyyy-MM-dd) | `"2026-07-31"` |
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
### 推荐默认入参
|
|
391
|
+
|
|
392
|
+
```json
|
|
393
|
+
{
|
|
394
|
+
"pageNo": 1,
|
|
395
|
+
"pageSize": 20
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### 命令
|
|
400
|
+
|
|
401
|
+
Windows PowerShell:
|
|
402
|
+
|
|
403
|
+
```powershell
|
|
404
|
+
weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":20}'
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
macOS/Linux(bash/zsh):
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
weaver-work-cli --json invoice run invoice.reim.requests.list --input-json '{"pageNo":1,"pageSize":20}'
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### 预筛选入参(先获取到发票时使用)
|
|
414
|
+
|
|
415
|
+
> **前提:事前申请日期一定在开票日期之前。**
|
|
416
|
+
|
|
417
|
+
如果已有发票数据,利用发票的 `invoiceDate` 来缩小事前申请查询范围:
|
|
418
|
+
|
|
419
|
+
```json
|
|
420
|
+
{
|
|
421
|
+
"pageNo": 1,
|
|
422
|
+
"pageSize": 20,
|
|
423
|
+
"cusCreateDateStart": "2026-04-21",
|
|
424
|
+
"cusCreateDateEnd": "2026-07-30"
|
|
425
|
+
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
- `cusCreateDateEnd` = 最晚发票 invoiceDate(事前申请不会晚于开票日期)
|
|
429
|
+
- `cusCreateDateStart` = 最早发票 invoiceDate 往前推 90 天(合理的事前申请窗口期)
|
|
430
|
+
|
|
431
|
+
### 返回示例
|
|
432
|
+
|
|
433
|
+
```json
|
|
434
|
+
{
|
|
435
|
+
"code": 200,
|
|
436
|
+
"msg": "接口返回成功",
|
|
437
|
+
"status": true,
|
|
438
|
+
"data": [
|
|
439
|
+
{
|
|
440
|
+
"requestid": "1298294241967177729",
|
|
441
|
+
"workflowid": "1181057526276915214",
|
|
442
|
+
"requestname": "交通费报销-后端开发111-2026-07-31",
|
|
443
|
+
"requestnametitle": "交通费报销-后端开发111-2026-07-31 (相关客户:, 相关项目:, 承担主体: , 流程编号:Weaver-FYBX202607000069, 报销总金额:14.47 , 费用承担公司:)",
|
|
444
|
+
"flowStatus": 6,
|
|
445
|
+
"creatorId": "1201729946891231232",
|
|
446
|
+
"creatorName": "后端开发111",
|
|
447
|
+
"creatorSubCompanyId": "1169438875220598808",
|
|
448
|
+
"creatorDepartmentId": "1201729461554241537",
|
|
449
|
+
"createTime": "2026-07-31 15:24:45",
|
|
450
|
+
"requestMark": "Weaver-FYBX202607000069",
|
|
451
|
+
"userDepartmentId": "1201729461554241537",
|
|
452
|
+
"nodeid": "1181057741029220917"
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
"fail": false
|
|
456
|
+
}
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### 返回字段说明
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
| 字段 | 说明 |
|
|
463
|
+
| --------------------- | ---------------------- |
|
|
464
|
+
| `requestid` | 事前申请流程ID(用于匹配绑定和填单) |
|
|
465
|
+
| `workflowid` | 工作流ID(用于获取表单结构) |
|
|
466
|
+
| `requestname` | 流程标题 |
|
|
467
|
+
| `requestnametitle` | 标题纯文本(含扩展信息:客户、项目、金额等) |
|
|
468
|
+
| `flowStatus` | 流程状态(6=已完成) |
|
|
469
|
+
| `creatorId` | 发起人ID |
|
|
470
|
+
| `creatorName` | 发起人姓名 |
|
|
471
|
+
| `creatorDepartmentId` | 发起人部门ID |
|
|
472
|
+
| `creatorSubCompanyId` | 发起人分部ID |
|
|
473
|
+
| `createTime` | 发起时间 |
|
|
474
|
+
| `requestMark` | 流程编号 |
|
|
475
|
+
| `nodeid` | 当前节点ID |
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## 3. 获取报销单表单字段结构
|
|
481
|
+
|
|
482
|
+
CLI operation:`invoice.reim.form.structure`
|
|
483
|
+
|
|
484
|
+
### 入参
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
488
|
+
| ------------ | ------ | --- | ------------ |
|
|
489
|
+
| `workflowId` | String | 是 | 工作流ID |
|
|
490
|
+
| `nodeId` | String | 否 | 节点ID,默认 `1` |
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
### 命令
|
|
494
|
+
|
|
495
|
+
Windows PowerShell:
|
|
496
|
+
|
|
497
|
+
```powershell
|
|
498
|
+
weaver-work-cli --json invoice run invoice.reim.form.structure --input-json '{"workflowId":"1181057526276915214"}'
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
macOS/Linux(bash/zsh):
|
|
502
|
+
|
|
503
|
+
```bash
|
|
504
|
+
weaver-work-cli --json invoice run invoice.reim.form.structure --input-json '{"workflowId":"1181057526276915214"}'
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
### 返回示例
|
|
508
|
+
|
|
509
|
+
```json
|
|
510
|
+
{
|
|
511
|
+
"code": 200,
|
|
512
|
+
"msg": "接口返回成功",
|
|
513
|
+
"status": true,
|
|
514
|
+
"data": {
|
|
515
|
+
"mainFormId": "1181057741029226975",
|
|
516
|
+
"mainFields": [
|
|
517
|
+
{
|
|
518
|
+
"fieldId": "1181057741029227445",
|
|
519
|
+
"fieldName": "申请人",
|
|
520
|
+
"fieldType": "Employee",
|
|
521
|
+
"single": true,
|
|
522
|
+
"marked": true
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"fieldId": "1181057741029227446",
|
|
526
|
+
"fieldName": "部门",
|
|
527
|
+
"fieldType": "Department",
|
|
528
|
+
"single": true,
|
|
529
|
+
"marked": true
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"fieldId": "1181057741029227447",
|
|
533
|
+
"fieldName": "报销日期",
|
|
534
|
+
"fieldType": "DateComponent",
|
|
535
|
+
"single": true,
|
|
536
|
+
"marked": false
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"fieldId": "1181057741029227448",
|
|
540
|
+
"fieldName": "相关人员",
|
|
541
|
+
"fieldType": "Text",
|
|
542
|
+
"single": true,
|
|
543
|
+
"marked": false
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"fieldId": "1181057741029227454",
|
|
547
|
+
"fieldName": "报销方式",
|
|
548
|
+
"fieldType": "Select",
|
|
549
|
+
"single": true,
|
|
550
|
+
"marked": false,
|
|
551
|
+
"options": [
|
|
552
|
+
{"optionId": "1181057741029227903", "optionName": "银行(个人报销)", "optionValue": "7"},
|
|
553
|
+
{"optionId": "1181057741029227900", "optionName": "冲销借款", "optionValue": "4"},
|
|
554
|
+
{"optionId": "1181057741029227904", "optionName": "银行(付公司)", "optionValue": "6"}
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"fieldId": "1181057741029227456",
|
|
559
|
+
"fieldName": "报销事由",
|
|
560
|
+
"fieldType": "TextArea",
|
|
561
|
+
"single": false,
|
|
562
|
+
"marked": false
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"fieldId": "1181057741029227470",
|
|
566
|
+
"fieldName": "相关流程",
|
|
567
|
+
"fieldType": "Workflow",
|
|
568
|
+
"single": false,
|
|
569
|
+
"marked": true
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
"subTables": [
|
|
573
|
+
{
|
|
574
|
+
"subFormId": "1181057741029227992",
|
|
575
|
+
"subFormName": "费用明细",
|
|
576
|
+
"subFields": [
|
|
577
|
+
{
|
|
578
|
+
"fieldId": "1181057741029227449",
|
|
579
|
+
"fieldName": "相关客户",
|
|
580
|
+
"fieldType": "Ebuilder",
|
|
581
|
+
"single": true,
|
|
582
|
+
"marked": true
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"fieldId": "1181057741029227450",
|
|
586
|
+
"fieldName": "相关项目",
|
|
587
|
+
"fieldType": "Ebuilder",
|
|
588
|
+
"single": true,
|
|
589
|
+
"marked": true
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"fieldId": "1181057741029227459",
|
|
593
|
+
"fieldName": "实报金额",
|
|
594
|
+
"fieldType": "Money",
|
|
595
|
+
"single": true,
|
|
596
|
+
"marked": false
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"fieldId": "1181057741029227463",
|
|
600
|
+
"fieldName": "费用类型(科目)",
|
|
601
|
+
"fieldType": "RelateBrowser",
|
|
602
|
+
"single": true,
|
|
603
|
+
"marked": true
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"fieldId": "1181057741029227464",
|
|
607
|
+
"fieldName": "费用说明",
|
|
608
|
+
"fieldType": "Text",
|
|
609
|
+
"single": false,
|
|
610
|
+
"marked": false
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"fieldId": "1181057741029227465",
|
|
614
|
+
"fieldName": "附件数",
|
|
615
|
+
"fieldType": "NumberComponent",
|
|
616
|
+
"single": true,
|
|
617
|
+
"marked": false
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"fieldId": "1181057741029227467",
|
|
621
|
+
"fieldName": "费用日期",
|
|
622
|
+
"fieldType": "DateComponent",
|
|
623
|
+
"single": true,
|
|
624
|
+
"marked": false
|
|
625
|
+
}
|
|
626
|
+
]
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
"fail": false
|
|
631
|
+
}
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
### 字段类型对照表
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
| fieldType | 说明 | fieldValue 格式 | 示例 |
|
|
638
|
+
| ----------------- | ---------- | ------------- | ----------------------- |
|
|
639
|
+
| `Employee` | 员工选择 | 用户ID | `"1201729946891231232"` |
|
|
640
|
+
| `Department` | 部门选择 | 部门ID | `"1201729461554241537"` |
|
|
641
|
+
| `DateComponent` | 日期 | yyyy-MM-dd | `"2026-08-04"` |
|
|
642
|
+
| `Text` | 单行文本 | 文本字符串 | `"差旅报销"` |
|
|
643
|
+
| `TextArea` | 多行文本 | 文本字符串 | `"详细说明..."` |
|
|
644
|
+
| `Select` | 下拉选择 | optionValue 值 | `"7"` |
|
|
645
|
+
| `Money` | 金额 | 数字字符串 | `"820.00"` |
|
|
646
|
+
| `NumberComponent` | 数字 | 数字字符串 | `"5"` |
|
|
647
|
+
| `Workflow` | 关联流程 | 流程requestId | `"1298294241967177729"` |
|
|
648
|
+
| `RelateBrowser` | 关联浏览 | 关联数据ID | `"2087459027187551811"` |
|
|
649
|
+
| `Ebuilder` | Ebuilder关联 | 关联数据ID | `"2087459027187551811"` |
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
---
|
|
653
|
+
|
|
654
|
+
## 4. 模糊搜索字段关联值
|
|
655
|
+
|
|
656
|
+
CLI operation:`invoice.reim.field.search`
|
|
657
|
+
|
|
658
|
+
用于 `marked = true` 的字段,通过名称关键词查找对应的数据ID。
|
|
659
|
+
|
|
660
|
+
### 入参
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
664
|
+
| -------------- | ------ | --- | ------------- |
|
|
665
|
+
| `keywords` | String | 是 | 搜索关键词 |
|
|
666
|
+
| `fieldId` | String | 是 | 目标字段的 fieldId |
|
|
667
|
+
| `workflowId` | String | 是 | 工作流ID |
|
|
668
|
+
| `nodeId` | String | 否 | 默认由 CLI 填充 |
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
### 命令
|
|
672
|
+
|
|
673
|
+
Windows PowerShell:
|
|
674
|
+
|
|
675
|
+
```powershell
|
|
676
|
+
weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"强","fieldId":"1250065066476052720","workflowId":"1250064959163990031"}'
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
macOS/Linux(bash/zsh):
|
|
680
|
+
|
|
681
|
+
```bash
|
|
682
|
+
weaver-work-cli --json invoice run invoice.reim.field.search --input-json '{"keywords":"强","fieldId":"1250065066476052720","workflowId":"1250064959163990031"}'
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
### 返回示例
|
|
686
|
+
|
|
687
|
+
```json
|
|
688
|
+
{
|
|
689
|
+
"code": 200,
|
|
690
|
+
"msg": "接口返回成功",
|
|
691
|
+
"status": true,
|
|
692
|
+
"data": [
|
|
693
|
+
{
|
|
694
|
+
"name": "袁强强",
|
|
695
|
+
"id": "2765669800318484102",
|
|
696
|
+
"value": "2765669800318484102"
|
|
697
|
+
}
|
|
698
|
+
],
|
|
699
|
+
"fail": false
|
|
700
|
+
}
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### 使用策略
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
| 返回结果数 | 处理方式 |
|
|
707
|
+
| ----- | -------------------------------------- |
|
|
708
|
+
| 1个 | 直接使用 `value` 作为 `fieldValue` |
|
|
709
|
+
| 多个 | 展示候选列表让用户选择 |
|
|
710
|
+
| 0个 | 缩短关键词重试;仍无结果则 `fieldValue` 留空,提示用户手动填写 |
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
---
|
|
714
|
+
|
|
715
|
+
## 5. 获取报销单工作流ID
|
|
716
|
+
|
|
717
|
+
CLI operation:`invoice.reim.workflow.resolve`
|
|
718
|
+
|
|
719
|
+
根据事前申请流程ID获取对应的报销单工作流ID;若无事前申请则返回候选报销单工作流列表。
|
|
720
|
+
|
|
721
|
+
### 入参
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
725
|
+
| ------------ | ----------- | --- | -------------------------- |
|
|
726
|
+
| `requestIds` | ArrayString | 是 | 事前申请流程ID列表。无事前申请时传空数组 `[]` |
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
### 场景A:有事前申请
|
|
730
|
+
|
|
731
|
+
**命令:**
|
|
732
|
+
|
|
733
|
+
Windows PowerShell:
|
|
734
|
+
|
|
735
|
+
```powershell
|
|
736
|
+
weaver-work-cli --json invoice run invoice.reim.workflow.resolve --input-json '{"requestIds":["1299854672520364033"]}'
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
macOS/Linux(bash/zsh):
|
|
740
|
+
|
|
741
|
+
```bash
|
|
742
|
+
weaver-work-cli --json invoice run invoice.reim.workflow.resolve --input-json '{"requestIds":["1299854672520364033"]}'
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
**返回:**
|
|
746
|
+
|
|
747
|
+
```json
|
|
748
|
+
{
|
|
749
|
+
"code": 200,
|
|
750
|
+
"msg": "接口返回成功",
|
|
751
|
+
"status": true,
|
|
752
|
+
"data": {
|
|
753
|
+
"requestWorkflowMap": {
|
|
754
|
+
"1299854672520364033": {
|
|
755
|
+
"workFlowId": "1250064959163990031",
|
|
756
|
+
"workFlowName": "差旅事前申请"
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
"fail": false
|
|
761
|
+
}
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
**返回字段说明:**
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
| 字段 | 说明 |
|
|
768
|
+
| -------------------------------------------- | ----------------------------------------------- |
|
|
769
|
+
| `requestWorkflowMap` | 事前申请ID → 对应报销单工作流的映射 |
|
|
770
|
+
| `requestWorkflowMap[requestId].workFlowId` | 对应的报销单工作流ID(用于 `invoice.reim.form.structure` 和 work_flow_id) |
|
|
771
|
+
| `requestWorkflowMap[requestId].workFlowName` | 报销单流程名称 |
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
### 场景B:无事前申请
|
|
775
|
+
|
|
776
|
+
**命令:**
|
|
777
|
+
|
|
778
|
+
Windows PowerShell:
|
|
779
|
+
|
|
780
|
+
```powershell
|
|
781
|
+
weaver-work-cli --json invoice run invoice.reim.workflow.resolve --input-json '{"requestIds":[]}'
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
macOS/Linux(bash/zsh):
|
|
785
|
+
|
|
786
|
+
```bash
|
|
787
|
+
weaver-work-cli --json invoice run invoice.reim.workflow.resolve --input-json '{"requestIds":[]}'
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
**返回:**
|
|
791
|
+
|
|
792
|
+
```json
|
|
793
|
+
{
|
|
794
|
+
"code": 200,
|
|
795
|
+
"msg": "接口返回成功",
|
|
796
|
+
"status": true,
|
|
797
|
+
"data": {
|
|
798
|
+
"candidateWorkflows": [
|
|
799
|
+
{
|
|
800
|
+
"workFlowId": "1255675973064196097",
|
|
801
|
+
"workFlowName": "报销流程666【活动版本V1】"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"workFlowId": "1250064959163990031",
|
|
805
|
+
"workFlowName": "差旅事前申请"
|
|
806
|
+
}
|
|
807
|
+
]
|
|
808
|
+
},
|
|
809
|
+
"fail": false
|
|
810
|
+
}
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
**返回字段说明:**
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
| 字段 | 说明 |
|
|
817
|
+
| ----------------------------------- | ---------- |
|
|
818
|
+
| `candidateWorkflows` | 候选报销单工作流列表 |
|
|
819
|
+
| `candidateWorkflows[].workFlowId` | 报销单工作流ID |
|
|
820
|
+
| `candidateWorkflows[].workFlowName` | 报销单流程名称 |
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
### 使用策略
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
| 场景 | 处理方式 |
|
|
827
|
+
| ------------------------------- | ------------------------------ |
|
|
828
|
+
| 有事前申请 → 所有事前申请对应同一 workFlowId | 创建 1 个报销单 |
|
|
829
|
+
| 有事前申请 → 事前申请对应不同 workFlowId | 按 workFlowId 分组,**每组各创建一个报销单** |
|
|
830
|
+
| 无事前申请 → candidateWorkflows 只有1个 | 创建 1 个报销单 |
|
|
831
|
+
| 无事前申请 → candidateWorkflows 有多个 | 将发票按匹配分配到各工作流,**每组各创建一个报销单** |
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
---
|
|
835
|
+
|
|
836
|
+
## 5.5 获取当前人员及上级信息
|
|
837
|
+
|
|
838
|
+
CLI operation:`invoice.reim.employee-superiors`
|
|
839
|
+
|
|
840
|
+
获取当前登录人员的基本信息及其所有上级人员列表。**用于填写表单中"报销人上级"、"承担人直接上级"和"承担人所有上级"字段(均为必填)。**
|
|
841
|
+
|
|
842
|
+
### 命令
|
|
843
|
+
|
|
844
|
+
Windows PowerShell:
|
|
845
|
+
|
|
846
|
+
```powershell
|
|
847
|
+
weaver-work-cli --json invoice run invoice.reim.employee-superiors --input-json '{}'
|
|
848
|
+
```
|
|
849
|
+
|
|
850
|
+
macOS/Linux(bash/zsh):
|
|
851
|
+
|
|
852
|
+
```bash
|
|
853
|
+
weaver-work-cli --json invoice run invoice.reim.employee-superiors --input-json '{}'
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
### 入参
|
|
857
|
+
|
|
858
|
+
无。
|
|
859
|
+
|
|
860
|
+
### 返回示例
|
|
861
|
+
|
|
862
|
+
```json
|
|
863
|
+
{
|
|
864
|
+
"code": 200,
|
|
865
|
+
"msg": "接口返回成功",
|
|
866
|
+
"status": true,
|
|
867
|
+
"data": {
|
|
868
|
+
"currentEmployee": {
|
|
869
|
+
"id": "1201729946891231232",
|
|
870
|
+
"name": "后端开发111"
|
|
871
|
+
},
|
|
872
|
+
"allSuperiors": [
|
|
873
|
+
{
|
|
874
|
+
"id": "1201729946891231111",
|
|
875
|
+
"name": "部门经理张三"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"id": "1201729946891231222",
|
|
879
|
+
"name": "总监李四"
|
|
880
|
+
}
|
|
881
|
+
]
|
|
882
|
+
},
|
|
883
|
+
"fail": false
|
|
884
|
+
}
|
|
885
|
+
```
|
|
886
|
+
|
|
887
|
+
### 返回字段说明
|
|
888
|
+
|
|
889
|
+
| 字段 | 说明 |
|
|
890
|
+
| --- | --- |
|
|
891
|
+
| `currentEmployee.id` | 当前人员 ID(**字符串**,避免雪花 ID 超过 JS 安全整数精度) |
|
|
892
|
+
| `currentEmployee.name` | 当前人员名称 |
|
|
893
|
+
| `allSuperiors` | 所有上级列表(含直接上级和间接上级),每项含 `id` 和 `name` |
|
|
894
|
+
| `allSuperiors[0]` | 第一个元素即为直接上级 |
|
|
895
|
+
| `allSuperiors[].id` | 上级人员 ID(**字符串**) |
|
|
896
|
+
|
|
897
|
+
### 填单字段对应关系
|
|
898
|
+
|
|
899
|
+
| 表单字段 | 取值方式 |
|
|
900
|
+
| --- | --- |
|
|
901
|
+
| 报销人上级 | `allSuperiors[0].id`(直接上级 ID,直接赋值) |
|
|
902
|
+
| 承担人直接上级 | `allSuperiors[0].id`(直接上级 ID,直接赋值) |
|
|
903
|
+
| 承担人所有上级 | `allSuperiors` 中所有 `id` 用逗号拼接(如 `"id1,id2,id3"`) |
|
|
904
|
+
|
|
905
|
+
---
|
|
906
|
+
|
|
907
|
+
## 5.6 获取发票明细行预填信息
|
|
908
|
+
|
|
909
|
+
CLI operation:`invoice.reim.row-info`
|
|
910
|
+
|
|
911
|
+
根据发票 ID 获取该发票在明细行中应填写的费用日期、费用说明、关联凭证、费用科目。**返回值优先级高于 AI 自行推断**。
|
|
912
|
+
|
|
913
|
+
### 入参
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
917
|
+
| ----------- | ------ | --- | ------------------ |
|
|
918
|
+
| `cdzt` | String | 否 | 当前用户/人员 ID,不传则 CLI 使用当前登录用户 |
|
|
919
|
+
| `requestid` | String | 否 | 事前申请流程 ID(无可不传或留空) |
|
|
920
|
+
| `invoiceId` | String | 是 | 发票 ID |
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
### 命令
|
|
924
|
+
|
|
925
|
+
Windows PowerShell:
|
|
926
|
+
|
|
927
|
+
```powershell
|
|
928
|
+
weaver-work-cli --json invoice run invoice.reim.row-info --input-json '{"invoiceId":"1297093330645237792","requestid":""}'
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
macOS/Linux(bash/zsh):
|
|
932
|
+
|
|
933
|
+
```bash
|
|
934
|
+
weaver-work-cli --json invoice run invoice.reim.row-info --input-json '{"invoiceId":"1297093330645237792","requestid":""}'
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
### 返回字段
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
| 字段 | 说明 | 对应明细行字段 |
|
|
941
|
+
| ----------- | ---------------- | ---------------------------------------- |
|
|
942
|
+
| `date` | 费用日期 | 费用日期/发生日期 |
|
|
943
|
+
| `fysm` | 费用说明 | 费用说明/摘要 |
|
|
944
|
+
| `itinerary` | 关联凭证 ID(多个用逗号拼接) | 相关凭证(`EinvoiceComponent`, `single=true`) |
|
|
945
|
+
| `subjectId` | 费用科目 ID | 费用类型(科目) |
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
### 返回示例
|
|
949
|
+
|
|
950
|
+
```json
|
|
951
|
+
{
|
|
952
|
+
"code": 200,
|
|
953
|
+
"status": true,
|
|
954
|
+
"data": {
|
|
955
|
+
"date": "2026-07-29",
|
|
956
|
+
"fysm": "交通运输服务",
|
|
957
|
+
"itinerary": "1298798990831518001",
|
|
958
|
+
"subjectId": "100502270000000006"
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
### 使用场景与优先级
|
|
964
|
+
|
|
965
|
+
- **调用时机**:Step 4 组装明细行时,对每张发票调用 `invoice.reim.row-info`
|
|
966
|
+
- **优先级**:此 CLI 返回的 `date`、`fysm`、`itinerary`、`subjectId` 四个值**优先于 AI 自行推断的值**
|
|
967
|
+
- **容错**:如果某个字段为空/null,则回退到 AI 推断逻辑
|
|
968
|
+
- **itinerary 处理**:如果 `itinerary` 有值(可能逗号分隔多个 ID),直接填入相关凭证字段(`EinvoiceComponent`+`single=true`),**替代原有的凭证配对逻辑**
|
|
969
|
+
|
|
970
|
+
---
|
|
971
|
+
|
|
972
|
+
## 5.7 获取发票详情(交通类发票行程信息)
|
|
973
|
+
|
|
974
|
+
CLI operation:`invoice.get`
|
|
975
|
+
|
|
976
|
+
根据发票 ID 获取发票完整详情。**主要用途:交通类发票获取出发地、目的地,用于生成费用说明。**
|
|
977
|
+
|
|
978
|
+
### 命令
|
|
979
|
+
|
|
980
|
+
Windows PowerShell:
|
|
981
|
+
|
|
982
|
+
```powershell
|
|
983
|
+
weaver-work-cli --json invoice run invoice.get --input-json '{"fid":"1301956959986835460"}'
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
macOS/Linux(bash/zsh):
|
|
987
|
+
|
|
988
|
+
```bash
|
|
989
|
+
weaver-work-cli --json invoice run invoice.get --input-json '{"fid":"1301956959986835460"}'
|
|
990
|
+
```
|
|
991
|
+
|
|
992
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
993
|
+
| --- | --- | --- | --- |
|
|
994
|
+
| `fid` | String | 与 `number` 二选一 | 发票 fid |
|
|
995
|
+
| `number` | String | 与 `fid` 二选一 | 发票号码 |
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
### 调用时机
|
|
999
|
+
|
|
1000
|
+
**仅当发票为交通类时调用**。判断条件(满足任一):
|
|
1001
|
+
|
|
1002
|
+
- `expenseType` 包含"交通"、"出行"、"打车"、"出租车"
|
|
1003
|
+
- `consumeContent` 包含"客运服务费"、"运输服务"
|
|
1004
|
+
- `invoiceTypeCode` 为 17(行程单)或 57(客运凭证)等交通相关类型
|
|
1005
|
+
- `sellerName` 包含"滴滴"、"享道"、"高德"、"曹操"等出行平台
|
|
1006
|
+
|
|
1007
|
+
### 返回值关键字段
|
|
1008
|
+
|
|
1009
|
+
从 `infos[].info` 中提取:
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
| 字段路径 | 说明 | 示例 |
|
|
1013
|
+
| ----------------------------------------------------- | ------- | -------------------- |
|
|
1014
|
+
| `from` | 出发地 | `"仁济医院南院区门诊部(南门)南侧"` |
|
|
1015
|
+
| `to` | 目的地 | `"浦江瑞和城柒街区30号"` |
|
|
1016
|
+
| `ext` (JSON字符串) → `passengersService[].from` | 出发地(详细) | `"仁济医院南院区门诊部(南门)南侧"` |
|
|
1017
|
+
| `ext` (JSON字符串) → `passengersService[].to` | 目的地(详细) | `"浦江瑞和城柒街区30号"` |
|
|
1018
|
+
| `ext` (JSON字符串) → `passengersService[].transportType` | 交通方式 | `"出租车"` |
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
> **优先取 `info.from` 和 `info.to`**(顶层字段),如为空则从 `ext.passengersService[0]` 中提取。
|
|
1022
|
+
|
|
1023
|
+
### 出发地/目的地精简规则
|
|
1024
|
+
|
|
1025
|
+
原始地址可能很长,需要精简后使用:
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
| 原始值 | 精简后 |
|
|
1029
|
+
| -------------------- | ---------------- |
|
|
1030
|
+
| `"仁济医院南院区门诊部(南门)南侧"` | `"仁济医院南院"` |
|
|
1031
|
+
| `"浦江瑞和城柒街区30号"` | `"浦江瑞和城"` |
|
|
1032
|
+
| `"上海虹桥国际机场T2航站楼出发层"` | `"虹桥机场T2"` |
|
|
1033
|
+
| `"北京南站"` | `"北京南站"`(已够短,保留) |
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
精简原则:
|
|
1037
|
+
|
|
1038
|
+
- 去掉括号及括号内内容(如 `(南门)`)
|
|
1039
|
+
- 去掉"侧"、"层"、"出发层"、"到达层"等方位后缀
|
|
1040
|
+
- 去掉门牌号(如 `30号`、`3419号`)
|
|
1041
|
+
- 保留核心地标名称,控制在 **10 个字以内**
|
|
1042
|
+
|
|
1043
|
+
### 返回示例(精简)
|
|
1044
|
+
|
|
1045
|
+
```json
|
|
1046
|
+
{
|
|
1047
|
+
"infos": [
|
|
1048
|
+
{
|
|
1049
|
+
"info": {
|
|
1050
|
+
"id": "1301956959986835460",
|
|
1051
|
+
"from": "仁济医院南院区门诊部(南门)南侧",
|
|
1052
|
+
"to": "浦江瑞和城柒街区30号",
|
|
1053
|
+
"ext": "{...\"passengersService\":[{\"from\":\"仁济医院南院区门诊部(南门)南侧\",\"to\":\"浦江瑞和城柒街区30号\",\"transportType\":\"出租车\"}]...}"
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
}
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1060
|
+
---
|
|
1061
|
+
|
|
1062
|
+
## 6. 生成报销单流程
|
|
1063
|
+
|
|
1064
|
+
CLI operation:`invoice.reim.flow.create.prepare` → 用户确认 → `invoice.reim.flow.create.apply`
|
|
1065
|
+
|
|
1066
|
+
> **⚠️ 禁止重复创建:同一组发票数据只能创建一次。创建成功后,修改报销单请用 `invoice.reim.flow.update.prepare/apply`,不要再次调用 create。**
|
|
1067
|
+
|
|
1068
|
+
将填单结构化 JSON 作为 `payload` 提交到 CLI,生成报销单流程。
|
|
1069
|
+
|
|
1070
|
+
### 入参
|
|
1071
|
+
|
|
1072
|
+
入参即 Step 4 组装的完整填单 JSON(结构定义见 [form-fill-rules.md](reim-form-fill-rules.md#最终输出结构)),作为请求体(JSON Body)提交。
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
1076
|
+
| ------------------- | ------ | --- | -------------------------------- |
|
|
1077
|
+
| `work_flow_id` | String | 是 | 目标报销流程的工作流ID |
|
|
1078
|
+
| `mainFormId` | String | 是 | 报销单主表formId(来自 `invoice.reim.form.structure`) |
|
|
1079
|
+
| `request_name` | String | 是 | 流程标题 |
|
|
1080
|
+
| `main_fields` | Array | 是 | 主表字段值列表 |
|
|
1081
|
+
| `detail_rows` | Array | 是 | 明细表行数据 |
|
|
1082
|
+
| `need_user_confirm` | Array | 否 | 需用户确认的字段 |
|
|
1083
|
+
| `unable_to_fill` | Array | 否 | 无法自动填写的字段 |
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
### 命令
|
|
1087
|
+
|
|
1088
|
+
将 Step 4 的 JSON 包在 `payload` 里写入文件,先 prepare,用户确认后再 apply。
|
|
1089
|
+
|
|
1090
|
+
Windows PowerShell:
|
|
1091
|
+
|
|
1092
|
+
```powershell
|
|
1093
|
+
weaver-work-cli --json invoice run invoice.reim.flow.create.prepare --input .\reim-create.json
|
|
1094
|
+
```
|
|
1095
|
+
|
|
1096
|
+
macOS/Linux(bash/zsh):
|
|
1097
|
+
|
|
1098
|
+
```bash
|
|
1099
|
+
weaver-work-cli --json invoice run invoice.reim.flow.create.prepare --input ./reim-create.json
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
`payload` 示例:
|
|
1103
|
+
|
|
1104
|
+
```json
|
|
1105
|
+
{
|
|
1106
|
+
"work_flow_id": "1181057526276915214",
|
|
1107
|
+
"mainFormId": "1181057741029226975",
|
|
1108
|
+
"request_name": "交通费报销-后端开发111-2026-08-04(共1笔)",
|
|
1109
|
+
"main_fields": [
|
|
1110
|
+
{"fieldId": "1181057741029227445", "value": "1201729946891231232", "fieldName": "申请人"},
|
|
1111
|
+
{"fieldId": "1181057741029227447", "value": "2026-08-04", "fieldName": "报销日期"},
|
|
1112
|
+
{"fieldId": "1181057741029227454", "optionValue": "7", "fieldName": "报销方式"}
|
|
1113
|
+
],
|
|
1114
|
+
"detail_rows": [
|
|
1115
|
+
{
|
|
1116
|
+
"dataIndex": 1,
|
|
1117
|
+
"subFormId": "1181057741029227992",
|
|
1118
|
+
"invoiceId": "1295366637717012482",
|
|
1119
|
+
"fields": [
|
|
1120
|
+
{"fieldId": "1181057741029227459", "value": "108.2", "fieldName": "实报金额"},
|
|
1121
|
+
{"fieldId": "1181057741029227467", "value": "2026-07-30", "fieldName": "费用日期"}
|
|
1122
|
+
]
|
|
1123
|
+
}
|
|
1124
|
+
],
|
|
1125
|
+
"need_user_confirm": [],
|
|
1126
|
+
"unable_to_fill": []
|
|
1127
|
+
}
|
|
1128
|
+
```
|
|
1129
|
+
|
|
1130
|
+
### 返回示例
|
|
1131
|
+
|
|
1132
|
+
```json
|
|
1133
|
+
{
|
|
1134
|
+
"code": 200,
|
|
1135
|
+
"msg": "接口返回成功",
|
|
1136
|
+
"status": true,
|
|
1137
|
+
"data": {
|
|
1138
|
+
"requestId": "1300266422434136064"
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
```
|
|
1142
|
+
|
|
1143
|
+
### 返回字段说明
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
| 字段 | 说明 |
|
|
1147
|
+
| ---------------- | -------------------- |
|
|
1148
|
+
| `data.requestId` | 创建成功的报销单流程 requestId |
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
### 创建成功后
|
|
1152
|
+
|
|
1153
|
+
`invoice.reim.flow.create.apply` 返回 `requestId`、`requestName` 和 `viewUrl`。用 Markdown 链接展示给用户,锚文本用流程标题,链接用 CLI 返回的 `viewUrl`,不要自己拼接地址。
|
|
1154
|
+
|
|
1155
|
+
```markdown
|
|
1156
|
+
报销单已创建成功!点击查看:[交通费报销-后端开发111-2026-08-04(共1笔)](viewUrl)
|
|
1157
|
+
```
|
|
1158
|
+
|
|
1159
|
+
---
|
|
1160
|
+
|
|
1161
|
+
## 7. 更新报销单流程
|
|
1162
|
+
|
|
1163
|
+
CLI operation:`invoice.reim.flow.update.prepare` → 用户确认 → `invoice.reim.flow.update.apply`
|
|
1164
|
+
|
|
1165
|
+
更新已创建的报销流程表单。支持三种操作的任意组合,互不阻断:
|
|
1166
|
+
|
|
1167
|
+
- **修改主表字段** — 更新主表中的字段值
|
|
1168
|
+
- **修改/新增明细行字段** — 更新或新增明细表中的行数据
|
|
1169
|
+
- **删除指定明细行** — 按明细表ID + 行号删除
|
|
1170
|
+
|
|
1171
|
+
### 入参
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
1175
|
+
| ------------------ | ----------- | --- | --------------------------------------------- |
|
|
1176
|
+
| `requestId` | Long | 是 | 要更新的流程 requestId(`invoice.reim.flow.create.apply` 返回的 requestId) |
|
|
1177
|
+
| `mainFormId` | String | 是 | 报销单主表ID(来自 `invoice.reim.form.structure` 返回的 `mainFormId`) |
|
|
1178
|
+
| `deleteDetailRows` | Array | 否 | 要删除的明细行,见下方格式 |
|
|
1179
|
+
| `main_fields` | ArrayObject | 否 | 需要更新的主表字段列表 |
|
|
1180
|
+
| `detail_rows` | ArrayObject | 否 | 需要更新/新增的明细行数据 |
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
#### deleteDetailRows 格式
|
|
1184
|
+
|
|
1185
|
+
**推荐使用对象数组**(精确指定明细表):
|
|
1186
|
+
|
|
1187
|
+
```json
|
|
1188
|
+
"deleteDetailRows": [
|
|
1189
|
+
{"subFormId": "1169534588649275663", "dataIndex": 1},
|
|
1190
|
+
{"subFormId": "1169534588649275663", "dataIndex": 3}
|
|
1191
|
+
]
|
|
1192
|
+
```
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
| 字段 | 类型 | 说明 |
|
|
1196
|
+
| ----------- | ------- | ------------------------------ |
|
|
1197
|
+
| `subFormId` | String | 明细表ID,指定从哪个明细表删除 |
|
|
1198
|
+
| `dataIndex` | Integer | 行号(1-based),传 `-1` 表示删除该明细表全部行 |
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
也支持**简写整数数组**(删除所有明细表中对应行):`[1, 3]` 或 `[-1]`(删全部)
|
|
1202
|
+
|
|
1203
|
+
#### 字段对象(main_fields / detail_rows.fields 通用)
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
1207
|
+
| ---------------- | ------- | --- | ---------------------------- |
|
|
1208
|
+
| `fieldId` | String | 是 | 字段ID |
|
|
1209
|
+
| `fieldName` | String | 否 | 字段名称(便于理解,不参与逻辑) |
|
|
1210
|
+
| `value` | String | 否 | 字段值(与 optionValue 二选一) |
|
|
1211
|
+
| `optionValue` | String | 否 | 选项型字段的 optionId(与 value 二选一) |
|
|
1212
|
+
| `unable_to_fill` | Boolean | 否 | `true` 表示该字段无法填写,跳过 |
|
|
1213
|
+
| `need_search` | Boolean | 否 | `true` 表示该字段需要搜索确认,跳过 |
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
#### detail_rows 行对象
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
1220
|
+
| ----------- | ----------- | --- | ----------------- |
|
|
1221
|
+
| `subFormId` | String | 是 | 明细表ID,表示该行属于哪个明细表 |
|
|
1222
|
+
| `dataIndex` | Long | 是 | 明细行号(1-based),第几行 |
|
|
1223
|
+
| `fields` | ArrayObject | 是 | 该行中要更新的字段列表 |
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
### 执行顺序
|
|
1227
|
+
|
|
1228
|
+
> **删除操作先于表单更新执行,但删除失败不会阻断表单更新。**
|
|
1229
|
+
|
|
1230
|
+
### 命令
|
|
1231
|
+
|
|
1232
|
+
将以下 JSON 包在 `payload` 里写入文件,先 `invoice.reim.flow.update.prepare`,用户确认后再 `.apply`。
|
|
1233
|
+
|
|
1234
|
+
### payload 示例
|
|
1235
|
+
|
|
1236
|
+
#### 场景1:同时删除明细第2行 + 修改主表 + 更新第1行明细
|
|
1237
|
+
|
|
1238
|
+
```json
|
|
1239
|
+
{
|
|
1240
|
+
"requestId": 1300266422434136064,
|
|
1241
|
+
"mainFormId": "1169534588649275463",
|
|
1242
|
+
"deleteDetailRows": [
|
|
1243
|
+
{"subFormId": "1169534588649275663", "dataIndex": 2}
|
|
1244
|
+
],
|
|
1245
|
+
"main_fields": [
|
|
1246
|
+
{"fieldId": "1169534588649275901", "fieldName": "申请日期", "value": "2026-08-05"}
|
|
1247
|
+
],
|
|
1248
|
+
"detail_rows": [
|
|
1249
|
+
{
|
|
1250
|
+
"subFormId": "1169534588649275663",
|
|
1251
|
+
"dataIndex": 1,
|
|
1252
|
+
"fields": [
|
|
1253
|
+
{"fieldId": "1169534588649275988", "fieldName": "货物或应税劳务、服务名称", "value": "1297537820896575492"},
|
|
1254
|
+
{"fieldId": "1169534588649275989", "fieldName": "金额", "value": "500.00"}
|
|
1255
|
+
]
|
|
1256
|
+
}
|
|
1257
|
+
]
|
|
1258
|
+
}
|
|
1259
|
+
```
|
|
1260
|
+
|
|
1261
|
+
#### 场景2:仅删除某个明细表的第1行和第3行
|
|
1262
|
+
|
|
1263
|
+
```json
|
|
1264
|
+
{
|
|
1265
|
+
"requestId": 1300266422434136064,
|
|
1266
|
+
"mainFormId": "1169534588649275463",
|
|
1267
|
+
"deleteDetailRows": [
|
|
1268
|
+
{"subFormId": "1169534588649275663", "dataIndex": 1},
|
|
1269
|
+
{"subFormId": "1169534588649275663", "dataIndex": 3}
|
|
1270
|
+
]
|
|
1271
|
+
}
|
|
1272
|
+
```
|
|
1273
|
+
|
|
1274
|
+
#### 场景3:删除某个明细表全部行
|
|
1275
|
+
|
|
1276
|
+
```json
|
|
1277
|
+
{
|
|
1278
|
+
"requestId": 1300266422434136064,
|
|
1279
|
+
"mainFormId": "1169534588649275463",
|
|
1280
|
+
"deleteDetailRows": [
|
|
1281
|
+
{"subFormId": "1169534588649275663", "dataIndex": -1}
|
|
1282
|
+
]
|
|
1283
|
+
}
|
|
1284
|
+
```
|
|
1285
|
+
|
|
1286
|
+
#### 场景4:仅修改明细行
|
|
1287
|
+
|
|
1288
|
+
```json
|
|
1289
|
+
{
|
|
1290
|
+
"requestId": 1300266422434136064,
|
|
1291
|
+
"mainFormId": "1169534588649275463",
|
|
1292
|
+
"detail_rows": [
|
|
1293
|
+
{
|
|
1294
|
+
"subFormId": "1169534588649275663",
|
|
1295
|
+
"dataIndex": 1,
|
|
1296
|
+
"fields": [
|
|
1297
|
+
{"fieldId": "1169534588649275988", "fieldName": "货物或应税劳务、服务名称", "value": "1297537820896575492"}
|
|
1298
|
+
]
|
|
1299
|
+
}
|
|
1300
|
+
]
|
|
1301
|
+
}
|
|
1302
|
+
```
|
|
1303
|
+
|
|
1304
|
+
### 返回示例
|
|
1305
|
+
|
|
1306
|
+
```json
|
|
1307
|
+
{
|
|
1308
|
+
"code": 200,
|
|
1309
|
+
"status": true,
|
|
1310
|
+
"msg": "更新成功",
|
|
1311
|
+
"data": {
|
|
1312
|
+
"requestId": "1300266422434136064",
|
|
1313
|
+
"deleteDetailSuccess": true,
|
|
1314
|
+
"updateFormSuccess": true
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
### 返回字段说明
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
| 字段 | 说明 |
|
|
1323
|
+
| -------------------------- | ----------------------------------------- |
|
|
1324
|
+
| `data.requestId` | 流程 requestId |
|
|
1325
|
+
| `data.deleteDetailSuccess` | 明细行删除结果(仅当传了 deleteDetailRows 时返回) |
|
|
1326
|
+
| `data.deleteDetailMsg` | 删除失败原因(仅失败时返回) |
|
|
1327
|
+
| `data.updateFormSuccess` | 表单更新结果(仅当有 main_fields 或 detail_rows 时返回) |
|
|
1328
|
+
| `data.updateFormMsg` | 更新失败原因(仅失败时返回) |
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
### 注意事项
|
|
1332
|
+
|
|
1333
|
+
- `mainFormId` 来自 `invoice.reim.form.structure` 返回的 `mainFormId`,每次调用 `invoice.reim.flow.update.prepare/apply` 必传
|
|
1334
|
+
- `dataIndex` 是 **1-based**(从1开始),对应明细表中的第1行、第2行...
|
|
1335
|
+
- `subFormId` 是明细表ID,一个流程表单可能有多个明细表,需准确指定
|
|
1336
|
+
- 删除操作先于表单更新执行,删除失败不阻断表单更新
|
|
1337
|
+
- `fieldName` 仅用于可读性,不参与业务逻辑
|
|
1338
|
+
- 如果只删除不修改,只传 `requestId` + `deleteDetailRows` 即可
|
|
1339
|
+
- `value` 为空、`unable_to_fill=true`、`need_search=true` 的字段会被自动跳过
|
|
1340
|
+
|