weaver-work-cli 0.1.73 → 0.1.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -1
- package/dist/chunks/{archive-THZV4ND4.js → archive-OZJ6PYUR.js} +14 -9
- package/dist/chunks/{archive-oa-PQ23OLEV.js → archive-oa-BHL5RK2F.js} +10 -7
- package/dist/chunks/{asset-RGPROZYH.js → asset-HKRFRQR2.js} +10 -7
- package/dist/chunks/{asset-idle-Z2PDX7NA.js → asset-idle-GGIR4KE7.js} +7 -4
- package/dist/chunks/{attachment-content-R3RPVOYE.js → attachment-content-4OV65NK5.js} +3 -3
- package/dist/chunks/{blog-7U3QZPIF.js → blog-HYDP4DV3.js} +10 -7
- package/dist/chunks/{caizhilian-3AB42GCV.js → caizhilian-JS4RQZ6Z.js} +10 -7
- package/dist/chunks/{calendar-KINM64E4.js → calendar-SWRY4DIT.js} +10 -7
- package/dist/chunks/chunk-257JXJGD.js +30 -0
- package/dist/chunks/{chunk-LLCMOZ5L.js → chunk-2AUFKU2D.js} +11 -11
- package/dist/chunks/chunk-2BZ7TY4M.js +49 -0
- package/dist/chunks/{chunk-WM33BSIL.js → chunk-2QCCXPNU.js} +1 -1
- package/dist/chunks/{chunk-TV46Q4NY.js → chunk-4FCBEWNB.js} +74 -68
- package/dist/chunks/{chunk-NUP4RYZK.js → chunk-5D2V7ZAN.js} +2 -2
- package/dist/chunks/{chunk-DRUND2PJ.js → chunk-5QUTQHXF.js} +225 -152
- package/dist/chunks/{chunk-4BXR6CNB.js → chunk-5ZJGPEIB.js} +2 -2
- package/dist/chunks/chunk-7DE3VMZD.js +35 -0
- package/dist/chunks/chunk-BNKUHN4N.js +1346 -0
- package/dist/chunks/{chunk-2CHGUYMG.js → chunk-BSR5TM7U.js} +4 -4
- package/dist/chunks/{chunk-4I26YMBY.js → chunk-ERZY6GYL.js} +7 -3
- package/dist/chunks/{chunk-4YXAK6OA.js → chunk-FEZK536Z.js} +12 -7
- package/dist/chunks/{chunk-F4HM25K4.js → chunk-I6NOHKEK.js} +1 -1
- package/dist/chunks/{chunk-JMJBPP4B.js → chunk-J7FAAHWH.js} +2 -2
- package/dist/chunks/{chunk-54ST55IJ.js → chunk-JJONWB5N.js} +11 -1
- package/dist/chunks/chunk-JOY3HZXL.js +467 -0
- package/dist/chunks/{chunk-GWJLAF6B.js → chunk-JWF2R6EQ.js} +0 -462
- package/dist/chunks/{chunk-BWYVS62Z.js → chunk-KEA4XQPO.js} +4 -4
- package/dist/chunks/chunk-KINXYJXM.js +205 -0
- package/dist/chunks/{chunk-IBSJJGXL.js → chunk-KWJEICD4.js} +2 -2
- package/dist/chunks/{chunk-GAMGDNTF.js → chunk-LJI4N6FV.js} +1 -1
- package/dist/chunks/{chunk-IU6UB2TD.js → chunk-MXCRKXOP.js} +48 -6
- package/dist/chunks/{chunk-PAFOLIYQ.js → chunk-NWYHCZTY.js} +1 -1
- package/dist/chunks/chunk-OJ4JPD25.js +428 -0
- package/dist/chunks/{chunk-L7TYG5SN.js → chunk-OQCK5SAU.js} +2 -2
- package/dist/chunks/chunk-PG5YSNYY.js +1166 -0
- package/dist/chunks/{chunk-XZBYRYWX.js → chunk-QJWVYOOV.js} +2 -2
- package/dist/chunks/{chunk-AMAPQVBT.js → chunk-QVKRNL7L.js} +286 -305
- package/dist/chunks/chunk-SU6IJD6D.js +49 -0
- package/dist/chunks/{chunk-ZWLWXHJC.js → chunk-TA2RBUTH.js} +2 -2
- package/dist/chunks/{chunk-6HT73VOI.js → chunk-U6Y32KEV.js} +2 -2
- package/dist/chunks/chunk-UUJK76HV.js +209 -0
- package/dist/chunks/{chunk-R3MK2RBN.js → chunk-VOMDD2C5.js} +1 -1
- package/dist/chunks/chunk-Y3C6MDL7.js +28 -0
- package/dist/chunks/chunk-ZM7RN2IM.js +38 -0
- package/dist/chunks/{chunk-2XED2FKY.js → chunk-ZUB4M4N3.js} +38 -36
- package/dist/chunks/{chunk-7QFVXP2X.js → chunk-ZWIMLT6P.js} +8 -7
- package/dist/chunks/cli-FULPXIKJ.js +226 -0
- package/dist/chunks/commands-BNWFNTD3.js +70 -0
- package/dist/chunks/{conflict-VPAR7E6F.js → conflict-5BKCDV2F.js} +2 -2
- package/dist/chunks/{contract-DDXAO2DZ.js → contract-WI23OXVC.js} +12446 -5964
- package/dist/chunks/{cowork-34QCHMDD.js → cowork-DZBBVNMQ.js} +11 -8
- package/dist/chunks/{create-flow-52PU2OBI.js → create-flow-7ZRBRKX7.js} +6 -6
- package/dist/chunks/{data-CLQ62QGD.js → data-PAZVE6QE.js} +6 -3
- package/dist/chunks/{ebuilder-form-W5R7Q22S.js → ebuilder-form-5SQXIGXN.js} +9 -6
- package/dist/chunks/{ehr-LCNAVMK5.js → ehr-CX5F4ZAU.js} +23 -16
- package/dist/chunks/{entry-mode-6Z3ZV3DE.js → entry-mode-I2BYNONZ.js} +3 -3
- package/dist/chunks/{env-RDKWAARB.js → env-ZAQZ7EHN.js} +2 -2
- package/dist/chunks/{esb-ANKPUU65.js → esb-DQTXDIBF.js} +10 -7
- package/dist/chunks/{factory-434B7RAT.js → factory-XRI6KZ7H.js} +1 -1
- package/dist/chunks/{fna-AKBSG5HI.js → fna-FK6HQVJL.js} +13 -8
- package/dist/chunks/{group-chat-PROTW22R.js → group-chat-MLWNYM2P.js} +3 -3
- package/dist/chunks/{host-WO4L5G5I.js → host-3EPREGXS.js} +6 -3
- package/dist/chunks/{host-XIYG4F4B.js → host-J74JGYAW.js} +6 -3
- package/dist/chunks/{host-7FJW4E7R.js → host-KUMU3DDK.js} +6 -3
- package/dist/chunks/{host-5R2SNFWD.js → host-MEC4VQZA.js} +6 -3
- package/dist/chunks/{host-PDJAKCT7.js → host-T6NNQGVZ.js} +6 -3
- package/dist/chunks/{host-CGXUFQO4.js → host-VI7Q45PM.js} +6 -3
- package/dist/chunks/{hrm-WGODDTEH.js → hrm-KKVAW4P5.js} +8 -5
- package/dist/chunks/{im-YKTKAJU3.js → im-47CIWQNL.js} +7 -4
- package/dist/chunks/{invoice-PVYCCCVM.js → invoice-CDYRBNIG.js} +21 -16
- package/dist/chunks/{jiuchuanhui-RKOQW7BY.js → jiuchuanhui-M7QTRHZK.js} +17 -10
- package/dist/chunks/{lazy-dispatch-DW45AFQ5.js → lazy-dispatch-FKQJZFI5.js} +22 -8
- package/dist/chunks/{mail-BNB5S4NW.js → mail-NRBS5N6Y.js} +11 -8
- package/dist/chunks/{meeting-O2KDJH66.js → meeting-WC5LD3IO.js} +22 -18
- package/dist/chunks/{minute-doc-JUCG56GY.js → minute-doc-OQUMDTKG.js} +4 -4
- package/dist/chunks/{okr-LWFGWOE7.js → okr-EHKSKMPL.js} +10 -7
- package/dist/chunks/{operations-532PN5OB.js → operations-V5VM5MS2.js} +7 -4
- package/dist/chunks/{performance-7W5COCFU.js → performance-ZJADXJPN.js} +6 -3
- package/dist/chunks/{plan-ZVY3IYTL.js → plan-OTDNBDJ7.js} +10 -7
- package/dist/chunks/{project-SA62B7MH.js → project-4XVBQ3HX.js} +10 -7
- package/dist/chunks/{reception-NGIONPQ3.js → reception-3FAHOOH7.js} +8 -4
- package/dist/chunks/{recruit-stage-WOSN6MGP.js → recruit-stage-3WTVWW2K.js} +199 -74
- package/dist/chunks/register-SQOPIR2G.js +16 -0
- package/dist/chunks/{registry-R72GWXOG.js → registry-F4YFZLOD.js} +7 -3
- package/dist/chunks/registry-NBTBXR4L.js +30 -0
- package/dist/chunks/{registry-N7P3W2RD.js → registry-TJGCVRCW.js} +7 -4
- package/dist/chunks/{room-recommend-KCGIVUFR.js → room-recommend-KL62XB2Y.js} +4 -4
- package/dist/chunks/root-YZG2TS5W.js +16 -0
- package/dist/chunks/{schedule-6UP27HQ4.js → schedule-XOISYUPB.js} +4 -4
- package/dist/chunks/{smart-extract-DDOQSPRB.js → smart-extract-UYGNV3BM.js} +15 -7
- package/dist/chunks/update-AV5VOXGY.js +13 -0
- package/dist/chunks/{workflow-V5ALD6QZ.js → workflow-V54LJPXL.js} +15 -10
- package/dist/cli.js +40 -0
- package/dist/cmd/action.js +3 -1
- package/dist/cmd/doctor/index.js +1 -1
- package/dist/cmd/e10/index.js +1 -1
- package/dist/cmd/identity/index.js +5 -8
- package/dist/cmd/index.js +2 -0
- package/dist/cmd/setup/index.js +1 -1
- package/dist/cmd/update/index.js +38 -0
- package/dist/core/manifest-view.js +1 -1
- package/dist/core/output.js +8 -1
- package/dist/core/runtime-agent.js +13 -0
- package/dist/core/update-notice.js +23 -0
- package/dist/index.js +105 -198
- package/dist/internal/e10/auth/agent-host-key.js +16 -0
- package/dist/internal/e10/auth/agent-hosts.js +45 -9
- package/dist/internal/e10/auth/commands.js +66 -36
- package/dist/internal/e10/auth/session.js +30 -15
- package/dist/internal/e10/auth/xiaoe.js +4 -20
- package/dist/internal/e10/auth-recovery.js +44 -4
- package/dist/internal/e10/context.js +5 -2
- package/dist/internal/update/bootstrap.js +96 -0
- package/dist/internal/update/npm.js +78 -0
- package/dist/internal/update/service.js +252 -0
- package/dist/internal/update/store.js +135 -0
- package/dist/shortcuts/archive/index.js +2 -2
- package/dist/shortcuts/archive/manifest.js +1 -0
- package/dist/shortcuts/archive/operations/search.js +3 -1
- package/dist/shortcuts/archive-oa/index.js +1 -1
- package/dist/shortcuts/asset/index.js +1 -1
- package/dist/shortcuts/asset-idle/index.js +1 -1
- package/dist/shortcuts/blog/index.js +1 -1
- package/dist/shortcuts/caizhilian/index.js +1 -1
- package/dist/shortcuts/calendar/index.js +1 -1
- package/dist/shortcuts/contract/data/bi-config.js +156 -0
- package/dist/shortcuts/contract/data/collection-ledger-html.js +189 -0
- package/dist/shortcuts/contract/data/collection-node-catalog.js +226 -0
- package/dist/shortcuts/contract/data/metric-catalog.js +154 -20
- package/dist/shortcuts/contract/data/report-renderers.js +414 -0
- package/dist/shortcuts/contract/data/report-spec.js +132 -0
- package/dist/shortcuts/contract/error-actions.js +114 -0
- package/dist/shortcuts/contract/host.js +12 -3
- package/dist/shortcuts/contract/index.js +17 -1
- package/dist/shortcuts/contract/manifest.js +398 -3
- package/dist/shortcuts/contract/ooxml/docx-table.js +48 -0
- package/dist/shortcuts/contract/operations/bi-preview.js +131 -0
- package/dist/shortcuts/contract/operations/bizreview-report.js +496 -0
- package/dist/shortcuts/contract/operations/collection-node.js +229 -0
- package/dist/shortcuts/contract/operations/docx-slots.js +735 -16
- package/dist/shortcuts/contract/operations/draft-build.js +940 -0
- package/dist/shortcuts/contract/operations/draft-submit.js +229 -0
- package/dist/shortcuts/contract/operations/first-screen.js +3 -2
- package/dist/shortcuts/contract/operations/generated-submit.js +175 -0
- package/dist/shortcuts/contract/operations/ledger-report.js +233 -0
- package/dist/shortcuts/contract/operations/ledger-stat.js +1400 -0
- package/dist/shortcuts/contract/operations/ledger.js +4 -1
- package/dist/shortcuts/contract/operations/metrics.js +9 -3
- package/dist/shortcuts/contract/operations/ops-draft.js +527 -0
- package/dist/shortcuts/contract/operations/page.js +9 -0
- package/dist/shortcuts/contract/operations/quote-submit.js +55 -229
- package/dist/shortcuts/contract/operations/registry.js +20 -0
- package/dist/shortcuts/contract/operations/sign-launch.js +256 -0
- package/dist/shortcuts/contract/operations/viewlink.js +334 -0
- package/dist/shortcuts/cowork/index.js +2 -2
- package/dist/shortcuts/ebuilder-form/index.js +1 -1
- package/dist/shortcuts/ehr/index.js +2 -2
- package/dist/shortcuts/ehr/manifest.js +1 -1
- package/dist/shortcuts/ehr/operations/recruit-position.js +7 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +7 -6
- package/dist/shortcuts/ehr/operations/recruit.js +318 -248
- package/dist/shortcuts/ehr/operations/shared.js +22 -2
- package/dist/shortcuts/esb/index.js +1 -1
- package/dist/shortcuts/fna/index.js +1 -1
- package/dist/shortcuts/fna/manifest.js +1 -0
- package/dist/shortcuts/fna/operations/expense-chart.js +3 -1
- package/dist/shortcuts/hrm/index.js +1 -1
- package/dist/shortcuts/invoice/index.js +1 -1
- package/dist/shortcuts/jiuchuanhui/index.js +2 -2
- package/dist/shortcuts/jiuchuanhui/manifest.js +3 -0
- package/dist/shortcuts/mail/index.js +2 -2
- package/dist/shortcuts/meeting/index.js +1 -1
- package/dist/shortcuts/meeting/manifest.js +1 -0
- package/dist/shortcuts/meeting/operations/eb/catalog.js +5 -3
- package/dist/shortcuts/meeting/operations/eb/conflict.js +3 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +10 -9
- package/dist/shortcuts/meeting/operations/eb/factory.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/member-expand.js +3 -2
- package/dist/shortcuts/meeting/operations/invitation-publish.js +3 -3
- package/dist/shortcuts/meeting/operations/invitation.js +4 -4
- package/dist/shortcuts/meeting/operations/link.js +3 -1
- package/dist/shortcuts/okr/index.js +1 -1
- package/dist/shortcuts/performance/index.js +1 -1
- package/dist/shortcuts/plan/index.js +1 -1
- package/dist/shortcuts/project/index.js +1 -1
- package/dist/shortcuts/reception/manifest.js +2 -2
- package/dist/shortcuts/recruit-stage/context.js +10 -2
- package/dist/shortcuts/recruit-stage/index.js +16 -3
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +17 -8
- package/dist/shortcuts/recruit-stage/operations/list.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +178 -35
- package/dist/shortcuts/recruit-stage/operations/search.js +2 -2
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +4 -2
- package/dist/shortcuts/recruit-stage/shared.js +27 -53
- package/dist/shortcuts/smart-extract/manifest.js +1 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +7 -2
- package/dist/shortcuts/smart-extract/operations/validate.js +4 -1
- package/dist/shortcuts/workflow/index.js +2 -2
- package/dist/shortcuts/workflow/manifest.js +1 -0
- package/dist/shortcuts/workflow/operations/aiDeepRead/render.js +4 -1
- package/dist/shortcuts/workflow/operations/deepRead.js +23 -2
- package/dist/shortcuts/workflow/operations/form.js +8 -2
- package/docs/contract.md +6 -1
- package/docs/e10-auth.md +25 -7
- package/docs/operation-manual.md +15 -0
- package/package.json +2 -2
- package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
- package/skill-template/business-info.json +28 -0
- package/skill-template/domains/jinchengda.md +13 -1
- package/skills/weaver-e10-archive-oa/references/source-manifest.json +3 -3
- package/skills/weaver-e10-caizhilian/references/auth-and-install.md +2 -1
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +3 -3
- package/skills/weaver-e10-esb/references/source-manifest.json +3 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +90 -32
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +45 -0
- package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +68 -0
- package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +216 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-negotiate.md +215 -0
- package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +113 -0
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +19 -3
- package/skills/weaver-e10-jinchengda/references/contract-decisions.md +114 -0
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +53 -44
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +200 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +18 -1
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +138 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +158 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +3 -1
- package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +139 -0
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +10 -3
- package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +106 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +176 -56
- package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +123 -0
- package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +410 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-viewlink.md +110 -0
- package/skills/weaver-e10-jinchengda/references/orchestration.md +38 -24
- package/skills/weaver-e10-meeting/SKILL.md +13 -0
- package/skills/weaver-e10-okr/SKILL.md +11 -0
- package/skills/weaver-e10-okr/references/source-manifest.json +7 -6
- package/skills/weaver-e10-performance/SKILL.md +131 -39
- package/skills/weaver-e10-performance/agents/openai.yaml +48 -17
- package/skills/weaver-e10-performance/references/default-assembly.md +3 -0
- package/skills/weaver-e10-performance/references/extraction-guide.md +17 -3
- package/skills/weaver-e10-performance/references/flow-assess.md +38 -5
- package/skills/weaver-e10-performance/references/scheme-setting-page.md +20 -3
- package/skills/weaver-e10-performance/scripts/assemble_scheme.py +461 -0
- package/skills/weaver-e10-performance/scripts/parse_appraisal_doc.py +41 -0
- package/skills/weaver-e10-plan/SKILL.md +10 -0
- package/skills/weaver-e10-plan/references/source-manifest.json +13 -13
- package/skills/weaver-e10-qiyecheng/SKILL.md +2 -2
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +9 -9
- package/skills/weaver-e10-recruit-stage/SKILL.md +188 -169
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +55 -37
- package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +3 -0
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +168 -35
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +175 -7
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +3 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +15 -1
- package/skills/weaver-e10-recruit-stage/lib/report-attachment.mjs +38 -0
- package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +5 -1
- package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +12 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +16 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +10 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +6 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +31 -23
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +16 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +6 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +147 -34
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +16 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +6 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +24 -15
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +5 -1
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +41 -28
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +23 -26
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +32 -30
- package/skills/weaver-e10-shared/SKILL.md +40 -5
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +11 -1
- package/skills/weaver-e10-shared/references/json-output-contract.md +144 -8
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +11 -0
- package/skills/weaver-e10-shijingran/references/source-manifest.json +3 -3
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
- package/skills/weaver-e10-workflow/references/source-manifest.json +3 -3
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +5 -5
- package/dist/chunks/chunk-ICP53R52.js +0 -2849
- package/dist/chunks/registry-RIQ67ZT7.js +0 -27
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 收款节点台账 HTML(2026-11-29)。
|
|
3
|
+
*
|
|
4
|
+
* 视觉骨架沿用用户提供的台账参考版(`index (5).html`):页头 + 筛选说明条 + 4 个指标卡 + 表格。
|
|
5
|
+
* 与本仓库统计报表(`report-renderers.ts`)分开:那份是"指标×期间"的分析报表,
|
|
6
|
+
* 这份是"逐行条款"的**台账**,行结构固定为付款阶段。
|
|
7
|
+
*
|
|
8
|
+
* 展示口径:
|
|
9
|
+
* - 金额一律「元 + 2 位小数 + 千分位」(与 contract-ledger-query-playbook §0 一致);
|
|
10
|
+
* KPI 卡同时给万元概览,但表内不折算,避免精度争议;
|
|
11
|
+
* - 无值显示「—」,不补 0;
|
|
12
|
+
* - 逾期天数本地计算(今天 − 计划收款日),正数=已逾期。
|
|
13
|
+
*/
|
|
14
|
+
const STYLE = `
|
|
15
|
+
:root{--primary:#2468f2;--bg:#f3f5f9;--card:#fff;--border:#e5e9f0;--text:#1f2329;--text-2:#646a73;--text-3:#8f959e;
|
|
16
|
+
--green:#17a06b;--green-bg:#e5f6ef;--orange:#d9740a;--orange-bg:#fdf1e2;--red:#d83931;--red-bg:#fdeceb}
|
|
17
|
+
*{margin:0;padding:0;box-sizing:border-box}
|
|
18
|
+
body{font-family:-apple-system,"PingFang SC","Microsoft YaHei","Source Han Sans SC",sans-serif;background:var(--bg);color:var(--text);font-size:14px}
|
|
19
|
+
.page{max-width:1440px;margin:0 auto;padding:20px 24px}
|
|
20
|
+
.page-head{display:flex;align-items:baseline;gap:12px;margin-bottom:16px;flex-wrap:wrap}
|
|
21
|
+
.page-head h1{font-size:17px;font-weight:600}
|
|
22
|
+
.page-head .note{font-size:12.5px;color:var(--text-3)}
|
|
23
|
+
.filter{background:var(--card);border:1px solid var(--border);border-radius:8px;padding:14px 20px;display:flex;flex-wrap:wrap;gap:10px 22px;align-items:center;font-size:13px;color:var(--text-2)}
|
|
24
|
+
.filter b{color:var(--text);font-weight:600}
|
|
25
|
+
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:16px}
|
|
26
|
+
.stat{background:var(--card);border:1px solid var(--border);border-radius:8px;padding:14px 18px}
|
|
27
|
+
.stat .k{font-size:12.5px;color:var(--text-2)}
|
|
28
|
+
.stat .v{font-size:22px;font-weight:600;margin-top:4px;font-variant-numeric:tabular-nums;line-height:1.2}
|
|
29
|
+
.stat .v.warn{color:var(--red)}
|
|
30
|
+
.stat .v small{font-size:12.5px;font-weight:500;color:var(--text-3);margin-left:3px}
|
|
31
|
+
.stat .sub{font-size:12px;color:var(--text-3);margin-top:2px}
|
|
32
|
+
.table-card{background:var(--card);border:1px solid var(--border);border-radius:8px;margin-top:16px;overflow:hidden}
|
|
33
|
+
.table-head{display:flex;align-items:center;padding:14px 20px;border-bottom:1px solid var(--border)}
|
|
34
|
+
.table-head .t{font-weight:600}
|
|
35
|
+
.table-head .n{font-size:12.5px;color:var(--text-3);margin-left:10px}
|
|
36
|
+
table{width:100%;border-collapse:collapse}
|
|
37
|
+
th,td{padding:11px 14px;text-align:left;font-size:13px;border-bottom:1px solid var(--border);vertical-align:top}
|
|
38
|
+
th{background:#fafbfd;color:var(--text-2);font-weight:500;white-space:nowrap}
|
|
39
|
+
tbody tr:hover{background:#f7f9ff}
|
|
40
|
+
tbody tr:last-child td{border-bottom:none}
|
|
41
|
+
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
|
|
42
|
+
.cname{font-weight:500;color:var(--text)}
|
|
43
|
+
.ctype{font-size:12px;color:var(--text-3);margin-top:2px;white-space:normal;max-width:460px;line-height:1.6}
|
|
44
|
+
.mono{font-variant-numeric:tabular-nums}
|
|
45
|
+
.pill{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:10px;font-size:12px;white-space:nowrap}
|
|
46
|
+
.pill::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
|
|
47
|
+
.pill.r{color:var(--red);background:var(--red-bg)}
|
|
48
|
+
.pill.o{color:var(--orange);background:var(--orange-bg)}
|
|
49
|
+
.pill.g{color:var(--green);background:var(--green-bg)}
|
|
50
|
+
.pill.gray{color:var(--text-2);background:#eef0f4}
|
|
51
|
+
.overdue{color:var(--red);font-weight:600}
|
|
52
|
+
.empty{padding:44px;text-align:center;color:var(--text-3)}
|
|
53
|
+
.footer-note{padding:12px 20px;font-size:12px;color:var(--text-3);border-top:1px solid var(--border);line-height:1.8}
|
|
54
|
+
.warnbar{background:var(--orange-bg);border:1px solid #f7d9b0;color:#8a5200;border-radius:8px;padding:10px 16px;font-size:12.5px;margin-top:16px;line-height:1.7}
|
|
55
|
+
`;
|
|
56
|
+
function esc(value) {
|
|
57
|
+
return String(value ?? '')
|
|
58
|
+
.replace(/&/gu, '&')
|
|
59
|
+
.replace(/</gu, '<')
|
|
60
|
+
.replace(/>/gu, '>')
|
|
61
|
+
.replace(/"/gu, '"');
|
|
62
|
+
}
|
|
63
|
+
export function formatMoney(value) {
|
|
64
|
+
if (value === null || value === undefined || !Number.isFinite(value))
|
|
65
|
+
return '—';
|
|
66
|
+
const fixed = Number(value).toFixed(2);
|
|
67
|
+
const [integer, decimal] = fixed.split('.');
|
|
68
|
+
const sign = integer.startsWith('-') ? '-' : '';
|
|
69
|
+
const digits = sign ? integer.slice(1) : integer;
|
|
70
|
+
return `${sign}${digits.replace(/\B(?=(\d{3})+(?!\d))/gu, ',')}.${decimal}`;
|
|
71
|
+
}
|
|
72
|
+
function formatWan(value) {
|
|
73
|
+
if (value === null || value === undefined || !Number.isFinite(value))
|
|
74
|
+
return '—';
|
|
75
|
+
return (Number(value) / 10000).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
76
|
+
}
|
|
77
|
+
export function renderCollectionLedger(rows, totals, options = {}) {
|
|
78
|
+
const title = options.title?.trim() || '合同台账 · 收款节点';
|
|
79
|
+
const manager = options.managerName?.trim() || '—';
|
|
80
|
+
const generatedAt = (options.generatedAt ?? new Date()).toLocaleString('zh-CN', { hour12: false });
|
|
81
|
+
const warnings = options.warnings ?? [];
|
|
82
|
+
const sorted = [...rows].sort((a, b) => {
|
|
83
|
+
const left = a.overdueDays;
|
|
84
|
+
const right = b.overdueDays;
|
|
85
|
+
if (left === null && right === null)
|
|
86
|
+
return 0;
|
|
87
|
+
if (left === null)
|
|
88
|
+
return 1;
|
|
89
|
+
if (right === null)
|
|
90
|
+
return -1;
|
|
91
|
+
return right - left;
|
|
92
|
+
});
|
|
93
|
+
const body = sorted.length === 0
|
|
94
|
+
? `<tr><td colspan="10"><div class="empty">该客户经理名下暂无「条件已达成且未收清」的付款阶段</div></td></tr>`
|
|
95
|
+
: sorted.map((row) => {
|
|
96
|
+
const overdue = row.overdueDays;
|
|
97
|
+
const status = overdue === null
|
|
98
|
+
? '<span class="pill gray">无计划日</span>'
|
|
99
|
+
: overdue > 0
|
|
100
|
+
? '<span class="pill r">已逾期</span>'
|
|
101
|
+
: overdue === 0
|
|
102
|
+
? '<span class="pill o">今日到期</span>'
|
|
103
|
+
: '<span class="pill o">待到账</span>';
|
|
104
|
+
return ` <tr>
|
|
105
|
+
<td><div class="cname">${esc(row.projectName || '—')}</div><div class="ctype">${esc(row.contractNo || '—')}</div></td>
|
|
106
|
+
<td><div class="ctype">${esc(row.term || '—')}</div></td>
|
|
107
|
+
<td class="num">${formatMoney(row.contractAmount)}</td>
|
|
108
|
+
<td class="num">${row.ratio ? `${row.ratio}%` : '—'}</td>
|
|
109
|
+
<td class="num">${formatMoney(row.dueAmount)}</td>
|
|
110
|
+
<td class="num">${formatMoney(row.receivedAmount)}</td>
|
|
111
|
+
<td class="num"><b>${formatMoney(row.unreceivedAmount)}</b></td>
|
|
112
|
+
<td class="mono">${esc(row.planReceiveDate || '—')}</td>
|
|
113
|
+
<td class="num">${overdue !== null && overdue > 0 ? `<span class="overdue">${overdue}</span>` : '—'}</td>
|
|
114
|
+
<td>${status}</td>
|
|
115
|
+
</tr>`;
|
|
116
|
+
}).join('\n');
|
|
117
|
+
const warnHtml = warnings.length
|
|
118
|
+
? `<div class="warnbar">${warnings.map((item) => esc(item)).join('<br>')}</div>`
|
|
119
|
+
: '';
|
|
120
|
+
return `<!DOCTYPE html>
|
|
121
|
+
<html lang="zh-CN">
|
|
122
|
+
<head>
|
|
123
|
+
<meta charset="UTF-8">
|
|
124
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
125
|
+
<title>${esc(title)}</title>
|
|
126
|
+
<style>${STYLE}</style>
|
|
127
|
+
</head>
|
|
128
|
+
<body>
|
|
129
|
+
<div class="page">
|
|
130
|
+
<div class="page-head">
|
|
131
|
+
<h1>${esc(title)}</h1>
|
|
132
|
+
<span class="note">客户经理 ${esc(manager)} · 未结束项目 · 仅列「条件已达成且未收清」的付款阶段</span>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div class="filter">
|
|
136
|
+
<span>客户经理:<b>${esc(manager)}</b></span>
|
|
137
|
+
<span>项目范围:<b>${options.projectCount ?? totals.projects}</b> 个</span>
|
|
138
|
+
<span>命中付款阶段:<b>${totals.stages}</b> 条</span>
|
|
139
|
+
<span>涉及合同:<b>${totals.contracts}</b> 份</span>
|
|
140
|
+
<span>生成时间:<b>${esc(generatedAt)}</b></span>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
${warnHtml}
|
|
144
|
+
|
|
145
|
+
<div class="stats">
|
|
146
|
+
<div class="stat">
|
|
147
|
+
<div class="k">合同金额合计</div>
|
|
148
|
+
<div class="v">${formatWan(totals.contractAmount)}<small> 万元</small></div>
|
|
149
|
+
<div class="sub">命中条款所属合同金额</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="stat">
|
|
152
|
+
<div class="k">本期应收合计</div>
|
|
153
|
+
<div class="v">${formatWan(totals.dueAmount)}<small> 万元</small></div>
|
|
154
|
+
<div class="sub">各阶段应收之和</div>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="stat">
|
|
157
|
+
<div class="k">未收合计</div>
|
|
158
|
+
<div class="v">${formatWan(totals.unreceivedAmount)}<small> 万元</small></div>
|
|
159
|
+
<div class="sub">已收 ${formatMoney(totals.receivedAmount)} 元</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div class="stat">
|
|
162
|
+
<div class="k">逾期条款</div>
|
|
163
|
+
<div class="v warn">${totals.overdueStages}<small> 条</small></div>
|
|
164
|
+
<div class="sub">${totals.overdueStages ? `最长逾期 ${totals.maxOverdueDays} 天` : '无逾期'}</div>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<div class="table-card">
|
|
169
|
+
<div class="table-head"><span class="t">到收款节点的付款阶段</span><span class="n">共 ${totals.stages} 条</span></div>
|
|
170
|
+
<table>
|
|
171
|
+
<thead><tr>
|
|
172
|
+
<th>项目 / 合同号</th><th>付款条件</th><th class="num">合同金额(元)</th><th class="num">比例</th>
|
|
173
|
+
<th class="num">本期应收(元)</th><th class="num">已收(元)</th><th class="num">未收(元)</th>
|
|
174
|
+
<th>计划收款日</th><th class="num">逾期天数</th><th>状态</th>
|
|
175
|
+
</tr></thead>
|
|
176
|
+
<tbody>
|
|
177
|
+
${body}
|
|
178
|
+
</tbody>
|
|
179
|
+
</table>
|
|
180
|
+
<div class="footer-note">
|
|
181
|
+
数据来源:项目看板(客户经理 = ${esc(manager)},项目状态 ∈ 5 个未结束值)→ 项目合同付款阶段明细台账(关联项目 inC 批量过滤,台账仅返回未收清条款)。<br>
|
|
182
|
+
口径:本期应收 = 合同金额 × 比例;未收 = 本期应收 − 已收;逾期天数 = 今天 − 计划收款日(本地计算,正数表示已逾期)。金额单位:元(KPI 卡另附万元概览)。
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</body>
|
|
187
|
+
</html>
|
|
188
|
+
`;
|
|
189
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 收款节点台账:页面常量、过滤器构造与行归一化(2026-11-29 实测固化)。
|
|
3
|
+
*
|
|
4
|
+
* 两条通道都打 `/api/ebuilder/form/eblist/getData`(multipart + `ebbusinessid` 头 = pageId),
|
|
5
|
+
* 但它们是**两个不同的页面/组件**,不能混用常量:
|
|
6
|
+
*
|
|
7
|
+
* ① 项目看板(按客户经理取项目)
|
|
8
|
+
* - pageId `1144658644836794483` / compId `f5b2b31aeb2e4e46956464bba7d2e52c` / pageAppId `1136121637129502949`
|
|
9
|
+
* - 客户经理字段 `1103020255307300866`(Employee,`inC`,值是人员 uid)
|
|
10
|
+
* - 项目状态字段 `1020284131492896810`(Ebuilder,`in`,值是多值逗号串)
|
|
11
|
+
* - 返回行里带 项目 ID、项目名称、合同编号、项目金额、本月应收、计划/实际验收日期
|
|
12
|
+
*
|
|
13
|
+
* ② 项目合同付款阶段明细台账(按项目 ID 批量取"到收款节点的条款")
|
|
14
|
+
* - pageId `1343149269846859781`(viewport)/ compId `e86b99daf27e4a80abb76dd061e72745` / pageAppId `839290288278422588`
|
|
15
|
+
* - 过滤字段「关联项目」`1145017747040632944`(Ebuilder,`inC`,值是**项目 ID 逗号串**——支持批量)
|
|
16
|
+
* - 台账自带「条件已达成且未收清」过滤:已收清的付款阶段不会返回
|
|
17
|
+
* - 返回行里带 合同号、付款条件、比例、本期应收、已收、未收、计划收款日期、条件工作日、合同金额
|
|
18
|
+
*
|
|
19
|
+
* 实测要点:
|
|
20
|
+
* - `count` 字段不可信(实测恒为 0 而 `list` 有数据)→ 只能翻页到空页判断结束;
|
|
21
|
+
* - 项目看板 `pageSize` 硬上限 20;台账页实测 50 可用;
|
|
22
|
+
* - 逗号拼接的项目 ID 会被当成**一个** project_id → 本项目合同查询/款项查询**不支持批量**,
|
|
23
|
+
* 但台账的「关联项目 inC」支持,因此批量只走台账。
|
|
24
|
+
*/
|
|
25
|
+
/** ① 项目看板页面常量 */
|
|
26
|
+
export const PROJECT_BOARD = {
|
|
27
|
+
pageId: '1144658644836794483',
|
|
28
|
+
compId: 'f5b2b31aeb2e4e46956464bba7d2e52c',
|
|
29
|
+
pageAppId: '1136121637129502949',
|
|
30
|
+
cusMenuId: '1201017772495888388',
|
|
31
|
+
urlPageTitle: '6aG555uu5p+l6K+i',
|
|
32
|
+
tableuid: 'c82ef7625eda49fc9120e90d0fde43a7',
|
|
33
|
+
refPluginPackageId: '933846626099339271',
|
|
34
|
+
appIdKey: 'appId_1144658644836794483',
|
|
35
|
+
/** 项目基础表单(客户经理/项目状态字段所属) */
|
|
36
|
+
objId: '1020275562853482532',
|
|
37
|
+
datasetAppId: '1020021532740116481',
|
|
38
|
+
field: {
|
|
39
|
+
manager: { id: '1103020255307300866', fieldName: 'field_1103020255307300866', text: '客户经理' },
|
|
40
|
+
status: { id: '1020284131492896810', fieldName: 'field_1020284131492896810', text: '项目状态' },
|
|
41
|
+
},
|
|
42
|
+
/** 项目状态 8 个取值里 5 个「未结束」;另外 3 个代表已结束,不查 */
|
|
43
|
+
activeStatusValues: '1141684719154102343,1141682108011354125,1141681708386451653,1109795875498729585,1027049516734808082',
|
|
44
|
+
/** 行键(实测) */
|
|
45
|
+
rowKey: {
|
|
46
|
+
name: '1',
|
|
47
|
+
createTime: '3',
|
|
48
|
+
projectId: '5',
|
|
49
|
+
projectName: '1020275734718578690',
|
|
50
|
+
amount: '1078546758770548738',
|
|
51
|
+
monthReceivable: '1143571863448961046',
|
|
52
|
+
contractNo: '1082264039946829824',
|
|
53
|
+
planAcceptDate: '1078534294574129155',
|
|
54
|
+
actualAcceptDate: '1078534294574129157',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
/** ② 付款阶段明细台账页面常量 */
|
|
58
|
+
export const PAYMENT_STAGE_LEDGER = {
|
|
59
|
+
pageId: '1343149269846859781',
|
|
60
|
+
compId: 'e86b99daf27e4a80abb76dd061e72745',
|
|
61
|
+
pageAppId: '839290288278422588',
|
|
62
|
+
tableuid: 'a2dad9cf192d4f4580e69cae363bcc96',
|
|
63
|
+
refPluginPackageId: '933846626099339271',
|
|
64
|
+
/** 付款阶段明细表 objId */
|
|
65
|
+
objId: '839290494445240625',
|
|
66
|
+
datasetAppId: '839290288278422588',
|
|
67
|
+
datasetText: '项目合同付款阶段明细_独表',
|
|
68
|
+
/** 过滤字段:关联项目 */
|
|
69
|
+
field: { project: { id: '1145017747040632944', fieldName: 'field_1145017747040632944', text: '关联项目' } },
|
|
70
|
+
/** 行键(实测) */
|
|
71
|
+
rowKey: {
|
|
72
|
+
term: '1',
|
|
73
|
+
rowId: '5',
|
|
74
|
+
contractNo: '839290494445241328',
|
|
75
|
+
ratio: '839290494445241332',
|
|
76
|
+
dueAmount: '839290494445241333',
|
|
77
|
+
receivedAmount: '839290494445241336',
|
|
78
|
+
unreceivedAmount: '839290494445241337',
|
|
79
|
+
planReceiveDate: '839290494445241334',
|
|
80
|
+
workdays: '839290494445241335',
|
|
81
|
+
project: '1145017747040632944',
|
|
82
|
+
contractAmount: '887446114335178756',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
const EBUILDER_DATASET_BASE = {
|
|
86
|
+
type: 'LOGIC',
|
|
87
|
+
groupId: 'weaver-ebuilder-form-service',
|
|
88
|
+
isPhysical: true,
|
|
89
|
+
usage: 'all',
|
|
90
|
+
detailTable: false,
|
|
91
|
+
objType: 'physical',
|
|
92
|
+
module: 'ebuilder',
|
|
93
|
+
isFormModuleSelected: true,
|
|
94
|
+
hasChangeGroupFilter: false,
|
|
95
|
+
hasChangePermissions: true,
|
|
96
|
+
hasChangeExtConfig: false,
|
|
97
|
+
};
|
|
98
|
+
function datasetOf(id, appId, text, isForm) {
|
|
99
|
+
return {
|
|
100
|
+
...EBUILDER_DATASET_BASE,
|
|
101
|
+
id,
|
|
102
|
+
appId,
|
|
103
|
+
text,
|
|
104
|
+
ebuilderDataConfig: isForm
|
|
105
|
+
? { dataSetup: { dataSource: 'ALL', dataPermission: 'HAVE_PERMISSION_DATA', dataType: 'ALL' }, type: 'FORM' }
|
|
106
|
+
: { dataSetup: {}, type: 'FORM' },
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function fieldEntry(compId, objId, field, dataset, compType, type) {
|
|
110
|
+
return { compId, compType, dataset, fieldName: field.fieldName, id: field.id, objId, type, text: field.text };
|
|
111
|
+
}
|
|
112
|
+
function condition(compId, suffix, entry, funcType, value) {
|
|
113
|
+
return {
|
|
114
|
+
conditionType: 'and',
|
|
115
|
+
dataType: 'field',
|
|
116
|
+
id: `${compId}-${entry.id}-${funcType}`,
|
|
117
|
+
conditionComId: `${compId}_${suffix}_EXCLUDECACHE`,
|
|
118
|
+
filterFields: [entry],
|
|
119
|
+
funcType,
|
|
120
|
+
value,
|
|
121
|
+
customSelect: null,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/** ① 项目看板过滤器:客户经理 inC(+ 可选 项目名称 like) */
|
|
125
|
+
export function buildProjectBoardFilter(options) {
|
|
126
|
+
const dataset = datasetOf(PROJECT_BOARD.objId, PROJECT_BOARD.datasetAppId, '项目基础', true);
|
|
127
|
+
const filters = [];
|
|
128
|
+
if (options.includeStatus !== false) {
|
|
129
|
+
filters.push(condition(PROJECT_BOARD.compId, 'filter', fieldEntry(PROJECT_BOARD.compId, PROJECT_BOARD.objId, PROJECT_BOARD.field.status, dataset, 'Ebuilder', 'Ebuilder'), 'in', options.statusValues ?? PROJECT_BOARD.activeStatusValues));
|
|
130
|
+
}
|
|
131
|
+
filters.push(condition(PROJECT_BOARD.compId, 'filter', fieldEntry(PROJECT_BOARD.compId, PROJECT_BOARD.objId, PROJECT_BOARD.field.manager, dataset, 'Employee', 'Employee'), 'inC', options.managerId));
|
|
132
|
+
return filters;
|
|
133
|
+
}
|
|
134
|
+
/** ② 付款阶段台账过滤器:关联项目 inC(项目 ID 逗号串,支持批量) */
|
|
135
|
+
export function buildPaymentStageFilter(projectIds) {
|
|
136
|
+
const dataset = datasetOf(PAYMENT_STAGE_LEDGER.objId, PAYMENT_STAGE_LEDGER.datasetAppId, PAYMENT_STAGE_LEDGER.datasetText, false);
|
|
137
|
+
const entry = fieldEntry(PAYMENT_STAGE_LEDGER.compId, PAYMENT_STAGE_LEDGER.objId, PAYMENT_STAGE_LEDGER.field.project, dataset, 'Ebuilder', 'Ebuilder');
|
|
138
|
+
return [condition(PAYMENT_STAGE_LEDGER.compId, 'advance', entry, 'inC', projectIds.join(','))];
|
|
139
|
+
}
|
|
140
|
+
// ---------------------------------------------------------------- 归一化
|
|
141
|
+
function text(value) {
|
|
142
|
+
if (value === null || value === undefined)
|
|
143
|
+
return '';
|
|
144
|
+
if (typeof value === 'string')
|
|
145
|
+
return value.trim();
|
|
146
|
+
if (typeof value === 'number' || typeof value === 'boolean')
|
|
147
|
+
return String(value);
|
|
148
|
+
return '';
|
|
149
|
+
}
|
|
150
|
+
/** 金额去千分位;空值返回 0(仅用于求和展示,不掩盖缺失——缺失另有 hasAmount 标记)。 */
|
|
151
|
+
export function toAmount(value) {
|
|
152
|
+
const raw = text(value).replace(/[,,\s¥¥元]/gu, '');
|
|
153
|
+
if (!raw)
|
|
154
|
+
return 0;
|
|
155
|
+
const parsed = Number(raw);
|
|
156
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
157
|
+
}
|
|
158
|
+
export function normalizeProjectRow(row) {
|
|
159
|
+
const key = PROJECT_BOARD.rowKey;
|
|
160
|
+
const nos = text(row[key.contractNo])
|
|
161
|
+
.split(',')
|
|
162
|
+
.map((item) => item.trim())
|
|
163
|
+
.filter(Boolean);
|
|
164
|
+
return {
|
|
165
|
+
projectId: text(row[key.projectId]) || text(row.id),
|
|
166
|
+
projectName: text(row[key.projectName]) || text(row.name),
|
|
167
|
+
contractNos: [...new Set(nos)],
|
|
168
|
+
amount: toAmount(row[key.amount]),
|
|
169
|
+
monthReceivable: toAmount(row[key.monthReceivable]),
|
|
170
|
+
planAcceptDate: text(row[key.planAcceptDate]),
|
|
171
|
+
actualAcceptDate: text(row[key.actualAcceptDate]),
|
|
172
|
+
createTime: text(row[key.createTime]),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
/** 关联项目字段是对象数组 `[{name,id}]`,取首个的名称与 id。 */
|
|
176
|
+
export function linkedProject(value) {
|
|
177
|
+
const list = Array.isArray(value) ? value : [];
|
|
178
|
+
const first = (list[0] ?? {});
|
|
179
|
+
return { id: text(first.id), name: text(first.name) };
|
|
180
|
+
}
|
|
181
|
+
export function normalizePaymentStageRow(row, today) {
|
|
182
|
+
const key = PAYMENT_STAGE_LEDGER.rowKey;
|
|
183
|
+
const project = linkedProject(row[key.project]);
|
|
184
|
+
const planReceiveDate = text(row[key.planReceiveDate]);
|
|
185
|
+
return {
|
|
186
|
+
rowId: text(row[key.rowId]) || text(row.id),
|
|
187
|
+
term: text(row[key.term]) || text(row.name),
|
|
188
|
+
contractNo: text(row[key.contractNo]),
|
|
189
|
+
projectId: project.id,
|
|
190
|
+
projectName: project.name,
|
|
191
|
+
contractAmount: toAmount(row[key.contractAmount]),
|
|
192
|
+
ratio: toAmount(row[key.ratio]),
|
|
193
|
+
dueAmount: toAmount(row[key.dueAmount]),
|
|
194
|
+
receivedAmount: toAmount(row[key.receivedAmount]),
|
|
195
|
+
unreceivedAmount: toAmount(row[key.unreceivedAmount]),
|
|
196
|
+
planReceiveDate,
|
|
197
|
+
workdays: text(row[key.workdays]),
|
|
198
|
+
overdueDays: planReceiveDate ? daysBetween(planReceiveDate, today) : null,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/** 计划收款日距今天的天数(正数=已逾期)。 */
|
|
202
|
+
export function daysBetween(dateText, today) {
|
|
203
|
+
const matched = /^(\d{4})-(\d{2})-(\d{2})$/u.exec(dateText.trim());
|
|
204
|
+
if (!matched)
|
|
205
|
+
return null;
|
|
206
|
+
const target = Date.UTC(Number(matched[1]), Number(matched[2]) - 1, Number(matched[3]));
|
|
207
|
+
const base = Date.UTC(today.getFullYear(), today.getMonth(), today.getDate());
|
|
208
|
+
return Math.round((base - target) / 86_400_000);
|
|
209
|
+
}
|
|
210
|
+
export function summarize(rows) {
|
|
211
|
+
const overdue = rows.filter((row) => (row.overdueDays ?? 0) > 0);
|
|
212
|
+
return {
|
|
213
|
+
stages: rows.length,
|
|
214
|
+
contracts: new Set(rows.map((row) => row.contractNo).filter(Boolean)).size,
|
|
215
|
+
projects: new Set(rows.map((row) => row.projectId).filter(Boolean)).size,
|
|
216
|
+
contractAmount: round2(rows.reduce((sum, row) => sum + row.contractAmount, 0)),
|
|
217
|
+
dueAmount: round2(rows.reduce((sum, row) => sum + row.dueAmount, 0)),
|
|
218
|
+
receivedAmount: round2(rows.reduce((sum, row) => sum + row.receivedAmount, 0)),
|
|
219
|
+
unreceivedAmount: round2(rows.reduce((sum, row) => sum + row.unreceivedAmount, 0)),
|
|
220
|
+
overdueStages: overdue.length,
|
|
221
|
+
maxOverdueDays: overdue.length ? Math.max(...overdue.map((row) => row.overdueDays ?? 0)) : 0,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
function round2(value) {
|
|
225
|
+
return Number(value.toFixed(2));
|
|
226
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 合同业绩统计口径单一事实源(2026-11-18
|
|
2
|
+
* 合同业绩统计口径单一事实源(2026-11-18 用户定稿;2026-11-28 扩充为五口径 + 派生比率)。
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* 供 `contract.ledger.metrics` 直接输出,文档只做引用。
|
|
4
|
+
* 背景:台账数据可以有很多字段,但对外口径每个都只认一个字段,且都不在台账默认展示列里。
|
|
5
|
+
* 以前这套口径只写在 references 文档里,实现与文档容易漂移;现收敛到本文件,作为唯一事实源,
|
|
6
|
+
* 供 `contract.ledger.metrics` 直接输出,`contract.ledger.stat` 直接执行,文档只做引用。
|
|
8
7
|
*
|
|
9
|
-
*
|
|
10
|
-
* 1. 合同业绩
|
|
8
|
+
* 口径清单(用户口径,不得自行替换字段):
|
|
9
|
+
* 1. 合同业绩 → 直销业绩台账的「冲刺有效金额」(不是「有效金额」);
|
|
11
10
|
* 2. 合同已收款 → 直销合同台账的「已收款」;
|
|
12
|
-
* 3. eteams
|
|
11
|
+
* 3. eteams业绩 → 合同收款台账中「渠道属性 = 渠道收款」的行,统计「销售有效金额」;
|
|
12
|
+
* 4. 签约总额 → 直销合同台账的「合同总金额」(2026-11-28 新增);
|
|
13
|
+
* 5. 新签客户数 → 直销合同台账「合同种类 = 新签合同」的「客户名称」去重计数(2026-11-28 新增);
|
|
14
|
+
* 6. 回款率 → Σ「已收款」÷ Σ「合同总金额」×100%,同台账同窗口(2026-11-28 新增)。
|
|
13
15
|
*
|
|
14
|
-
* 字段 ID 与返回键(dataKey)来源:2026-11-18 用 `getListDatas` 响应的
|
|
16
|
+
* 字段 ID 与返回键(dataKey)来源:2026-11-18 / 2026-11-28 用 `getListDatas` 响应的
|
|
15
17
|
* `data.columns` 实测解析(`contract.performance.list.query` + `includeColumns=true`),
|
|
16
|
-
*
|
|
18
|
+
* 不是文档推测。运行时无需再解析。
|
|
17
19
|
*
|
|
18
|
-
*
|
|
19
|
-
* -
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* - 直销合同:已收款 `846297265322574184` / `sumsk`(注意返回键不是 ysq)
|
|
23
|
-
* - 合同收款:渠道属性 `846297265322574590` / `qdsx`;销售有效金额 `846297265322574559` / `xsyxje`
|
|
20
|
+
* 条件取值来源(`source`):
|
|
21
|
+
* - `period`:由 `contract.ledger.stat` 按查询月份自动填(如 2026-11);
|
|
22
|
+
* - `person`:由调用方解析出的 `{id,name}` 填(人员 ID 规则见 playbook §2.1.1);
|
|
23
|
+
* - `fixed`:口径自带的固定值(如「合同种类 = 新签合同」),调用方不得覆盖。
|
|
24
24
|
*/
|
|
25
25
|
/** 六台账固定 ID(与 contract-ledger-catalog.md 实测值一致)。 */
|
|
26
26
|
export const LEDGER_METRICS = [
|
|
@@ -42,6 +42,7 @@ export const LEDGER_METRICS = [
|
|
|
42
42
|
fieldId: '846297265322574199',
|
|
43
43
|
dataKey: 'xsjl',
|
|
44
44
|
operator: 'inC',
|
|
45
|
+
source: 'person',
|
|
45
46
|
required: true,
|
|
46
47
|
note: 'person 字段,必须传人员 ID;传姓名不报错但返回全量',
|
|
47
48
|
},
|
|
@@ -50,6 +51,7 @@ export const LEDGER_METRICS = [
|
|
|
50
51
|
fieldId: '846297265322574201',
|
|
51
52
|
dataKey: 'hsny',
|
|
52
53
|
operator: 'startWith',
|
|
54
|
+
source: 'period',
|
|
53
55
|
required: true,
|
|
54
56
|
note: '形如 2026-11;只传 11 命中 0 条',
|
|
55
57
|
},
|
|
@@ -74,6 +76,7 @@ export const LEDGER_METRICS = [
|
|
|
74
76
|
fieldId: '846297265322574079',
|
|
75
77
|
dataKey: 'htyjny',
|
|
76
78
|
operator: 'startWith',
|
|
79
|
+
source: 'period',
|
|
77
80
|
required: true,
|
|
78
81
|
note: '形如 2026-11',
|
|
79
82
|
},
|
|
@@ -82,11 +85,12 @@ export const LEDGER_METRICS = [
|
|
|
82
85
|
fieldId: '846297265322574070',
|
|
83
86
|
dataKey: 'xsjl',
|
|
84
87
|
operator: 'like',
|
|
88
|
+
source: 'person',
|
|
85
89
|
required: false,
|
|
86
90
|
note: 'text 字段,值是「姓名(产品线)」,同名不同署名会串数',
|
|
87
91
|
},
|
|
88
92
|
],
|
|
89
|
-
note: '合同已收款取自直销合同台账的「已收款」(返回键 sumsk,不是 ysq
|
|
93
|
+
note: '合同已收款取自直销合同台账的「已收款」(返回键 sumsk,不是 ysq),不是合同收款台账的收款流水合计;两本是两套数据源,不得混算。该列按「合同业绩年月」归属,因此是"该月签约合同的累计已收",不是"该月实际收到的现金"。',
|
|
90
94
|
},
|
|
91
95
|
{
|
|
92
96
|
key: 'eteamsPerformance',
|
|
@@ -106,15 +110,17 @@ export const LEDGER_METRICS = [
|
|
|
106
110
|
fieldId: '846297265322574590',
|
|
107
111
|
dataKey: 'qdsx',
|
|
108
112
|
operator: 'eq',
|
|
113
|
+
source: 'fixed',
|
|
109
114
|
value: '渠道收款',
|
|
110
115
|
required: true,
|
|
111
|
-
note: '
|
|
116
|
+
note: '实测取值只有「渠道收款」与空值;若 eq 返回 0 条,先按坑位表换 like 复核',
|
|
112
117
|
},
|
|
113
118
|
{
|
|
114
119
|
field: '销售核算年月',
|
|
115
120
|
fieldId: '846297265322574528',
|
|
116
121
|
dataKey: 'xshsny',
|
|
117
122
|
operator: 'startWith',
|
|
123
|
+
source: 'period',
|
|
118
124
|
required: true,
|
|
119
125
|
note: '形如 2026-11',
|
|
120
126
|
},
|
|
@@ -123,24 +129,152 @@ export const LEDGER_METRICS = [
|
|
|
123
129
|
fieldId: '846297265322574539',
|
|
124
130
|
dataKey: 'xsjl',
|
|
125
131
|
operator: 'inC',
|
|
132
|
+
source: 'person',
|
|
126
133
|
required: false,
|
|
127
134
|
note: 'person 字段,必须传人员 ID',
|
|
128
135
|
},
|
|
129
136
|
],
|
|
130
137
|
note: 'eteams 业绩量在合同收款台账里,条件是「渠道属性 = 渠道收款」,统计列为「销售有效金额」(返回键 xsyxje);不得用渠道订单台账的单量、合同总金额、客服有效金额或项目有效金额替代。',
|
|
131
138
|
},
|
|
139
|
+
{
|
|
140
|
+
key: 'signedAmount',
|
|
141
|
+
label: '签约总额',
|
|
142
|
+
ledger: '直销合同',
|
|
143
|
+
listId: '846297265322576591',
|
|
144
|
+
objId: '846297265322573825',
|
|
145
|
+
pageId: '846297265322576591',
|
|
146
|
+
viewKey: 'ecology',
|
|
147
|
+
metricField: '合同总金额',
|
|
148
|
+
metricFieldId: '846297265322574148',
|
|
149
|
+
metricDataKey: 'htzje',
|
|
150
|
+
aggregation: 'sum',
|
|
151
|
+
conditions: [
|
|
152
|
+
{
|
|
153
|
+
field: '合同业绩年月',
|
|
154
|
+
fieldId: '846297265322574079',
|
|
155
|
+
dataKey: 'htyjny',
|
|
156
|
+
operator: 'startWith',
|
|
157
|
+
source: 'period',
|
|
158
|
+
required: true,
|
|
159
|
+
note: '形如 2026-11;按月口径是「合同业绩年月」,不是签订日期',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
field: '销售经理',
|
|
163
|
+
fieldId: '846297265322574070',
|
|
164
|
+
dataKey: 'xsjl',
|
|
165
|
+
operator: 'like',
|
|
166
|
+
source: 'person',
|
|
167
|
+
required: false,
|
|
168
|
+
note: 'text 字段,值是「姓名(产品线)」;同名不同署名会串数',
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
note: '签约总额 = 直销合同台账「合同总金额」(返回键 htzje)求和,含税、未扣减任何调整;不得用「有效金额」「合同总金额(已调整)」替代。月份口径为「合同业绩年月」。',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
key: 'newSignedCustomers',
|
|
175
|
+
label: '新签客户数',
|
|
176
|
+
ledger: '直销合同',
|
|
177
|
+
listId: '846297265322576591',
|
|
178
|
+
objId: '846297265322573825',
|
|
179
|
+
pageId: '846297265322576591',
|
|
180
|
+
viewKey: 'ecology',
|
|
181
|
+
metricField: '客户名称',
|
|
182
|
+
metricFieldId: '846297265322574105',
|
|
183
|
+
metricDataKey: 'khmc',
|
|
184
|
+
aggregation: 'countDistinct',
|
|
185
|
+
distinct: { field: '客户名称', fieldId: '846297265322574105', dataKey: 'khmc' },
|
|
186
|
+
conditions: [
|
|
187
|
+
{
|
|
188
|
+
field: '合同种类',
|
|
189
|
+
fieldId: '846297265322574087',
|
|
190
|
+
dataKey: 'htzl',
|
|
191
|
+
operator: 'eq',
|
|
192
|
+
source: 'fixed',
|
|
193
|
+
value: '新签合同',
|
|
194
|
+
required: true,
|
|
195
|
+
note: '实测 2026-11:eq / like / startWith 三种写法同为 337 条;取值形如「新签合同」「续签合同」',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
field: '合同业绩年月',
|
|
199
|
+
fieldId: '846297265322574079',
|
|
200
|
+
dataKey: 'htyjny',
|
|
201
|
+
operator: 'startWith',
|
|
202
|
+
source: 'period',
|
|
203
|
+
required: true,
|
|
204
|
+
note: '形如 2026-11',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
field: '销售经理',
|
|
208
|
+
fieldId: '846297265322574070',
|
|
209
|
+
dataKey: 'xsjl',
|
|
210
|
+
operator: 'like',
|
|
211
|
+
source: 'person',
|
|
212
|
+
required: false,
|
|
213
|
+
note: 'text 字段,值是「姓名(产品线)」',
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
note: '新签客户数 = 「合同种类 = 新签合同」的合同行里「客户名称」去重计数;跨月合计按整窗去重(不是各月相加)。客户名称是自由文本、无客户 ID,同名不同写法(「泛微」/「泛微网络科技」)会算成两个客户,口径差异需在结论里说明。',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
key: 'receiptRate',
|
|
220
|
+
label: '回款率',
|
|
221
|
+
ledger: '直销合同',
|
|
222
|
+
listId: '846297265322576591',
|
|
223
|
+
objId: '846297265322573825',
|
|
224
|
+
pageId: '846297265322576591',
|
|
225
|
+
viewKey: 'ecology',
|
|
226
|
+
metricField: '已收款 / 合同总金额',
|
|
227
|
+
metricFieldId: null,
|
|
228
|
+
metricDataKey: null,
|
|
229
|
+
aggregation: 'ratio',
|
|
230
|
+
ratio: {
|
|
231
|
+
numerator: { field: '已收款', fieldId: '846297265322574184', dataKey: 'sumsk' },
|
|
232
|
+
denominator: { field: '合同总金额', fieldId: '846297265322574148', dataKey: 'htzje' },
|
|
233
|
+
unit: 'percent',
|
|
234
|
+
},
|
|
235
|
+
conditions: [
|
|
236
|
+
{
|
|
237
|
+
field: '合同业绩年月',
|
|
238
|
+
fieldId: '846297265322574079',
|
|
239
|
+
dataKey: 'htyjny',
|
|
240
|
+
operator: 'startWith',
|
|
241
|
+
source: 'period',
|
|
242
|
+
required: true,
|
|
243
|
+
note: '形如 2026-11',
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
field: '销售经理',
|
|
247
|
+
fieldId: '846297265322574070',
|
|
248
|
+
dataKey: 'xsjl',
|
|
249
|
+
operator: 'like',
|
|
250
|
+
source: 'person',
|
|
251
|
+
required: false,
|
|
252
|
+
note: 'text 字段,值是「姓名(产品线)」',
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
note: '回款率 = Σ「已收款」(sumsk)÷ Σ「合同总金额」(htzje)× 100%,分子分母同台账、同窗口;分母为 0 时返回 null(不补 0、不算 100%)。因两个字段都按「合同业绩年月」归属,所以这是「按签约月份归属的回款率」,不等于「当月现金流入 ÷ 当月签约额」——要后者必须改用合同收款台账的收款流水,属于另一套口径,不得与本口径混算。',
|
|
256
|
+
},
|
|
132
257
|
];
|
|
133
258
|
/** 按 key 取口径;key 为空时返回全量。 */
|
|
134
259
|
export function findLedgerMetric(key) {
|
|
135
260
|
if (!key)
|
|
136
261
|
return undefined;
|
|
137
|
-
|
|
262
|
+
const text = key.trim();
|
|
263
|
+
return LEDGER_METRICS.find((metric) => metric.key === text || metric.label === text);
|
|
138
264
|
}
|
|
139
265
|
/** 未写死字段 ID 的字段名清单,提示运行时解析。 */
|
|
140
266
|
export function unresolvedMetricFields(metric) {
|
|
141
267
|
const missing = [];
|
|
142
|
-
if (
|
|
268
|
+
if (metric.aggregation === 'ratio') {
|
|
269
|
+
// 比率口径的字段来自 numerator / denominator,metricFieldId 故意为 null,不算「未解析」。
|
|
270
|
+
if (!metric.ratio?.numerator.fieldId)
|
|
271
|
+
missing.push(metric.ratio?.numerator.field ?? '比率分子');
|
|
272
|
+
if (!metric.ratio?.denominator.fieldId)
|
|
273
|
+
missing.push(metric.ratio?.denominator.field ?? '比率分母');
|
|
274
|
+
}
|
|
275
|
+
else if (!metric.metricFieldId) {
|
|
143
276
|
missing.push(metric.metricField);
|
|
277
|
+
}
|
|
144
278
|
for (const cond of metric.conditions) {
|
|
145
279
|
if (!cond.fieldId)
|
|
146
280
|
missing.push(cond.field);
|