weaver-work-cli 0.1.48 → 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/{archive-oa-EDJDU3V4.js → archive-oa-57R2FYHV.js} +111 -12
- package/dist/chunks/{attachment-content-4KSNBPRO.js → attachment-content-EJYIOJPH.js} +3 -3
- package/dist/chunks/{chunk-FEP6ELMR.js → chunk-3NCFFHB2.js} +1 -1
- package/dist/chunks/chunk-5QYE52LG.js +223 -0
- package/dist/chunks/{chunk-3YV7PKRL.js → chunk-6QYNE6HE.js} +12 -212
- package/dist/chunks/{chunk-NBEWUR7L.js → chunk-6T53BSWZ.js} +158 -44
- package/dist/chunks/{chunk-OCYRVZGN.js → chunk-7AYQJSFY.js} +2 -2
- package/dist/chunks/{chunk-5B5JXTY2.js → chunk-7ECB22G3.js} +221 -30
- package/dist/chunks/{chunk-72MI3MBX.js → chunk-ATEXBEPD.js} +55 -15
- package/dist/chunks/{chunk-WMSAWAWZ.js → chunk-BFKLQLBK.js} +8 -8
- package/dist/chunks/{chunk-EFOUMXIX.js → chunk-HARQF5IP.js} +28 -28
- package/dist/chunks/{chunk-O6CMPO65.js → chunk-IW7A2IQY.js} +16 -146
- package/dist/chunks/chunk-JEQHNNSS.js +158 -0
- package/dist/chunks/{chunk-NK74RE5F.js → chunk-K67FODVC.js} +3 -3
- package/dist/chunks/{chunk-YLCYX7LE.js → chunk-KMRT7NAT.js} +18 -5
- package/dist/chunks/{chunk-BCACE6VV.js → chunk-MCZG6HPM.js} +3 -3
- package/dist/chunks/{chunk-SVFG6EMV.js → chunk-RYFRGTUV.js} +5 -5
- package/dist/chunks/{chunk-PSPOFLSU.js → chunk-WNJUGI2F.js} +1 -1
- package/dist/chunks/{chunk-R2HHLJNN.js → chunk-YB3AJYPY.js} +4 -4
- package/dist/chunks/{conflict-APGSD5E7.js → conflict-C4UDHCWV.js} +2 -2
- package/dist/chunks/{contract-N6P2HIIE.js → contract-VUC6JOPG.js} +464 -9
- package/dist/chunks/{create-flow-5TXFOC7X.js → create-flow-6OG2LYBD.js} +6 -6
- package/dist/chunks/data-QO7QWOIV.js +2525 -0
- package/dist/chunks/{employee-NOHNXC46.js → employee-DR5Y64TI.js} +2 -1
- package/dist/chunks/{env-B6GKA2J3.js → env-WP57TF2S.js} +2 -2
- package/dist/chunks/{factory-MFCKLUT6.js → factory-VUXI7N5C.js} +1 -1
- package/dist/chunks/{fna-ZVB2IILI.js → fna-ECOYBQYL.js} +328 -5
- package/dist/chunks/{group-chat-YE7WIBFO.js → group-chat-UQRGXILK.js} +3 -3
- package/dist/chunks/{hrm-UNKCCCGP.js → hrm-YGIR3HGF.js} +4 -2
- 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-RYZV2JTQ.js → meeting-4BBLVAWM.js} +10 -10
- package/dist/chunks/{msg-parse-4GSQ2WTO.js → msg-parse-FPFVPMYI.js} +5 -1
- package/dist/chunks/org-NFE7X7FK.js +12 -0
- package/dist/chunks/{reception-VL6TKVAW.js → reception-QGPNTGHG.js} +526 -175
- package/dist/chunks/{recruit-stage-ERZD3ZNB.js → recruit-stage-FKWS5UQF.js} +66 -13
- package/dist/chunks/{registry-VWXWPVAG.js → registry-3UGIWH53.js} +4 -2
- package/dist/chunks/{registry-22O6UG4I.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-IMZPJMYB.js → room-recommend-AYR3UG7R.js} +4 -4
- package/dist/chunks/{schedule-SPPAHER2.js → schedule-JZEFIXUS.js} +4 -4
- package/dist/chunks/{workflow-WVEFJ6KC.js → workflow-3ZAF2J5E.js} +4 -4
- package/dist/index.js +16 -11
- package/dist/shortcuts/archive-oa/operations/contract-modules.js +57 -0
- package/dist/shortcuts/archive-oa/operations/contract.js +23 -8
- package/dist/shortcuts/archive-oa/operations/registry.js +4 -1
- package/dist/shortcuts/archive-oa/operations/shared.js +41 -5
- 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/data/errors.js +64 -0
- package/dist/shortcuts/data/host.js +140 -0
- package/dist/shortcuts/data/index.js +429 -0
- package/dist/shortcuts/data/manifest.js +133 -0
- package/dist/shortcuts/data/operations/attend.js +62 -0
- package/dist/shortcuts/data/operations/conf.js +384 -0
- package/dist/shortcuts/data/operations/ds.js +686 -0
- package/dist/shortcuts/data/operations/field.js +68 -0
- package/dist/shortcuts/data/operations/index.js +65 -0
- package/dist/shortcuts/data/operations/module.js +383 -0
- package/dist/shortcuts/data/operations/noun.js +102 -0
- package/dist/shortcuts/data/operations/query.js +85 -0
- package/dist/shortcuts/data/operations/scene.js +235 -0
- package/dist/shortcuts/data/operations/shared.js +279 -0
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +12 -5
- package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +21 -13
- package/dist/shortcuts/ehr/recruit-stage/shared.js +57 -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/index.js +5 -0
- package/dist/shortcuts/invoice/manifest.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/member-expand.js +200 -0
- package/dist/shortcuts/meeting/operations/from-group-chat.js +16 -2
- package/dist/shortcuts/meeting/operations/registry.js +2 -0
- package/dist/shortcuts/reception/constants.js +13 -6
- package/dist/shortcuts/reception/index.js +3 -1
- package/dist/shortcuts/reception/manifest.js +3 -2
- package/dist/shortcuts/reception/operations/ask.js +20 -2
- package/dist/shortcuts/reception/operations/compose.js +11 -0
- package/dist/shortcuts/reception/operations/doc.js +59 -0
- package/dist/shortcuts/reception/operations/docrender.js +25 -1
- package/dist/shortcuts/reception/operations/leads.js +31 -7
- package/dist/shortcuts/reception/operations/panels.js +86 -22
- package/dist/shortcuts/reception/operations/render.js +40 -0
- package/dist/shortcuts/reception/operations/restaurant.js +17 -4
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +12 -5
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -13
- package/dist/shortcuts/recruit-stage/shared.js +57 -0
- 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 +2 -1
- package/docs/_catalog.md +4 -1
- package/docs/data.md +149 -0
- package/docs/fna.md +11 -4
- package/docs/reception.md +59 -5
- package/package.json +1 -1
- package/scripts/check-skill-sync.mjs +188 -0
- package/scripts/package-skill.mjs +17 -3
- package/skill-template/business-info.json +29 -1
- package/skill-template/domains/data.md +15 -0
- package/skill-template/domains/qiyecheng.md +4 -2
- package/skills/weaver-e10-archive-oa/SKILL.md +7 -6
- package/skills/weaver-e10-archive-oa/references/contract-search.md +83 -14
- package/skills/weaver-e10-archive-oa/references/disabled-capabilities.md +1 -1
- package/skills/weaver-e10-archive-oa/references/qys-contract-search.md +35 -11
- package/skills/weaver-e10-data/SKILL.md +118 -0
- package/skills/weaver-e10-data/references/config-center.md +90 -0
- package/skills/weaver-e10-data/references/datasource.md +136 -0
- package/skills/weaver-e10-data/references/scene-and-misc.md +82 -0
- 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-meeting/SKILL.md +39 -7
- 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 +70 -19
- package/skills/weaver-e10-reception-flow/references/guide.md +5 -4
- package/skills/weaver-e10-reception-flow/scripts/render.py +5 -3
- package/skills/weaver-e10-recruit-stage/SKILL.md +1 -1
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +26 -6
- 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-recruit-stage/references/recruit-utterance-glossary.md +53 -11
- 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
- package/dist/chunks/{ebuilder-form-I5ZIX4WO.js → ebuilder-form-CBYI6CQ6.js} +4 -4
|
@@ -946,6 +946,44 @@ function buildCardUrl(baseUrl, objId, dataId) {
|
|
|
946
946
|
if (!baseUrl || !objId || !dataId) return null;
|
|
947
947
|
return String(baseUrl).replace(/\/+$/, "") + "/sp/ebdfpage/card/0/" + objId + "/" + dataId;
|
|
948
948
|
}
|
|
949
|
+
var TALENT_UI_ROUTE = "/sp/custom/ecode/recruit-talent";
|
|
950
|
+
async function detectTalentUi(host, cache) {
|
|
951
|
+
const flag = String(cache.talentUi || "");
|
|
952
|
+
if (flag === "1") return true;
|
|
953
|
+
if (flag === "0") return false;
|
|
954
|
+
let installed = false;
|
|
955
|
+
try {
|
|
956
|
+
const r = await host.request({
|
|
957
|
+
path: "/api/ecode/project/searchAll",
|
|
958
|
+
method: "GET",
|
|
959
|
+
query: { page: 1, size: 100 },
|
|
960
|
+
operation: "detect-talent-ui"
|
|
961
|
+
});
|
|
962
|
+
const list = r && r.data && r.data.list || r && r.list || [];
|
|
963
|
+
installed = Array.isArray(list) && list.some((x) => String(x && x.projectName || "").startsWith("recruit-talent-ui"));
|
|
964
|
+
} catch {
|
|
965
|
+
installed = false;
|
|
966
|
+
}
|
|
967
|
+
cache.talentUi = installed ? "1" : "0";
|
|
968
|
+
return installed;
|
|
969
|
+
}
|
|
970
|
+
async function resolveTalentListUrl(host, cache, baseUrl, fallbackListId) {
|
|
971
|
+
if (await detectTalentUi(host, cache)) {
|
|
972
|
+
return String(baseUrl).replace(/\/+$/, "") + TALENT_UI_ROUTE;
|
|
973
|
+
}
|
|
974
|
+
return buildListUrl(baseUrl, fallbackListId);
|
|
975
|
+
}
|
|
976
|
+
async function resolveInterviewListUrlOrNative(host, cache, baseUrl, fallbackListId) {
|
|
977
|
+
if (await detectTalentUi(host, cache)) {
|
|
978
|
+
return String(baseUrl).replace(/\/+$/, "") + TALENT_UI_ROUTE + "/interview";
|
|
979
|
+
}
|
|
980
|
+
return buildListUrl(baseUrl, fallbackListId);
|
|
981
|
+
}
|
|
982
|
+
async function talentUiCardUrl(host, cache, baseUrl, talentId) {
|
|
983
|
+
if (!talentId) return null;
|
|
984
|
+
if (!await detectTalentUi(host, cache)) return null;
|
|
985
|
+
return String(baseUrl).replace(/\/+$/, "") + TALENT_UI_ROUTE + "/card?talentId=" + encodeURIComponent(String(talentId));
|
|
986
|
+
}
|
|
949
987
|
function buildListUrl(baseUrl, listId) {
|
|
950
988
|
if (!baseUrl || !listId) return null;
|
|
951
989
|
return String(baseUrl).replace(/\/+$/, "") + "/sp/ebdfpage/list/" + listId;
|
|
@@ -2557,7 +2595,11 @@ function makeBriefReader(ctx, formId, objId, fields) {
|
|
|
2557
2595
|
}
|
|
2558
2596
|
};
|
|
2559
2597
|
}
|
|
2560
|
-
function resolveTalentCardUrl(ctx, talentId) {
|
|
2598
|
+
async function resolveTalentCardUrl(ctx, talentId) {
|
|
2599
|
+
if (talentId) {
|
|
2600
|
+
const ui = await talentUiCardUrl(ctx.host, ctx.cache, ctx.baseUrl, String(talentId));
|
|
2601
|
+
if (ui) return ui;
|
|
2602
|
+
}
|
|
2561
2603
|
const pid = ctx.cache.ebdDetailPageId;
|
|
2562
2604
|
if (!pid || !talentId) {
|
|
2563
2605
|
const forms = ctx.cache.forms || {};
|
|
@@ -2566,8 +2608,10 @@ function resolveTalentCardUrl(ctx, talentId) {
|
|
|
2566
2608
|
}
|
|
2567
2609
|
return `${ctx.baseUrl}/sp/ebdpage/view/${pid}?talentId=${talentId}${talentLinkExtra(ctx.cache)}`;
|
|
2568
2610
|
}
|
|
2569
|
-
function resolveTalentListLocateUrl(ctx, _talentId) {
|
|
2611
|
+
async function resolveTalentListLocateUrl(ctx, _talentId) {
|
|
2570
2612
|
const listId = ctx.cache.lists?.talent?.listId;
|
|
2613
|
+
const preferred = await resolveTalentListUrl(ctx.host, ctx.cache, ctx.baseUrl, listId || "");
|
|
2614
|
+
if (preferred) return preferred;
|
|
2571
2615
|
if (!listId) return null;
|
|
2572
2616
|
return `${ctx.baseUrl.replace(/\/+$/, "")}/sp/ebdfpage/list/${listId}`;
|
|
2573
2617
|
}
|
|
@@ -3086,8 +3130,8 @@ async function findExistingTalents(ctx, opts) {
|
|
|
3086
3130
|
talentId: b.talentId,
|
|
3087
3131
|
candidateId: b.candidateId,
|
|
3088
3132
|
talentViewUrl: b.candidateId ? buildTalentViewUrl(ctx.baseUrl, b.candidateId) : null,
|
|
3089
|
-
talentCardUrl: b.talentId ? resolveTalentCardUrl(ctx, b.talentId) : null,
|
|
3090
|
-
talentListLocateUrl: b.talentId ? resolveTalentListLocateUrl(ctx, b.talentId) : null
|
|
3133
|
+
talentCardUrl: b.talentId ? await resolveTalentCardUrl(ctx, b.talentId) : null,
|
|
3134
|
+
talentListLocateUrl: b.talentId ? await resolveTalentListLocateUrl(ctx, b.talentId) : null
|
|
3091
3135
|
};
|
|
3092
3136
|
}
|
|
3093
3137
|
} else {
|
|
@@ -3106,8 +3150,8 @@ async function findExistingTalents(ctx, opts) {
|
|
|
3106
3150
|
formConflicts.existing.push({
|
|
3107
3151
|
talentId: id,
|
|
3108
3152
|
...rec,
|
|
3109
|
-
talentCardUrl: resolveTalentCardUrl(ctx, id),
|
|
3110
|
-
talentListLocateUrl: resolveTalentListLocateUrl(ctx, id),
|
|
3153
|
+
talentCardUrl: await resolveTalentCardUrl(ctx, id),
|
|
3154
|
+
talentListLocateUrl: await resolveTalentListLocateUrl(ctx, id),
|
|
3111
3155
|
recordCardUrl: buildCardUrl(ctx.baseUrl, objId, id)
|
|
3112
3156
|
});
|
|
3113
3157
|
} else formConflicts.unreadable.push(id);
|
|
@@ -3389,8 +3433,8 @@ async function applyCore(args, env, payload) {
|
|
|
3389
3433
|
talentId: updateTalentId,
|
|
3390
3434
|
afterSummary: { mainFieldCount: Object.keys(after.main).length, subRows: after.subRows, subCells: after.subCells },
|
|
3391
3435
|
verifyWarnings: verifyWarnings.length ? verifyWarnings : void 0,
|
|
3392
|
-
talentCardUrl: resolveTalentCardUrl(ctx, updateTalentId),
|
|
3393
|
-
talentListLocateUrl: resolveTalentListLocateUrl(ctx, updateTalentId),
|
|
3436
|
+
talentCardUrl: await resolveTalentCardUrl(ctx, updateTalentId),
|
|
3437
|
+
talentListLocateUrl: await resolveTalentListLocateUrl(ctx, updateTalentId),
|
|
3394
3438
|
parsed: { name: built.structured.candidateName, mobile: built.structured.telephone, email: built.structured.email || "(\u7A7A)" }
|
|
3395
3439
|
});
|
|
3396
3440
|
}
|
|
@@ -3489,8 +3533,8 @@ async function applyCore(args, env, payload) {
|
|
|
3489
3533
|
for (const m of verification.mismatches) writeWarnings.push("\u843D\u5E93\u56DE\u67E5\u4E0D\u4E00\u81F4\uFF1A" + m.label + " \u671F\u671B " + m.expected + "\uFF0C\u5B9E\u9645 " + m.actual);
|
|
3490
3534
|
}
|
|
3491
3535
|
const result = detailsState === "complete" && !verification.mismatches.length ? "success" : "partial";
|
|
3492
|
-
const talentCardUrl = resolveTalentCardUrl(ctx, talentId);
|
|
3493
|
-
const talentListLocateUrl = resolveTalentListLocateUrl(ctx, talentId);
|
|
3536
|
+
const talentCardUrl = await resolveTalentCardUrl(ctx, talentId);
|
|
3537
|
+
const talentListLocateUrl = await resolveTalentListLocateUrl(ctx, talentId);
|
|
3494
3538
|
return rsSuccess("recruit-stage.resume.import.apply", {
|
|
3495
3539
|
mode: "apply",
|
|
3496
3540
|
result,
|
|
@@ -4233,7 +4277,11 @@ async function resolveRequiredHint(plan, ctx) {
|
|
|
4233
4277
|
dataDetails: plan.dataDetails
|
|
4234
4278
|
});
|
|
4235
4279
|
}
|
|
4236
|
-
function resolveTalentCardUrl2(ctx, talentId) {
|
|
4280
|
+
async function resolveTalentCardUrl2(ctx, talentId) {
|
|
4281
|
+
if (talentId) {
|
|
4282
|
+
const ui = await talentUiCardUrl(ctx.host, ctx.cache, ctx.baseUrl, String(talentId));
|
|
4283
|
+
if (ui) return ui;
|
|
4284
|
+
}
|
|
4237
4285
|
const pid = ctx.cache.ebdDetailPageId;
|
|
4238
4286
|
if (!pid || !talentId) {
|
|
4239
4287
|
const forms = ctx.cache.forms || {};
|
|
@@ -4461,7 +4509,12 @@ async function applyCore2(args, env, payload) {
|
|
|
4461
4509
|
(m) => "\u843D\u5E93\u56DE\u67E5\u4E0D\u4E00\u81F4\uFF1A" + m.label + " \u671F\u671B " + m.expected + "\uFF0C\u5B9E\u9645 " + m.actual + "\uFF08\u8BE5\u5B57\u6BB5\u53EF\u80FD\u672A\u5199\u5165\uFF09"
|
|
4462
4510
|
);
|
|
4463
4511
|
const detailUrl = buildCardUrl(ctx.baseUrl, plan.objId, formDataId);
|
|
4464
|
-
const listLocateUrl =
|
|
4512
|
+
const listLocateUrl = await resolveInterviewListUrlOrNative(
|
|
4513
|
+
ctx.host,
|
|
4514
|
+
ctx.cache,
|
|
4515
|
+
ctx.baseUrl,
|
|
4516
|
+
ctx.cache.lists?.interview?.listId || ""
|
|
4517
|
+
);
|
|
4465
4518
|
return rsSuccess("recruit-stage.interview.arrange.apply", {
|
|
4466
4519
|
mode: "apply",
|
|
4467
4520
|
result: verification.mismatches.length ? "partial" : "success",
|
|
@@ -4505,7 +4558,7 @@ async function prefill2(args, env) {
|
|
|
4505
4558
|
}
|
|
4506
4559
|
throw rsFail("\u9762\u8BD5\u65B9\u5F0F\u300C" + typeKey + "\u300D\u4E0D\u5728\u679A\u4E3E\u4E2D\uFF08" + Object.keys(typeFull.map).join("/") + "\uFF09");
|
|
4507
4560
|
}
|
|
4508
|
-
const cardUrl = resolveTalentCardUrl2(ctx, talentId);
|
|
4561
|
+
const cardUrl = await resolveTalentCardUrl2(ctx, talentId);
|
|
4509
4562
|
const listUrl = await resolveInterviewListUrl(ctx).catch(() => null);
|
|
4510
4563
|
const jsExpr = `(() => { const W = window.WeFormSDK; const i = W && W.getWeFormInstance('ebuilderform', '${formId}'); if (!i) return 'no-form-instance(\u8BF7\u5148\u5728\u4EBA\u624D\u5361\u7247\u70B9\u300C\u5B89\u6392\u9762\u8BD5\u300D\u6253\u5F00\u9762\u8BD5\u5B89\u6392\u8868\u5355)'; try { i.changeFieldValue('field${typeFid}', { value: '${typeId}' }); return 'ok \u9762\u8BD5\u65B9\u5F0F=${typeKey}'; } catch (e) { return 'err:' + e.message; } })()`;
|
|
4511
4564
|
return rsSuccess("recruit-stage.interview.arrange.prefill", {
|
|
@@ -4,8 +4,10 @@ import {
|
|
|
4
4
|
getHrmOperation,
|
|
5
5
|
hasHrmOperation,
|
|
6
6
|
hrmOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-6QYNE6HE.js";
|
|
8
|
+
import "./chunk-IW7A2IQY.js";
|
|
9
|
+
import "./chunk-5QYE52LG.js";
|
|
10
|
+
import "./chunk-JEQHNNSS.js";
|
|
9
11
|
import "./chunk-56EZERK4.js";
|
|
10
12
|
import "./chunk-UG5G54VL.js";
|
|
11
13
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -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";
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
createWorkflowHost
|
|
5
|
-
} from "./chunk-HFXK54M4.js";
|
|
6
3
|
import {
|
|
7
4
|
USER_INTENT_RULE_FILE,
|
|
8
5
|
aigroupUserDir,
|
|
@@ -17,7 +14,10 @@ import {
|
|
|
17
14
|
validateRuleFile,
|
|
18
15
|
workflowOperationDefinitions,
|
|
19
16
|
workflowSuccess
|
|
20
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6T53BSWZ.js";
|
|
18
|
+
import {
|
|
19
|
+
createWorkflowHost
|
|
20
|
+
} from "./chunk-HFXK54M4.js";
|
|
21
21
|
import {
|
|
22
22
|
createWorkflowContinuationSigner
|
|
23
23
|
} from "./chunk-HP7JIYMT.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",
|
|
@@ -50,7 +50,7 @@ var builtinShortcuts = [
|
|
|
50
50
|
lazyShortcut({
|
|
51
51
|
name: "recruit-stage",
|
|
52
52
|
description: "\u6CDB\u5FAEE10\u62DB\u8058\u52A9\u624B\uFF08JD\u751F\u6210/\u7B80\u5386\u5EFA\u6863/AI\u9762\u8BD5\u9080\u7EA6\uFF09CLI",
|
|
53
|
-
load: async () => (await import("./chunks/recruit-stage-
|
|
53
|
+
load: async () => (await import("./chunks/recruit-stage-FKWS5UQF.js")).recruitStageShortcut
|
|
54
54
|
}),
|
|
55
55
|
lazyShortcut({
|
|
56
56
|
name: "cowork",
|
|
@@ -65,7 +65,7 @@ var builtinShortcuts = [
|
|
|
65
65
|
lazyShortcut({
|
|
66
66
|
name: "archive-oa",
|
|
67
67
|
description: "E10 \u6863\u6848\u5B9A\u4F4D\u4E0E OA \u5546\u52A1\u5408\u540C\u501F\u9605 CLI",
|
|
68
|
-
load: async () => (await import("./chunks/archive-oa-
|
|
68
|
+
load: async () => (await import("./chunks/archive-oa-57R2FYHV.js")).archiveOaShortcut
|
|
69
69
|
}),
|
|
70
70
|
lazyShortcut({
|
|
71
71
|
name: "calendar",
|
|
@@ -75,12 +75,12 @@ 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",
|
|
82
82
|
description: "\u6CDB\u5FAEE10\u7EC4\u7EC7\u7BA1\u7406\uFF08\u5458\u5DE5/\u7EC4\u7EC7/\u5C97\u4F4D\u67E5\u8BE2\uFF09CLI",
|
|
83
|
-
load: async () => (await import("./chunks/hrm-
|
|
83
|
+
load: async () => (await import("./chunks/hrm-YGIR3HGF.js")).hrmShortcut
|
|
84
84
|
}),
|
|
85
85
|
lazyShortcut({
|
|
86
86
|
name: "mail",
|
|
@@ -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",
|
|
@@ -110,7 +110,7 @@ var builtinShortcuts = [
|
|
|
110
110
|
lazyShortcut({
|
|
111
111
|
name: "ebuilder-form",
|
|
112
112
|
description: "\u6CDB\u5FAEE10 eBuilder \u8868\u5355\u83DC\u5355\u3001\u5217\u8868\u548C\u8868\u5355\u6570\u636E CLI",
|
|
113
|
-
load: async () => (await import("./chunks/ebuilder-form-
|
|
113
|
+
load: async () => (await import("./chunks/ebuilder-form-CBYI6CQ6.js")).ebuilderFormShortcut
|
|
114
114
|
}),
|
|
115
115
|
lazyShortcut({
|
|
116
116
|
name: "jiuchuanhui",
|
|
@@ -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,17 @@ 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
|
+
}),
|
|
165
|
+
lazyShortcut({
|
|
166
|
+
name: "data",
|
|
167
|
+
description: "\u6CDB\u5FAEE10\u6570\u636E\u52A9\u624B CLI\uFF08\u6570\u636E\u6E90\u67E5\u8BE2 / \u914D\u7F6E\u4E2D\u5FC3 / \u573A\u666F\u5B9A\u4F4D\uFF09",
|
|
168
|
+
load: async () => (await import("./chunks/data-QO7QWOIV.js")).dataShortcut
|
|
164
169
|
})
|
|
165
170
|
];
|
|
166
171
|
function shortcutMetadata() {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { archiveOaValidationError } from '../errors.js';
|
|
2
|
+
import { READ, archiveOaSuccess, schemaOf, } from './types.js';
|
|
3
|
+
import { positiveInt, unwrapData } from './shared.js';
|
|
4
|
+
/** 合同专项模块(`zxfa`)浏览按钮候选值接口。 */
|
|
5
|
+
const MODULE_BROWSER_PATH = '/api/bcw/common/browser/complete/customBrowser_sw_htzxmk';
|
|
6
|
+
/** 合同表单里专项模块控件的 controlId(浏览按钮搜索时必带)。 */
|
|
7
|
+
const MODULE_CONTROL_ID = '3753081';
|
|
8
|
+
export const contractModuleOptionsOperation = {
|
|
9
|
+
name: 'archive-oa.contract.module-options',
|
|
10
|
+
resource: 'contract',
|
|
11
|
+
method: 'module-options',
|
|
12
|
+
action: 'archive-oa.contract.module-options',
|
|
13
|
+
summary: '查询合同专项模块(zxfa)的候选值,用于把「文书定」等模块名转成 inC 需要的对象',
|
|
14
|
+
capability: 'contract',
|
|
15
|
+
risk: READ,
|
|
16
|
+
inputSchema: schemaOf({
|
|
17
|
+
keyword: { type: 'string', description: '关键字,如「文书定」,缺省返回前 N 项' },
|
|
18
|
+
pageSize: { type: 'integer', minimum: 1, maximum: 100, description: '返回条数,缺省 50' },
|
|
19
|
+
}, { description: '查询合同专项模块候选值' }),
|
|
20
|
+
handler: async (args, env) => {
|
|
21
|
+
const keyword = typeof args.keyword === 'string' ? args.keyword.trim() : '';
|
|
22
|
+
const pageSize = positiveInt(args.pageSize, 'pageSize', 50);
|
|
23
|
+
if (pageSize > 100) {
|
|
24
|
+
throw archiveOaValidationError('number_invalid', 'pageSize 最多 100');
|
|
25
|
+
}
|
|
26
|
+
const response = await env.host.request({
|
|
27
|
+
method: 'POST',
|
|
28
|
+
path: MODULE_BROWSER_PATH,
|
|
29
|
+
operation: 'archive-oa.contract.module-options',
|
|
30
|
+
body: {
|
|
31
|
+
browserMultiple: true,
|
|
32
|
+
fromSearch: '1',
|
|
33
|
+
controlId: MODULE_CONTROL_ID,
|
|
34
|
+
formParam: JSON.stringify({ filterItems: [], module: 'ebuilderform', dataDetails: [] }),
|
|
35
|
+
notFromLayout: true,
|
|
36
|
+
newly: 0,
|
|
37
|
+
searchValue: keyword,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const data = unwrapData(response);
|
|
41
|
+
const list = Array.isArray(data?.data) ? data.data : [];
|
|
42
|
+
const options = list
|
|
43
|
+
.map((item) => ({
|
|
44
|
+
id: String(item?.id ?? ''),
|
|
45
|
+
name: String(item?.name ?? ''),
|
|
46
|
+
}))
|
|
47
|
+
.filter((item) => item.id.length > 0 && item.name.length > 0)
|
|
48
|
+
.slice(0, pageSize);
|
|
49
|
+
/** 服务端按 `searchValue` 过滤;这里再兜一层,避免接口忽略关键字时把全部模块当命中。 */
|
|
50
|
+
const matched = keyword ? options.filter((item) => item.name.includes(keyword)) : options;
|
|
51
|
+
return archiveOaSuccess('archive-oa.contract.module-options', {
|
|
52
|
+
keyword,
|
|
53
|
+
total: matched.length,
|
|
54
|
+
options: matched,
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -5,6 +5,10 @@ const CONTRACT_LIST_PATH = '/api/ebuilder/form/list/getListDatas';
|
|
|
5
5
|
function filterPath(profile) {
|
|
6
6
|
return `/api/ebuilder/form/listFilter/showFilters/${profile.listId}`;
|
|
7
7
|
}
|
|
8
|
+
/** 查询列表字段配置(含快速搜索与高级搜索字段),比 showFilters 更全。 */
|
|
9
|
+
function searchFieldsPath(profile) {
|
|
10
|
+
return `/api/ebuilder/form/listSearch/getListSearch/${profile.listId}`;
|
|
11
|
+
}
|
|
8
12
|
function operationName(profile, action) {
|
|
9
13
|
return profile.source === 'qys'
|
|
10
14
|
? `archive-oa.qys.contract.${action}`
|
|
@@ -47,17 +51,27 @@ function makeFieldsOperation(profile) {
|
|
|
47
51
|
handler: async (_args, env) => {
|
|
48
52
|
const response = await env.host.request({
|
|
49
53
|
method: 'GET',
|
|
50
|
-
path:
|
|
54
|
+
path: searchFieldsPath(profile),
|
|
51
55
|
operation: name,
|
|
52
|
-
query: { passid: profile.passId
|
|
56
|
+
query: { passid: profile.passId },
|
|
53
57
|
});
|
|
54
58
|
const data = (unwrapData(response) ?? {});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
/** getListSearch 把字段放在 `layout`(二维:分组 → 字段项),每项含 id / label / groupId。 */
|
|
60
|
+
const layout = Array.isArray(data.layout) ? data.layout : [];
|
|
61
|
+
const groups = Array.isArray(data.groups) ? data.groups : [];
|
|
62
|
+
const groupTitle = new Map(groups.map((group) => [String(group.id), String(group.title ?? '')]));
|
|
63
|
+
const fields = layout.flat().map((item) => {
|
|
64
|
+
const id = String(item?.id ?? '');
|
|
65
|
+
const groupId = String(item?.groupId ?? '');
|
|
66
|
+
return {
|
|
67
|
+
fieldName: id,
|
|
68
|
+
showName: String(item?.label ?? ''),
|
|
69
|
+
groupId,
|
|
70
|
+
groupName: groupTitle.get(groupId) ?? '',
|
|
71
|
+
hidden: item?.hide === true,
|
|
72
|
+
};
|
|
73
|
+
}).filter((item) => item.fieldName.length > 0);
|
|
74
|
+
return archiveOaSuccess(name, { fields }, { source: profile.source, listId: profile.listId, count: fields.length });
|
|
61
75
|
},
|
|
62
76
|
};
|
|
63
77
|
}
|
|
@@ -116,5 +130,6 @@ function makeListOperation(profile) {
|
|
|
116
130
|
};
|
|
117
131
|
}
|
|
118
132
|
export const weaverContractFieldsOperation = makeFieldsOperation(WEAVER_CONTRACT);
|
|
133
|
+
export const qysContractFieldsOperation = makeFieldsOperation(QYS_CONTRACT);
|
|
119
134
|
export const weaverContractListOperation = makeListOperation(WEAVER_CONTRACT);
|
|
120
135
|
export const qysContractListOperation = makeListOperation(QYS_CONTRACT);
|
|
@@ -2,15 +2,18 @@ import { QYS_BORROW_CAR, QYS_ESB_ADD, QYS_ESB_REMOVE, WEAVER_BORROW_CAR, WEAVER_
|
|
|
2
2
|
import { archiveOaValidationError } from '../errors.js';
|
|
3
3
|
import { createBorrowCarOperations } from './borrow-car.js';
|
|
4
4
|
import { createBorrowStartUrlOperation } from './borrow-url.js';
|
|
5
|
-
import { qysContractListOperation, weaverContractFieldsOperation, weaverContractListOperation, } from './contract.js';
|
|
5
|
+
import { qysContractFieldsOperation, qysContractListOperation, weaverContractFieldsOperation, weaverContractListOperation, } from './contract.js';
|
|
6
6
|
import { archiveLocateOperation } from './locate.js';
|
|
7
|
+
import { contractModuleOptionsOperation } from './contract-modules.js';
|
|
7
8
|
import { myBorrowListOperation } from './my-borrow-contract.js';
|
|
8
9
|
function buildRegistry() {
|
|
9
10
|
const registry = new Map();
|
|
10
11
|
const definitions = [
|
|
11
12
|
archiveLocateOperation,
|
|
12
13
|
myBorrowListOperation,
|
|
14
|
+
contractModuleOptionsOperation,
|
|
13
15
|
weaverContractFieldsOperation,
|
|
16
|
+
qysContractFieldsOperation,
|
|
14
17
|
weaverContractListOperation,
|
|
15
18
|
qysContractListOperation,
|
|
16
19
|
...createBorrowCarOperations(WEAVER_BORROW_CAR, WEAVER_ESB_ADD, WEAVER_ESB_REMOVE),
|
|
@@ -127,26 +127,62 @@ export function buildCommonSearchFields(fields, extra = []) {
|
|
|
127
127
|
}
|
|
128
128
|
for (const item of items) {
|
|
129
129
|
const value = normalizeConditionValue(item.conditionType, item.value, item.field);
|
|
130
|
-
|
|
130
|
+
const entry = {
|
|
131
|
+
[`${item.field}_condition_type`]: item.conditionType,
|
|
132
|
+
[item.field]: value,
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* 日期字段的 between 在源资料里是「数组值 + 快捷区间元数据」,
|
|
136
|
+
* 只传 `{min,max}` 服务端匹配不到(表现为恒 0 条),必须补 `_obj` 与 `_selectedKeyPrior`。
|
|
137
|
+
*/
|
|
138
|
+
if (item.conditionType === 'between' && Array.isArray(value)) {
|
|
139
|
+
const [min, max] = value;
|
|
140
|
+
entry[`${item.field}_obj`] = { value, ...dateRangePreset(min, max) };
|
|
141
|
+
entry[`${item.field}_selectedKeyPrior`] = false;
|
|
142
|
+
}
|
|
143
|
+
result[item.field] = [entry];
|
|
131
144
|
}
|
|
132
145
|
return result;
|
|
133
146
|
}
|
|
147
|
+
const DATE_TEXT = /^\d{4}-\d{2}-\d{2}$/u;
|
|
148
|
+
/** 识别常见快捷日期区间(上半年/下半年/今年),识别不到时留空,由服务端按自定义区间处理。 */
|
|
149
|
+
function dateRangePreset(min, max) {
|
|
150
|
+
const year = new Date().getFullYear();
|
|
151
|
+
if (min === `${year}-01-01` && max === `${year}-06-30`) {
|
|
152
|
+
return { selectedKey: 'firstHalfYear', selectedName: '上半年' };
|
|
153
|
+
}
|
|
154
|
+
if (min === `${year}-07-01` && max === `${year}-12-31`) {
|
|
155
|
+
return { selectedKey: 'secondHalfYear', selectedName: '下半年' };
|
|
156
|
+
}
|
|
157
|
+
if (min === `${year}-01-01` && max === `${year}-12-31`) {
|
|
158
|
+
return { selectedKey: 'currentYear', selectedName: '今年' };
|
|
159
|
+
}
|
|
160
|
+
return { selectedKey: '', selectedName: '' };
|
|
161
|
+
}
|
|
134
162
|
function normalizeConditionValue(conditionType, value, field) {
|
|
135
163
|
if (conditionType === 'between') {
|
|
164
|
+
let min;
|
|
165
|
+
let max;
|
|
136
166
|
if (Array.isArray(value)) {
|
|
137
167
|
if (value.length !== 2) {
|
|
138
168
|
throw archiveOaValidationError('search_value_invalid', `${field} 的 between 条件需要两个值`);
|
|
139
169
|
}
|
|
140
|
-
|
|
170
|
+
min = String(value[0]);
|
|
171
|
+
max = String(value[1]);
|
|
141
172
|
}
|
|
142
|
-
if (value && typeof value === 'object') {
|
|
173
|
+
else if (value && typeof value === 'object') {
|
|
143
174
|
const range = value;
|
|
144
175
|
if (range.min === undefined || range.max === undefined) {
|
|
145
176
|
throw archiveOaValidationError('search_value_invalid', `${field} 的 between 条件需要 min / max`);
|
|
146
177
|
}
|
|
147
|
-
|
|
178
|
+
min = String(range.min);
|
|
179
|
+
max = String(range.max);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
throw archiveOaValidationError('search_value_invalid', `${field} 的 between 条件必须是 {min,max} 或 [起,止]`);
|
|
148
183
|
}
|
|
149
|
-
|
|
184
|
+
/** 日期区间按源资料用数组;数值区间(如合同金额)仍用 {min,max}。 */
|
|
185
|
+
return DATE_TEXT.test(min) && DATE_TEXT.test(max) ? [min, max] : { min, max };
|
|
150
186
|
}
|
|
151
187
|
if (conditionType === 'in' || conditionType === 'inC') {
|
|
152
188
|
if (!Array.isArray(value)) {
|
|
@@ -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' },
|