weaver-work-cli 0.1.49 → 0.1.50
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/{attachment-content-MU2LPI5P.js → attachment-content-EJYIOJPH.js} +3 -3
- package/dist/chunks/{chunk-6GWU63YF.js → chunk-3NCFFHB2.js} +1 -1
- package/dist/chunks/{chunk-NBEWUR7L.js → chunk-6T53BSWZ.js} +158 -44
- package/dist/chunks/{chunk-EJVA5ZVB.js → chunk-7AYQJSFY.js} +2 -2
- package/dist/chunks/{chunk-D2QRZUW4.js → chunk-7ECB22G3.js} +35 -28
- package/dist/chunks/{chunk-72MI3MBX.js → chunk-ATEXBEPD.js} +55 -15
- package/dist/chunks/{chunk-3NV2ETZR.js → chunk-BFKLQLBK.js} +8 -8
- package/dist/chunks/{chunk-BRRW7CWA.js → chunk-HARQF5IP.js} +26 -26
- package/dist/chunks/{chunk-K3BT54CU.js → chunk-K67FODVC.js} +1 -1
- package/dist/chunks/{chunk-YLCYX7LE.js → chunk-KMRT7NAT.js} +18 -5
- package/dist/chunks/{chunk-GEOMANP7.js → chunk-MCZG6HPM.js} +2 -2
- package/dist/chunks/{chunk-ZKEUGS2U.js → chunk-RYFRGTUV.js} +4 -4
- package/dist/chunks/{chunk-3X7VOSBA.js → chunk-WNJUGI2F.js} +1 -1
- package/dist/chunks/{chunk-KV5SOWMS.js → chunk-YB3AJYPY.js} +4 -4
- package/dist/chunks/{conflict-6347A7YK.js → conflict-C4UDHCWV.js} +2 -2
- package/dist/chunks/{contract-N6P2HIIE.js → contract-VUC6JOPG.js} +464 -9
- package/dist/chunks/{create-flow-7WG7LVX5.js → create-flow-6OG2LYBD.js} +6 -6
- package/dist/chunks/{env-LHRKSLG6.js → env-WP57TF2S.js} +2 -2
- package/dist/chunks/{factory-2H7Z4RWJ.js → factory-VUXI7N5C.js} +1 -1
- package/dist/chunks/{fna-ZVB2IILI.js → fna-ECOYBQYL.js} +328 -5
- package/dist/chunks/{group-chat-EW6PNDDT.js → group-chat-UQRGXILK.js} +3 -3
- package/dist/chunks/{im-3RCNL5GT.js → im-TN2JYVGJ.js} +2 -2
- package/dist/chunks/{invoice-FXWH5GPO.js → invoice-E7GOITEU.js} +1 -1
- package/dist/chunks/{meeting-N2FQBHXI.js → meeting-4BBLVAWM.js} +10 -10
- package/dist/chunks/{msg-parse-4GSQ2WTO.js → msg-parse-FPFVPMYI.js} +5 -1
- package/dist/chunks/{reception-MYOKJULO.js → reception-QGPNTGHG.js} +98 -82
- package/dist/chunks/{registry-CKUVBS53.js → registry-5CRCN2TV.js} +10 -10
- package/dist/chunks/{registry-BUTEDK3C.js → registry-E5RQJVWN.js} +2 -2
- package/dist/chunks/{registry-7VZ6YJUF.js → registry-V4CHRQDI.js} +1 -1
- package/dist/chunks/{room-recommend-MBCYENQ2.js → room-recommend-AYR3UG7R.js} +4 -4
- package/dist/chunks/{schedule-5IFMCXME.js → schedule-JZEFIXUS.js} +4 -4
- package/dist/chunks/{workflow-2TRU2ZSP.js → workflow-3ZAF2J5E.js} +1 -1
- package/dist/index.js +7 -7
- package/dist/shortcuts/contract/host.js +11 -0
- package/dist/shortcuts/contract/index.js +13 -0
- package/dist/shortcuts/contract/manifest.js +53 -0
- package/dist/shortcuts/contract/operations/performance.js +58 -7
- package/dist/shortcuts/contract/operations/quote.js +283 -1
- package/dist/shortcuts/contract/operations/registry.js +2 -0
- package/dist/shortcuts/contract/operations/save-recognize.js +151 -0
- package/dist/shortcuts/fna/host.js +4 -2
- package/dist/shortcuts/fna/manifest.js +14 -5
- package/dist/shortcuts/fna/operations/audit.js +334 -0
- package/dist/shortcuts/fna/operations/registry.js +2 -0
- package/dist/shortcuts/im/operations/at-mention.js +6 -3
- package/dist/shortcuts/im/operations/msg-parse.js +35 -5
- package/dist/shortcuts/im/operations/msg-sync.js +3 -1
- package/dist/shortcuts/im/operations/msg-write.js +57 -9
- package/dist/shortcuts/invoice/manifest.js +1 -1
- package/dist/shortcuts/meeting/operations/from-group-chat.js +16 -2
- package/dist/shortcuts/reception/constants.js +3 -7
- package/dist/shortcuts/reception/operations/leads.js +30 -6
- package/dist/shortcuts/reception/operations/panels.js +3 -2
- package/dist/shortcuts/workflow/operations/read.js +58 -14
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +140 -24
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +42 -14
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +4 -6
- package/docs/SKILL.md +1 -1
- package/docs/_catalog.md +1 -1
- package/docs/fna.md +11 -4
- package/package.json +1 -1
- package/skill-template/business-info.json +6 -1
- package/skill-template/domains/qiyecheng.md +4 -2
- package/skills/weaver-e10-jinchengda/SKILL.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +44 -2
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +219 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +50 -30
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +24 -15
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +96 -2
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +43 -0
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +997 -0
- package/skills/weaver-e10-jinchengda/scripts/render_ebdf_list_card.py +265 -0
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +83 -0
- package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +118 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +21 -7
- package/skills/weaver-e10-qiyecheng/references/ai-check-audit.md +104 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +17 -3
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +136 -30
- package/skills/weaver-e10-reception-flow/SKILL.md +43 -6
- package/skills/weaver-e10-reception-flow/references/guide.md +1 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +3 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +6 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +3 -3
- package/skills/weaver-e10-workflow/SKILL.md +2 -1
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +29 -6
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +162 -10
- package/skills/weaver-e10-yepiaotong/SKILL.md +10 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +19 -32
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +6 -45
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +5 -5
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +4 -37
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +4 -4
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +22 -35
- package/skills/weaver-e10-yimiaoban/SKILL.md +8 -6
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +20 -0
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +7 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +18 -15
|
@@ -44,12 +44,6 @@ var LOGISTICS_HINT = [
|
|
|
44
44
|
"\u4F34\u624B\u793C\uFF1A\u5982\u300C\u793C\u76D2\u6BCF\u4EBA1\u4EFD\u300D\u6216\u300C\u4E0D\u7528\u300D",
|
|
45
45
|
"\u624B\u673A\uFF1A11 \u4F4D\uFF0C\u53EA\u7528\u4E8E\u884C\u7A0B\u5355\u663E\u793A\u63A5\u5F85\u4EBA\u8054\u7CFB\u65B9\u5F0F\uFF08\u7CFB\u7EDF\u4E0D\u67E5\u5458\u5DE5\u624B\u673A\u53F7\uFF09"
|
|
46
46
|
].join("\n");
|
|
47
|
-
var CUSTOMER_NEED_OPTIONS = [
|
|
48
|
-
"\u4E86\u89E3\u6CDB\u5FAE\u4EA7\u54C1\u4E0E\u653F\u52A1\u884C\u4E1A\u89E3\u51B3\u65B9\u6848",
|
|
49
|
-
"\u53C2\u89C2\u603B\u90E8\u73AF\u5883\u4E0E\u5C55\u5385\uFF0C\u4E86\u89E3\u516C\u53F8\u5B9E\u529B",
|
|
50
|
-
"\u4EA4\u6D41\u5177\u4F53\u9879\u76EE\u5408\u4F5C\u4E0E\u5B9E\u65BD\u7EC6\u8282",
|
|
51
|
-
"\u6682\u672A\u786E\u5B9A\uFF0C\u5148\u8FDB\u5F85\u529E"
|
|
52
|
-
];
|
|
53
47
|
var MEETING_TITLE = "\u662F\u5426\u5B89\u6392\u4F1A\u8BAE\uFF08\u9700\u9884\u7559\u573A\u5730\uFF09";
|
|
54
48
|
var MEETING_OPTIONS = [
|
|
55
49
|
{ label: "\u662F\uFF0C\u5B89\u6392\u4F1A\u8BAE\u5BA4", value: "\u662F" },
|
|
@@ -582,6 +576,103 @@ function createReceptionHost(ctx) {
|
|
|
582
576
|
return { getSession, requireRuntime, uploadFile, fetchRestaurantRooms: fetchRestaurantRooms2 };
|
|
583
577
|
}
|
|
584
578
|
|
|
579
|
+
// src/shortcuts/reception/operations/leads.ts
|
|
580
|
+
var MEETING_ROOMS = [
|
|
581
|
+
{ id: "100502820000000225", name: "130\u4F1A\u8BAE\u5BA4\uFF08\u4E2D\u5EAD\u5DE6\u4FA7\uFF09", no: "130", where: "\u4E2D\u5EAD\u5DE6\u4FA7", capacity: 12, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" },
|
|
582
|
+
{ id: "100502820000000227", name: "131\u4F1A\u8BAE\u5BA4\uFF08\u524D\u5EAD\u5DE6\u4FA7\uFF09", no: "131", where: "\u524D\u5EAD\u5DE6\u4FA7", capacity: 20, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" },
|
|
583
|
+
{ id: "100502820000000224", name: "129\u4F1A\u8BAE\u5BA4\uFF08\u4E2D\u5EAD\u5DE6\u4FA7\uFF09", no: "129", where: "\u4E2D\u5EAD\u5DE6\u4FA7", capacity: 20, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" }
|
|
584
|
+
];
|
|
585
|
+
function normalizeMeetingRoom(value) {
|
|
586
|
+
const text = String(value || "").trim();
|
|
587
|
+
if (!text) return "";
|
|
588
|
+
const exact = MEETING_ROOMS.find((room) => room.name === text);
|
|
589
|
+
if (exact) return exact.name;
|
|
590
|
+
const byId = MEETING_ROOMS.find((room) => room.id === text);
|
|
591
|
+
if (byId) return byId.name;
|
|
592
|
+
const no = text.match(/(?:总部\s*)?(129|130|131)/);
|
|
593
|
+
if (!no) return "";
|
|
594
|
+
const hit = MEETING_ROOMS.find((room) => room.no === no[1]);
|
|
595
|
+
return hit ? hit.name : "";
|
|
596
|
+
}
|
|
597
|
+
function meetingRoomId(value) {
|
|
598
|
+
const name = normalizeMeetingRoom(value);
|
|
599
|
+
const hit = MEETING_ROOMS.find((room) => room.name === name);
|
|
600
|
+
return hit ? hit.id : "";
|
|
601
|
+
}
|
|
602
|
+
function normalizeMeeting(value) {
|
|
603
|
+
const raw = typeof value === "boolean" ? value ? "\u662F" : "\u5426" : String(value ?? "").trim();
|
|
604
|
+
if (!raw) return "";
|
|
605
|
+
if (/^(否|不|无|没|no|n|false|0)/i.test(raw)) return "\u5426";
|
|
606
|
+
if (/^(是|要|需要|安排|定|订|有|yes|y|true|1)/i.test(raw)) return "\u662F";
|
|
607
|
+
if (/(不需要|不用|无需|不安排|不定|不订)/.test(raw)) return "\u5426";
|
|
608
|
+
if (/(需要|安排|预定|预订|定会|开会|座谈)/.test(raw)) return "\u662F";
|
|
609
|
+
return "";
|
|
610
|
+
}
|
|
611
|
+
function applyMeetingPolicy(data) {
|
|
612
|
+
const declared = normalizeMeeting(data.meeting);
|
|
613
|
+
const room = normalizeMeetingRoom(data.meetingRoom);
|
|
614
|
+
const meeting = declared || (room ? "\u662F" : "");
|
|
615
|
+
if (meeting === "\u662F") {
|
|
616
|
+
data.meeting = "\u662F";
|
|
617
|
+
if (room) {
|
|
618
|
+
const hit = MEETING_ROOMS.find((item) => item.name === room);
|
|
619
|
+
const prev = data.meetingRoomMeta || {};
|
|
620
|
+
data.meetingRoom = room;
|
|
621
|
+
data.meetingRoomMeta = {
|
|
622
|
+
...hit || {},
|
|
623
|
+
...prev.capacity ? prev : {},
|
|
624
|
+
name: room,
|
|
625
|
+
reason: prev.capacity ? prev.reason || "\u6309\u6307\u5B9A\u623F\u95F4\u9884\u7559" : "\u6309\u6307\u5B9A\u623F\u95F4\u9884\u7559"
|
|
626
|
+
};
|
|
627
|
+
} else {
|
|
628
|
+
const picked = pickMeetingRoom(data.headcount, data.headcountMax);
|
|
629
|
+
data.meetingRoom = picked.name;
|
|
630
|
+
data.meetingRoomMeta = { ...picked };
|
|
631
|
+
}
|
|
632
|
+
return data;
|
|
633
|
+
}
|
|
634
|
+
if (meeting === "\u5426") {
|
|
635
|
+
data.meeting = "\u5426";
|
|
636
|
+
data.meetingRoom = "\u4E0D\u9700\u4F1A\u8BAE\u5BA4";
|
|
637
|
+
data.meetingRoomMeta = { name: "\u4E0D\u9700\u4F1A\u8BAE\u5BA4", where: "", capacity: 0, desc: "", reason: "\u672C\u6B21\u4E0D\u5B89\u6392\u4F1A\u8BAE" };
|
|
638
|
+
return data;
|
|
639
|
+
}
|
|
640
|
+
delete data.meetingRoom;
|
|
641
|
+
delete data.meetingRoomMeta;
|
|
642
|
+
return data;
|
|
643
|
+
}
|
|
644
|
+
function pickMeetingRoom(headcount, headcountMax) {
|
|
645
|
+
const upper = Number(headcountMax) || Number(headcount) || 0;
|
|
646
|
+
if (!upper) return { ...MEETING_ROOMS[1], reason: "\u4EBA\u6570\u672A\u5B9A\uFF0C\u9ED8\u8BA4\u9884\u7559 20 \u4EBA\u95F4" };
|
|
647
|
+
const fits = [...MEETING_ROOMS].filter((room) => room.capacity >= upper).sort((a, b) => a.capacity - b.capacity);
|
|
648
|
+
if (!fits.length) {
|
|
649
|
+
return { ...MEETING_ROOMS[1], reason: `\u6700\u591A ${upper} \u4EBA\uFF0C\u8D85\u51FA 20 \u4EBA\u4E0A\u9650\uFF0C\u9700\u53E6\u627E\u573A\u5730` };
|
|
650
|
+
}
|
|
651
|
+
return { ...fits[0], reason: `\u6700\u591A ${upper} \u4EBA\uFF0C${fits[0].capacity} \u4EBA\u95F4\u53EF\u5BB9\u7EB3` };
|
|
652
|
+
}
|
|
653
|
+
function isGovClient(data = {}) {
|
|
654
|
+
const nature = String(data.nature || "");
|
|
655
|
+
if (/(政府|事业|国企)/.test(nature)) return true;
|
|
656
|
+
return /(局|委|厅|办公室|管委会|街道办|人民政府|法院|检察院|税务|政务)/.test(String(data.customer || ""));
|
|
657
|
+
}
|
|
658
|
+
function solutionLabel(data = {}) {
|
|
659
|
+
if (isGovClient(data)) return "\u6570\u667A\u516C\u6587";
|
|
660
|
+
const name = String(data.customer || "");
|
|
661
|
+
if (/航空|铁路|电力|电网|石油|石化|燃气|水务|烟草|邮政|电信|移动通信|联通|银行|保险|证券/.test(name)) {
|
|
662
|
+
return "\u6570\u667A\u516C\u6587";
|
|
663
|
+
}
|
|
664
|
+
if (/科技|信息技术|网络|软件|互联网|智能|数字|数据/.test(name)) return "AI\u667A\u80FD\u5316";
|
|
665
|
+
return "\u6570\u667A\u4E1A\u8D22";
|
|
666
|
+
}
|
|
667
|
+
function buildNeedOptions(data = {}) {
|
|
668
|
+
return [
|
|
669
|
+
"\u53C2\u89C2\u516C\u53F8\u603B\u90E8\uFF0C\u4E86\u89E3\u516C\u53F8\u5B9E\u529B",
|
|
670
|
+
`\u4E86\u89E3\u6CDB\u5FAE\u4EA7\u54C1\uFF0C\u4E0E${solutionLabel(data)}\u89E3\u51B3\u65B9\u6848`,
|
|
671
|
+
"\u63A8\u8FDB\u9879\u76EE\u8FDB\u5EA6\uFF0C\u4EA4\u6D41\u5B9E\u65BD\u7EC6\u8282",
|
|
672
|
+
"\u6682\u672A\u660E\u786E"
|
|
673
|
+
];
|
|
674
|
+
}
|
|
675
|
+
|
|
585
676
|
// src/shortcuts/reception/operations/panels.ts
|
|
586
677
|
function parseLogistics(text) {
|
|
587
678
|
const raw = String(text || "").trim();
|
|
@@ -704,7 +795,7 @@ function buildPanels(data) {
|
|
|
704
795
|
inputType: "single",
|
|
705
796
|
required: false,
|
|
706
797
|
allowCustomInput: true,
|
|
707
|
-
options:
|
|
798
|
+
options: buildNeedOptions(data).map((item) => ({ label: item, value: item }))
|
|
708
799
|
});
|
|
709
800
|
}
|
|
710
801
|
const mobile = ((data.companions || []).find((item) => item && item.mobile) || {}).mobile || "";
|
|
@@ -898,81 +989,6 @@ function tryLoadRun(stateDir, runId) {
|
|
|
898
989
|
return readJson(runPath(stateDir, runId));
|
|
899
990
|
}
|
|
900
991
|
|
|
901
|
-
// src/shortcuts/reception/operations/leads.ts
|
|
902
|
-
var MEETING_ROOMS = [
|
|
903
|
-
{ id: "100502820000000225", name: "130\u4F1A\u8BAE\u5BA4\uFF08\u4E2D\u5EAD\u5DE6\u4FA7\uFF09", no: "130", where: "\u4E2D\u5EAD\u5DE6\u4FA7", capacity: 12, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" },
|
|
904
|
-
{ id: "100502820000000227", name: "131\u4F1A\u8BAE\u5BA4\uFF08\u524D\u5EAD\u5DE6\u4FA7\uFF09", no: "131", where: "\u524D\u5EAD\u5DE6\u4FA7", capacity: 20, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" },
|
|
905
|
-
{ id: "100502820000000224", name: "129\u4F1A\u8BAE\u5BA4\uFF08\u4E2D\u5EAD\u5DE6\u4FA7\uFF09", no: "129", where: "\u4E2D\u5EAD\u5DE6\u4FA7", capacity: 20, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" }
|
|
906
|
-
];
|
|
907
|
-
function normalizeMeetingRoom(value) {
|
|
908
|
-
const text = String(value || "").trim();
|
|
909
|
-
if (!text) return "";
|
|
910
|
-
const exact = MEETING_ROOMS.find((room) => room.name === text);
|
|
911
|
-
if (exact) return exact.name;
|
|
912
|
-
const byId = MEETING_ROOMS.find((room) => room.id === text);
|
|
913
|
-
if (byId) return byId.name;
|
|
914
|
-
const no = text.match(/(?:总部\s*)?(129|130|131)/);
|
|
915
|
-
if (!no) return "";
|
|
916
|
-
const hit = MEETING_ROOMS.find((room) => room.no === no[1]);
|
|
917
|
-
return hit ? hit.name : "";
|
|
918
|
-
}
|
|
919
|
-
function meetingRoomId(value) {
|
|
920
|
-
const name = normalizeMeetingRoom(value);
|
|
921
|
-
const hit = MEETING_ROOMS.find((room) => room.name === name);
|
|
922
|
-
return hit ? hit.id : "";
|
|
923
|
-
}
|
|
924
|
-
function normalizeMeeting(value) {
|
|
925
|
-
const raw = typeof value === "boolean" ? value ? "\u662F" : "\u5426" : String(value ?? "").trim();
|
|
926
|
-
if (!raw) return "";
|
|
927
|
-
if (/^(否|不|无|没|no|n|false|0)/i.test(raw)) return "\u5426";
|
|
928
|
-
if (/^(是|要|需要|安排|定|订|有|yes|y|true|1)/i.test(raw)) return "\u662F";
|
|
929
|
-
if (/(不需要|不用|无需|不安排|不定|不订)/.test(raw)) return "\u5426";
|
|
930
|
-
if (/(需要|安排|预定|预订|定会|开会|座谈)/.test(raw)) return "\u662F";
|
|
931
|
-
return "";
|
|
932
|
-
}
|
|
933
|
-
function applyMeetingPolicy(data) {
|
|
934
|
-
const declared = normalizeMeeting(data.meeting);
|
|
935
|
-
const room = normalizeMeetingRoom(data.meetingRoom);
|
|
936
|
-
const meeting = declared || (room ? "\u662F" : "");
|
|
937
|
-
if (meeting === "\u662F") {
|
|
938
|
-
data.meeting = "\u662F";
|
|
939
|
-
if (room) {
|
|
940
|
-
const hit = MEETING_ROOMS.find((item) => item.name === room);
|
|
941
|
-
const prev = data.meetingRoomMeta || {};
|
|
942
|
-
data.meetingRoom = room;
|
|
943
|
-
data.meetingRoomMeta = {
|
|
944
|
-
...hit || {},
|
|
945
|
-
...prev.capacity ? prev : {},
|
|
946
|
-
name: room,
|
|
947
|
-
reason: prev.capacity ? prev.reason || "\u6309\u6307\u5B9A\u623F\u95F4\u9884\u7559" : "\u6309\u6307\u5B9A\u623F\u95F4\u9884\u7559"
|
|
948
|
-
};
|
|
949
|
-
} else {
|
|
950
|
-
const picked = pickMeetingRoom(data.headcount, data.headcountMax);
|
|
951
|
-
data.meetingRoom = picked.name;
|
|
952
|
-
data.meetingRoomMeta = { ...picked };
|
|
953
|
-
}
|
|
954
|
-
return data;
|
|
955
|
-
}
|
|
956
|
-
if (meeting === "\u5426") {
|
|
957
|
-
data.meeting = "\u5426";
|
|
958
|
-
data.meetingRoom = "\u4E0D\u9700\u4F1A\u8BAE\u5BA4";
|
|
959
|
-
data.meetingRoomMeta = { name: "\u4E0D\u9700\u4F1A\u8BAE\u5BA4", where: "", capacity: 0, desc: "", reason: "\u672C\u6B21\u4E0D\u5B89\u6392\u4F1A\u8BAE" };
|
|
960
|
-
return data;
|
|
961
|
-
}
|
|
962
|
-
delete data.meetingRoom;
|
|
963
|
-
delete data.meetingRoomMeta;
|
|
964
|
-
return data;
|
|
965
|
-
}
|
|
966
|
-
function pickMeetingRoom(headcount, headcountMax) {
|
|
967
|
-
const upper = Number(headcountMax) || Number(headcount) || 0;
|
|
968
|
-
if (!upper) return { ...MEETING_ROOMS[1], reason: "\u4EBA\u6570\u672A\u5B9A\uFF0C\u9ED8\u8BA4\u9884\u7559 20 \u4EBA\u95F4" };
|
|
969
|
-
const fits = [...MEETING_ROOMS].filter((room) => room.capacity >= upper).sort((a, b) => a.capacity - b.capacity);
|
|
970
|
-
if (!fits.length) {
|
|
971
|
-
return { ...MEETING_ROOMS[1], reason: `\u6700\u591A ${upper} \u4EBA\uFF0C\u8D85\u51FA 20 \u4EBA\u4E0A\u9650\uFF0C\u9700\u53E6\u627E\u573A\u5730` };
|
|
972
|
-
}
|
|
973
|
-
return { ...fits[0], reason: `\u6700\u591A ${upper} \u4EBA\uFF0C${fits[0].capacity} \u4EBA\u95F4\u53EF\u5BB9\u7EB3` };
|
|
974
|
-
}
|
|
975
|
-
|
|
976
992
|
// src/shortcuts/reception/operations/ask.ts
|
|
977
993
|
async function ask(input, ctx) {
|
|
978
994
|
const startedAt = Date.now();
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
hasMeetingOperation,
|
|
6
6
|
meetingOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-7ECB22G3.js";
|
|
8
|
+
import "./chunk-7AYQJSFY.js";
|
|
9
|
+
import "./chunk-BFKLQLBK.js";
|
|
10
|
+
import "./chunk-HARQF5IP.js";
|
|
11
|
+
import "./chunk-RYFRGTUV.js";
|
|
12
|
+
import "./chunk-MCZG6HPM.js";
|
|
13
|
+
import "./chunk-YB3AJYPY.js";
|
|
14
|
+
import "./chunk-WNJUGI2F.js";
|
|
15
|
+
import "./chunk-3NCFFHB2.js";
|
|
16
|
+
import "./chunk-K67FODVC.js";
|
|
17
17
|
import "./chunk-7BDPM5ST.js";
|
|
18
18
|
import "./chunk-UG5G54VL.js";
|
|
19
19
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -3,9 +3,9 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getImOperation,
|
|
5
5
|
imOperationDefinitions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ATEXBEPD.js";
|
|
7
7
|
import "./chunk-IC62NFM5.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KMRT7NAT.js";
|
|
9
9
|
import "./chunk-UG5G54VL.js";
|
|
10
10
|
import "./chunk-BUSC6UAE.js";
|
|
11
11
|
export {
|
|
@@ -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-YB3AJYPY.js";
|
|
11
|
+
import "./chunk-WNJUGI2F.js";
|
|
12
|
+
import "./chunk-3NCFFHB2.js";
|
|
13
|
+
import "./chunk-K67FODVC.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-MCZG6HPM.js";
|
|
12
|
+
import "./chunk-WNJUGI2F.js";
|
|
13
|
+
import "./chunk-3NCFFHB2.js";
|
|
14
|
+
import "./chunk-K67FODVC.js";
|
|
15
15
|
import "./chunk-7BDPM5ST.js";
|
|
16
16
|
import "./chunk-UG5G54VL.js";
|
|
17
17
|
import "./chunk-BUSC6UAE.js";
|
package/dist/index.js
CHANGED
|
@@ -40,7 +40,7 @@ var builtinShortcuts = [
|
|
|
40
40
|
lazyShortcut({
|
|
41
41
|
name: "invoice",
|
|
42
42
|
description: "E10 \u4E1A\u7968\u901A\u53D1\u7968\u7BA1\u7406 CLI",
|
|
43
|
-
load: async () => (await import("./chunks/invoice-
|
|
43
|
+
load: async () => (await import("./chunks/invoice-E7GOITEU.js")).invoiceShortcut
|
|
44
44
|
}),
|
|
45
45
|
lazyShortcut({
|
|
46
46
|
name: "ehr",
|
|
@@ -75,7 +75,7 @@ var builtinShortcuts = [
|
|
|
75
75
|
lazyShortcut({
|
|
76
76
|
name: "fna",
|
|
77
77
|
description: "\u6CDB\u5FAEE10\u9F50\u4E1A\u6210\u8D39\u63A7\u4E2D\u5FC3\uFF08\u9884\u7B97/\u8D39\u7528\u4E2D\u5FC3/\u501F\u6B3E\u7BA1\u7406/\u53D1\u7968\u6838\u9500\uFF09CLI",
|
|
78
|
-
load: async () => (await import("./chunks/fna-
|
|
78
|
+
load: async () => (await import("./chunks/fna-ECOYBQYL.js")).fnaShortcut
|
|
79
79
|
}),
|
|
80
80
|
lazyShortcut({
|
|
81
81
|
name: "hrm",
|
|
@@ -90,7 +90,7 @@ var builtinShortcuts = [
|
|
|
90
90
|
lazyShortcut({
|
|
91
91
|
name: "meeting",
|
|
92
92
|
description: "\u6CDB\u5FAEE10\u4F1A\u8BAE\u7BA1\u7406 CLI\uFF08\u6807\u51C6\u7248\uFF1A\u67E5\u8BE2/\u51B2\u7A81/\u9884\u7EA6/\u56DE\u6267/\u7B7E\u5230\uFF09",
|
|
93
|
-
load: async () => (await import("./chunks/meeting-
|
|
93
|
+
load: async () => (await import("./chunks/meeting-4BBLVAWM.js")).meetingShortcut
|
|
94
94
|
}),
|
|
95
95
|
lazyShortcut({
|
|
96
96
|
name: "okr",
|
|
@@ -130,7 +130,7 @@ var builtinShortcuts = [
|
|
|
130
130
|
lazyShortcut({
|
|
131
131
|
name: "im",
|
|
132
132
|
description: "\u6CDB\u5FAEE10\u6613\u79D2\u529E\uFF08\u5373\u65F6\u901A\u8BAF\uFF09CLI",
|
|
133
|
-
load: async () => (await import("./chunks/im-
|
|
133
|
+
load: async () => (await import("./chunks/im-TN2JYVGJ.js")).imShortcut
|
|
134
134
|
}),
|
|
135
135
|
lazyShortcut({
|
|
136
136
|
name: "project",
|
|
@@ -140,7 +140,7 @@ var builtinShortcuts = [
|
|
|
140
140
|
lazyShortcut({
|
|
141
141
|
name: "workflow",
|
|
142
142
|
description: "\u6CDB\u5FAEE10\u6D41\u7A0B\u667A\u80FD\u52A9\u624B CLI\uFF08\u67E5\u8BE2/\u67E5\u770B/\u64CD\u4F5C/\u6279\u91CF/\u53D1\u8D77/\u4FEE\u6539\uFF09",
|
|
143
|
-
load: async () => (await import("./chunks/workflow-
|
|
143
|
+
load: async () => (await import("./chunks/workflow-3ZAF2J5E.js")).workflowShortcut
|
|
144
144
|
}),
|
|
145
145
|
lazyShortcut({
|
|
146
146
|
name: "blog",
|
|
@@ -155,12 +155,12 @@ var builtinShortcuts = [
|
|
|
155
155
|
lazyShortcut({
|
|
156
156
|
name: "contract",
|
|
157
157
|
description: "\u6CDB\u5FAEE10\u4ECA\u627F\u8FBE\u5408\u540C\u7BA1\u7406 CLI",
|
|
158
|
-
load: async () => (await import("./chunks/contract-
|
|
158
|
+
load: async () => (await import("./chunks/contract-VUC6JOPG.js")).contractShortcut
|
|
159
159
|
}),
|
|
160
160
|
lazyShortcut({
|
|
161
161
|
name: "reception",
|
|
162
162
|
description: "\u6CDB\u5FAE\u5BA2\u6237\u53C2\u89C2\u63A5\u5F85\u6D41\u7A0B CLI\uFF08\u9762\u677F/\u884C\u7A0B\u5355\u4E0E\u5185\u90E8\u65B9\u6848/\u586B\u5355\u9875\u9884\u586B\uFF09",
|
|
163
|
-
load: async () => (await import("./chunks/reception-
|
|
163
|
+
load: async () => (await import("./chunks/reception-QGPNTGHG.js")).receptionShortcut
|
|
164
164
|
}),
|
|
165
165
|
lazyShortcut({
|
|
166
166
|
name: "data",
|
|
@@ -108,6 +108,17 @@ export function contractBusinessStatus(path, value) {
|
|
|
108
108
|
}
|
|
109
109
|
return { ok: true, code: errcode || undefined, message: textOf(messageNode, ['errmsg', 'msg']) };
|
|
110
110
|
}
|
|
111
|
+
// 智能填单识别记录保存 `/api/ai/application/smartfill/**`:成功码是顶层 code=200(或 0)且 status 非 false,
|
|
112
|
+
// 响应里既没有 message 节点也没有 errcode。落到末尾兜底会因 errcode === undefined 被判成失败。
|
|
113
|
+
if (path.startsWith('/api/ai/application/smartfill/')) {
|
|
114
|
+
const code = root.code ?? messageNode.code ?? messageNode.errcode;
|
|
115
|
+
const ok = (code === 0 || code === '0' || code === 200 || code === '200') && root.status !== false && root.fail !== true;
|
|
116
|
+
return {
|
|
117
|
+
ok,
|
|
118
|
+
code: code === undefined ? undefined : String(code),
|
|
119
|
+
message: textOf(root, ['msg', 'message']) ?? textOf(messageNode, ['msg', 'errmsg']),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
111
122
|
const errcode = messageNode.errcode ?? root.errcode;
|
|
112
123
|
const ok = errcode === '0' || errcode === 0 || errcode === '200' || errcode === 200;
|
|
113
124
|
return { ok, code: errcode === undefined ? undefined : String(errcode), message: textOf(messageNode, ['errmsg', 'msg']) };
|
|
@@ -363,6 +363,13 @@ export const contractShortcut = {
|
|
|
363
363
|
{ flag: '--sclx <types>', description: '8 risk review (contract pre-review); 1/2/3 disabled', key: 'sclx' },
|
|
364
364
|
]);
|
|
365
365
|
const flow = contract.command('flow').description('Contract flow entry commands');
|
|
366
|
+
registerCommand(flow, 'save-recognize-record', 'Save extracted form elements as a recognize record and return aiExtraId', 'contract.flow.save-recognize-record', [
|
|
367
|
+
{ flag: '--flow <name>', description: 'optional flow preset: 契约锁 / 新客户 / 老客户增值 / 常规二次销售' },
|
|
368
|
+
{ flag: '--attachment-ids <ids>', description: 'comma separated attachment ids', key: 'attachmentIds' },
|
|
369
|
+
{ flag: '--attachment-field-id <id>', description: 'contract file field id; its value is passed to the flow component via customParams', key: 'attachmentFieldId' },
|
|
370
|
+
{ flag: '--attachment-file-id <id>', description: 'fileId for the contract file field (defaults to the first attachment id)', key: 'attachmentFileId' },
|
|
371
|
+
{ flag: '--workflow-id <id>', description: 'workflow template id; required when flow is not one of the four presets', key: 'workflowId' },
|
|
372
|
+
]);
|
|
366
373
|
registerCommand(flow, 'page', 'Build the flow create page url', 'contract.flow.page', [
|
|
367
374
|
{ flag: '--flow <name>', description: '契约锁 / 新客户 / 老客户增值 / 常规二次销售', key: 'flow' },
|
|
368
375
|
]);
|
|
@@ -482,6 +489,12 @@ export const contractShortcut = {
|
|
|
482
489
|
{ flag: '--keep-remark', description: 'keep remark column', key: 'keepRemark', kind: 'bool' },
|
|
483
490
|
{ flag: '--include-zero', description: 'keep zero-qty/amount items', key: 'includeZero', kind: 'bool' },
|
|
484
491
|
]);
|
|
492
|
+
registerCommand(quote, 'extract', 'Extract .docx quote into tables/paragraphs (no semantics)', 'contract.quote.extract', [
|
|
493
|
+
{ flag: '--path <file>', description: 'quote docx path', key: 'path' },
|
|
494
|
+
]);
|
|
495
|
+
registerCommand(quote, 'normalize', 'Validate and normalize model-produced quote JSON', 'contract.quote.normalize', [
|
|
496
|
+
{ flag: '--data <file>', description: 'model JSON path', key: 'data' },
|
|
497
|
+
]);
|
|
485
498
|
registerCommand(quote, 'fill', 'Fill a real .docx contract template with data JSON', 'contract.quote.fill', [
|
|
486
499
|
{ flag: '--template <file>', description: 'real contract template docx', key: 'template' },
|
|
487
500
|
{ flag: '--data <file>', description: 'data JSON path', key: 'data' },
|
|
@@ -488,6 +488,22 @@ const quoteContracts = [
|
|
|
488
488
|
includeZero: { type: 'boolean' },
|
|
489
489
|
}, ['path']),
|
|
490
490
|
},
|
|
491
|
+
{
|
|
492
|
+
name: 'contract.quote.extract',
|
|
493
|
+
risk: 'read-with-upload',
|
|
494
|
+
fixed: { local: true, kind: 'docx-extract' },
|
|
495
|
+
inputSchema: readSchema({
|
|
496
|
+
path: { type: 'string', minLength: 1 },
|
|
497
|
+
}, ['path']),
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
name: 'contract.quote.normalize',
|
|
501
|
+
risk: 'read',
|
|
502
|
+
fixed: { local: true, kind: 'quote-normalize' },
|
|
503
|
+
inputSchema: readSchema({
|
|
504
|
+
data: { type: 'string', minLength: 1 },
|
|
505
|
+
}, ['data']),
|
|
506
|
+
},
|
|
491
507
|
{
|
|
492
508
|
name: 'contract.quote.fill',
|
|
493
509
|
risk: 'read-with-upload',
|
|
@@ -1181,6 +1197,43 @@ export const contractOperations = [
|
|
|
1181
1197
|
path: { type: 'string', minLength: 1, maxLength: 1000 },
|
|
1182
1198
|
}, ['flow', 'path']),
|
|
1183
1199
|
},
|
|
1200
|
+
{
|
|
1201
|
+
name: 'contract.flow.save-recognize-record',
|
|
1202
|
+
risk: 'write',
|
|
1203
|
+
auth: AUTH,
|
|
1204
|
+
fixed: {
|
|
1205
|
+
method: 'POST',
|
|
1206
|
+
path: '/api/ai/application/smartfill/data/saveRecognizeRecord',
|
|
1207
|
+
note: '要素抽取结果先存成识别记录,返回的 aiExtraId 再随 customParams 传给流程组件',
|
|
1208
|
+
},
|
|
1209
|
+
inputSchema: readSchema({
|
|
1210
|
+
flow: {
|
|
1211
|
+
type: 'string',
|
|
1212
|
+
maxLength: 64,
|
|
1213
|
+
description: '可选流程预设(契约锁 / 新客户 / 老客户增值 / 常规二次销售);也可传自定义流程名,此时必须同时给 workflowId',
|
|
1214
|
+
},
|
|
1215
|
+
recognizeResult: {
|
|
1216
|
+
description: '识别结果;传 JSON 对象或其字符串均可,CLI 统一序列化为字符串',
|
|
1217
|
+
anyOf: [{ type: 'string' }, { type: 'object' }],
|
|
1218
|
+
},
|
|
1219
|
+
attachmentIds: { type: 'string', maxLength: 4000, description: '本次全部附件 ID,英文逗号分隔' },
|
|
1220
|
+
attachmentFieldId: {
|
|
1221
|
+
type: 'string',
|
|
1222
|
+
pattern: '^[1-9]\\d*$',
|
|
1223
|
+
description: '合同文件字段 ID(取自该流程表单字段定义);传入后该字段与文件 ID 会一起写进 customParams,由流程组件回填附件',
|
|
1224
|
+
},
|
|
1225
|
+
attachmentFileId: {
|
|
1226
|
+
type: 'string',
|
|
1227
|
+
maxLength: 64,
|
|
1228
|
+
description: '合同文件的 fileId;不传时取 attachmentIds 的首个文件',
|
|
1229
|
+
},
|
|
1230
|
+
workflowId: {
|
|
1231
|
+
type: 'string',
|
|
1232
|
+
pattern: '^[1-9]\\d*$',
|
|
1233
|
+
description: '流程模板 ID;不传时取 flow 的预设 workflowId。与 flow 至少传一个',
|
|
1234
|
+
},
|
|
1235
|
+
}, ['recognizeResult']),
|
|
1236
|
+
},
|
|
1184
1237
|
{
|
|
1185
1238
|
name: 'contract.recommend.doc',
|
|
1186
1239
|
risk: 'read',
|
|
@@ -11,7 +11,18 @@ import { PERFORMANCE_CATALOG, CONTRACT_SOURCES, } from '../data/performance-cata
|
|
|
11
11
|
import { contractValidationError } from '../errors.js';
|
|
12
12
|
import { requireNonEmptyString } from './shared.js';
|
|
13
13
|
const ORIGIN_PLACEHOLDER = '{baseUrl}';
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* 六菜单对应的 ebdf 列表页 pageId(2026-11-10 用户确认)。
|
|
16
|
+
* catalog 的 list_id 与部署环境可能错位(「渠道订单-商务」实测不同),这里以确认值覆盖。
|
|
17
|
+
*/
|
|
18
|
+
const EBDF_LIST_PAGE_IDS = {
|
|
19
|
+
'直销合同': '881124906081886244',
|
|
20
|
+
'直销业绩': '846297265322576586',
|
|
21
|
+
'合同收款': '846297265322576589',
|
|
22
|
+
'项目验收': '846297265322576590',
|
|
23
|
+
'渠道订单': '881210951456350225',
|
|
24
|
+
'渠道订单-商务': '881211329321197671',
|
|
25
|
+
};
|
|
15
26
|
const NULL_OPS = new Set(['isNull', 'isNotNull']);
|
|
16
27
|
function catalog() {
|
|
17
28
|
return PERFORMANCE_CATALOG;
|
|
@@ -187,22 +198,62 @@ function buildQuery(menu, conditions, origin) {
|
|
|
187
198
|
warnings.push(`页面可能默认限制${defaultTime}为当年。请用户核对实际范围;要求全部年份/其他时间口径时,由用户清空默认年月再搜索。`);
|
|
188
199
|
}
|
|
189
200
|
const url = origin + route + '?' + params.map(([k, v]) => `${encodeURIComponent0(k)}=${encodeURIComponent0(v)}`).join('&');
|
|
201
|
+
const listPageId = EBDF_LIST_PAGE_IDS[menu.name] ?? menu.list_id;
|
|
202
|
+
if (!listPageId) {
|
|
203
|
+
throw contractValidationError('list_page_missing', `catalog 未记录「${menu.name}」的 ebdf 列表 pageId,无法组件化打开。`);
|
|
204
|
+
}
|
|
190
205
|
return {
|
|
191
206
|
menu: menu.name,
|
|
192
207
|
url,
|
|
193
208
|
filters,
|
|
194
209
|
needs_ui: needsUi,
|
|
195
210
|
warnings,
|
|
196
|
-
|
|
197
|
-
version: '1.0',
|
|
198
|
-
callId: 'performance-query-1',
|
|
199
|
-
toolId: 'open_web',
|
|
200
|
-
arguments: { url, title: menu.name, activate: true, width: BROWSER_WIDTH },
|
|
201
|
-
},
|
|
211
|
+
card: buildEbdfListCard(menu, origin, listPageId, filters),
|
|
202
212
|
page_verified: false,
|
|
203
213
|
execution: needsUi.length ? 'manual-page-filter' : 'filtered-link',
|
|
204
214
|
};
|
|
205
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* 六菜单统一用 ebdf 列表页组件卡打开(fill_form + e10 + sdkOptions)。
|
|
218
|
+
* 原 open_web 落在宿主工作区视图,拿不到 E10 列表组件,已废弃。
|
|
219
|
+
* comParams 键必须是 field_<字段id>,值必须是字符串;无法序列化的条件留在 needs_ui 交用户补填。
|
|
220
|
+
*/
|
|
221
|
+
function buildEbdfListCard(menu, origin, listPageId, filters) {
|
|
222
|
+
const comParams = {};
|
|
223
|
+
for (const f of filters) {
|
|
224
|
+
const key = typeof f.key === 'string' ? f.key : '';
|
|
225
|
+
const value = f.value;
|
|
226
|
+
if (!/^field_\d+$/u.test(key))
|
|
227
|
+
continue;
|
|
228
|
+
if (typeof value !== 'string' || value === '')
|
|
229
|
+
continue;
|
|
230
|
+
comParams[key] = value;
|
|
231
|
+
}
|
|
232
|
+
const now = new Date();
|
|
233
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
234
|
+
const callId = `ebdf-list-${menu.name}-${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}${pad(now.getHours())}${pad(now.getMinutes())}-01`;
|
|
235
|
+
const path = `/list/${listPageId}`;
|
|
236
|
+
return {
|
|
237
|
+
version: 1,
|
|
238
|
+
callId,
|
|
239
|
+
toolId: 'fill_form',
|
|
240
|
+
arguments: {
|
|
241
|
+
type: 'e10',
|
|
242
|
+
title: menu.name,
|
|
243
|
+
src: `${origin}/sp/ebdfpage/list/${listPageId}`,
|
|
244
|
+
sdkRenderType: 'inline',
|
|
245
|
+
sdkOptions: {
|
|
246
|
+
compName: 'ui.CorsComponent',
|
|
247
|
+
routerType: 'MemoryRouter',
|
|
248
|
+
routerProps_pc: { initialEntries: [path] },
|
|
249
|
+
routerProps_mobile: { initialEntries: [path] },
|
|
250
|
+
params_pc: { app: '@weapp/ebdfpage', compName: 'TableViewList', noMDialog: true },
|
|
251
|
+
params_mobile: { app: '@weapp/ebdfpage', compName: 'MTableViewList', noMDialog: true },
|
|
252
|
+
params: { pageId: listPageId, comParams },
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
}
|
|
206
257
|
function requireOrigin(input) {
|
|
207
258
|
const raw = String(input.origin ?? '').trim();
|
|
208
259
|
if (!raw) {
|