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
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
invoicePartialError,
|
|
9
9
|
invoiceValidationError,
|
|
10
10
|
isInvoiceNetworkError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SDPC7BG2.js";
|
|
12
12
|
import {
|
|
13
13
|
reportPlatformError
|
|
14
14
|
} from "./chunk-6N4JPNFL.js";
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
CONTINUATION_TTL_MS,
|
|
17
17
|
CONTINUATION_TTL_SECONDS
|
|
18
18
|
} from "./chunk-7BDPM5ST.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-RV2JAA5I.js";
|
|
20
|
+
import "./chunk-TJN4PIYO.js";
|
|
21
|
+
import "./chunk-6VCQLZXE.js";
|
|
22
22
|
import {
|
|
23
23
|
isCliError,
|
|
24
24
|
toErrorEnvelope
|
|
@@ -120,10 +120,10 @@ function firstText(...values) {
|
|
|
120
120
|
return "";
|
|
121
121
|
}
|
|
122
122
|
function invoiceRecordOf(item) {
|
|
123
|
-
const
|
|
124
|
-
const inner = asRecord(
|
|
125
|
-
const hasOwnInvoiceFields =
|
|
126
|
-
return !hasOwnInvoiceFields && Object.keys(inner).length ? inner :
|
|
123
|
+
const record2 = asRecord(item);
|
|
124
|
+
const inner = asRecord(record2.info);
|
|
125
|
+
const hasOwnInvoiceFields = record2.comm_info !== void 0 || record2.fid !== void 0 || record2.number !== void 0;
|
|
126
|
+
return !hasOwnInvoiceFields && Object.keys(inner).length ? inner : record2;
|
|
127
127
|
}
|
|
128
128
|
function parseInvoiceExt(value) {
|
|
129
129
|
if (value && typeof value === "object") return asRecord(value);
|
|
@@ -243,11 +243,11 @@ function summarizeListData(data) {
|
|
|
243
243
|
var DETAIL_EXTRA_FIELDS = ["issuer", "checkState", "attachments"];
|
|
244
244
|
var DETAIL_ITEM_FIELDS = [...SUMMARY_ITEM_FIELDS, ...DETAIL_EXTRA_FIELDS];
|
|
245
245
|
function attachmentOf(entry) {
|
|
246
|
-
const
|
|
246
|
+
const record2 = asRecord2(entry);
|
|
247
247
|
return {
|
|
248
|
-
id: text2(
|
|
249
|
-
name: text2(
|
|
250
|
-
type: text2(
|
|
248
|
+
id: text2(record2.fileId ?? record2.id),
|
|
249
|
+
name: text2(record2.name),
|
|
250
|
+
type: text2(record2.type)
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
function summarizeInvoiceDetailItem(wrapper) {
|
|
@@ -584,46 +584,6 @@ var uploadSchema = objectSchema({
|
|
|
584
584
|
ocrMap: { type: "string" },
|
|
585
585
|
fail: { const: false }
|
|
586
586
|
}, ["id", "ids", "fileType", "totalPages", "hasFanWei", "fail"]);
|
|
587
|
-
var browseFieldItemSchema = objectSchema({
|
|
588
|
-
optionId: { type: "string" },
|
|
589
|
-
id: { type: "string" },
|
|
590
|
-
fid: { type: "string" },
|
|
591
|
-
type: { type: "integer" },
|
|
592
|
-
typeName: { type: "string" },
|
|
593
|
-
number: { type: "string" },
|
|
594
|
-
code: { type: "string" },
|
|
595
|
-
content: { type: "string" },
|
|
596
|
-
name: { type: "string" },
|
|
597
|
-
total: { type: "string" },
|
|
598
|
-
ttax: { type: "string" },
|
|
599
|
-
seller: { type: "string" },
|
|
600
|
-
sellerId: { type: "string" },
|
|
601
|
-
buyer: { type: "string" },
|
|
602
|
-
buyerId: { type: "string" },
|
|
603
|
-
incDate: { type: "string" },
|
|
604
|
-
incDateTimestamp: { type: "integer" },
|
|
605
|
-
validStatus: { type: "string" },
|
|
606
|
-
source: { type: "string" },
|
|
607
|
-
invoiceStatus: { type: "integer" },
|
|
608
|
-
del: { type: "integer" },
|
|
609
|
-
currency: { type: "string" },
|
|
610
|
-
currencyName: { type: "string" },
|
|
611
|
-
taxRate: { type: "string" },
|
|
612
|
-
consumeContent: { type: "string" },
|
|
613
|
-
fylx: { type: "string" },
|
|
614
|
-
inputDate: { type: "string" },
|
|
615
|
-
incTotal: { type: "number" },
|
|
616
|
-
reimingMoney: { type: "string" },
|
|
617
|
-
reimedMoney: { type: "string" },
|
|
618
|
-
notReimMoney: { type: "string" },
|
|
619
|
-
reimDate: { type: "string" },
|
|
620
|
-
reimProcess: { type: "string" }
|
|
621
|
-
}, ["optionId", "id", "fid", "type", "typeName", "number", "content", "name", "total"]);
|
|
622
|
-
var browseFieldErrorSchema = objectSchema({
|
|
623
|
-
fid: { type: "string" },
|
|
624
|
-
ret: { type: "integer" },
|
|
625
|
-
message: { type: "string" }
|
|
626
|
-
}, ["ret", "message"]);
|
|
627
587
|
var continuationSchema = { type: "string", minLength: 1 };
|
|
628
588
|
var continuationPreviewOutput = (previewSchema, extra = {}) => objectSchema({
|
|
629
589
|
preview: previewSchema,
|
|
@@ -1231,26 +1191,6 @@ var invoiceOperations = [
|
|
|
1231
1191
|
},
|
|
1232
1192
|
outputSchema: deleteApplyOutputSchema
|
|
1233
1193
|
},
|
|
1234
|
-
{
|
|
1235
|
-
name: "invoice.browse-field.data",
|
|
1236
|
-
risk: "read",
|
|
1237
|
-
fixed: { source: "POST /api/inc/get", mask: 0, userFlag: "1", isDelFlag: "1" },
|
|
1238
|
-
inputSchema: {
|
|
1239
|
-
type: "object",
|
|
1240
|
-
additionalProperties: false,
|
|
1241
|
-
properties: {
|
|
1242
|
-
fid: positiveId,
|
|
1243
|
-
fids: positiveIdArray,
|
|
1244
|
-
detail: { type: "object" }
|
|
1245
|
-
},
|
|
1246
|
-
oneOf: [{ required: ["fid"] }, { required: ["fids"] }, { required: ["detail"] }]
|
|
1247
|
-
},
|
|
1248
|
-
outputSchema: objectSchema({
|
|
1249
|
-
items: arrayOf(browseFieldItemSchema),
|
|
1250
|
-
errors: arrayOf(browseFieldErrorSchema),
|
|
1251
|
-
workflow: workflowSchema
|
|
1252
|
-
}, ["items", "errors", "workflow"])
|
|
1253
|
-
},
|
|
1254
1194
|
{
|
|
1255
1195
|
name: "invoice.reim.file-ocr.preview",
|
|
1256
1196
|
risk: "read-with-upload",
|
|
@@ -1361,6 +1301,34 @@ var invoiceOperations = [
|
|
|
1361
1301
|
workflow: workflowSchema
|
|
1362
1302
|
}, ["result", "data", "keywords", "match", "items", "workflow"])
|
|
1363
1303
|
},
|
|
1304
|
+
{
|
|
1305
|
+
name: "invoice.reim.customer.search",
|
|
1306
|
+
risk: "read",
|
|
1307
|
+
fixed: {
|
|
1308
|
+
path: "/api/ebuilder/coms/nlist/getData",
|
|
1309
|
+
method: "POST",
|
|
1310
|
+
headers: { ebbusinessid: "1218181956452048911", langtype: "zh_CN", pragma: "no-cache", priority: "u=1, i", timezoneoffset: "-480", Accept: "*/*" },
|
|
1311
|
+
compId: "c39b9e14c0034336adf9e9bc39aeed75",
|
|
1312
|
+
pageId: "1218181956452048911",
|
|
1313
|
+
pageNo: "1",
|
|
1314
|
+
tableuid: "d26c94cc9c234d7da9bc2d399339a439",
|
|
1315
|
+
filter: "\u5BA2\u6237\u8868\u300C\u540D\u79F0\u300D\u5B57\u6BB5 field_1173221220888062665 \u6A21\u7CCA\u5339\u914D keywords\uFF1B\u5176\u4ED6\u7B5B\u9009\u53C2\u6570\u56FA\u5B9A"
|
|
1316
|
+
},
|
|
1317
|
+
inputSchema: objectSchema({
|
|
1318
|
+
keywords: { type: "string", minLength: 1, description: "\u7528\u6237\u8F93\u5165\u7684\u5BA2\u6237\u540D\u79F0\uFF0C\u652F\u6301\u6A21\u7CCA\u540D\u79F0\uFF1B\u4E0D\u9700\u8981\u62A5\u9500\u8868\u5355\u6216\u5B57\u6BB5 ID" }
|
|
1319
|
+
}, ["keywords"]),
|
|
1320
|
+
outputSchema: objectSchema({
|
|
1321
|
+
list: arrayOf(objectSchema({
|
|
1322
|
+
id: { type: "string", description: "\u76F8\u5173\u5BA2\u6237 ID" },
|
|
1323
|
+
"1173221220888062665": { type: "string", description: "\u76F8\u5173\u5BA2\u6237\u540D\u79F0" },
|
|
1324
|
+
"1173221220888062667": arrayOf(objectSchema({
|
|
1325
|
+
name: { type: "string", description: "\u627F\u62C5\u4E3B\u4F53\u540D\u79F0" },
|
|
1326
|
+
id: { type: "string", description: "\u627F\u62C5\u4E3B\u4F53 ID" },
|
|
1327
|
+
type: { type: "string" }
|
|
1328
|
+
}, ["name", "id", "type"]))
|
|
1329
|
+
}, ["id", "1173221220888062665", "1173221220888062667"]))
|
|
1330
|
+
}, ["list"])
|
|
1331
|
+
},
|
|
1364
1332
|
{
|
|
1365
1333
|
name: "invoice.reim.relation.search",
|
|
1366
1334
|
risk: "read",
|
|
@@ -1582,12 +1550,12 @@ var invoiceRetiredOperations = [
|
|
|
1582
1550
|
},
|
|
1583
1551
|
{
|
|
1584
1552
|
name: "invoice.reim.row-info",
|
|
1585
|
-
replacement: "\u660E\u7EC6\u884C\u4E0D\u518D\u9884\u586B\uFF1A\u6BCF\u884C\u53EA\u5199\u300C\u76F8\u5173\u53D1\u7968\u300D\uFF08\u7528
|
|
1553
|
+
replacement: "\u660E\u7EC6\u884C\u4E0D\u518D\u9884\u586B\uFF1A\u6BCF\u884C\u53EA\u5199\u300C\u76F8\u5173\u53D1\u7968\u300D\uFF08\u76F4\u63A5\u4F7F\u7528\u5DF2\u9009\u53D1\u7968\u7684 id/name \u5F15\u7528\u5BF9\u8C61\uFF09\uFF0C\u5176\u4F59\u5217\u7531\u8054\u52A8\u5E26\u51FA",
|
|
1586
1554
|
reference: REIM_REFERENCE
|
|
1587
1555
|
},
|
|
1588
1556
|
{
|
|
1589
1557
|
name: "invoice.reim.row-info-batch",
|
|
1590
|
-
replacement: "\u660E\u7EC6\u884C\u4E0D\u518D\u9884\u586B\uFF1A\u6BCF\u884C\u53EA\u5199\u300C\u76F8\u5173\u53D1\u7968\u300D\uFF08\u7528
|
|
1558
|
+
replacement: "\u660E\u7EC6\u884C\u4E0D\u518D\u9884\u586B\uFF1A\u6BCF\u884C\u53EA\u5199\u300C\u76F8\u5173\u53D1\u7968\u300D\uFF08\u76F4\u63A5\u4F7F\u7528\u5DF2\u9009\u53D1\u7968\u7684 id/name \u5F15\u7528\u5BF9\u8C61\uFF09\uFF0C\u5176\u4F59\u5217\u7531\u8054\u52A8\u5E26\u51FA",
|
|
1591
1559
|
reference: REIM_REFERENCE
|
|
1592
1560
|
},
|
|
1593
1561
|
{
|
|
@@ -1756,58 +1724,6 @@ var UPDATE_FIELDS = /* @__PURE__ */ new Map([
|
|
|
1756
1724
|
["currency", "string"],
|
|
1757
1725
|
["currencyName", "string"]
|
|
1758
1726
|
]);
|
|
1759
|
-
var BROWSE_TYPE_NAMES = /* @__PURE__ */ new Map([
|
|
1760
|
-
[1, "\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968"],
|
|
1761
|
-
[2, "\u589E\u503C\u7A0E\u666E\u901A\u53D1\u7968"],
|
|
1762
|
-
[3, "\u589E\u503C\u7A0E\u7535\u5B50\u666E\u901A\u53D1\u7968"],
|
|
1763
|
-
[4, "\u5377\u5F0F\u53D1\u7968"],
|
|
1764
|
-
[5, "\u901A\u884C\u8D39\u589E\u503C\u7A0E\u7535\u5B50\u666E\u901A\u53D1\u7968"],
|
|
1765
|
-
[6, "\u673A\u52A8\u8F66\u9500\u552E\u7EDF\u4E00\u53D1\u7968"],
|
|
1766
|
-
[7, "\u5B9A\u989D\u53D1\u7968"],
|
|
1767
|
-
[8, "\u5BA2\u8FD0\u6C7D\u8F66\u7968"],
|
|
1768
|
-
[9, "\u822A\u7A7A\u8FD0\u8F93\u7535\u5B50\u5BA2\u7968\u884C\u7A0B\u5355"],
|
|
1769
|
-
[10, "\u706B\u8F66\u7968"],
|
|
1770
|
-
[11, "\u51FA\u79DF\u8F66\u7968"],
|
|
1771
|
-
[12, "\u5176\u4ED6"],
|
|
1772
|
-
[13, "\u6C7D\u8F66\u901A\u884C\u8D39\u53D1\u7968"],
|
|
1773
|
-
[14, "\u8239\u7968"],
|
|
1774
|
-
[22, "\u4E8C\u624B\u8F66\u9500\u552E\u7EDF\u4E00\u53D1\u7968"],
|
|
1775
|
-
[28, "\u589E\u503C\u7A0E\u7535\u5B50\u4E13\u7528\u53D1\u7968"],
|
|
1776
|
-
[32, "\u7535\u5B50\u53D1\u7968\uFF08\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968\uFF09"],
|
|
1777
|
-
[33, "\u7535\u5B50\u53D1\u7968\uFF08\u666E\u901A\u53D1\u7968\uFF09"],
|
|
1778
|
-
[47, "\u533B\u7597\u6536\u8D39\u7968\u636E"],
|
|
1779
|
-
[48, "\u8D22\u653F\u975E\u7A0E\u6536\u5165\u7EDF\u4E00\u7968\u636E"],
|
|
1780
|
-
[49, "\u6D77\u5173\u8FDB\u53E3\u589E\u503C\u7A0E\u4E13\u7528\u7F34\u6B3E\u4E66"],
|
|
1781
|
-
[50, "\u7535\u5B50\u53D1\u7968\u670D\u52A1\u5E73\u53F0\u7EB8\u8D28\u666E\u7968"],
|
|
1782
|
-
[52, "\u5B8C\u7A0E\u51ED\u8BC1"],
|
|
1783
|
-
[53, "\u56FD\u9645\u5C0F\u7968"],
|
|
1784
|
-
[54, "\u94F6\u884C\u56DE\u5355"],
|
|
1785
|
-
[56, "\u4EE3\u6263\u4EE3\u7F34\u7A0E\u6536\u7F34\u6B3E\u51ED\u8BC1"]
|
|
1786
|
-
]);
|
|
1787
|
-
var VALID_STATUS_NAMES = /* @__PURE__ */ new Map([
|
|
1788
|
-
[0, "\u672A\u67E5\u9A8C"],
|
|
1789
|
-
[1, "\u6709\u6548\u5DF2\u67E5\u9A8C"],
|
|
1790
|
-
[2, "\u6709\u6548\u672A\u67E5\u9A8C"],
|
|
1791
|
-
[3, "\u67E5\u9A8C\u5931\u8D25"],
|
|
1792
|
-
[4, "\u53D1\u7968\u65E0\u6548"],
|
|
1793
|
-
[5, "\u7968\u9762\u6821\u9A8C\u4E0D\u4E00\u81F4"]
|
|
1794
|
-
]);
|
|
1795
|
-
var SOURCE_NAMES = /* @__PURE__ */ new Map([
|
|
1796
|
-
[1, "\u5FAE\u4FE1"],
|
|
1797
|
-
[2, "\u652F\u4ED8\u5B9D"],
|
|
1798
|
-
[4, "\u90AE\u7BB1"],
|
|
1799
|
-
[5, "\u62CD\u7167"],
|
|
1800
|
-
[6, "\u626B\u7801"],
|
|
1801
|
-
[7, "\u624B\u52A8"],
|
|
1802
|
-
[9, "\u67E5\u9A8C\u5F55\u5165"],
|
|
1803
|
-
[10, "\u4F01\u4E1A\u5FAE\u4FE1"],
|
|
1804
|
-
[11, "\u516C\u4F17\u53F7"],
|
|
1805
|
-
[12, "\u4F01\u4E1A\u53F0\u8D26"],
|
|
1806
|
-
[13, "\u6587\u4EF6"],
|
|
1807
|
-
[14, "Excel"],
|
|
1808
|
-
[15, "\u77ED\u4FE1"],
|
|
1809
|
-
[16, "\u94FE\u63A5\u5F55\u5165"]
|
|
1810
|
-
]);
|
|
1811
1727
|
function asObject(value, name = "\u4E1A\u52A1\u8F93\u5165") {
|
|
1812
1728
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
1813
1729
|
throw invoiceValidationError("input_invalid", `${name}\u5FC5\u987B\u662F JSON \u5BF9\u8C61`);
|
|
@@ -1962,13 +1878,6 @@ async function getDetail(input, host) {
|
|
|
1962
1878
|
body: { ...body, userFlag: "1", isDelFlag: "1", req_base: reqBase() }
|
|
1963
1879
|
});
|
|
1964
1880
|
}
|
|
1965
|
-
async function getDetailsByFids(fids, host) {
|
|
1966
|
-
return host.invoiceRequest({
|
|
1967
|
-
path: "/api/inc/get",
|
|
1968
|
-
method: "POST",
|
|
1969
|
-
body: { ids: fids, mask: 0, userFlag: "1", isDelFlag: "1", req_base: reqBase() }
|
|
1970
|
-
});
|
|
1971
|
-
}
|
|
1972
1881
|
function invoiceDetailUrl(baseUrl, fid) {
|
|
1973
1882
|
return `${baseUrl.replace(/\/+$/, "")}/sp/inc/incDetail?fid=${fid}`;
|
|
1974
1883
|
}
|
|
@@ -1994,142 +1903,10 @@ function preview(info, baseUrl) {
|
|
|
1994
1903
|
function workflow(name, state) {
|
|
1995
1904
|
return { workflow: name, version: 1, state };
|
|
1996
1905
|
}
|
|
1997
|
-
function stringOrEmpty(value) {
|
|
1998
|
-
return value === void 0 || value === null ? "" : String(value);
|
|
1999
|
-
}
|
|
2000
1906
|
function numberOrZero(value) {
|
|
2001
1907
|
const parsed = Number(value);
|
|
2002
1908
|
return Number.isFinite(parsed) ? parsed : 0;
|
|
2003
1909
|
}
|
|
2004
|
-
function enumName(names, value) {
|
|
2005
|
-
if (value === void 0 || value === null || value === "") return "";
|
|
2006
|
-
return names.get(numberOrZero(value)) || "";
|
|
2007
|
-
}
|
|
2008
|
-
function parseExt(extRaw) {
|
|
2009
|
-
if (typeof extRaw !== "string" || !extRaw.trim()) return {};
|
|
2010
|
-
try {
|
|
2011
|
-
const parsed = JSON.parse(extRaw);
|
|
2012
|
-
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
2013
|
-
} catch {
|
|
2014
|
-
return {};
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
function dateToTimestampMs(date) {
|
|
2018
|
-
if (typeof date !== "string" || !/^\d{4}-\d{2}-\d{2}$/u.test(date)) return 0;
|
|
2019
|
-
const timestamp = Date.parse(`${date}T00:00:00+08:00`);
|
|
2020
|
-
return Number.isFinite(timestamp) ? timestamp : 0;
|
|
2021
|
-
}
|
|
2022
|
-
function contentFor(typeName, number) {
|
|
2023
|
-
if (typeName && number) return `${typeName}-${number}`;
|
|
2024
|
-
return typeName || number || "";
|
|
2025
|
-
}
|
|
2026
|
-
function cents(value) {
|
|
2027
|
-
if (value === void 0 || value === null || value === "") return 0;
|
|
2028
|
-
const text5 = String(value);
|
|
2029
|
-
const match = /^(-?\d+)(?:\.(\d{1,2}))?$/u.exec(text5);
|
|
2030
|
-
if (!match) return null;
|
|
2031
|
-
const whole = Number(match[1]);
|
|
2032
|
-
const fraction = Number((match[2] || "").padEnd(2, "0"));
|
|
2033
|
-
return whole * 100 + (whole < 0 ? -fraction : fraction);
|
|
2034
|
-
}
|
|
2035
|
-
function moneyMinus(total, reiming, reimed) {
|
|
2036
|
-
if ((reiming === void 0 || reiming === null || reiming === "") && (reimed === void 0 || reimed === null || reimed === "")) {
|
|
2037
|
-
return stringOrEmpty(total);
|
|
2038
|
-
}
|
|
2039
|
-
const totalCents = cents(total);
|
|
2040
|
-
const reimingCents = cents(reiming);
|
|
2041
|
-
const reimedCents = cents(reimed);
|
|
2042
|
-
if (totalCents === null || reimingCents === null || reimedCents === null) return stringOrEmpty(total);
|
|
2043
|
-
const value = totalCents - reimingCents - reimedCents;
|
|
2044
|
-
const sign = value < 0 ? "-" : "";
|
|
2045
|
-
const absolute = Math.abs(value);
|
|
2046
|
-
const whole = Math.floor(absolute / 100);
|
|
2047
|
-
const fraction = absolute % 100;
|
|
2048
|
-
return fraction === 0 ? `${sign}${whole}` : `${sign}${whole}.${String(fraction).padStart(2, "0")}`;
|
|
2049
|
-
}
|
|
2050
|
-
function extProductNames(products) {
|
|
2051
|
-
if (!Array.isArray(products)) return "";
|
|
2052
|
-
return products.map((item) => item && typeof item === "object" ? stringOrEmpty(item.productName || item.name) : "").filter(Boolean).join("\u3001");
|
|
2053
|
-
}
|
|
2054
|
-
function browseFieldItem(info) {
|
|
2055
|
-
const comm = info.comm_info || {};
|
|
2056
|
-
const pro = comm.pro || {};
|
|
2057
|
-
const price = comm.price || {};
|
|
2058
|
-
const buyer = comm.buyer || {};
|
|
2059
|
-
const payer = comm.payer || {};
|
|
2060
|
-
const modify = info.modify_info || {};
|
|
2061
|
-
const ext = parseExt(info.ext);
|
|
2062
|
-
const products = Array.isArray(ext.products) ? ext.products : [];
|
|
2063
|
-
const fid = stringOrEmpty(info.fid || info.id);
|
|
2064
|
-
const type = numberOrZero(pro.type);
|
|
2065
|
-
const typeName = stringOrEmpty(pro.cname) || BROWSE_TYPE_NAMES.get(type) || "\u672A\u77E5\u7968\u79CD";
|
|
2066
|
-
const number = stringOrEmpty(info.number);
|
|
2067
|
-
const content = contentFor(typeName, number);
|
|
2068
|
-
const total = stringOrEmpty(price.total);
|
|
2069
|
-
const reimingMoney = typeof price.reimingMoney === "string" ? price.reimingMoney : "";
|
|
2070
|
-
const reimedMoney = typeof price.reimedMoney === "string" ? price.reimedMoney : "";
|
|
2071
|
-
const firstProduct = products.find((item) => item && typeof item === "object");
|
|
2072
|
-
return {
|
|
2073
|
-
optionId: fid,
|
|
2074
|
-
id: fid,
|
|
2075
|
-
fid,
|
|
2076
|
-
type,
|
|
2077
|
-
typeName,
|
|
2078
|
-
number,
|
|
2079
|
-
code: stringOrEmpty(info.code),
|
|
2080
|
-
content,
|
|
2081
|
-
name: content,
|
|
2082
|
-
total,
|
|
2083
|
-
ttax: stringOrEmpty(ext.ttax),
|
|
2084
|
-
seller: stringOrEmpty(payer.company),
|
|
2085
|
-
sellerId: stringOrEmpty(payer.tcode),
|
|
2086
|
-
buyer: stringOrEmpty(buyer.company),
|
|
2087
|
-
buyerId: stringOrEmpty(buyer.tcode),
|
|
2088
|
-
incDate: stringOrEmpty(pro.date),
|
|
2089
|
-
incDateTimestamp: dateToTimestampMs(pro.date),
|
|
2090
|
-
validStatus: enumName(VALID_STATUS_NAMES, pro.valid),
|
|
2091
|
-
source: enumName(SOURCE_NAMES, modify.source),
|
|
2092
|
-
invoiceStatus: numberOrZero(pro.status),
|
|
2093
|
-
del: numberOrZero(modify.del),
|
|
2094
|
-
currency: stringOrEmpty(info.currency) || "CNY",
|
|
2095
|
-
currencyName: stringOrEmpty(info.currencyName) || "\u4EBA\u6C11\u5E01",
|
|
2096
|
-
taxRate: stringOrEmpty(ext.taxRate || ext.trate || firstProduct?.taxRate || firstProduct?.trate),
|
|
2097
|
-
consumeContent: stringOrEmpty(ext.content) || extProductNames(products),
|
|
2098
|
-
fylx: stringOrEmpty(info.fylx) || "0",
|
|
2099
|
-
inputDate: stringOrEmpty(modify.createDate || modify.modifyDate),
|
|
2100
|
-
incTotal: 0,
|
|
2101
|
-
reimingMoney,
|
|
2102
|
-
reimedMoney,
|
|
2103
|
-
notReimMoney: moneyMinus(total, reimingMoney, reimedMoney),
|
|
2104
|
-
reimDate: "",
|
|
2105
|
-
reimProcess: ""
|
|
2106
|
-
};
|
|
2107
|
-
}
|
|
2108
|
-
function browseFieldData(response) {
|
|
2109
|
-
const ret = response.res_base?.ret;
|
|
2110
|
-
if (ret !== void 0 && ret !== 0) {
|
|
2111
|
-
throw new InvoiceCliError("api", "detail_failed", response.res_base?.message || "\u8BE6\u60C5\u63A5\u53E3\u6574\u4F53\u5931\u8D25", {
|
|
2112
|
-
code: ret,
|
|
2113
|
-
details: { res_base: response.res_base },
|
|
2114
|
-
exitCode: 1
|
|
2115
|
-
});
|
|
2116
|
-
}
|
|
2117
|
-
const items = [];
|
|
2118
|
-
const errors = [];
|
|
2119
|
-
for (const entry of Array.isArray(response.infos) ? response.infos : []) {
|
|
2120
|
-
const itemRet = entry?.ret?.ret;
|
|
2121
|
-
if (itemRet !== 0) {
|
|
2122
|
-
errors.push({
|
|
2123
|
-
fid: stringOrEmpty(entry?.info?.fid || entry?.info?.id),
|
|
2124
|
-
ret: itemRet,
|
|
2125
|
-
message: entry?.ret?.message || "\u67E5\u8BE2\u5931\u8D25"
|
|
2126
|
-
});
|
|
2127
|
-
continue;
|
|
2128
|
-
}
|
|
2129
|
-
if (entry?.info && typeof entry.info === "object") items.push(browseFieldItem(entry.info));
|
|
2130
|
-
}
|
|
2131
|
-
return { items, errors };
|
|
2132
|
-
}
|
|
2133
1910
|
function assertBusinessSuccess(value, subtype, fallbackMessage) {
|
|
2134
1911
|
const result = value && typeof value === "object" ? value : {};
|
|
2135
1912
|
const code = result.code ?? result.res_base?.ret;
|
|
@@ -2351,8 +2128,8 @@ async function previewOcr(upload, host) {
|
|
|
2351
2128
|
}
|
|
2352
2129
|
return { results, invoices };
|
|
2353
2130
|
}
|
|
2354
|
-
function isRedReversedInvoice(
|
|
2355
|
-
const raw =
|
|
2131
|
+
function isRedReversedInvoice(record2) {
|
|
2132
|
+
const raw = record2?.comm_info?.pro?.status;
|
|
2356
2133
|
return (typeof raw === "number" ? raw : Number(raw ?? 0)) === 8;
|
|
2357
2134
|
}
|
|
2358
2135
|
async function listInvoices(input, host, flag) {
|
|
@@ -2374,10 +2151,10 @@ async function listInvoices(input, host, flag) {
|
|
|
2374
2151
|
const session = await host.getSession();
|
|
2375
2152
|
const result = await host.invoiceRequest({ path: "/api/inc/sync", method: "POST", body });
|
|
2376
2153
|
const items = (result.infos || []).filter((item) => !isRedReversedInvoice(invoiceRecordOf(item))).map((item) => {
|
|
2377
|
-
const
|
|
2378
|
-
const fid =
|
|
2379
|
-
if (fid)
|
|
2380
|
-
|
|
2154
|
+
const record2 = invoiceRecordOf(item);
|
|
2155
|
+
const fid = record2.fid ?? record2.id;
|
|
2156
|
+
if (fid) record2.detailUrl = invoiceDetailUrl(session.baseUrl, String(fid));
|
|
2157
|
+
record2.extInfo = invoiceExtInfo(record2);
|
|
2381
2158
|
return item;
|
|
2382
2159
|
});
|
|
2383
2160
|
return {
|
|
@@ -2676,22 +2453,6 @@ var InvoiceAddApplyOperation = class {
|
|
|
2676
2453
|
}
|
|
2677
2454
|
};
|
|
2678
2455
|
|
|
2679
|
-
// src/shortcuts/invoice/operations/browse-field.ts
|
|
2680
|
-
var InvoiceBrowseFieldDataOperation = class {
|
|
2681
|
-
name = "invoice.browse-field.data";
|
|
2682
|
-
async execute(input, { host }) {
|
|
2683
|
-
const detail = input.detail === void 0 ? asObject(await getDetailsByFids(normalizeFids(input), host), "detail") : asObject(input.detail, "detail");
|
|
2684
|
-
const data = browseFieldData(detail);
|
|
2685
|
-
return {
|
|
2686
|
-
status: data.errors.length ? "PARTIAL" : "COMPLETE",
|
|
2687
|
-
data: {
|
|
2688
|
-
...data,
|
|
2689
|
-
workflow: workflow("invoice.browse-field.data", data.errors.length ? "PARTIAL" : "COMPLETE")
|
|
2690
|
-
}
|
|
2691
|
-
};
|
|
2692
|
-
}
|
|
2693
|
-
};
|
|
2694
|
-
|
|
2695
2456
|
// src/shortcuts/invoice/operations/delete.ts
|
|
2696
2457
|
var InvoiceDeletePrepareOperation = class {
|
|
2697
2458
|
name = "invoice.delete.prepare";
|
|
@@ -3113,8 +2874,8 @@ function amountCents(value, requestId) {
|
|
|
3113
2874
|
}
|
|
3114
2875
|
return Math.round(Number(text5) * 100);
|
|
3115
2876
|
}
|
|
3116
|
-
function formatCents(
|
|
3117
|
-
return (
|
|
2877
|
+
function formatCents(cents) {
|
|
2878
|
+
return (cents / 100).toFixed(2);
|
|
3118
2879
|
}
|
|
3119
2880
|
function summarizeContractRows(requestId, rows) {
|
|
3120
2881
|
if (rows.length === 0) {
|
|
@@ -3132,12 +2893,12 @@ function summarizeContractRows(requestId, rows) {
|
|
|
3132
2893
|
let totalCents = 0;
|
|
3133
2894
|
for (const row of rows) {
|
|
3134
2895
|
const group = textValue2(row[FIELD.group]);
|
|
3135
|
-
const
|
|
3136
|
-
totalCents +=
|
|
2896
|
+
const cents = amountCents(row[FIELD.amount], requestId);
|
|
2897
|
+
totalCents += cents;
|
|
3137
2898
|
const key = group ?? "";
|
|
3138
2899
|
const entry = groups.get(key) ?? { group, cents: 0, items: [] };
|
|
3139
|
-
entry.cents +=
|
|
3140
|
-
entry.items.push({ name: textValue2(row[FIELD.itemName]), amount: formatCents(
|
|
2900
|
+
entry.cents += cents;
|
|
2901
|
+
entry.items.push({ name: textValue2(row[FIELD.itemName]), amount: formatCents(cents) });
|
|
3141
2902
|
groups.set(key, entry);
|
|
3142
2903
|
}
|
|
3143
2904
|
return {
|
|
@@ -3147,7 +2908,7 @@ function summarizeContractRows(requestId, rows) {
|
|
|
3147
2908
|
buyerTaxNo: firstText2(rows, FIELD.buyerTaxNo),
|
|
3148
2909
|
sellerName: sellerName(rows),
|
|
3149
2910
|
invoiceAmount: formatCents(totalCents),
|
|
3150
|
-
invoiceGroups: [...groups.values()].map(({ group, cents
|
|
2911
|
+
invoiceGroups: [...groups.values()].map(({ group, cents, items }) => ({ group, amount: formatCents(cents), items }))
|
|
3151
2912
|
};
|
|
3152
2913
|
}
|
|
3153
2914
|
function requestIdOf(value, location) {
|
|
@@ -3373,9 +3134,9 @@ function projectRequestListItem(item) {
|
|
|
3373
3134
|
}
|
|
3374
3135
|
function projectRequestListResult(value) {
|
|
3375
3136
|
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
3376
|
-
const
|
|
3377
|
-
if (!Array.isArray(
|
|
3378
|
-
return { ...
|
|
3137
|
+
const record2 = value;
|
|
3138
|
+
if (!Array.isArray(record2.data)) return value;
|
|
3139
|
+
return { ...record2, data: record2.data.map(projectRequestListItem) };
|
|
3379
3140
|
}
|
|
3380
3141
|
var UNSAFE_JSON_INTEGER_ID = /("id"\s*:\s*)(-?\d{16,})(?=\s*[,}\]])/g;
|
|
3381
3142
|
function quoteEmployeeIdsInJsonText(text5) {
|
|
@@ -3389,9 +3150,9 @@ function employeeIdString(value) {
|
|
|
3389
3150
|
}
|
|
3390
3151
|
function stringifyEmployeeRecordId(employee) {
|
|
3391
3152
|
if (!employee || typeof employee !== "object" || Array.isArray(employee)) return employee;
|
|
3392
|
-
const
|
|
3393
|
-
if (!("id" in
|
|
3394
|
-
return { ...
|
|
3153
|
+
const record2 = employee;
|
|
3154
|
+
if (!("id" in record2)) return employee;
|
|
3155
|
+
return { ...record2, id: employeeIdString(record2.id) };
|
|
3395
3156
|
}
|
|
3396
3157
|
function stringifyEmployeeSuperiorsPayload(payload) {
|
|
3397
3158
|
if ("currentEmployee" in payload) {
|
|
@@ -3518,9 +3279,9 @@ function projectFieldSearchItems(value) {
|
|
|
3518
3279
|
const items = [];
|
|
3519
3280
|
const seen = /* @__PURE__ */ new Set();
|
|
3520
3281
|
for (const item of raw) {
|
|
3521
|
-
const
|
|
3522
|
-
const id = String(
|
|
3523
|
-
const name = String(
|
|
3282
|
+
const record2 = item && typeof item === "object" && !Array.isArray(item) ? item : {};
|
|
3283
|
+
const id = String(record2.id ?? record2.value ?? "").trim();
|
|
3284
|
+
const name = String(record2.name ?? "").trim();
|
|
3524
3285
|
if (!id || !name || seen.has(id)) continue;
|
|
3525
3286
|
seen.add(id);
|
|
3526
3287
|
items.push({ id, name, value: id });
|
|
@@ -3578,9 +3339,9 @@ function toCents(value) {
|
|
|
3578
3339
|
const [whole, fraction = ""] = match[0].replace("-", "").split(".");
|
|
3579
3340
|
return (Number(whole) * 100 + Number(fraction.padEnd(2, "0"))) * (negative ? -1 : 1);
|
|
3580
3341
|
}
|
|
3581
|
-
function centsToMoney(
|
|
3582
|
-
const sign =
|
|
3583
|
-
const absolute = Math.abs(
|
|
3342
|
+
function centsToMoney(cents) {
|
|
3343
|
+
const sign = cents < 0 ? "-" : "";
|
|
3344
|
+
const absolute = Math.abs(cents);
|
|
3584
3345
|
const whole = Math.floor(absolute / 100);
|
|
3585
3346
|
const fraction = absolute % 100;
|
|
3586
3347
|
return `${sign}${whole}.${String(fraction).padStart(2, "0")}`;
|
|
@@ -3589,12 +3350,12 @@ function sumMoney(values) {
|
|
|
3589
3350
|
let sum = 0;
|
|
3590
3351
|
let invalid = 0;
|
|
3591
3352
|
for (const value of values) {
|
|
3592
|
-
const
|
|
3593
|
-
if (
|
|
3353
|
+
const cents = toCents(value);
|
|
3354
|
+
if (cents === null) {
|
|
3594
3355
|
invalid += 1;
|
|
3595
3356
|
continue;
|
|
3596
3357
|
}
|
|
3597
|
-
sum +=
|
|
3358
|
+
sum += cents;
|
|
3598
3359
|
}
|
|
3599
3360
|
return { amount: centsToMoney(sum), invalid };
|
|
3600
3361
|
}
|
|
@@ -3708,6 +3469,112 @@ var InvoiceReimCandidatesListOperation = class {
|
|
|
3708
3469
|
}
|
|
3709
3470
|
};
|
|
3710
3471
|
|
|
3472
|
+
// src/shortcuts/invoice/operations/reim-customer.ts
|
|
3473
|
+
var CUSTOMER_PAGE_ID = "1218181956452048911";
|
|
3474
|
+
var CUSTOMER_COMP_ID = "c39b9e14c0034336adf9e9bc39aeed75";
|
|
3475
|
+
var CUSTOMER_OBJECT_ID = "1173221220888059964";
|
|
3476
|
+
var CUSTOMER_NAME_FIELD = "1173221220888062665";
|
|
3477
|
+
var CUSTOMER_BEARER_FIELD = "1173221220888062667";
|
|
3478
|
+
function customerFilter(keywords) {
|
|
3479
|
+
return [
|
|
3480
|
+
{
|
|
3481
|
+
conditionType: "or",
|
|
3482
|
+
dataType: "field",
|
|
3483
|
+
id: "f9bf956948e54ed58ac32988ff8a84c8",
|
|
3484
|
+
conditionComId: `${CUSTOMER_COMP_ID}_quick_EXCLUDECACHE`,
|
|
3485
|
+
filterFields: [{
|
|
3486
|
+
compId: CUSTOMER_COMP_ID,
|
|
3487
|
+
compType: "Text",
|
|
3488
|
+
dataset: {
|
|
3489
|
+
isPhysical: true,
|
|
3490
|
+
ebuilderDataConfig: { dataSetup: {}, type: "FORM" },
|
|
3491
|
+
detailTable: false,
|
|
3492
|
+
groupId: "weaver-ebuilder-form-service",
|
|
3493
|
+
usage: "all",
|
|
3494
|
+
appId: "980180677416657173",
|
|
3495
|
+
id: CUSTOMER_OBJECT_ID,
|
|
3496
|
+
text: "\u5BA2\u6237",
|
|
3497
|
+
type: "LOGIC",
|
|
3498
|
+
objType: "physical"
|
|
3499
|
+
},
|
|
3500
|
+
fieldName: `field_${CUSTOMER_NAME_FIELD}`,
|
|
3501
|
+
id: CUSTOMER_NAME_FIELD,
|
|
3502
|
+
objId: CUSTOMER_OBJECT_ID,
|
|
3503
|
+
type: "String",
|
|
3504
|
+
text: "\u540D\u79F0"
|
|
3505
|
+
}],
|
|
3506
|
+
value: keywords
|
|
3507
|
+
},
|
|
3508
|
+
{
|
|
3509
|
+
conditionComId: `${CUSTOMER_COMP_ID}_filter_EXCLUDECACHE`,
|
|
3510
|
+
conditionType: "and",
|
|
3511
|
+
dataType: "classification",
|
|
3512
|
+
useConfig: true
|
|
3513
|
+
}
|
|
3514
|
+
];
|
|
3515
|
+
}
|
|
3516
|
+
function invalidResponse() {
|
|
3517
|
+
throw new InvoiceCliError("api", "reim_customer_search_invalid", "\u5BA2\u6237\u67E5\u8BE2\u8FD4\u56DE\u7684\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u65E0\u6CD5\u786E\u8BA4\u76F8\u5173\u5BA2\u6237\u548C\u627F\u62C5\u4E3B\u4F53", { exitCode: 1 });
|
|
3518
|
+
}
|
|
3519
|
+
function record(value) {
|
|
3520
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return invalidResponse();
|
|
3521
|
+
return value;
|
|
3522
|
+
}
|
|
3523
|
+
function responseString(value) {
|
|
3524
|
+
if (typeof value !== "string" || !value.trim()) return invalidResponse();
|
|
3525
|
+
return value;
|
|
3526
|
+
}
|
|
3527
|
+
function projectCustomer(value) {
|
|
3528
|
+
const row = record(value);
|
|
3529
|
+
const bearers = row[CUSTOMER_BEARER_FIELD] ?? [];
|
|
3530
|
+
if (!Array.isArray(bearers)) return invalidResponse();
|
|
3531
|
+
return {
|
|
3532
|
+
id: responseString(row.id),
|
|
3533
|
+
[CUSTOMER_NAME_FIELD]: responseString(row[CUSTOMER_NAME_FIELD]),
|
|
3534
|
+
[CUSTOMER_BEARER_FIELD]: bearers.map((value2) => {
|
|
3535
|
+
const bearer = record(value2);
|
|
3536
|
+
return {
|
|
3537
|
+
name: responseString(bearer.name),
|
|
3538
|
+
id: responseString(bearer.id),
|
|
3539
|
+
type: responseString(bearer.type)
|
|
3540
|
+
};
|
|
3541
|
+
})
|
|
3542
|
+
};
|
|
3543
|
+
}
|
|
3544
|
+
var InvoiceReimCustomerSearchOperation = class {
|
|
3545
|
+
name = "invoice.reim.customer.search";
|
|
3546
|
+
async execute(input, { host }) {
|
|
3547
|
+
if (Object.keys(input).some((key) => key !== "keywords")) {
|
|
3548
|
+
throw invoiceValidationError("input_invalid", "\u5BA2\u6237\u67E5\u8BE2\u53EA\u63A5\u53D7 keywords\uFF0C\u5176\u4ED6\u67E5\u8BE2\u53C2\u6570\u56FA\u5B9A");
|
|
3549
|
+
}
|
|
3550
|
+
const keywords = asNonEmptyString(input.keywords, "keywords");
|
|
3551
|
+
const result = await host.invoiceMultipartRequest({
|
|
3552
|
+
path: "/api/ebuilder/coms/nlist/getData",
|
|
3553
|
+
method: "POST",
|
|
3554
|
+
headers: {
|
|
3555
|
+
ebbusinessid: CUSTOMER_PAGE_ID,
|
|
3556
|
+
langtype: "zh_CN",
|
|
3557
|
+
pragma: "no-cache",
|
|
3558
|
+
priority: "u=1, i",
|
|
3559
|
+
timezoneoffset: "-480",
|
|
3560
|
+
Accept: "*/*"
|
|
3561
|
+
},
|
|
3562
|
+
fields: {
|
|
3563
|
+
filter: customerFilter(keywords),
|
|
3564
|
+
compId: CUSTOMER_COMP_ID,
|
|
3565
|
+
pageId: CUSTOMER_PAGE_ID,
|
|
3566
|
+
pageNo: "1",
|
|
3567
|
+
tableuid: "d26c94cc9c234d7da9bc2d399339a439"
|
|
3568
|
+
},
|
|
3569
|
+
operation: this.name
|
|
3570
|
+
});
|
|
3571
|
+
assertBusinessSuccess(result, "reim_customer_search_failed", "\u641C\u7D22\u76F8\u5173\u5BA2\u6237\u5931\u8D25");
|
|
3572
|
+
const list = record(record(result).data).list;
|
|
3573
|
+
if (!Array.isArray(list)) return invalidResponse();
|
|
3574
|
+
return { status: "COMPLETE", data: { list: list.map(projectCustomer) } };
|
|
3575
|
+
}
|
|
3576
|
+
};
|
|
3577
|
+
|
|
3711
3578
|
// src/shortcuts/invoice/operations/reim-relation.ts
|
|
3712
3579
|
var RELATION_SAVE_PATH = "/api/esb/server/event/triggerActionFlow";
|
|
3713
3580
|
var RELATION_SAVE_FLOW_ID = "908258457763844096";
|
|
@@ -3733,7 +3600,7 @@ var CUSTOMER_SEARCH_PAGE_ID = "1218181956452048911";
|
|
|
3733
3600
|
var CUSTOMER_SEARCH_COMP_ID = "c39b9e14c0034336adf9e9bc39aeed75";
|
|
3734
3601
|
var CUSTOMER_SEARCH_WORKFLOW_ID = "100003460000000060";
|
|
3735
3602
|
var CUSTOMER_OBJ_ID = "1173221220888059964";
|
|
3736
|
-
var
|
|
3603
|
+
var CUSTOMER_NAME_FIELD2 = "1173221220888062665";
|
|
3737
3604
|
var PROJECT_SEARCH_PATH = "/api/ebuilder/form/common/browser/data/ebuilder";
|
|
3738
3605
|
var PROJECT_NAME_FIELD = "1020275734718578690";
|
|
3739
3606
|
var PROJECT_FORM_PARAM = JSON.stringify({
|
|
@@ -3798,12 +3665,12 @@ async function mapInOrder(items, fn) {
|
|
|
3798
3665
|
return results;
|
|
3799
3666
|
}
|
|
3800
3667
|
function saveOutcome(value) {
|
|
3801
|
-
const
|
|
3802
|
-
const message = text3(asRecord3(asRecord3(asRecord3(asRecord3(
|
|
3803
|
-
if (Number(
|
|
3668
|
+
const record2 = asRecord3(value);
|
|
3669
|
+
const message = text3(asRecord3(asRecord3(asRecord3(asRecord3(record2.actionData).responseData).customData).mainTable).msg);
|
|
3670
|
+
if (Number(record2.resultCode) === 200 && message.includes(RELATION_SAVED_MESSAGE)) return { saved: true, message };
|
|
3804
3671
|
return {
|
|
3805
3672
|
saved: false,
|
|
3806
|
-
message: message || text3(
|
|
3673
|
+
message: message || text3(record2.resultMsg) || `\u52A8\u4F5C\u6D41\u6CA1\u6709\u8FD4\u56DE\u300C${RELATION_SAVED_MESSAGE}\u300D\uFF08resultCode=${text3(record2.resultCode) || "\u65E0"}\uFF09`
|
|
3807
3674
|
};
|
|
3808
3675
|
}
|
|
3809
3676
|
var InvoiceReimRelationSaveOperation = class {
|
|
@@ -3962,7 +3829,7 @@ function relationSearchTarget(value) {
|
|
|
3962
3829
|
if (value === "customer" || value === "project") return value;
|
|
3963
3830
|
throw invoiceValidationError("input_invalid", "target \u53EA\u80FD\u662F customer\uFF08\u76F8\u5173\u5BA2\u6237\uFF09\u6216 project\uFF08\u76F8\u5173\u9879\u76EE\uFF09");
|
|
3964
3831
|
}
|
|
3965
|
-
function
|
|
3832
|
+
function customerFilter2(keywords) {
|
|
3966
3833
|
return [
|
|
3967
3834
|
{
|
|
3968
3835
|
conditionType: "or",
|
|
@@ -3984,8 +3851,8 @@ function customerFilter(keywords) {
|
|
|
3984
3851
|
type: "LOGIC",
|
|
3985
3852
|
objType: "physical"
|
|
3986
3853
|
},
|
|
3987
|
-
fieldName: `field_${
|
|
3988
|
-
id:
|
|
3854
|
+
fieldName: `field_${CUSTOMER_NAME_FIELD2}`,
|
|
3855
|
+
id: CUSTOMER_NAME_FIELD2,
|
|
3989
3856
|
objId: CUSTOMER_OBJ_ID,
|
|
3990
3857
|
type: "String",
|
|
3991
3858
|
text: "\u540D\u79F0"
|
|
@@ -4009,7 +3876,7 @@ async function searchCustomers(host, keywords, operation) {
|
|
|
4009
3876
|
fields: {
|
|
4010
3877
|
workflowId: CUSTOMER_SEARCH_WORKFLOW_ID,
|
|
4011
3878
|
isCreate: "1",
|
|
4012
|
-
filter:
|
|
3879
|
+
filter: customerFilter2(keywords),
|
|
4013
3880
|
compId: CUSTOMER_SEARCH_COMP_ID,
|
|
4014
3881
|
pageId: CUSTOMER_SEARCH_PAGE_ID,
|
|
4015
3882
|
pageNo: "1",
|
|
@@ -4020,8 +3887,8 @@ async function searchCustomers(host, keywords, operation) {
|
|
|
4020
3887
|
assertBusinessSuccess(result, "reim_relation_search_failed", "\u641C\u7D22\u76F8\u5173\u5BA2\u6237\u5931\u8D25");
|
|
4021
3888
|
const list = asRecord3(asRecord3(result).data).list;
|
|
4022
3889
|
return (Array.isArray(list) ? list : []).map((row) => {
|
|
4023
|
-
const
|
|
4024
|
-
return { id: text3(
|
|
3890
|
+
const record2 = asRecord3(row);
|
|
3891
|
+
return { id: text3(record2.id), name: text3(record2[CUSTOMER_NAME_FIELD2]) };
|
|
4025
3892
|
});
|
|
4026
3893
|
}
|
|
4027
3894
|
async function searchProjects(host, keywords, operation) {
|
|
@@ -4118,14 +3985,14 @@ function amountCents2(value, name) {
|
|
|
4118
3985
|
if (value === void 0 || value === null || value === "") return null;
|
|
4119
3986
|
const text5 = typeof value === "number" ? String(value) : value;
|
|
4120
3987
|
const match = typeof text5 === "string" ? /^(\d+)(?:\.(\d{1,2}))?$/u.exec(text5.trim()) : null;
|
|
4121
|
-
const
|
|
4122
|
-
if (!Number.isSafeInteger(
|
|
3988
|
+
const cents = match ? Number(match[1]) * 100 + Number((match[2] ?? "").padEnd(2, "0")) : NaN;
|
|
3989
|
+
if (!Number.isSafeInteger(cents) || cents <= 0) {
|
|
4123
3990
|
throw invoiceValidationError("input_invalid", `${name} \u5FC5\u987B\u662F\u5927\u4E8E 0\u3001\u6700\u591A\u4E24\u4F4D\u5C0F\u6570\u7684\u91D1\u989D`);
|
|
4124
3991
|
}
|
|
4125
|
-
return
|
|
3992
|
+
return cents;
|
|
4126
3993
|
}
|
|
4127
|
-
function formatCents2(
|
|
4128
|
-
return
|
|
3994
|
+
function formatCents2(cents) {
|
|
3995
|
+
return cents % 100 === 0 ? String(cents / 100) : (cents / 100).toFixed(2);
|
|
4129
3996
|
}
|
|
4130
3997
|
function subsidyInvoiceDateRange(now = /* @__PURE__ */ new Date()) {
|
|
4131
3998
|
const dateEnd = shanghaiCalendarDate(0, now);
|
|
@@ -4138,8 +4005,8 @@ function normalizeInvoices(value) {
|
|
|
4138
4005
|
const invoices = value.map((item, index) => {
|
|
4139
4006
|
if (!item || typeof item !== "object") throw invoiceValidationError("input_invalid", `invoices[${index}] \u5FC5\u987B\u662F {fid,total,date}`);
|
|
4140
4007
|
const fid = asPositiveString(String(item.fid ?? ""), `invoices[${index}].fid`);
|
|
4141
|
-
const
|
|
4142
|
-
if (
|
|
4008
|
+
const cents = amountCents2(item.total, `invoices[${index}].total`);
|
|
4009
|
+
if (cents === null) throw invoiceValidationError("input_invalid", `invoices[${index}].total \u5FC5\u586B\uFF1A\u8FD9\u5F20\u53D1\u7968\u7684\u4EF7\u7A0E\u5408\u8BA1`);
|
|
4143
4010
|
const date = asNonEmptyString(item.date, `invoices[${index}].date`);
|
|
4144
4011
|
const timestamp = Date.parse(`${date}T00:00:00Z`);
|
|
4145
4012
|
if (!/^\d{4}-\d{2}-\d{2}$/u.test(date) || !Number.isFinite(timestamp) || new Date(timestamp).toISOString().slice(0, 10) !== date) {
|
|
@@ -4153,7 +4020,7 @@ function normalizeInvoices(value) {
|
|
|
4153
4020
|
dateEnd
|
|
4154
4021
|
});
|
|
4155
4022
|
}
|
|
4156
|
-
return { fid, cents
|
|
4023
|
+
return { fid, cents, date };
|
|
4157
4024
|
});
|
|
4158
4025
|
if (new Set(invoices.map((item) => item.fid)).size !== invoices.length) {
|
|
4159
4026
|
throw invoiceValidationError("input_invalid", "invoices \u4E0D\u80FD\u5305\u542B\u91CD\u590D fid");
|
|
@@ -4165,7 +4032,7 @@ function workflowViewUrl(baseUrl, requestId) {
|
|
|
4165
4032
|
}
|
|
4166
4033
|
function subsidyReceipt(options) {
|
|
4167
4034
|
const { processTitle, reason, url, details, skipped, allowanceCents, reimbursedTotalCents } = options;
|
|
4168
|
-
const money = (
|
|
4035
|
+
const money = (cents) => `\xA5${(cents / 100).toFixed(2)}`;
|
|
4169
4036
|
const includedTotalCents = details.reduce((sum, item) => sum + item.cents, 0);
|
|
4170
4037
|
const partialAmountCents = includedTotalCents - reimbursedTotalCents;
|
|
4171
4038
|
const dates = details.map((item) => item.date).sort();
|
|
@@ -4452,8 +4319,8 @@ function usefulExt(rawExt, cname) {
|
|
|
4452
4319
|
return asRecord4(compact(ext));
|
|
4453
4320
|
}
|
|
4454
4321
|
function party(value) {
|
|
4455
|
-
const
|
|
4456
|
-
return { company: text4(
|
|
4322
|
+
const record2 = asRecord4(value);
|
|
4323
|
+
return { company: text4(record2.company), tcode: text4(record2.tcode) };
|
|
4457
4324
|
}
|
|
4458
4325
|
function invoiceResult(item, baseUrl) {
|
|
4459
4326
|
const entry = asRecord4(item);
|
|
@@ -4547,13 +4414,13 @@ function buildRegistry() {
|
|
|
4547
4414
|
new InvoiceDownloadOperation(),
|
|
4548
4415
|
new InvoiceDeletePrepareOperation(),
|
|
4549
4416
|
new InvoiceDeleteApplyOperation(),
|
|
4550
|
-
new InvoiceBrowseFieldDataOperation(),
|
|
4551
4417
|
new InvoiceReimFileOcrPreviewOperation(),
|
|
4552
4418
|
new InvoiceReimRequestsListOperation(),
|
|
4553
4419
|
new InvoiceReimWorkflowResolveOperation(),
|
|
4554
4420
|
new InvoiceReimCandidatesListOperation(),
|
|
4555
4421
|
new InvoiceReimEmployeeSuperiorsOperation(),
|
|
4556
4422
|
new InvoiceReimFieldSearchOperation(),
|
|
4423
|
+
new InvoiceReimCustomerSearchOperation(),
|
|
4557
4424
|
new InvoiceReimRelationSearchOperation(),
|
|
4558
4425
|
new InvoiceReimRelationSaveOperation(),
|
|
4559
4426
|
new InvoiceReimRelationListOperation(),
|