weaver-work-cli 0.1.61 → 0.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{archive-S2VKZWQ3.js → archive-BLDYBZDX.js} +5 -4
- package/dist/chunks/{archive-oa-HEDSIUUY.js → archive-oa-3GJ3TWXR.js} +5 -4
- package/dist/chunks/{asset-HYH4W357.js → asset-AFXJN4CK.js} +5 -4
- package/dist/chunks/{asset-idle-N7REBNGL.js → asset-idle-VUJXWGWJ.js} +5 -4
- package/dist/chunks/{attachment-content-VYYA75FR.js → attachment-content-VMJA7NSQ.js} +3 -3
- package/dist/chunks/{blog-SLMZZICV.js → blog-EREB35VU.js} +5 -4
- package/dist/chunks/{caizhilian-RV43KKBT.js → caizhilian-ATM2JO5S.js} +5 -5
- package/dist/chunks/{calendar-DMVZ4OLY.js → calendar-E26ZIH7S.js} +5 -4
- package/dist/chunks/{chunk-6XSSAUNW.js → chunk-4OB22YKE.js} +48 -12
- package/dist/chunks/{chunk-UBGWIXU3.js → chunk-5CY37VLS.js} +131 -38
- package/dist/chunks/{chunk-EGANE35F.js → chunk-6G2JARDK.js} +1 -1
- package/dist/chunks/{chunk-WIWDVETN.js → chunk-6VCQLZXE.js} +75 -76
- package/dist/chunks/{chunk-E5YD5JWR.js → chunk-BY3WDJO5.js} +1 -1
- package/dist/chunks/{chunk-IW7A2IQY.js → chunk-C4YQJFZV.js} +43 -15
- package/dist/chunks/{chunk-BQYX2UX5.js → chunk-C5PIGPGX.js} +5 -3
- package/dist/chunks/{chunk-UBRWONP4.js → chunk-EOZHSNND.js} +2 -2
- package/dist/chunks/{chunk-UQFPF4EX.js → chunk-G3ZM57PD.js} +2 -2
- package/dist/chunks/{chunk-XT77MP54.js → chunk-GOBNIGWS.js} +410 -24
- package/dist/chunks/{chunk-KY3R42RS.js → chunk-GQK6WLOS.js} +5 -3
- package/dist/chunks/{chunk-BIA2NKUG.js → chunk-HEJPVXD3.js} +5 -5
- package/dist/chunks/{chunk-ILALC2N6.js → chunk-I4C2KR2G.js} +1 -1
- package/dist/chunks/{chunk-YI2YMW5N.js → chunk-IGICM3WJ.js} +2 -2
- package/dist/chunks/chunk-IN6NXQ26.js +680 -0
- package/dist/chunks/{chunk-VBFBMM7G.js → chunk-LOVAIGM2.js} +387 -70
- package/dist/chunks/{chunk-H6YOMI3U.js → chunk-OMAGCLUE.js} +5 -3
- package/dist/chunks/{chunk-VNYOUAWV.js → chunk-QAMIIFP6.js} +11 -11
- package/dist/chunks/{chunk-QBDXJS2W.js → chunk-QZYKZ7MQ.js} +16 -8
- package/dist/chunks/{chunk-V2LASYKO.js → chunk-RR45ELVE.js} +30 -24
- package/dist/chunks/{chunk-NRYDJN4J.js → chunk-RV2JAA5I.js} +89 -8
- package/dist/chunks/{chunk-TEZHIB6T.js → chunk-SDPC7BG2.js} +5 -3
- package/dist/chunks/{chunk-T2KVJFWJ.js → chunk-SHBDXEUE.js} +4 -7
- package/dist/chunks/{chunk-P6TXQK75.js → chunk-THMBDCRA.js} +5 -3
- package/dist/chunks/chunk-TJN4PIYO.js +47 -0
- package/dist/chunks/{chunk-DTCQFTHW.js → chunk-TNFIUZ4H.js} +3 -3
- package/dist/chunks/{chunk-JFAWZX53.js → chunk-UPVAQJKS.js} +282 -131
- package/dist/chunks/{chunk-KXJA42EA.js → chunk-WPBZQVLS.js} +1 -1
- package/dist/chunks/{conflict-GFJRS6I7.js → conflict-AMNTM3FV.js} +2 -2
- package/dist/chunks/{contract-U3ZGNRWB.js → contract-PLO2V2NO.js} +2333 -4426
- package/dist/chunks/{cowork-EX7PKIDK.js → cowork-FZAXE6FO.js} +5 -4
- package/dist/chunks/{create-flow-EJZD434E.js → create-flow-2DAUN7HU.js} +16 -6
- package/dist/chunks/{data-FOODGAMF.js → data-7NXMWET4.js} +3 -3
- package/dist/chunks/{ebuilder-form-I2EOKODG.js → ebuilder-form-DEYHX6M7.js} +4 -4
- package/dist/chunks/{ehr-TE4RFNID.js → ehr-QQH2DYYA.js} +244 -151
- package/dist/chunks/{employee-DR5Y64TI.js → employee-PGMY6NI6.js} +1 -1
- package/dist/chunks/{entry-mode-ZOLSXEGX.js → entry-mode-2JTVEKMP.js} +3 -3
- package/dist/chunks/{env-TID5NFR6.js → env-2JZMXC6I.js} +2 -2
- package/dist/chunks/{esb-7L6MHYLB.js → esb-I5ZFHJUK.js} +8 -8
- package/dist/chunks/{factory-OG7BPMH5.js → factory-XIATYHU6.js} +1 -1
- package/dist/chunks/{fna-6V2ENR3Y.js → fna-3V2TL6B2.js} +5 -4
- package/dist/chunks/{group-chat-5DKPWIHL.js → group-chat-CVYUZCOQ.js} +3 -3
- package/dist/chunks/{host-TJ5VVHM7.js → host-4DP7C7YQ.js} +4 -4
- package/dist/chunks/{host-3DLYA54R.js → host-4KQCAEWA.js} +4 -4
- package/dist/chunks/{host-ONZC6AE7.js → host-4X2F3JPQ.js} +4 -4
- package/dist/chunks/{host-OGBHL75G.js → host-BD7NAM33.js} +4 -4
- package/dist/chunks/{host-VTPAWDZV.js → host-CBONEAZS.js} +4 -4
- package/dist/chunks/{host-GOJHHTPY.js → host-L37QVNIV.js} +4 -4
- package/dist/chunks/{hrm-2N7NFQDZ.js → hrm-OL3IKN7C.js} +6 -6
- package/dist/chunks/{im-XCH47ZBN.js → im-YXQWUF3R.js} +4 -4
- package/dist/chunks/{invoice-XQRKMGNY.js → invoice-4WY32PR2.js} +199 -332
- package/dist/chunks/{jiuchuanhui-PL6DRPBM.js → jiuchuanhui-L6SHLONH.js} +5 -4
- package/dist/chunks/{lazy-dispatch-UATEN7H7.js → lazy-dispatch-OYE6QV24.js} +5 -5
- package/dist/chunks/{mail-Q7Z4CQ4D.js → mail-PZV2KNRU.js} +5 -4
- package/dist/chunks/{meeting-5E3BNARL.js → meeting-6SOBCC6N.js} +16 -15
- package/dist/chunks/{minute-doc-NXRE5C77.js → minute-doc-KSJSJNOH.js} +4 -4
- package/dist/chunks/{okr-3O3XNYOK.js → okr-B76FW5M2.js} +5 -4
- package/dist/chunks/{operations-EZWG72FH.js → operations-YOMEGFLV.js} +5 -5
- package/dist/chunks/{performance-Y7CPNSOR.js → performance-4VBKUPFO.js} +5 -4
- package/dist/chunks/{plan-BLGPZF5M.js → plan-HBNZRQTI.js} +5 -4
- package/dist/chunks/{project-6MZMLJMP.js → project-IV6FWK74.js} +5 -4
- package/dist/chunks/{reception-F2VT2X52.js → reception-BR5YURT6.js} +3 -3
- package/dist/chunks/{recruit-stage-4ETIBMIW.js → recruit-stage-4HQ6OGXT.js} +654 -336
- package/dist/chunks/{registry-I4DVPDMU.js → registry-7LICMV5J.js} +12 -12
- package/dist/chunks/{registry-3FYSWV3U.js → registry-JFQEFC7E.js} +3 -3
- package/dist/chunks/{registry-3UGIWH53.js → registry-JMNOXRST.js} +2 -2
- package/dist/chunks/{registry-7RS74TCK.js → registry-MZJQX65Q.js} +5 -5
- package/dist/chunks/{room-recommend-GWCVKCXW.js → room-recommend-43GLLE7Y.js} +4 -4
- package/dist/chunks/{schedule-6AN63MJQ.js → schedule-ZQ42BEW6.js} +4 -4
- package/dist/chunks/{smart-extract-SR4SJJKN.js → smart-extract-QKAEAZGM.js} +3 -3
- package/dist/chunks/{workflow-KF7FA2UQ.js → workflow-6HV7H5PC.js} +10 -7
- package/dist/index.js +34 -34
- package/dist/internal/e10/auth/commands.js +21 -1
- package/dist/internal/e10/auth/xiaoe.js +6 -2
- package/dist/internal/e10/auth-recovery.js +28 -2
- package/dist/internal/e10/request-runtime.js +15 -3
- package/dist/internal/e10/request-trace.js +65 -0
- package/dist/shortcuts/contract/data/metric-catalog.js +149 -0
- package/dist/shortcuts/contract/index.js +14 -39
- package/dist/shortcuts/contract/manifest.js +115 -270
- package/dist/shortcuts/contract/operations/compare-report.js +437 -0
- package/dist/shortcuts/contract/operations/compare.js +2 -0
- package/dist/shortcuts/contract/operations/first-screen.js +96 -207
- package/dist/shortcuts/contract/operations/flow.js +19 -1
- package/dist/shortcuts/contract/operations/{card-ebdf-list.js → ledger-card.js} +98 -25
- package/dist/shortcuts/contract/operations/ledger.js +315 -1
- package/dist/shortcuts/contract/operations/metrics.js +93 -0
- package/dist/shortcuts/contract/operations/modeltext.js +3 -3
- package/dist/shortcuts/contract/operations/page.js +8 -4
- package/dist/shortcuts/contract/operations/performance.js +53 -0
- package/dist/shortcuts/contract/operations/quote-recognize.js +289 -0
- package/dist/shortcuts/contract/operations/quote-submit.js +264 -0
- package/dist/shortcuts/contract/operations/recommend.js +42 -1
- package/dist/shortcuts/contract/operations/registry.js +16 -23
- package/dist/shortcuts/contract/operations/{card-risk-report.js → review-report.js} +24 -114
- package/dist/shortcuts/contract/operations/review.js +33 -167
- package/dist/shortcuts/contract/operations/save-recognize.js +173 -43
- package/dist/shortcuts/contract/operations/triage.js +13 -6
- package/dist/shortcuts/contract/operations/{template.js → type-clause-read.js} +10 -25
- package/dist/shortcuts/contract/operations/upload.js +17 -11
- package/dist/shortcuts/contract/prewarm-cache.js +6 -2
- package/dist/shortcuts/contract/prewarm.js +33 -23
- package/dist/shortcuts/contract/recommend-cache.js +191 -0
- package/dist/shortcuts/ehr/operations/recruit-interview-overview.js +85 -62
- package/dist/shortcuts/ehr/operations/recruit-position.js +21 -13
- package/dist/shortcuts/ehr/operations/recruit-short-cache.js +59 -0
- package/dist/shortcuts/ehr/operations/recruit-tag.js +17 -11
- package/dist/shortcuts/ehr/operations/recruit-write.js +118 -70
- package/dist/shortcuts/ehr/operations/recruit.js +338 -121
- package/dist/shortcuts/hrm/operations/employee.js +64 -17
- package/dist/shortcuts/hrm/operations/resolve.js +419 -369
- package/dist/shortcuts/im/host.js +38 -22
- package/dist/shortcuts/invoice/manifest.js +30 -62
- package/dist/shortcuts/invoice/operations/registry.js +2 -2
- package/dist/shortcuts/invoice/operations/reim-customer.js +111 -0
- package/dist/shortcuts/invoice/operations/shared.js +0 -204
- package/dist/shortcuts/meeting/operations/eb/conflict.js +60 -2
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +116 -7
- package/dist/shortcuts/meeting/operations/eb/create-form-link.js +380 -0
- package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +1 -3
- package/dist/shortcuts/recruit-stage/batch-store.js +44 -0
- package/dist/shortcuts/recruit-stage/context.js +75 -9
- package/dist/shortcuts/recruit-stage/manifest.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -22
- package/dist/shortcuts/recruit-stage/operations/list.js +187 -37
- package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +231 -313
- package/dist/shortcuts/recruit-stage/operations/search.js +5 -5
- package/dist/shortcuts/recruit-stage/operations/tag.js +286 -0
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +12 -15
- package/dist/shortcuts/workflow/operations/read.js +8 -8
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +3 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +7 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +4 -3
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +1 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +33 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +153 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +232 -0
- package/dist/shortcuts/workflow/operations.js +5 -0
- package/docs/agent-invoice.md +1 -1
- package/docs/contract.md +2 -2
- package/docs/e10-auth.md +28 -0
- package/docs/ehr.md +1 -1
- package/docs/invoice.md +0 -2
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +0 -1
- package/skills/weaver-e10-hrm/SKILL.md +3 -3
- package/skills/weaver-e10-hrm/references/employee.md +13 -2
- package/skills/weaver-e10-jinchengda/SKILL.md +237 -347
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -14
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +109 -185
- package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +12 -4
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +28 -20
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +12 -17
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +7 -13
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +10 -18
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +18 -17
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +114 -61
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +8 -2
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +73 -104
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +32 -37
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +12 -10
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +70 -82
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +37 -33
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +94 -27
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +9 -15
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +9 -4
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +59 -32
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +7 -5
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +21 -13
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +13 -13
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +6 -5
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +250 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +11 -20
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +203 -54
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +4 -11
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +11 -17
- package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +11 -17
- package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +5 -11
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +56 -7
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +10 -16
- package/skills/weaver-e10-jinchengda/references/orchestration.md +31 -33
- package/skills/weaver-e10-jucailin/SKILL.md +6 -7
- package/skills/weaver-e10-jucailin/agents/openai.yaml +52 -0
- package/skills/weaver-e10-jucailin/references/recruit-interview-overview.md +8 -6
- package/skills/weaver-e10-jucailin/references/recruit-read.md +4 -0
- package/skills/weaver-e10-jucailin/references/recruit-screening-to-interview-sop.md +2 -2
- package/skills/weaver-e10-jucailin/references/recruit-write.md +4 -4
- package/skills/weaver-e10-meeting/SKILL.md +83 -531
- package/skills/weaver-e10-meeting/references/commands-table.md +61 -0
- package/skills/weaver-e10-meeting/references/create-commands.md +136 -0
- package/skills/weaver-e10-meeting/references/create-flow.md +3 -1
- package/skills/weaver-e10-meeting/references/create-guardrails.md +14 -8
- package/skills/weaver-e10-meeting/references/custom-fields.md +40 -0
- package/skills/weaver-e10-meeting/references/eb-contracts.md +60 -0
- package/skills/weaver-e10-meeting/references/invitation.md +69 -0
- package/skills/weaver-e10-meeting/references/minutes-pipeline.md +119 -0
- package/skills/weaver-e10-meeting/references/pitfalls.md +1 -1
- package/skills/weaver-e10-meeting/references/room-recommend.md +88 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +317 -266
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +22 -27
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +30 -27
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +2 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +12 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +2 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +23 -19
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +18 -16
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +25 -23
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +10 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +11 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +150 -85
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +14 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +173 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-taxonomy.json +76 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
- package/skills/weaver-e10-workflow/SKILL.md +49 -32
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +67 -34
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +65 -51
- package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +18 -11
- package/skills/weaver-e10-workflow/references/workflow-create.md +2 -2
- package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -37
- package/skills/weaver-e10-workflow/references/workflow-query.md +25 -22
- package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +318 -110
- package/skills/weaver-e10-yepiaotong/SKILL.md +16 -9
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +9 -7
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +15 -11
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +29 -25
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +89 -0
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +35 -37
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +66 -63
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +50 -71
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +34 -95
- package/skills/weaver-e10-yimiaoban/SKILL.md +10 -10
- package/skills/weaver-e10-yimiaoban/references/person.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +9 -9
- package/dist/chunks/chunk-6QYNE6HE.js +0 -658
- package/dist/chunks/chunk-SHYQUBY3.js +0 -48
- package/dist/shortcuts/contract/operations/card-action.js +0 -1266
- package/dist/shortcuts/contract/operations/card-plan.js +0 -393
- package/dist/shortcuts/contract/operations/card.js +0 -232
- package/dist/shortcuts/contract/operations/compare-screen.js +0 -378
- package/dist/shortcuts/contract/operations/quote-to-contract.js +0 -495
- package/dist/shortcuts/contract/operations/quotescreen.js +0 -529
- package/dist/shortcuts/contract/operations/summary-validate.js +0 -293
- package/dist/shortcuts/contract/operations/summary.js +0 -187
- package/dist/shortcuts/ehr/recruit-stage/batch-store.js +0 -78
- package/dist/shortcuts/ehr/recruit-stage/context.js +0 -231
- package/dist/shortcuts/ehr/recruit-stage/continuation.js +0 -74
- package/dist/shortcuts/ehr/recruit-stage/errors.js +0 -65
- package/dist/shortcuts/ehr/recruit-stage/fs-scan.js +0 -165
- package/dist/shortcuts/ehr/recruit-stage/host.js +0 -109
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +0 -1065
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-feedback.js +0 -295
- package/dist/shortcuts/ehr/recruit-stage/operations/jd-create.js +0 -961
- package/dist/shortcuts/ehr/recruit-stage/operations/list.js +0 -431
- package/dist/shortcuts/ehr/recruit-stage/operations/registry.js +0 -50
- package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +0 -1655
- package/dist/shortcuts/ehr/recruit-stage/operations/search.js +0 -158
- package/dist/shortcuts/ehr/recruit-stage/operations/types.js +0 -34
- package/dist/shortcuts/ehr/recruit-stage/runtime.js +0 -31
- package/dist/shortcuts/ehr/recruit-stage/school-tiers.json +0 -318
- package/dist/shortcuts/ehr/recruit-stage/shared.js +0 -887
- package/dist/shortcuts/invoice/operations/browse-field.js +0 -17
- package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +0 -22
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +0 -554
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +0 -279
- package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +0 -483
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -46
- package/skills/weaver-e10-recruit-stage/lib/recruit-resume-photo.py +0 -194
- package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +0 -204
|
@@ -301,7 +301,12 @@ export function createImHost(ctx, dependencies = {}) {
|
|
|
301
301
|
}
|
|
302
302
|
return upData.fileObj;
|
|
303
303
|
}
|
|
304
|
-
/**
|
|
304
|
+
/**
|
|
305
|
+
* hrm 人员浏览 destData:uid 列表批量解析(selectIds 逗号拼接,一次最多 100,自动分批)。
|
|
306
|
+
* 禁用旧接口 /api/hrm/common/getEmployeeByKeyWords 与 /api/hrm/common/getEmployeeByIds,
|
|
307
|
+
* 统一改走 /api/hrm/common/browser/destData/resource(入参只需 browserMultiple + selectIds,
|
|
308
|
+
* 其余 browserMultiple 之外字段如 selectedData/types/wx*ConvertCount/authWecahtBook 均不需要)。
|
|
309
|
+
*/
|
|
305
310
|
async function resolveUsersByIds(ids) {
|
|
306
311
|
const unique = [...new Set(ids.map((x) => String(x)).filter(Boolean))];
|
|
307
312
|
const miss = unique.filter((id) => !personCache.has(id));
|
|
@@ -315,30 +320,41 @@ export function createImHost(ctx, dependencies = {}) {
|
|
|
315
320
|
const batch = miss.slice(i, i + 100);
|
|
316
321
|
const res = await request({
|
|
317
322
|
method: 'POST',
|
|
318
|
-
path: '/api/hrm/common/
|
|
319
|
-
body: {
|
|
320
|
-
headers: { devtype: '5' },
|
|
323
|
+
path: '/api/hrm/common/browser/destData/resource',
|
|
324
|
+
body: { browserMultiple: true, selectIds: batch.join(',') },
|
|
321
325
|
operation: 'im.person.resolveByIds',
|
|
322
326
|
timeoutMs: 15_000,
|
|
323
327
|
});
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
328
|
+
const d = res?.data ?? {};
|
|
329
|
+
const list = Array.isArray(d)
|
|
330
|
+
? d
|
|
331
|
+
: Array.isArray(d.datas)
|
|
332
|
+
? d.datas
|
|
333
|
+
: Array.isArray(d.data)
|
|
334
|
+
? d.data
|
|
335
|
+
: Array.isArray(d.userList)
|
|
336
|
+
? d.userList
|
|
337
|
+
: Array.isArray(d.rows)
|
|
338
|
+
? d.rows
|
|
339
|
+
: null;
|
|
340
|
+
if (!list) {
|
|
341
|
+
throw imValidationError('person_resolve_unexpected_shape', `人员批量解析响应结构异常(keys=${Object.keys(d).join(',')})`);
|
|
342
|
+
}
|
|
343
|
+
for (const u of list) {
|
|
344
|
+
const brief = {
|
|
345
|
+
uid: String(u.id ?? u.mainId ?? ''),
|
|
346
|
+
name: String(u.name ?? ''),
|
|
347
|
+
cid: String(u.imCid ?? u.cid ?? ''),
|
|
348
|
+
jobNum: String(u.jobNum ?? u.number ?? u.job_num ?? ''),
|
|
349
|
+
department: String(u.department ?? ''),
|
|
350
|
+
departmentId: String(u.departmentId ?? u.department_id ?? ''),
|
|
351
|
+
subCompany: String(u.subCompany ?? u.subcompany ?? ''),
|
|
352
|
+
position: String(u.position ?? ''),
|
|
353
|
+
mobile: String(u.mobile ?? ''),
|
|
354
|
+
};
|
|
355
|
+
if (brief.uid) {
|
|
356
|
+
personCache.set(brief.uid, brief);
|
|
357
|
+
result[brief.uid] = brief;
|
|
342
358
|
}
|
|
343
359
|
}
|
|
344
360
|
}
|
|
@@ -199,46 +199,6 @@ const uploadSchema = objectSchema({
|
|
|
199
199
|
ocrMap: { type: 'string' },
|
|
200
200
|
fail: { const: false },
|
|
201
201
|
}, ['id', 'ids', 'fileType', 'totalPages', 'hasFanWei', 'fail']);
|
|
202
|
-
const browseFieldItemSchema = objectSchema({
|
|
203
|
-
optionId: { type: 'string' },
|
|
204
|
-
id: { type: 'string' },
|
|
205
|
-
fid: { type: 'string' },
|
|
206
|
-
type: { type: 'integer' },
|
|
207
|
-
typeName: { type: 'string' },
|
|
208
|
-
number: { type: 'string' },
|
|
209
|
-
code: { type: 'string' },
|
|
210
|
-
content: { type: 'string' },
|
|
211
|
-
name: { type: 'string' },
|
|
212
|
-
total: { type: 'string' },
|
|
213
|
-
ttax: { type: 'string' },
|
|
214
|
-
seller: { type: 'string' },
|
|
215
|
-
sellerId: { type: 'string' },
|
|
216
|
-
buyer: { type: 'string' },
|
|
217
|
-
buyerId: { type: 'string' },
|
|
218
|
-
incDate: { type: 'string' },
|
|
219
|
-
incDateTimestamp: { type: 'integer' },
|
|
220
|
-
validStatus: { type: 'string' },
|
|
221
|
-
source: { type: 'string' },
|
|
222
|
-
invoiceStatus: { type: 'integer' },
|
|
223
|
-
del: { type: 'integer' },
|
|
224
|
-
currency: { type: 'string' },
|
|
225
|
-
currencyName: { type: 'string' },
|
|
226
|
-
taxRate: { type: 'string' },
|
|
227
|
-
consumeContent: { type: 'string' },
|
|
228
|
-
fylx: { type: 'string' },
|
|
229
|
-
inputDate: { type: 'string' },
|
|
230
|
-
incTotal: { type: 'number' },
|
|
231
|
-
reimingMoney: { type: 'string' },
|
|
232
|
-
reimedMoney: { type: 'string' },
|
|
233
|
-
notReimMoney: { type: 'string' },
|
|
234
|
-
reimDate: { type: 'string' },
|
|
235
|
-
reimProcess: { type: 'string' },
|
|
236
|
-
}, ['optionId', 'id', 'fid', 'type', 'typeName', 'number', 'content', 'name', 'total']);
|
|
237
|
-
const browseFieldErrorSchema = objectSchema({
|
|
238
|
-
fid: { type: 'string' },
|
|
239
|
-
ret: { type: 'integer' },
|
|
240
|
-
message: { type: 'string' },
|
|
241
|
-
}, ['ret', 'message']);
|
|
242
202
|
const continuationSchema = { type: 'string', minLength: 1 };
|
|
243
203
|
const continuationPreviewOutput = (previewSchema, extra = {}) => objectSchema({
|
|
244
204
|
preview: previewSchema,
|
|
@@ -850,26 +810,6 @@ export const invoiceOperations = [
|
|
|
850
810
|
},
|
|
851
811
|
outputSchema: deleteApplyOutputSchema,
|
|
852
812
|
},
|
|
853
|
-
{
|
|
854
|
-
name: 'invoice.browse-field.data',
|
|
855
|
-
risk: 'read',
|
|
856
|
-
fixed: { source: 'POST /api/inc/get', mask: 0, userFlag: '1', isDelFlag: '1' },
|
|
857
|
-
inputSchema: {
|
|
858
|
-
type: 'object',
|
|
859
|
-
additionalProperties: false,
|
|
860
|
-
properties: {
|
|
861
|
-
fid: positiveId,
|
|
862
|
-
fids: positiveIdArray,
|
|
863
|
-
detail: { type: 'object' },
|
|
864
|
-
},
|
|
865
|
-
oneOf: [{ required: ['fid'] }, { required: ['fids'] }, { required: ['detail'] }],
|
|
866
|
-
},
|
|
867
|
-
outputSchema: objectSchema({
|
|
868
|
-
items: arrayOf(browseFieldItemSchema),
|
|
869
|
-
errors: arrayOf(browseFieldErrorSchema),
|
|
870
|
-
workflow: workflowSchema,
|
|
871
|
-
}, ['items', 'errors', 'workflow']),
|
|
872
|
-
},
|
|
873
813
|
{
|
|
874
814
|
name: 'invoice.reim.file-ocr.preview',
|
|
875
815
|
risk: 'read-with-upload',
|
|
@@ -980,6 +920,34 @@ export const invoiceOperations = [
|
|
|
980
920
|
workflow: workflowSchema,
|
|
981
921
|
}, ['result', 'data', 'keywords', 'match', 'items', 'workflow']),
|
|
982
922
|
},
|
|
923
|
+
{
|
|
924
|
+
name: 'invoice.reim.customer.search',
|
|
925
|
+
risk: 'read',
|
|
926
|
+
fixed: {
|
|
927
|
+
path: '/api/ebuilder/coms/nlist/getData',
|
|
928
|
+
method: 'POST',
|
|
929
|
+
headers: { ebbusinessid: '1218181956452048911', langtype: 'zh_CN', pragma: 'no-cache', priority: 'u=1, i', timezoneoffset: '-480', Accept: '*/*' },
|
|
930
|
+
compId: 'c39b9e14c0034336adf9e9bc39aeed75',
|
|
931
|
+
pageId: '1218181956452048911',
|
|
932
|
+
pageNo: '1',
|
|
933
|
+
tableuid: 'd26c94cc9c234d7da9bc2d399339a439',
|
|
934
|
+
filter: '客户表「名称」字段 field_1173221220888062665 模糊匹配 keywords;其他筛选参数固定',
|
|
935
|
+
},
|
|
936
|
+
inputSchema: objectSchema({
|
|
937
|
+
keywords: { type: 'string', minLength: 1, description: '用户输入的客户名称,支持模糊名称;不需要报销表单或字段 ID' },
|
|
938
|
+
}, ['keywords']),
|
|
939
|
+
outputSchema: objectSchema({
|
|
940
|
+
list: arrayOf(objectSchema({
|
|
941
|
+
id: { type: 'string', description: '相关客户 ID' },
|
|
942
|
+
'1173221220888062665': { type: 'string', description: '相关客户名称' },
|
|
943
|
+
'1173221220888062667': arrayOf(objectSchema({
|
|
944
|
+
name: { type: 'string', description: '承担主体名称' },
|
|
945
|
+
id: { type: 'string', description: '承担主体 ID' },
|
|
946
|
+
type: { type: 'string' },
|
|
947
|
+
}, ['name', 'id', 'type'])),
|
|
948
|
+
}, ['id', '1173221220888062665', '1173221220888062667'])),
|
|
949
|
+
}, ['list']),
|
|
950
|
+
},
|
|
983
951
|
{
|
|
984
952
|
name: 'invoice.reim.relation.search',
|
|
985
953
|
risk: 'read',
|
|
@@ -1205,12 +1173,12 @@ export const invoiceRetiredOperations = [
|
|
|
1205
1173
|
},
|
|
1206
1174
|
{
|
|
1207
1175
|
name: 'invoice.reim.row-info',
|
|
1208
|
-
replacement: '
|
|
1176
|
+
replacement: '明细行不再预填:每行只写「相关发票」(直接使用已选发票的 id/name 引用对象),其余列由联动带出',
|
|
1209
1177
|
reference: REIM_REFERENCE,
|
|
1210
1178
|
},
|
|
1211
1179
|
{
|
|
1212
1180
|
name: 'invoice.reim.row-info-batch',
|
|
1213
|
-
replacement: '
|
|
1181
|
+
replacement: '明细行不再预填:每行只写「相关发票」(直接使用已选发票的 id/name 引用对象),其余列由联动带出',
|
|
1214
1182
|
reference: REIM_REFERENCE,
|
|
1215
1183
|
},
|
|
1216
1184
|
{
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { invoiceValidationError } from '../errors.js';
|
|
2
2
|
import { invoiceOperations, invoiceRetiredOperations } from '../manifest.js';
|
|
3
3
|
import { InvoiceAddApplyOperation, InvoiceAddPrepareOperation } from './add.js';
|
|
4
|
-
import { InvoiceBrowseFieldDataOperation } from './browse-field.js';
|
|
5
4
|
import { InvoiceDeleteApplyOperation, InvoiceDeletePrepareOperation } from './delete.js';
|
|
6
5
|
import { InvoiceDownloadOperation } from './download.js';
|
|
7
6
|
import { InvoiceGetOperation } from './get.js';
|
|
@@ -12,6 +11,7 @@ import { InvoiceListOperation } from './list.js';
|
|
|
12
11
|
import { InvoiceOcrPreviewOperation } from './ocr-preview.js';
|
|
13
12
|
import { InvoiceReimEmployeeSuperiorsOperation, InvoiceReimFieldSearchOperation, InvoiceReimFileOcrPreviewOperation, InvoiceReimRequestsListOperation, InvoiceReimWorkflowResolveOperation, } from './reim.js';
|
|
14
13
|
import { InvoiceReimCandidatesListOperation } from './reim-auto.js';
|
|
14
|
+
import { InvoiceReimCustomerSearchOperation } from './reim-customer.js';
|
|
15
15
|
import { InvoiceReimRelationListOperation, InvoiceReimRelationSaveOperation, InvoiceReimRelationSearchOperation, } from './reim-relation.js';
|
|
16
16
|
import { InvoiceReimSubsidySubmitOperation } from './reim-subsidy.js';
|
|
17
17
|
import { InvoiceUpdateApplyOperation, InvoiceUpdatePrepareOperation } from './update.js';
|
|
@@ -35,13 +35,13 @@ function buildRegistry() {
|
|
|
35
35
|
new InvoiceDownloadOperation(),
|
|
36
36
|
new InvoiceDeletePrepareOperation(),
|
|
37
37
|
new InvoiceDeleteApplyOperation(),
|
|
38
|
-
new InvoiceBrowseFieldDataOperation(),
|
|
39
38
|
new InvoiceReimFileOcrPreviewOperation(),
|
|
40
39
|
new InvoiceReimRequestsListOperation(),
|
|
41
40
|
new InvoiceReimWorkflowResolveOperation(),
|
|
42
41
|
new InvoiceReimCandidatesListOperation(),
|
|
43
42
|
new InvoiceReimEmployeeSuperiorsOperation(),
|
|
44
43
|
new InvoiceReimFieldSearchOperation(),
|
|
44
|
+
new InvoiceReimCustomerSearchOperation(),
|
|
45
45
|
new InvoiceReimRelationSearchOperation(),
|
|
46
46
|
new InvoiceReimRelationSaveOperation(),
|
|
47
47
|
new InvoiceReimRelationListOperation(),
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { InvoiceCliError, invoiceValidationError } from '../errors.js';
|
|
2
|
+
import { asNonEmptyString, assertBusinessSuccess } from './shared.js';
|
|
3
|
+
const CUSTOMER_PAGE_ID = '1218181956452048911';
|
|
4
|
+
const CUSTOMER_COMP_ID = 'c39b9e14c0034336adf9e9bc39aeed75';
|
|
5
|
+
const CUSTOMER_OBJECT_ID = '1173221220888059964';
|
|
6
|
+
const CUSTOMER_NAME_FIELD = '1173221220888062665';
|
|
7
|
+
const CUSTOMER_BEARER_FIELD = '1173221220888062667';
|
|
8
|
+
function customerFilter(keywords) {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
conditionType: 'or',
|
|
12
|
+
dataType: 'field',
|
|
13
|
+
id: 'f9bf956948e54ed58ac32988ff8a84c8',
|
|
14
|
+
conditionComId: `${CUSTOMER_COMP_ID}_quick_EXCLUDECACHE`,
|
|
15
|
+
filterFields: [{
|
|
16
|
+
compId: CUSTOMER_COMP_ID,
|
|
17
|
+
compType: 'Text',
|
|
18
|
+
dataset: {
|
|
19
|
+
isPhysical: true,
|
|
20
|
+
ebuilderDataConfig: { dataSetup: {}, type: 'FORM' },
|
|
21
|
+
detailTable: false,
|
|
22
|
+
groupId: 'weaver-ebuilder-form-service',
|
|
23
|
+
usage: 'all',
|
|
24
|
+
appId: '980180677416657173',
|
|
25
|
+
id: CUSTOMER_OBJECT_ID,
|
|
26
|
+
text: '客户',
|
|
27
|
+
type: 'LOGIC',
|
|
28
|
+
objType: 'physical',
|
|
29
|
+
},
|
|
30
|
+
fieldName: `field_${CUSTOMER_NAME_FIELD}`,
|
|
31
|
+
id: CUSTOMER_NAME_FIELD,
|
|
32
|
+
objId: CUSTOMER_OBJECT_ID,
|
|
33
|
+
type: 'String',
|
|
34
|
+
text: '名称',
|
|
35
|
+
}],
|
|
36
|
+
value: keywords,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
conditionComId: `${CUSTOMER_COMP_ID}_filter_EXCLUDECACHE`,
|
|
40
|
+
conditionType: 'and',
|
|
41
|
+
dataType: 'classification',
|
|
42
|
+
useConfig: true,
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
function invalidResponse() {
|
|
47
|
+
throw new InvoiceCliError('api', 'reim_customer_search_invalid', '客户查询返回的数据格式不正确,无法确认相关客户和承担主体', { exitCode: 1 });
|
|
48
|
+
}
|
|
49
|
+
function record(value) {
|
|
50
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
51
|
+
return invalidResponse();
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
function responseString(value) {
|
|
55
|
+
if (typeof value !== 'string' || !value.trim())
|
|
56
|
+
return invalidResponse();
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
function projectCustomer(value) {
|
|
60
|
+
const row = record(value);
|
|
61
|
+
const bearers = row[CUSTOMER_BEARER_FIELD] ?? [];
|
|
62
|
+
if (!Array.isArray(bearers))
|
|
63
|
+
return invalidResponse();
|
|
64
|
+
return {
|
|
65
|
+
id: responseString(row.id),
|
|
66
|
+
[CUSTOMER_NAME_FIELD]: responseString(row[CUSTOMER_NAME_FIELD]),
|
|
67
|
+
[CUSTOMER_BEARER_FIELD]: bearers.map((value) => {
|
|
68
|
+
const bearer = record(value);
|
|
69
|
+
return {
|
|
70
|
+
name: responseString(bearer.name),
|
|
71
|
+
id: responseString(bearer.id),
|
|
72
|
+
type: responseString(bearer.type),
|
|
73
|
+
};
|
|
74
|
+
}),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** 普通 / 差旅报销查客户时,同时取得该客户带出的承担主体。 */
|
|
78
|
+
export class InvoiceReimCustomerSearchOperation {
|
|
79
|
+
name = 'invoice.reim.customer.search';
|
|
80
|
+
async execute(input, { host }) {
|
|
81
|
+
if (Object.keys(input).some((key) => key !== 'keywords')) {
|
|
82
|
+
throw invoiceValidationError('input_invalid', '客户查询只接受 keywords,其他查询参数固定');
|
|
83
|
+
}
|
|
84
|
+
const keywords = asNonEmptyString(input.keywords, 'keywords');
|
|
85
|
+
const result = await host.invoiceMultipartRequest({
|
|
86
|
+
path: '/api/ebuilder/coms/nlist/getData',
|
|
87
|
+
method: 'POST',
|
|
88
|
+
headers: {
|
|
89
|
+
ebbusinessid: CUSTOMER_PAGE_ID,
|
|
90
|
+
langtype: 'zh_CN',
|
|
91
|
+
pragma: 'no-cache',
|
|
92
|
+
priority: 'u=1, i',
|
|
93
|
+
timezoneoffset: '-480',
|
|
94
|
+
Accept: '*/*',
|
|
95
|
+
},
|
|
96
|
+
fields: {
|
|
97
|
+
filter: customerFilter(keywords),
|
|
98
|
+
compId: CUSTOMER_COMP_ID,
|
|
99
|
+
pageId: CUSTOMER_PAGE_ID,
|
|
100
|
+
pageNo: '1',
|
|
101
|
+
tableuid: 'd26c94cc9c234d7da9bc2d399339a439',
|
|
102
|
+
},
|
|
103
|
+
operation: this.name,
|
|
104
|
+
});
|
|
105
|
+
assertBusinessSuccess(result, 'reim_customer_search_failed', '搜索相关客户失败');
|
|
106
|
+
const list = record(record(result).data).list;
|
|
107
|
+
if (!Array.isArray(list))
|
|
108
|
+
return invalidResponse();
|
|
109
|
+
return { status: 'COMPLETE', data: { list: list.map(projectCustomer) } };
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -83,58 +83,6 @@ const UPDATE_FIELDS = new Map([
|
|
|
83
83
|
['currency', 'string'],
|
|
84
84
|
['currencyName', 'string'],
|
|
85
85
|
]);
|
|
86
|
-
const BROWSE_TYPE_NAMES = new Map([
|
|
87
|
-
[1, '增值税专用发票'],
|
|
88
|
-
[2, '增值税普通发票'],
|
|
89
|
-
[3, '增值税电子普通发票'],
|
|
90
|
-
[4, '卷式发票'],
|
|
91
|
-
[5, '通行费增值税电子普通发票'],
|
|
92
|
-
[6, '机动车销售统一发票'],
|
|
93
|
-
[7, '定额发票'],
|
|
94
|
-
[8, '客运汽车票'],
|
|
95
|
-
[9, '航空运输电子客票行程单'],
|
|
96
|
-
[10, '火车票'],
|
|
97
|
-
[11, '出租车票'],
|
|
98
|
-
[12, '其他'],
|
|
99
|
-
[13, '汽车通行费发票'],
|
|
100
|
-
[14, '船票'],
|
|
101
|
-
[22, '二手车销售统一发票'],
|
|
102
|
-
[28, '增值税电子专用发票'],
|
|
103
|
-
[32, '电子发票(增值税专用发票)'],
|
|
104
|
-
[33, '电子发票(普通发票)'],
|
|
105
|
-
[47, '医疗收费票据'],
|
|
106
|
-
[48, '财政非税收入统一票据'],
|
|
107
|
-
[49, '海关进口增值税专用缴款书'],
|
|
108
|
-
[50, '电子发票服务平台纸质普票'],
|
|
109
|
-
[52, '完税凭证'],
|
|
110
|
-
[53, '国际小票'],
|
|
111
|
-
[54, '银行回单'],
|
|
112
|
-
[56, '代扣代缴税收缴款凭证'],
|
|
113
|
-
]);
|
|
114
|
-
const VALID_STATUS_NAMES = new Map([
|
|
115
|
-
[0, '未查验'],
|
|
116
|
-
[1, '有效已查验'],
|
|
117
|
-
[2, '有效未查验'],
|
|
118
|
-
[3, '查验失败'],
|
|
119
|
-
[4, '发票无效'],
|
|
120
|
-
[5, '票面校验不一致'],
|
|
121
|
-
]);
|
|
122
|
-
const SOURCE_NAMES = new Map([
|
|
123
|
-
[1, '微信'],
|
|
124
|
-
[2, '支付宝'],
|
|
125
|
-
[4, '邮箱'],
|
|
126
|
-
[5, '拍照'],
|
|
127
|
-
[6, '扫码'],
|
|
128
|
-
[7, '手动'],
|
|
129
|
-
[9, '查验录入'],
|
|
130
|
-
[10, '企业微信'],
|
|
131
|
-
[11, '公众号'],
|
|
132
|
-
[12, '企业台账'],
|
|
133
|
-
[13, '文件'],
|
|
134
|
-
[14, 'Excel'],
|
|
135
|
-
[15, '短信'],
|
|
136
|
-
[16, '链接录入'],
|
|
137
|
-
]);
|
|
138
86
|
export function asObject(value, name = '业务输入') {
|
|
139
87
|
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
140
88
|
throw invoiceValidationError('input_invalid', `${name}必须是 JSON 对象`);
|
|
@@ -307,13 +255,6 @@ export async function getDetail(input, host) {
|
|
|
307
255
|
body: { ...body, userFlag: '1', isDelFlag: '1', req_base: reqBase() },
|
|
308
256
|
});
|
|
309
257
|
}
|
|
310
|
-
export async function getDetailsByFids(fids, host) {
|
|
311
|
-
return host.invoiceRequest({
|
|
312
|
-
path: '/api/inc/get',
|
|
313
|
-
method: 'POST',
|
|
314
|
-
body: { ids: fids, mask: 0, userFlag: '1', isDelFlag: '1', req_base: reqBase() },
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
258
|
export function invoiceDetailUrl(baseUrl, fid) {
|
|
318
259
|
return `${baseUrl.replace(/\/+$/, '')}/sp/inc/incDetail?fid=${fid}`;
|
|
319
260
|
}
|
|
@@ -339,155 +280,10 @@ export function preview(info, baseUrl) {
|
|
|
339
280
|
export function workflow(name, state) {
|
|
340
281
|
return { workflow: name, version: 1, state };
|
|
341
282
|
}
|
|
342
|
-
function stringOrEmpty(value) {
|
|
343
|
-
return value === undefined || value === null ? '' : String(value);
|
|
344
|
-
}
|
|
345
283
|
export function numberOrZero(value) {
|
|
346
284
|
const parsed = Number(value);
|
|
347
285
|
return Number.isFinite(parsed) ? parsed : 0;
|
|
348
286
|
}
|
|
349
|
-
function enumName(names, value) {
|
|
350
|
-
if (value === undefined || value === null || value === '')
|
|
351
|
-
return '';
|
|
352
|
-
return names.get(numberOrZero(value)) || '';
|
|
353
|
-
}
|
|
354
|
-
function parseExt(extRaw) {
|
|
355
|
-
if (typeof extRaw !== 'string' || !extRaw.trim())
|
|
356
|
-
return {};
|
|
357
|
-
try {
|
|
358
|
-
const parsed = JSON.parse(extRaw);
|
|
359
|
-
return parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : {};
|
|
360
|
-
}
|
|
361
|
-
catch {
|
|
362
|
-
return {};
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
function dateToTimestampMs(date) {
|
|
366
|
-
if (typeof date !== 'string' || !/^\d{4}-\d{2}-\d{2}$/u.test(date))
|
|
367
|
-
return 0;
|
|
368
|
-
const timestamp = Date.parse(`${date}T00:00:00+08:00`);
|
|
369
|
-
return Number.isFinite(timestamp) ? timestamp : 0;
|
|
370
|
-
}
|
|
371
|
-
function contentFor(typeName, number) {
|
|
372
|
-
if (typeName && number)
|
|
373
|
-
return `${typeName}-${number}`;
|
|
374
|
-
return typeName || number || '';
|
|
375
|
-
}
|
|
376
|
-
function cents(value) {
|
|
377
|
-
if (value === undefined || value === null || value === '')
|
|
378
|
-
return 0;
|
|
379
|
-
const text = String(value);
|
|
380
|
-
const match = /^(-?\d+)(?:\.(\d{1,2}))?$/u.exec(text);
|
|
381
|
-
if (!match)
|
|
382
|
-
return null;
|
|
383
|
-
const whole = Number(match[1]);
|
|
384
|
-
const fraction = Number((match[2] || '').padEnd(2, '0'));
|
|
385
|
-
return whole * 100 + (whole < 0 ? -fraction : fraction);
|
|
386
|
-
}
|
|
387
|
-
function moneyMinus(total, reiming, reimed) {
|
|
388
|
-
if ((reiming === undefined || reiming === null || reiming === '') && (reimed === undefined || reimed === null || reimed === '')) {
|
|
389
|
-
return stringOrEmpty(total);
|
|
390
|
-
}
|
|
391
|
-
const totalCents = cents(total);
|
|
392
|
-
const reimingCents = cents(reiming);
|
|
393
|
-
const reimedCents = cents(reimed);
|
|
394
|
-
if (totalCents === null || reimingCents === null || reimedCents === null)
|
|
395
|
-
return stringOrEmpty(total);
|
|
396
|
-
const value = totalCents - reimingCents - reimedCents;
|
|
397
|
-
const sign = value < 0 ? '-' : '';
|
|
398
|
-
const absolute = Math.abs(value);
|
|
399
|
-
const whole = Math.floor(absolute / 100);
|
|
400
|
-
const fraction = absolute % 100;
|
|
401
|
-
return fraction === 0 ? `${sign}${whole}` : `${sign}${whole}.${String(fraction).padStart(2, '0')}`;
|
|
402
|
-
}
|
|
403
|
-
function extProductNames(products) {
|
|
404
|
-
if (!Array.isArray(products))
|
|
405
|
-
return '';
|
|
406
|
-
return products
|
|
407
|
-
.map((item) => item && typeof item === 'object' ? stringOrEmpty(item.productName || item.name) : '')
|
|
408
|
-
.filter(Boolean)
|
|
409
|
-
.join('、');
|
|
410
|
-
}
|
|
411
|
-
export function browseFieldItem(info) {
|
|
412
|
-
const comm = info.comm_info || {};
|
|
413
|
-
const pro = comm.pro || {};
|
|
414
|
-
const price = comm.price || {};
|
|
415
|
-
const buyer = comm.buyer || {};
|
|
416
|
-
const payer = comm.payer || {};
|
|
417
|
-
const modify = info.modify_info || {};
|
|
418
|
-
const ext = parseExt(info.ext);
|
|
419
|
-
const products = Array.isArray(ext.products) ? ext.products : [];
|
|
420
|
-
const fid = stringOrEmpty(info.fid || info.id);
|
|
421
|
-
const type = numberOrZero(pro.type);
|
|
422
|
-
const typeName = stringOrEmpty(pro.cname) || BROWSE_TYPE_NAMES.get(type) || '未知票种';
|
|
423
|
-
const number = stringOrEmpty(info.number);
|
|
424
|
-
const content = contentFor(typeName, number);
|
|
425
|
-
const total = stringOrEmpty(price.total);
|
|
426
|
-
const reimingMoney = typeof price.reimingMoney === 'string' ? price.reimingMoney : '';
|
|
427
|
-
const reimedMoney = typeof price.reimedMoney === 'string' ? price.reimedMoney : '';
|
|
428
|
-
const firstProduct = products.find((item) => item && typeof item === 'object');
|
|
429
|
-
return {
|
|
430
|
-
optionId: fid,
|
|
431
|
-
id: fid,
|
|
432
|
-
fid,
|
|
433
|
-
type,
|
|
434
|
-
typeName,
|
|
435
|
-
number,
|
|
436
|
-
code: stringOrEmpty(info.code),
|
|
437
|
-
content,
|
|
438
|
-
name: content,
|
|
439
|
-
total,
|
|
440
|
-
ttax: stringOrEmpty(ext.ttax),
|
|
441
|
-
seller: stringOrEmpty(payer.company),
|
|
442
|
-
sellerId: stringOrEmpty(payer.tcode),
|
|
443
|
-
buyer: stringOrEmpty(buyer.company),
|
|
444
|
-
buyerId: stringOrEmpty(buyer.tcode),
|
|
445
|
-
incDate: stringOrEmpty(pro.date),
|
|
446
|
-
incDateTimestamp: dateToTimestampMs(pro.date),
|
|
447
|
-
validStatus: enumName(VALID_STATUS_NAMES, pro.valid),
|
|
448
|
-
source: enumName(SOURCE_NAMES, modify.source),
|
|
449
|
-
invoiceStatus: numberOrZero(pro.status),
|
|
450
|
-
del: numberOrZero(modify.del),
|
|
451
|
-
currency: stringOrEmpty(info.currency) || 'CNY',
|
|
452
|
-
currencyName: stringOrEmpty(info.currencyName) || '人民币',
|
|
453
|
-
taxRate: stringOrEmpty(ext.taxRate || ext.trate || firstProduct?.taxRate || firstProduct?.trate),
|
|
454
|
-
consumeContent: stringOrEmpty(ext.content) || extProductNames(products),
|
|
455
|
-
fylx: stringOrEmpty(info.fylx) || '0',
|
|
456
|
-
inputDate: stringOrEmpty(modify.createDate || modify.modifyDate),
|
|
457
|
-
incTotal: 0,
|
|
458
|
-
reimingMoney,
|
|
459
|
-
reimedMoney,
|
|
460
|
-
notReimMoney: moneyMinus(total, reimingMoney, reimedMoney),
|
|
461
|
-
reimDate: '',
|
|
462
|
-
reimProcess: '',
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
export function browseFieldData(response) {
|
|
466
|
-
const ret = response.res_base?.ret;
|
|
467
|
-
if (ret !== undefined && ret !== 0) {
|
|
468
|
-
throw new InvoiceCliError('api', 'detail_failed', response.res_base?.message || '详情接口整体失败', {
|
|
469
|
-
code: ret,
|
|
470
|
-
details: { res_base: response.res_base },
|
|
471
|
-
exitCode: 1,
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
const items = [];
|
|
475
|
-
const errors = [];
|
|
476
|
-
for (const entry of Array.isArray(response.infos) ? response.infos : []) {
|
|
477
|
-
const itemRet = entry?.ret?.ret;
|
|
478
|
-
if (itemRet !== 0) {
|
|
479
|
-
errors.push({
|
|
480
|
-
fid: stringOrEmpty(entry?.info?.fid || entry?.info?.id),
|
|
481
|
-
ret: itemRet,
|
|
482
|
-
message: entry?.ret?.message || '查询失败',
|
|
483
|
-
});
|
|
484
|
-
continue;
|
|
485
|
-
}
|
|
486
|
-
if (entry?.info && typeof entry.info === 'object')
|
|
487
|
-
items.push(browseFieldItem(entry.info));
|
|
488
|
-
}
|
|
489
|
-
return { items, errors };
|
|
490
|
-
}
|
|
491
287
|
export function assertBusinessSuccess(value, subtype, fallbackMessage) {
|
|
492
288
|
const result = value && typeof value === 'object' ? value : {};
|
|
493
289
|
const code = result.code ?? result.res_base?.ret;
|