weaver-work-cli 0.1.75 → 0.1.78
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 +3 -1
- package/dist/chunks/{archive-OZJ6PYUR.js → archive-ENBSUMHV.js} +1 -1
- package/dist/chunks/{archive-oa-BHL5RK2F.js → archive-oa-7BFPQ6M5.js} +1 -1
- package/dist/chunks/{asset-HKRFRQR2.js → asset-V5SUD3PW.js} +1 -1
- package/dist/chunks/{asset-idle-GGIR4KE7.js → asset-idle-3CEL7WFX.js} +1 -1
- package/dist/chunks/{attachment-content-4OV65NK5.js → attachment-content-TFOC3Y3X.js} +3 -3
- package/dist/chunks/{blog-HYDP4DV3.js → blog-FLI4SS3P.js} +1 -1
- package/dist/chunks/{caizhilian-JS4RQZ6Z.js → caizhilian-7WCTKCCP.js} +3 -3
- package/dist/chunks/{calendar-SWRY4DIT.js → calendar-G726HUUH.js} +1 -1
- package/dist/chunks/{chunk-5ZJGPEIB.js → chunk-2KW7AI6P.js} +1 -1
- package/dist/chunks/{chunk-JOY3HZXL.js → chunk-2UV4IZIT.js} +21 -15
- package/dist/chunks/{chunk-FEZK536Z.js → chunk-4PBN7NJY.js} +353 -43
- package/dist/chunks/{chunk-VOMDD2C5.js → chunk-5E2FDXBU.js} +1 -1
- package/dist/chunks/{chunk-ZUB4M4N3.js → chunk-5VQ7JHV4.js} +134 -49
- package/dist/chunks/{chunk-I6NOHKEK.js → chunk-7SQN5IZR.js} +1 -1
- package/dist/chunks/{chunk-4FCBEWNB.js → chunk-BP7BONZO.js} +675 -86
- package/dist/chunks/{chunk-U6Y32KEV.js → chunk-BWFCTE43.js} +1 -1
- package/dist/chunks/{chunk-PG5YSNYY.js → chunk-DACQKJ6O.js} +3 -3
- package/dist/chunks/{chunk-KWJEICD4.js → chunk-E2EY3DMS.js} +2 -2
- package/dist/chunks/{chunk-KEA4XQPO.js → chunk-FAC4IFGQ.js} +4 -4
- package/dist/chunks/{chunk-MXCRKXOP.js → chunk-FPWCCRKT.js} +1 -1
- package/dist/chunks/{minute-doc-OQUMDTKG.js → chunk-IBTGXLOT.js} +101 -18
- package/dist/chunks/{chunk-OJ4JPD25.js → chunk-LQLIXBJF.js} +6 -8
- package/dist/chunks/{chunk-BNKUHN4N.js → chunk-OVTCWLNQ.js} +2 -2
- package/dist/chunks/{chunk-5D2V7ZAN.js → chunk-PMRNIGKZ.js} +1 -1
- package/dist/chunks/{chunk-OQCK5SAU.js → chunk-RVEKGVZU.js} +1 -1
- package/dist/chunks/{chunk-2AUFKU2D.js → chunk-SWFTWNWL.js} +11 -11
- package/dist/chunks/{chunk-TA2RBUTH.js → chunk-TBCKK6LH.js} +1 -1
- package/dist/chunks/{chunk-SU6IJD6D.js → chunk-TD5IOEGN.js} +1 -1
- package/dist/chunks/{chunk-J7FAAHWH.js → chunk-UDBQJLQF.js} +1 -1
- package/dist/chunks/{chunk-BSR5TM7U.js → chunk-USYFVIUR.js} +22 -7
- package/dist/chunks/{chunk-ERZY6GYL.js → chunk-UZ2E3VNI.js} +1 -1
- package/dist/chunks/{chunk-NWYHCZTY.js → chunk-VNEU7OUN.js} +1 -1
- package/dist/chunks/{chunk-5QUTQHXF.js → chunk-WNFDR5PC.js} +198 -80
- package/dist/chunks/{chunk-LJI4N6FV.js → chunk-XNN5PZTI.js} +1 -1
- package/dist/chunks/{chunk-QJWVYOOV.js → chunk-Z44YFIN6.js} +2 -2
- package/dist/chunks/{chunk-ZWIMLT6P.js → chunk-ZOTXXGUM.js} +7 -7
- package/dist/chunks/{cli-FULPXIKJ.js → cli-WA7FOQKC.js} +35 -35
- package/dist/chunks/{commands-BNWFNTD3.js → commands-J52MJ6NF.js} +3 -3
- package/dist/chunks/{conflict-5BKCDV2F.js → conflict-D4GVAURN.js} +2 -2
- package/dist/chunks/{contract-WI23OXVC.js → contract-GW7US3UF.js} +4400 -3548
- package/dist/chunks/{cowork-DZBBVNMQ.js → cowork-GZDODGKF.js} +1 -1
- package/dist/chunks/{create-flow-7ZRBRKX7.js → create-flow-ERDGW3FZ.js} +10 -6
- package/dist/chunks/{data-PAZVE6QE.js → data-HTQZRPPI.js} +1 -1
- package/dist/chunks/{ebuilder-form-5SQXIGXN.js → ebuilder-form-GHNIZ7ET.js} +2 -2
- package/dist/chunks/{ehr-CX5F4ZAU.js → ehr-P6T7OAAV.js} +2 -2
- package/dist/chunks/{entry-mode-I2BYNONZ.js → entry-mode-SQU5WTX6.js} +3 -3
- package/dist/chunks/{env-ZAQZ7EHN.js → env-DASBNSEM.js} +2 -2
- package/dist/chunks/{esb-DQTXDIBF.js → esb-ATRKVHCD.js} +3 -3
- package/dist/chunks/{factory-XRI6KZ7H.js → factory-A3NAKZAA.js} +1 -1
- package/dist/chunks/{fna-FK6HQVJL.js → fna-IKYI3SST.js} +1 -1
- package/dist/chunks/{group-chat-MLWNYM2P.js → group-chat-7SEAVAJR.js} +3 -3
- package/dist/chunks/{host-MEC4VQZA.js → host-6UOXYOOY.js} +2 -2
- package/dist/chunks/{host-KUMU3DDK.js → host-EJSJSLVK.js} +2 -2
- package/dist/chunks/{host-3EPREGXS.js → host-EYNLB6S4.js} +2 -2
- package/dist/chunks/{host-T6NNQGVZ.js → host-OT4KNR3G.js} +2 -2
- package/dist/chunks/{host-VI7Q45PM.js → host-UY4LQPN4.js} +2 -2
- package/dist/chunks/{host-J74JGYAW.js → host-XXGDQM7D.js} +2 -2
- package/dist/chunks/{hrm-KKVAW4P5.js → hrm-5JQ7QZ6A.js} +2 -2
- package/dist/chunks/{im-47CIWQNL.js → im-2YJW3EI5.js} +2 -2
- package/dist/chunks/{invoice-CDYRBNIG.js → invoice-37HR6L3W.js} +937 -552
- package/dist/chunks/{jiuchuanhui-M7QTRHZK.js → jiuchuanhui-KBWUZ7WT.js} +1 -1
- package/dist/chunks/{lazy-dispatch-FKQJZFI5.js → lazy-dispatch-ZDKLS5MR.js} +6 -6
- package/dist/chunks/{mail-NRBS5N6Y.js → mail-YBKUM6HM.js} +1 -1
- package/dist/chunks/{meeting-WC5LD3IO.js → meeting-7AEQGBAT.js} +19 -13
- package/dist/chunks/minute-doc-REI6RUE4.js +20 -0
- package/dist/chunks/{okr-EHKSKMPL.js → okr-HW7IULIR.js} +1 -1
- package/dist/chunks/{operations-V5VM5MS2.js → operations-4P2UYVLH.js} +3 -3
- package/dist/chunks/{performance-ZJADXJPN.js → performance-PM2G6L3E.js} +1 -1
- package/dist/chunks/{plan-OTDNBDJ7.js → plan-3YYGZ7ZM.js} +1 -1
- package/dist/chunks/{project-4XVBQ3HX.js → project-6PRGBLO2.js} +39 -15
- package/dist/chunks/{reception-3FAHOOH7.js → reception-7G3J2MA6.js} +1 -1
- package/dist/chunks/{recruit-stage-3WTVWW2K.js → recruit-stage-TLZJUFHD.js} +544 -464
- package/dist/chunks/{registry-TJGCVRCW.js → registry-3VTB3KLV.js} +3 -3
- package/dist/chunks/{registry-F4YFZLOD.js → registry-KQ4TNUWO.js} +1 -1
- package/dist/chunks/{registry-NBTBXR4L.js → registry-UVTI323K.js} +12 -11
- package/dist/chunks/{room-recommend-KL62XB2Y.js → room-recommend-ELEJUYBN.js} +4 -4
- package/dist/chunks/{schedule-XOISYUPB.js → schedule-XBKY7VEA.js} +4 -4
- package/dist/chunks/{smart-extract-UYGNV3BM.js → smart-extract-T5Z4AULN.js} +1 -1
- package/dist/chunks/{update-AV5VOXGY.js → update-77ZUIYSG.js} +2 -2
- package/dist/chunks/{workflow-V54LJPXL.js → workflow-SYCBS5XD.js} +3 -3
- package/dist/index.js +3 -3
- package/dist/internal/update/service.js +9 -8
- package/dist/shortcuts/contract/data/collection-ledger-html.js +109 -33
- package/dist/shortcuts/contract/data/collection-node-catalog.js +26 -2
- package/dist/shortcuts/contract/data/report-renderers.js +75 -31
- package/dist/shortcuts/contract/data/report-spec.js +17 -3
- package/dist/shortcuts/contract/manifest.js +20 -3
- package/dist/shortcuts/contract/operations/bizreview-report.js +23 -2
- package/dist/shortcuts/contract/operations/collection-node.js +116 -1
- package/dist/shortcuts/contract/operations/compare-report.js +27 -5
- package/dist/shortcuts/contract/operations/credit-page.js +11 -2
- package/dist/shortcuts/contract/operations/docx-slots.js +27 -2
- package/dist/shortcuts/contract/operations/draft-submit.js +9 -6
- package/dist/shortcuts/contract/operations/elements-build.js +162 -30
- package/dist/shortcuts/contract/operations/elements-spec.js +50 -0
- package/dist/shortcuts/contract/operations/generated-submit.js +35 -0
- package/dist/shortcuts/contract/operations/ledger-card.js +32 -2
- package/dist/shortcuts/contract/operations/ledger-stat.js +17 -5
- package/dist/shortcuts/contract/operations/ledger.js +88 -16
- package/dist/shortcuts/contract/operations/metrics.js +16 -3
- package/dist/shortcuts/contract/operations/ops-draft.js +359 -27
- package/dist/shortcuts/contract/operations/page.js +23 -0
- package/dist/shortcuts/contract/operations/quote-recognize.js +91 -13
- package/dist/shortcuts/contract/operations/quote-submit.js +16 -0
- package/dist/shortcuts/contract/operations/review-report.js +11 -3
- package/dist/shortcuts/contract/operations/save-recognize.js +62 -1
- package/dist/shortcuts/contract/operations/triage.js +18 -3
- package/dist/shortcuts/contract/operations/viewlink.js +17 -1
- package/dist/shortcuts/ehr/operations/recruit.js +255 -90
- package/dist/shortcuts/invoice/business-response.js +13 -0
- package/dist/shortcuts/invoice/calendar.js +24 -0
- package/dist/shortcuts/invoice/host.js +26 -15
- package/dist/shortcuts/invoice/index.js +2 -2
- package/dist/shortcuts/invoice/invoice-record.js +7 -2
- package/dist/shortcuts/invoice/manifest.js +179 -155
- package/dist/shortcuts/invoice/operations/get.js +9 -3
- package/dist/shortcuts/invoice/operations/issuing-red-requests.js +138 -0
- package/dist/shortcuts/invoice/operations/registry.js +4 -5
- package/dist/shortcuts/invoice/operations/reim-auto.js +40 -2
- package/dist/shortcuts/invoice/operations/reim-customer-projects.js +79 -0
- package/dist/shortcuts/invoice/operations/reim-customer.js +79 -30
- package/dist/shortcuts/invoice/operations/reim-relation.js +0 -146
- package/dist/shortcuts/invoice/operations/reim.js +2 -126
- package/dist/shortcuts/invoice/operations/shared.js +15 -17
- package/dist/shortcuts/invoice/preapproval-enrichment.js +180 -0
- package/dist/shortcuts/invoice/projection.js +14 -0
- package/dist/shortcuts/invoice/read-enrichment.js +123 -0
- package/dist/shortcuts/meeting/confirm-gate.js +42 -0
- package/dist/shortcuts/meeting/continuation.js +6 -2
- package/dist/shortcuts/meeting/minute-doc.js +119 -12
- package/dist/shortcuts/meeting/operations/attachment.js +19 -0
- package/dist/shortcuts/meeting/operations/compose-outcome.js +24 -2
- package/dist/shortcuts/meeting/operations/eb/conflict.js +2 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +162 -19
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +22 -3
- package/dist/shortcuts/meeting/operations/group-share.js +268 -0
- package/dist/shortcuts/meeting/operations/minute-content.js +58 -1
- package/dist/shortcuts/meeting/operations/minute-export.js +295 -0
- package/dist/shortcuts/meeting/operations/registry.js +4 -0
- package/dist/shortcuts/project/operations/read.js +40 -15
- package/dist/shortcuts/recruit-stage/context.js +16 -81
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +89 -53
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +15 -5
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +46 -108
- package/dist/shortcuts/recruit-stage/operations/list.js +203 -74
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -85
- package/dist/shortcuts/recruit-stage/operations/search.js +113 -53
- package/dist/shortcuts/recruit-stage/shared.js +153 -4
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +11 -0
- package/dist/shortcuts/workflow/operations/read.js +24 -5
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +2 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +28 -4
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.node.js +198 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subordinate.js +70 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +15 -5
- package/docs/agent-invoice.md +28 -2
- package/docs/invoice.md +60 -9
- package/docs/project.md +1 -1
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +36 -7
- package/skills/weaver-e10-jinchengda/SKILL.md +64 -28
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +26 -2
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +9 -8
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +47 -52
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +7 -1
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +44 -1
- package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +8 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +33 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +17 -3
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +12 -12
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +18 -10
- package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +77 -37
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +7 -0
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +55 -12
- package/skills/weaver-e10-jinchengda/references/contract-review-todo.md +102 -0
- package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +1 -17
- package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +11 -8
- package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +2 -1
- package/skills/weaver-e10-jinchengda/references/orchestration.md +6 -6
- package/skills/weaver-e10-meeting/SKILL.md +203 -80
- package/skills/weaver-e10-meeting/references/create-quickstart.md +98 -0
- package/skills/weaver-e10-meeting/references/delivery-checklist.md +34 -0
- package/skills/weaver-e10-meeting/references/error-codes.md +44 -0
- package/skills/weaver-e10-meeting/references/minutes-pipeline.md +56 -3
- package/skills/weaver-e10-meeting/references/room-recommend.md +2 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +158 -146
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +64 -51
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +56 -18
- package/skills/weaver-e10-recruit-stage/lib/recruit-attach-probe.mjs +127 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +217 -30
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +39 -7
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +2 -2
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +10 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +18 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +29 -31
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +4 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +19 -20
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +3 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +10 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +21 -25
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +19 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +31 -58
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +2 -2
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +2 -2
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +1 -1
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +25 -15
- package/skills/weaver-e10-shijingran/SKILL.md +2 -2
- package/skills/weaver-e10-shijingran/references/operations.md +5 -2
- package/skills/weaver-e10-shijingran/references/source-manifest.json +41 -40
- package/skills/weaver-e10-workflow/SKILL.md +13 -9
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +33 -8
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +19 -14
- package/skills/weaver-e10-workflow/references/workflow-create.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +4 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +3 -3
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +132 -42
- package/skills/weaver-e10-yepiaotong/SKILL.md +133 -61
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +3 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-download.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +13 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +6 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +42 -45
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +14 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-red-workflow.md +96 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +56 -369
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +16 -6
- package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +38 -0
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +163 -646
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +90 -44
- package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +85 -0
- package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +61 -0
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +91 -280
- package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +98 -0
- package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +48 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +234 -695
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +395 -204
- package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +84 -0
- package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +165 -0
- package/templates/meeting/minute.docx +0 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +0 -93
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +0 -774
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +0 -111
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +0 -360
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +0 -167
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
esbOperationDefinitions,
|
|
5
5
|
getEsbOperation,
|
|
6
6
|
hasEsbOperation
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-5E2FDXBU.js";
|
|
8
|
+
import "./chunk-RVEKGVZU.js";
|
|
9
9
|
import "./chunk-TXUG266F.js";
|
|
10
10
|
import "./chunk-7BDPM5ST.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-FPWCCRKT.js";
|
|
12
12
|
import "./chunk-IZCQU5D5.js";
|
|
13
13
|
import "./chunk-QVKRNL7L.js";
|
|
14
14
|
import "./chunk-Y3C6MDL7.js";
|
|
@@ -4,18 +4,19 @@ import {
|
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
hasMeetingOperation,
|
|
6
6
|
meetingOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-BP7BONZO.js";
|
|
8
|
+
import "./chunk-E2EY3DMS.js";
|
|
9
|
+
import "./chunk-IBTGXLOT.js";
|
|
9
10
|
import "./chunk-WMRNO6IU.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-SWFTWNWL.js";
|
|
12
|
+
import "./chunk-Z44YFIN6.js";
|
|
13
|
+
import "./chunk-FAC4IFGQ.js";
|
|
14
|
+
import "./chunk-5VQ7JHV4.js";
|
|
15
|
+
import "./chunk-ZOTXXGUM.js";
|
|
16
|
+
import "./chunk-USYFVIUR.js";
|
|
17
|
+
import "./chunk-VNEU7OUN.js";
|
|
18
|
+
import "./chunk-7SQN5IZR.js";
|
|
19
|
+
import "./chunk-UZ2E3VNI.js";
|
|
19
20
|
import "./chunk-7BDPM5ST.js";
|
|
20
21
|
import "./chunk-QVKRNL7L.js";
|
|
21
22
|
import "./chunk-Y3C6MDL7.js";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
loadRooms,
|
|
8
8
|
recommendRooms,
|
|
9
9
|
rememberFrequentRoom
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-USYFVIUR.js";
|
|
11
|
+
import "./chunk-VNEU7OUN.js";
|
|
12
|
+
import "./chunk-7SQN5IZR.js";
|
|
13
|
+
import "./chunk-UZ2E3VNI.js";
|
|
14
14
|
import "./chunk-7BDPM5ST.js";
|
|
15
15
|
import "./chunk-UG5G54VL.js";
|
|
16
16
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
resolveMeetingScheduleTypeIds,
|
|
9
9
|
resolveMemberIdsByName,
|
|
10
10
|
runScheduleConflictFlow
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-FAC4IFGQ.js";
|
|
12
|
+
import "./chunk-VNEU7OUN.js";
|
|
13
|
+
import "./chunk-7SQN5IZR.js";
|
|
14
|
+
import "./chunk-UZ2E3VNI.js";
|
|
15
15
|
import "./chunk-7BDPM5ST.js";
|
|
16
16
|
import "./chunk-UG5G54VL.js";
|
|
17
17
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -2,8 +2,8 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
updateCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-TD5IOEGN.js";
|
|
6
|
+
import "./chunk-LQLIXBJF.js";
|
|
7
7
|
import "./chunk-7DE3VMZD.js";
|
|
8
8
|
import "./chunk-2BZ7TY4M.js";
|
|
9
9
|
import "./chunk-UG5G54VL.js";
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
validateRuleFile,
|
|
15
15
|
workflowOperationDefinitions,
|
|
16
16
|
workflowSuccess
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4PBN7NJY.js";
|
|
18
18
|
import {
|
|
19
19
|
createWorkflowContinuationSigner
|
|
20
20
|
} from "./chunk-HP7JIYMT.js";
|
|
21
21
|
import {
|
|
22
22
|
createWorkflowHost
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TBCKK6LH.js";
|
|
24
24
|
import {
|
|
25
25
|
CLARIFICATION_SUBTYPE,
|
|
26
26
|
WorkflowCliError,
|
|
@@ -36,7 +36,7 @@ import "./chunk-7BDPM5ST.js";
|
|
|
36
36
|
import {
|
|
37
37
|
reportPlatformError
|
|
38
38
|
} from "./chunk-MD5CW4B6.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-FPWCCRKT.js";
|
|
40
40
|
import "./chunk-IZCQU5D5.js";
|
|
41
41
|
import "./chunk-QVKRNL7L.js";
|
|
42
42
|
import "./chunk-Y3C6MDL7.js";
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunks/chunk-257JXJGD.js";
|
|
12
12
|
import {
|
|
13
13
|
UpdateService
|
|
14
|
-
} from "./chunks/chunk-
|
|
14
|
+
} from "./chunks/chunk-LQLIXBJF.js";
|
|
15
15
|
import "./chunks/chunk-7DE3VMZD.js";
|
|
16
16
|
import {
|
|
17
17
|
packageRootDir
|
|
@@ -85,7 +85,7 @@ async function bootstrap(argv = process.argv.slice(2)) {
|
|
|
85
85
|
const [{ createProgram }, { registerCommands }, { updateCommand }] = await Promise.all([
|
|
86
86
|
import("./chunks/root-YZG2TS5W.js"),
|
|
87
87
|
import("./chunks/register-SQOPIR2G.js"),
|
|
88
|
-
import("./chunks/update-
|
|
88
|
+
import("./chunks/update-77ZUIYSG.js")
|
|
89
89
|
]);
|
|
90
90
|
const { program, ctx } = createProgram();
|
|
91
91
|
await registerCommands(program, ctx, [updateCommand]);
|
|
@@ -112,7 +112,7 @@ async function bootstrap(argv = process.argv.slice(2)) {
|
|
|
112
112
|
var startup = await bootstrap();
|
|
113
113
|
if (!startup.handled) {
|
|
114
114
|
try {
|
|
115
|
-
await import("./chunks/cli-
|
|
115
|
+
await import("./chunks/cli-WA7FOQKC.js");
|
|
116
116
|
} finally {
|
|
117
117
|
startup.release?.();
|
|
118
118
|
}
|
|
@@ -7,6 +7,7 @@ import { isXiaoEHostEnvironment } from '../../core/runtime-agent.js';
|
|
|
7
7
|
import { compareVersions, findNpmCli, npmRunner } from './npm.js';
|
|
8
8
|
import { UPDATE_INTERVAL_MS, UpdateStore } from './store.js';
|
|
9
9
|
const NAME = 'weaver-work-cli';
|
|
10
|
+
export const UPDATE_REGISTRY = 'https://registry.npmmirror.com/';
|
|
10
11
|
const CHECK_TIMEOUT_MS = 3_000;
|
|
11
12
|
const INSTALL_TIMEOUT_MS = 120_000;
|
|
12
13
|
export class UpdateService {
|
|
@@ -47,7 +48,7 @@ export class UpdateService {
|
|
|
47
48
|
catch {
|
|
48
49
|
throw new Error('无法读取 npm 安装配置,请检查 npm 是否可用。');
|
|
49
50
|
}
|
|
50
|
-
if (typeof config.prefix !== 'string'
|
|
51
|
+
if (typeof config.prefix !== 'string')
|
|
51
52
|
throw new Error('无法识别 npm 安装配置。');
|
|
52
53
|
const prefix = resolve(config.prefix);
|
|
53
54
|
const expected = process.platform === 'win32'
|
|
@@ -60,11 +61,9 @@ export class UpdateService {
|
|
|
60
61
|
catch { /* Not this installation. */ }
|
|
61
62
|
if (!matches)
|
|
62
63
|
throw new Error('当前 CLI 不是此 npm 管理的全局安装,未执行更新。请使用原安装方式维护。');
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
return { prefix, registry: registry.href };
|
|
64
|
+
// Version lookup and installation use the same domestic mirror. Never mutate
|
|
65
|
+
// the user's npmrc, and never inherit registry overrides from their environment.
|
|
66
|
+
return { prefix, registry: UPDATE_REGISTRY };
|
|
68
67
|
}
|
|
69
68
|
status() {
|
|
70
69
|
if (this.skipReason)
|
|
@@ -79,7 +78,8 @@ export class UpdateService {
|
|
|
79
78
|
};
|
|
80
79
|
}
|
|
81
80
|
validPending(state) {
|
|
82
|
-
return
|
|
81
|
+
return state.registry === UPDATE_REGISTRY
|
|
82
|
+
&& typeof state.pending?.version === 'string'
|
|
83
83
|
&& typeof state.pending.token === 'string'
|
|
84
84
|
&& /^[a-f0-9-]{36}$/.test(state.pending.token)
|
|
85
85
|
&& compareVersions(state.pending.version, this.options.currentVersion) === 1;
|
|
@@ -115,11 +115,12 @@ export class UpdateService {
|
|
|
115
115
|
if (typeof latest !== 'string' || compareVersions(latest, this.options.currentVersion) === undefined) {
|
|
116
116
|
throw new Error('npm 返回的版本号无效。');
|
|
117
117
|
}
|
|
118
|
+
const samePending = this.validPending(state) && state.pending.version === latest;
|
|
118
119
|
state.latestVersion = latest;
|
|
119
120
|
state.prefix = install.prefix;
|
|
120
121
|
state.registry = install.registry;
|
|
121
122
|
if (compareVersions(latest, this.options.currentVersion) === 1) {
|
|
122
|
-
if (!
|
|
123
|
+
if (!samePending) {
|
|
123
124
|
state.pending = { version: latest, token: randomUUID() };
|
|
124
125
|
}
|
|
125
126
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PROJECT_CARD_OBJ_ID } from '../operations/page.js';
|
|
1
2
|
/**
|
|
2
3
|
* 收款节点台账 HTML(2026-11-29)。
|
|
3
4
|
*
|
|
@@ -49,6 +50,14 @@ td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:now
|
|
|
49
50
|
.pill.g{color:var(--green);background:var(--green-bg)}
|
|
50
51
|
.pill.gray{color:var(--text-2);background:#eef0f4}
|
|
51
52
|
.overdue{color:var(--red);font-weight:600}
|
|
53
|
+
a.jump{color:var(--primary);text-decoration:none;border-bottom:1px dashed rgba(36,104,242,.45)}
|
|
54
|
+
a.jump:hover{color:#1a53cc;border-bottom-style:solid}
|
|
55
|
+
.sep{color:var(--text-3)}
|
|
56
|
+
tr.group>td{background:#fbfcff;border-top:1px solid var(--border)}
|
|
57
|
+
tr.detail>td{background:#fff}
|
|
58
|
+
tr.detail .term{color:var(--text);padding-left:12px;position:relative;line-height:1.6}
|
|
59
|
+
tr.detail .term::before{content:"└";position:absolute;left:0;color:var(--text-3)}
|
|
60
|
+
tr.detail .sub{font-size:12px;color:var(--text-3)}
|
|
52
61
|
.empty{padding:44px;text-align:center;color:var(--text-3)}
|
|
53
62
|
.footer-note{padding:12px 20px;font-size:12px;color:var(--text-3);border-top:1px solid var(--border);line-height:1.8}
|
|
54
63
|
.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}
|
|
@@ -74,45 +83,109 @@ function formatWan(value) {
|
|
|
74
83
|
return '—';
|
|
75
84
|
return (Number(value) / 10000).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
76
85
|
}
|
|
86
|
+
function groupRows(rows) {
|
|
87
|
+
const groups = new Map();
|
|
88
|
+
for (const row of rows) {
|
|
89
|
+
const contractNo = String(row.contractNo ?? '').trim();
|
|
90
|
+
const key = `${row.projectId}||${contractNo}`;
|
|
91
|
+
let group = groups.get(key);
|
|
92
|
+
if (!group) {
|
|
93
|
+
group = {
|
|
94
|
+
key,
|
|
95
|
+
projectId: row.projectId,
|
|
96
|
+
projectName: row.projectName,
|
|
97
|
+
contractNo,
|
|
98
|
+
contractAmount: row.contractAmount,
|
|
99
|
+
dueAmount: 0,
|
|
100
|
+
receivedAmount: 0,
|
|
101
|
+
unreceivedAmount: 0,
|
|
102
|
+
maxOverdueDays: 0,
|
|
103
|
+
overdueStages: 0,
|
|
104
|
+
stages: [],
|
|
105
|
+
};
|
|
106
|
+
groups.set(key, group);
|
|
107
|
+
}
|
|
108
|
+
// 合同金额是合同级属性:同组多行取**最大值**,不重复累加(避免虚增)
|
|
109
|
+
group.contractAmount = Math.max(group.contractAmount, row.contractAmount);
|
|
110
|
+
group.dueAmount = round2(group.dueAmount + row.dueAmount);
|
|
111
|
+
group.receivedAmount = round2(group.receivedAmount + row.receivedAmount);
|
|
112
|
+
group.unreceivedAmount = round2(group.unreceivedAmount + row.unreceivedAmount);
|
|
113
|
+
const overdue = row.overdueDays ?? 0;
|
|
114
|
+
if (overdue > 0) {
|
|
115
|
+
group.overdueStages += 1;
|
|
116
|
+
group.maxOverdueDays = Math.max(group.maxOverdueDays, overdue);
|
|
117
|
+
}
|
|
118
|
+
group.stages.push(row);
|
|
119
|
+
}
|
|
120
|
+
for (const group of groups.values()) {
|
|
121
|
+
group.stages.sort((a, b) => (b.overdueDays ?? -Infinity) - (a.overdueDays ?? -Infinity));
|
|
122
|
+
}
|
|
123
|
+
return [...groups.values()].sort((a, b) => b.maxOverdueDays - a.maxOverdueDays);
|
|
124
|
+
}
|
|
125
|
+
function round2(value) {
|
|
126
|
+
return Math.round(value * 100) / 100;
|
|
127
|
+
}
|
|
128
|
+
/** 单元格里的链接:能取到地址就渲染 `<a target="_blank">`,取不到就是纯文本。 */
|
|
129
|
+
function anchor(href, label) {
|
|
130
|
+
const text = esc(label || '—');
|
|
131
|
+
if (!href)
|
|
132
|
+
return text;
|
|
133
|
+
return `<a class="jump" href="${esc(href)}" target="_blank" rel="noopener">${text}</a>`;
|
|
134
|
+
}
|
|
135
|
+
function statusPill(overdue) {
|
|
136
|
+
if (overdue === null)
|
|
137
|
+
return '<span class="pill gray">无计划日</span>';
|
|
138
|
+
if (overdue > 0)
|
|
139
|
+
return '<span class="pill r">已逾期</span>';
|
|
140
|
+
if (overdue === 0)
|
|
141
|
+
return '<span class="pill o">今日到期</span>';
|
|
142
|
+
return '<span class="pill o">待到账</span>';
|
|
143
|
+
}
|
|
77
144
|
export function renderCollectionLedger(rows, totals, options = {}) {
|
|
78
145
|
const title = options.title?.trim() || '合同台账 · 收款节点';
|
|
79
146
|
const manager = options.managerName?.trim() || '—';
|
|
80
147
|
const generatedAt = (options.generatedAt ?? new Date()).toLocaleString('zh-CN', { hour12: false });
|
|
81
148
|
const warnings = options.warnings ?? [];
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<td
|
|
106
|
-
<td
|
|
107
|
-
<td class="
|
|
149
|
+
const linkOf = options.linkOf ?? {};
|
|
150
|
+
const groups = groupRows(rows);
|
|
151
|
+
const body = groups.length === 0
|
|
152
|
+
? '<tr><td colspan="10"><div class="empty">该客户经理名下暂无「条件已达成且未收清」的付款阶段</div></td></tr>'
|
|
153
|
+
: groups.map((group) => {
|
|
154
|
+
const projectHref = group.projectId && linkOf.project ? linkOf.project(group.projectId) : '';
|
|
155
|
+
const contractParts = group.contractNo
|
|
156
|
+
? group.contractNo.split(',').map((item) => item.trim()).filter(Boolean)
|
|
157
|
+
: [];
|
|
158
|
+
const contractHtml = contractParts.length
|
|
159
|
+
? contractParts.map((no) => anchor(linkOf.contract ? linkOf.contract(no) : '', no)).join('<span class="sep">、</span>')
|
|
160
|
+
: '—';
|
|
161
|
+
const overdueText = group.overdueStages > 0
|
|
162
|
+
? `<span class="overdue">${group.maxOverdueDays}</span>`
|
|
163
|
+
: '—';
|
|
164
|
+
const mainRow = ` <tr class="group">
|
|
165
|
+
<td><div class="cname">${anchor(projectHref, group.projectName || '—')}</div><div class="ctype">合同号:${contractHtml}</div></td>
|
|
166
|
+
<td><div class="ctype">共 ${group.stages.length} 个收款节点${group.overdueStages ? `(逾期 ${group.overdueStages} 个)` : ''}</div></td>
|
|
167
|
+
<td class="num"><b>${formatMoney(group.contractAmount)}</b></td>
|
|
168
|
+
<td class="num">—</td>
|
|
169
|
+
<td class="num"><b>${formatMoney(group.dueAmount)}</b></td>
|
|
170
|
+
<td class="num">${formatMoney(group.receivedAmount)}</td>
|
|
171
|
+
<td class="num"><b>${formatMoney(group.unreceivedAmount)}</b></td>
|
|
172
|
+
<td class="mono">—</td>
|
|
173
|
+
<td class="num">${overdueText}</td>
|
|
174
|
+
<td>${group.overdueStages ? `<span class="pill r">${group.overdueStages} 个逾期</span>` : '<span class="pill g">未逾期</span>'}</td>
|
|
175
|
+
</tr>`;
|
|
176
|
+
const detailRows = group.stages.map((row) => ` <tr class="detail">
|
|
177
|
+
<td><div class="term">${esc(row.term || '—')}</div></td>
|
|
178
|
+
<td><span class="sub">└ 收款节点</span></td>
|
|
179
|
+
<td class="num">—</td>
|
|
108
180
|
<td class="num">${row.ratio ? `${row.ratio}%` : '—'}</td>
|
|
109
181
|
<td class="num">${formatMoney(row.dueAmount)}</td>
|
|
110
182
|
<td class="num">${formatMoney(row.receivedAmount)}</td>
|
|
111
|
-
<td class="num"
|
|
183
|
+
<td class="num">${formatMoney(row.unreceivedAmount)}</td>
|
|
112
184
|
<td class="mono">${esc(row.planReceiveDate || '—')}</td>
|
|
113
|
-
<td class="num">${
|
|
114
|
-
<td>${
|
|
115
|
-
</tr
|
|
185
|
+
<td class="num">${row.overdueDays !== null && row.overdueDays > 0 ? `<span class="overdue">${row.overdueDays}</span>` : '—'}</td>
|
|
186
|
+
<td>${statusPill(row.overdueDays)}</td>
|
|
187
|
+
</tr>`).join('\n');
|
|
188
|
+
return `${mainRow}\n${detailRows}`;
|
|
116
189
|
}).join('\n');
|
|
117
190
|
const warnHtml = warnings.length
|
|
118
191
|
? `<div class="warnbar">${warnings.map((item) => esc(item)).join('<br>')}</div>`
|
|
@@ -146,7 +219,7 @@ export function renderCollectionLedger(rows, totals, options = {}) {
|
|
|
146
219
|
<div class="stat">
|
|
147
220
|
<div class="k">合同金额合计</div>
|
|
148
221
|
<div class="v">${formatWan(totals.contractAmount)}<small> 万元</small></div>
|
|
149
|
-
<div class="sub"
|
|
222
|
+
<div class="sub">${totals.contracts} 份合同(同一合同多期只计一次)</div>
|
|
150
223
|
</div>
|
|
151
224
|
<div class="stat">
|
|
152
225
|
<div class="k">本期应收合计</div>
|
|
@@ -166,7 +239,7 @@ export function renderCollectionLedger(rows, totals, options = {}) {
|
|
|
166
239
|
</div>
|
|
167
240
|
|
|
168
241
|
<div class="table-card">
|
|
169
|
-
<div class="table-head"><span class="t">到收款节点的付款阶段</span><span class="n"
|
|
242
|
+
<div class="table-head"><span class="t">到收款节点的付款阶段</span><span class="n">${groups.length} 个项目·合同,共 ${totals.stages} 个收款节点</span></div>
|
|
170
243
|
<table>
|
|
171
244
|
<thead><tr>
|
|
172
245
|
<th>项目 / 合同号</th><th>付款条件</th><th class="num">合同金额(元)</th><th class="num">比例</th>
|
|
@@ -179,7 +252,10 @@ ${body}
|
|
|
179
252
|
</table>
|
|
180
253
|
<div class="footer-note">
|
|
181
254
|
数据来源:项目看板(客户经理 = ${esc(manager)},项目状态 ∈ 5 个未结束值)→ 项目合同付款阶段明细台账(关联项目 inC 批量过滤,台账仅返回未收清条款)。<br>
|
|
182
|
-
|
|
255
|
+
呈现口径:同一「项目 + 合同号」的多笔收款节点合并为一组 —— 主行给合同金额与应收/已收/未收合计,明细行(└)给每个收款节点;合同金额是合同级属性,只在主行出现一次,明细行不重复。<br>
|
|
256
|
+
口径:本期应收 = 合同金额 × 比例;未收 = 本期应收 − 已收;逾期天数 = 今天 − 计划收款日(本地计算,正数表示已逾期)。金额单位:元(KPI 卡另附万元概览)。<br>
|
|
257
|
+
KPI「合同金额合计」按合同去重统计(同一合同有多期只计一次,不是按行累加);应收/已收/未收则是各期之和。<br>
|
|
258
|
+
跳转:项目名 → 项目卡片页(/sp/ebdfpage/card/2/${PROJECT_CARD_OBJ_ID}/{项目ID});合同号 → 合同卡片页(/sp/ebdfpage/card/0/846297265322573825/{数据ID},数据 ID 由本链路按合同号解析;解析不到的合同号不带链接)。
|
|
183
259
|
</div>
|
|
184
260
|
</div>
|
|
185
261
|
</div>
|
|
@@ -207,13 +207,37 @@ export function daysBetween(dateText, today) {
|
|
|
207
207
|
const base = Date.UTC(today.getFullYear(), today.getMonth(), today.getDate());
|
|
208
208
|
return Math.round((base - target) / 86_400_000);
|
|
209
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* 合同金额的去重键:同一份合同无论出现几期(几行),合同金额只应计一次。
|
|
212
|
+
*
|
|
213
|
+
* 2026-12-01 事故:`summarize` 原先按**行**累加 `contractAmount`,同一合同有 2 期就被算了两遍
|
|
214
|
+
* (3 行 × 50 万 → KPI 显示 150 万,实际只有 2 份合同 100 万)。
|
|
215
|
+
* 合同号字段可能是多值(`HT-001,HT-002`)→ 先拆分排序再拼键,保证 `HT-001,HT-002` 与
|
|
216
|
+
* `HT-002,HT-001` 是同一把键。
|
|
217
|
+
*/
|
|
218
|
+
export function contractKeyOf(contractNo) {
|
|
219
|
+
return String(contractNo ?? '')
|
|
220
|
+
.split(',')
|
|
221
|
+
.map((item) => item.trim())
|
|
222
|
+
.filter(Boolean)
|
|
223
|
+
.sort()
|
|
224
|
+
.join('|');
|
|
225
|
+
}
|
|
210
226
|
export function summarize(rows) {
|
|
211
227
|
const overdue = rows.filter((row) => (row.overdueDays ?? 0) > 0);
|
|
228
|
+
// 合同金额按**合同**去重(同一合同多期只计一次,金额取该合同各行的最大值,避免脏数据放大)
|
|
229
|
+
const amountByContract = new Map();
|
|
230
|
+
for (const row of rows) {
|
|
231
|
+
const key = contractKeyOf(row.contractNo);
|
|
232
|
+
if (!key)
|
|
233
|
+
continue;
|
|
234
|
+
amountByContract.set(key, Math.max(amountByContract.get(key) ?? 0, row.contractAmount));
|
|
235
|
+
}
|
|
212
236
|
return {
|
|
213
237
|
stages: rows.length,
|
|
214
|
-
contracts: new Set(rows.map((row) => row.contractNo).filter(Boolean)).size,
|
|
238
|
+
contracts: amountByContract.size || new Set(rows.map((row) => row.contractNo).filter(Boolean)).size,
|
|
215
239
|
projects: new Set(rows.map((row) => row.projectId).filter(Boolean)).size,
|
|
216
|
-
contractAmount: round2(
|
|
240
|
+
contractAmount: round2([...amountByContract.values()].reduce((sum, value) => sum + value, 0)),
|
|
217
241
|
dueAmount: round2(rows.reduce((sum, row) => sum + row.dueAmount, 0)),
|
|
218
242
|
receivedAmount: round2(rows.reduce((sum, row) => sum + row.receivedAmount, 0)),
|
|
219
243
|
unreceivedAmount: round2(rows.reduce((sum, row) => sum + row.unreceivedAmount, 0)),
|