@gct-paas/excel 0.1.39-beta.2 → 0.1.39-beta.20
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/{BaseComponent-vgYIyddq.js → BaseComponent-DuVlKAnk.js} +2 -2
- package/dist/{VueVideoPlayer-Ca2aYCnh.js → VueVideoPlayer-BlB2c7W0.js} +2 -2
- package/dist/{align-editor-Bpdx7EAg.js → align-editor-wPpZ_4zH.js} +1 -1
- package/dist/{barcode-design-l88FtSJH.js → barcode-design-CDhA1Xiw.js} +2 -2
- package/dist/base/index.es.js +485 -194
- package/dist/{diagonal-design-BrC_JEX_.js → diagonal-design-ThSef3Um.js} +2 -2
- package/dist/{dynamic-table-action--l3y-33T.js → dynamic-table-action-cb-6H4R2.js} +325 -258
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-D-u5mq0C.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BmECtuSE.js} +328 -284
- package/dist/{edit.utils-CXmmCnxE-CLHOa5aM.js → edit.utils-CXmmCnxE-CQiGidG5.js} +1 -1
- package/dist/excel.css +473 -284
- package/dist/{exceljs.min-DC03-hj2.js → exceljs.min-CULCDRW9.js} +2 -2
- package/dist/{font-editor-Cdbnw5gf.js → font-editor-trc2cWng.js} +3 -3
- package/dist/{image-design-B2Ujtrgf.js → image-design-DbOmyTpn.js} +2 -2
- package/dist/{index-Bt1-V2lW.js → index-1WZ6SgTp.js} +3 -3
- package/dist/{index-2FOQLZQX.js → index-2Vv4Nw6L.js} +2 -2
- package/dist/{index-CdmpbReR.js → index-B2lCwHgw.js} +2 -2
- package/dist/{index-CosS1BAQ.js → index-B4LBLC9w.js} +1 -1
- package/dist/{index-VbeM2qtu.js → index-BBfo_rmJ.js} +2 -2
- package/dist/{index-DAOq48BR.js → index-BhJGnoAZ.js} +2 -2
- package/dist/{index-BTt4zC25.js → index-BkznJYts.js} +1242 -1045
- package/dist/{index-Dfx_FNTM.js → index-BsSL0R1j.js} +2 -2
- package/dist/{index-NJMyznIn.js → index-BsgB6y7K.js} +3 -3
- package/dist/{index-q6aP_omk.js → index-C-urdRZ2.js} +1 -1
- package/dist/{index-BwPjN5_z.js → index-CAGghO4i.js} +2 -2
- package/dist/{index-CCJHoK5a.js → index-CCyMfv1Z.js} +2 -2
- package/dist/{index-DHi56KLO.js → index-CPQNMrdO.js} +1 -1
- package/dist/{index-OtzvrfOW.js → index-CRo6J80n.js} +2 -2
- package/dist/{index-CinlHNlv.js → index-CSlejyqH.js} +1 -1
- package/dist/{index-BObb1Ah_.js → index-CksQHOUM.js} +2 -2
- package/dist/{index-qIYTDaGB.js → index-CpQ_DR3c.js} +3 -3
- package/dist/{index-ElmEtsp1.js → index-CvPWXCmn.js} +1 -1
- package/dist/{index-d-BkSigM.js → index-CyX1kNkY.js} +1 -1
- package/dist/{index-Cy3W1BCw.js → index-DGZzlITI.js} +4 -4
- package/dist/{index-DoKgmcyb.js → index-DOiOWH2x.js} +2 -2
- package/dist/{index-BHrga-sR.js → index-DUXHvUXT.js} +2 -2
- package/dist/{index-DLURy62t.js → index-DYjYdrMD.js} +2 -2
- package/dist/{index-BP9XsPy_.js → index-DaYPI9DA.js} +1 -1
- package/dist/{index-isNDc9Eg.js → index-Dkj2h_zE.js} +2 -2
- package/dist/{index-CyRyKW5Z.js → index-Dq5kgEpr.js} +2 -2
- package/dist/{index-CFr4e8Xs.js → index-Dq8DSt0w.js} +1 -1
- package/dist/{index-BmkcFEIb.js → index-DrWkEAL9.js} +2 -2
- package/dist/{index-BqWM4biL.js → index-DyZzboE8.js} +2 -2
- package/dist/{index-BfvMXo6W.js → index-Dzqrtkn_.js} +2 -2
- package/dist/{index-1RcD_jJ_.js → index-N2ZMSuL6.js} +1 -1
- package/dist/{index-BOw6pLMO.js → index-XtiIrcx4.js} +4 -4
- package/dist/{index-CbXb5NUR.js → index-cunDtoJs.js} +2 -2
- package/dist/{index-C2NlobVm.js → index-haSf7Cn8.js} +1 -1
- package/dist/{index-Ls2829xQ.js → index-l8FZ6Q3X.js} +53 -5
- package/dist/index.es.js +2 -2
- package/dist/{mb-render-BcBofCau.js → mb-render-DjXYXimz.js} +9 -3
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-D8-YBa_f.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-CtYTpCF6.js} +8 -1
- package/dist/{pagination-design-C6BIV4Ko.js → pagination-design-Dlt_hRc9.js} +2 -2
- package/dist/paper-widget-design-CsNAYJIm.js +4 -0
- package/dist/{print-runtime-instance-BuO2RPZB.js → print-runtime-instance-C0P0bQ0t.js} +1 -1
- package/dist/{print-snapshot-renderer-CJiTu8_l.js → print-snapshot-renderer-hfbiNoQz.js} +3 -3
- package/dist/{qrcode-design-DCAMHxR6.js → qrcode-design-BKW9Ywq7.js} +1 -1
- package/dist/{revo-grid.entry-s6oHfg7z.js → revo-grid.entry-DORNB4cp.js} +1 -1
- package/dist/{revogr-attribution_7.entry-CBEbTBbC.js → revogr-attribution_7.entry-CrdX04rF.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-DtE8OXYS.js → revogr-clipboard_3.entry-CWLVEZnP.js} +2 -2
- package/dist/{revogr-data_4.entry-seTKTkAE.js → revogr-data_4.entry-Bs8mqW3y.js} +2 -2
- package/dist/{revogr-filter-panel.entry-DSQR-lUK.js → revogr-filter-panel.entry-CTN0T0tx.js} +1 -1
- package/dist/seal-design-D1K9CloN.js +4 -0
- package/dist/{serialnumber-design-B3WHGrfc.js → serialnumber-design-BSgTQN0r.js} +1 -1
- package/dist/shared/index.es.js +10 -8
- package/dist/{single-field-drop-DFjo8ISo.js → single-field-drop-DkjfkD4a.js} +2 -2
- package/dist/{size-editor-DKJpM9UW.js → size-editor-DQJIuZCE.js} +1 -1
- package/dist/src/nocode-base/src/core/sub-table/pretreatment-list-table-core.d.ts +1 -0
- package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +2 -1
- package/dist/src/nocode-base/src/hooks/form-model/form-model-controller.d.ts +2 -0
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +1 -0
- package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +12 -7
- package/dist/src/nocode-base/src/hooks/material-consume-object/bom-validator.d.ts +4 -3
- package/dist/src/nocode-base/src/hooks/material-consume-object/initialize-autofill.d.ts +17 -0
- package/dist/src/nocode-base/src/hooks/material-consume-object/object-validation-controller.d.ts +24 -0
- package/dist/src/nocode-base/src/interface/render.d.ts +3 -1
- package/dist/src/nocode-base/src/interface/transform.d.ts +9 -1
- package/dist/src/nocode-base/src/runtime/async-task-coordinator.d.ts +6 -2
- package/dist/src/nocode-base/src/runtime/multi-sheet-runtime.d.ts +2 -0
- package/dist/src/nocode-base/src/runtime/runtime-field-initializer.d.ts +1 -1
- package/dist/src/nocode-base/src/runtime/runtime-validation-service.d.ts +1 -0
- package/dist/src/nocode-base/src/types/render/mc-render.d.ts +1 -1
- package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +5 -1
- package/dist/src/nocode-web-render/src/render/sub-table/common/inventory-scan-columns.d.ts +6 -0
- package/dist/src/nocode-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +1 -1
- package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-design.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +2 -2
- package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-option-select.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/designer/conversions/normalize-paper-grid.d.ts +3 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/utils/use-rule-props.d.ts +0 -3
- package/dist/src/online-form/src/views/render/sheet-tab-bar.vue.d.ts +5 -3
- package/dist/src/shared/enum/index.d.ts +2 -0
- package/dist/src/shared/enum/product-type.d.ts +9 -0
- package/dist/src/shared/enum/production-identification.d.ts +19 -0
- package/dist/{sub-table-factory-5l0MTqvt.js → sub-table-factory-Bnb8zZTb.js} +31 -12
- package/dist/{text-design-B69j6Z_b.js → text-design-CJo1qzwn.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-DfnQ57mt.js → throttle-Cpk1LoGk-w1fTQ4cj.js} +1 -1
- package/dist/{timediff-design-BUqlRNkO.js → timediff-design-BIyHZKid.js} +1 -1
- package/dist/{trace-like-wrapper-D5VFdJ3W.js → trace-like-wrapper-BQv5F61v.js} +2 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-CEuFEVMv.js → value-editor.vue_vue_type_style_index_0_lang-Cfy4DxTn.js} +2 -2
- package/dist/web-render/index.es.js +3 -3
- package/dist/{widget-barcode-Bt55wEEk.js → widget-barcode-Skwby19J.js} +4 -4
- package/dist/{widget-diagonal-BSkoDXjJ.js → widget-diagonal-2jkexxFy.js} +3 -3
- package/dist/{widget-image-BxycuGZB.js → widget-image-DzNGEvNB.js} +5 -5
- package/dist/{widget-line-DZ9sK1Zj.js → widget-line-CKztM9A8.js} +2 -2
- package/dist/{widget-pagination-WerXXmx2.js → widget-pagination-DewFBSHR.js} +5 -5
- package/dist/{widget-power-Bln2T1C-.js → widget-power-DXJJuRh4.js} +3 -3
- package/dist/{widget-qrcode-BQWQXzru.js → widget-qrcode-js88isHk.js} +3 -3
- package/dist/{widget-rangelimit-E8yqsqv3.js → widget-rangelimit-DLy_aqqT.js} +3 -3
- package/dist/{widget-serialnumber-Css27nM1.js → widget-serialnumber-BvpZV5f7.js} +1 -1
- package/dist/{widget-text-CD6_nGlp.js → widget-text-CrZN9uDY.js} +5 -5
- package/dist/{widget-timediff-DQPeQkkV.js → widget-timediff-DJLoE_Xk.js} +2 -2
- package/package.json +2 -2
- package/dist/paper-widget-design-DujWhnh6.js +0 -4
- package/dist/seal-design--ciGkbUu.js +0 -4
package/dist/base/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { E as api, $ as PlatformEnum, F as FIELD_TYPE,
|
|
2
|
-
import { aO, aQ,
|
|
3
|
-
import {
|
|
4
|
-
import { B as B2,
|
|
1
|
+
import { E as api, $ as PlatformEnum, F as FIELD_TYPE, bj as getRowId, bk as findRuntimeTableRow, b9 as RenderModeEnum, C as ComponentTypeEnum, bw as assembleRules, bx as isAttachFieldActive, aI as Dependency_ENUM, bl as calculateFormula, aH as ASSIGNMENTSTRATEGY_ENUM, R as getParseFormulaVarInfos, by as fetchHistoryConsume, bz as isBomGranted, aW as renderUtils, bv as uuid2, bA as parseFrontConfig, aL as CheckDsTypeEnum, aF as transformUtils, bB as baseDataUtils, bC as initializeSealFields, Y as FormTypeEnum, bD as normalizeToArray, bE as safeParseArray, bF as BpmnNodeTypeEnum, bG as mergeByMultiKey, a8 as _export_sfc, bH as evaluateInspectionDecisionRule, bI as areValidationCommentsEqual, bJ as useNocodeEmitter, bK as commonUtils, aJ as EntityModelCategoryEnum } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BmECtuSE.js";
|
|
2
|
+
import { aO, aQ, b0, a1, bL, bM, B, bN, y, ai, bO, bP, bQ, bi, bR, aT, ay, aP, aM, aN, bS, aj, an, bT, bU, aG, a3, ah, az, aR, a0, al, L, bV, bW, bX, O, p, P, aa, o, Q, A, bY, bZ, ax, aw, a6, a2, a4, a5, a7, f, b_, am, aq, ak, b$, c0, c1, c2, bh, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, bm, cd, ce, aZ, cf, b1, b2, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, aY, cq, b3, bf, cr, cs, ct, ao, t, aS, cu, cv, bn, a_ } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BmECtuSE.js";
|
|
3
|
+
import { P as getRuntimeDataFieldId, z as parseRuntimeFieldPath, Q as buildRuntimeFieldPath, T as resolveRuntimeFieldProps, U as resolveRuntimeFieldState, V as getRuntimeDependencyOutputKey, W as isRowAddedInCurrentFormChange, o as MaterialConsumptionPatternEnum, X as MaterialConsumeTableController, Y as setFormulaParamsConfig, Z as normalizeRuntime, H as createRuntimeInstanceContext, R as RuntimeFormStateStore, $ as RuntimeSheetService, g as getBusinessFieldKey, a0 as validateObjectBomQtyOnSubmit, a1 as closeValidatorPopovers, a2 as enrichFormChangeRowDetails, N as NCB_PROVIDE, I as RuntimeInstanceRegistry, a3 as useMaterialBalance, a4 as collectFormChangeFieldLocations, a5 as nextFormChangeRowViewHistoryId } from "../dynamic-table-action-cb-6H4R2.js";
|
|
4
|
+
import { B as B2, a6 as a62, e, _, a7 as a72, L as L2, a8, O as O2, E, a9, aa as aa2, ab, ac, ad, M, a, ae, b, af, ag, ah as ah2, ai as ai2, aj as aj2, ak as ak2, al as al2, am as am2, w, an as an2, m, ao as ao2, c, ap, aq as aq2, ar, as, l, x, at, au, av, aw as aw2, f as f2, y as y2, d, ax as ax2, ay as ay2, az as az2, aA, aB, aC, p as p2, r, aD, q, j, aE, s, aF, C, F, u, t as t2, G, i, k, A as A2, h, v } from "../dynamic-table-action-cb-6H4R2.js";
|
|
5
5
|
import { toRaw, watch, toRef, computed, defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, ref, provide, onUnmounted, markRaw, reactive, onBeforeUnmount } from "vue";
|
|
6
6
|
import { cloneDeep, defaults, isEmpty, merge } from "lodash-es";
|
|
7
7
|
import "dayjs";
|
|
8
|
-
import { S as SubTableCoreFactory, R as RuntimeInstanceController } from "../sub-table-factory-
|
|
9
|
-
import { A as A3, D, M as M2, a as a10, P as P2, b as
|
|
10
|
-
import { B as B3, F, M as M3, a as a11, u as u2 } from "../mb-render-
|
|
8
|
+
import { S as SubTableCoreFactory, R as RuntimeInstanceController } from "../sub-table-factory-Bnb8zZTb.js";
|
|
9
|
+
import { A as A3, D, M as M2, a as a10, P as P2, b as b4, c as c10, d as d2, e as e2, W, f as f3, g, h as h2 } from "../sub-table-factory-Bnb8zZTb.js";
|
|
10
|
+
import { B as B3, F as F2, M as M3, a as a11, u as u2 } from "../mb-render-DjXYXimz.js";
|
|
11
11
|
const InstanceStatusValues = {
|
|
12
12
|
/** 作废状态 */
|
|
13
13
|
ABANDON: "ABANDON",
|
|
@@ -190,7 +190,7 @@ class RuntimeFieldInitializer {
|
|
|
190
190
|
await Promise.resolve();
|
|
191
191
|
this.scheduled = false;
|
|
192
192
|
if (!signal.aborted && !this.disposed) await this.initialize();
|
|
193
|
-
}).catch((
|
|
193
|
+
}).catch(() => void 0).finally(() => this.tasks.delete("initialize:structure"));
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
record;
|
|
@@ -203,7 +203,7 @@ class RuntimeFieldInitializer {
|
|
|
203
203
|
disposed = false;
|
|
204
204
|
scheduled = false;
|
|
205
205
|
unsubscribe;
|
|
206
|
-
/**
|
|
206
|
+
/** 初次加载等待全部目标;默认值请求失败保留在任务中心供诊断,但不阻止提交。 */
|
|
207
207
|
async initialize() {
|
|
208
208
|
if (this.disposed || this.info.renderPurpose || this.info.platformType === PlatformEnum.INTEGRATION_PAAS_DP)
|
|
209
209
|
return;
|
|
@@ -247,7 +247,8 @@ class RuntimeFieldInitializer {
|
|
|
247
247
|
modelKey: props.modelKey,
|
|
248
248
|
subModelKey: props.subModelKey
|
|
249
249
|
},
|
|
250
|
-
sheetId
|
|
250
|
+
sheetId,
|
|
251
|
+
blockOnFailure: false
|
|
251
252
|
}
|
|
252
253
|
).finally(() => this.tasks.delete(key));
|
|
253
254
|
pending.push(task);
|
|
@@ -259,7 +260,7 @@ class RuntimeFieldInitializer {
|
|
|
259
260
|
this.record.asyncTasks.cancel(key);
|
|
260
261
|
this.tasks.delete(key);
|
|
261
262
|
}
|
|
262
|
-
await Promise.
|
|
263
|
+
await Promise.allSettled(pending);
|
|
263
264
|
}
|
|
264
265
|
request(key, fetch) {
|
|
265
266
|
const existing = this.requests.get(key);
|
|
@@ -805,6 +806,10 @@ class FormTmplBomController {
|
|
|
805
806
|
field2TableMap = {};
|
|
806
807
|
/** 默认物料消耗模式 */
|
|
807
808
|
defaultMCPattern = MaterialConsumptionPatternEnum.RECORD;
|
|
809
|
+
/** 表单实例身份与 BOM 数据是否存在无关,模板展示也会创建完整控制器。 */
|
|
810
|
+
hasFormInstance = false;
|
|
811
|
+
/** 按页面中的表解析后的配置,页面与打印共用。 */
|
|
812
|
+
resolvedTmplBomList = [];
|
|
808
813
|
constructor() {
|
|
809
814
|
}
|
|
810
815
|
/**
|
|
@@ -822,7 +827,9 @@ class FormTmplBomController {
|
|
|
822
827
|
productQty: this.productQty,
|
|
823
828
|
historyData: this.historyData,
|
|
824
829
|
field2TableMap: this.field2TableMap,
|
|
825
|
-
defaultMCPattern: this.defaultMCPattern
|
|
830
|
+
defaultMCPattern: this.defaultMCPattern,
|
|
831
|
+
hasFormInstance: this.hasFormInstance,
|
|
832
|
+
resolvedTmplBomList: this.resolvedTmplBomList
|
|
826
833
|
})
|
|
827
834
|
);
|
|
828
835
|
(view.tmplBomList ?? []).forEach((config) => {
|
|
@@ -874,11 +881,11 @@ class FormTmplBomController {
|
|
|
874
881
|
* @readonly
|
|
875
882
|
*/
|
|
876
883
|
get bomEntries() {
|
|
877
|
-
return this.formInstBom?.bomEntries;
|
|
884
|
+
return this.formInstBom?.bomEntries ?? [];
|
|
878
885
|
}
|
|
879
886
|
/** 表单模板bom信息配置列表 */
|
|
880
887
|
get tmplBomList() {
|
|
881
|
-
return this.
|
|
888
|
+
return this.resolvedTmplBomList;
|
|
882
889
|
}
|
|
883
890
|
/**
|
|
884
891
|
* bom那边指定的当前工序的开关
|
|
@@ -887,30 +894,55 @@ class FormTmplBomController {
|
|
|
887
894
|
get enableSequenceLoading() {
|
|
888
895
|
return !!this.formInstBom?.sequenceEntries?.[0]?.enabled_;
|
|
889
896
|
}
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
897
|
+
createDefaultConfig(table) {
|
|
898
|
+
return {
|
|
899
|
+
table_key_: `${table.tableKey}:${table.masterSubField}`,
|
|
900
|
+
material_loading_model_enabled_: false,
|
|
901
|
+
material_consumption_pattern_: MaterialConsumptionPatternEnum.RECORD,
|
|
902
|
+
bom_init_enabled_: false,
|
|
903
|
+
personal_bom_enabled_: false,
|
|
904
|
+
sequence_loading_enabled_: false,
|
|
905
|
+
entries_: []
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
/** 有实例时读取实例配置,无实例时仅创建默认展示控制器。 */
|
|
893
909
|
async init(data) {
|
|
894
|
-
|
|
895
|
-
|
|
910
|
+
this.hasFormInstance = data.hasFormInstance;
|
|
911
|
+
this.operationId = data.operationId ?? "";
|
|
912
|
+
this.materialNo = data.materialNo ?? "";
|
|
913
|
+
this.formInstBom = this.hasFormInstance ? data.formInstBom ?? null : null;
|
|
914
|
+
this.productQty = this.formInstBom ? data.productQty ?? 0 : data.productQty;
|
|
915
|
+
this.historyData = [];
|
|
916
|
+
this.defaultMCPattern = MaterialConsumptionPatternEnum.RECORD;
|
|
917
|
+
this.tableControllers = {};
|
|
918
|
+
this.field2TableMap = {};
|
|
919
|
+
const instanceConfigs = new Map(
|
|
920
|
+
(this.formInstBom?.formTmplBomList ?? []).filter((config) => !config.deleted_ && config.table_key_).map((config) => [config.table_key_, config])
|
|
921
|
+
);
|
|
922
|
+
this.resolvedTmplBomList = data.materialConsumeTableList.map((table) => {
|
|
923
|
+
const key = `${table.tableKey}:${table.masterSubField}`;
|
|
924
|
+
const source = instanceConfigs.get(key);
|
|
925
|
+
if (!source) return this.createDefaultConfig(table);
|
|
926
|
+
const config = cloneDeep(source);
|
|
927
|
+
config.entries_ ??= [];
|
|
928
|
+
return config;
|
|
929
|
+
});
|
|
930
|
+
if (this.formInstBom) {
|
|
931
|
+
if (this.formInstBom.productionIdentificationId && this.operationId) {
|
|
932
|
+
this.historyData = await fetchHistoryConsume({
|
|
933
|
+
production_identification_id_: this.formInstBom.productionIdentificationId,
|
|
934
|
+
routing_operation_id_: this.operationId
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
const isGranted = await isBomGranted();
|
|
938
|
+
this.defaultMCPattern = isGranted ? MaterialConsumptionPatternEnum.BOM : MaterialConsumptionPatternEnum.RECORD;
|
|
896
939
|
}
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
production_identification_id_: this.formInstBom.productionIdentificationId,
|
|
903
|
-
routing_operation_id_: this.operationId
|
|
940
|
+
data.materialConsumeTableList.forEach((table, index) => {
|
|
941
|
+
const config = this.resolvedTmplBomList[index];
|
|
942
|
+
const controller = new MaterialConsumeTableController(this, config);
|
|
943
|
+
this.tableControllers[table.tableKey] = controller;
|
|
944
|
+
this.field2TableMap[table.masterSubField] = table.tableKey;
|
|
904
945
|
});
|
|
905
|
-
const isGranted = await isBomGranted();
|
|
906
|
-
this.defaultMCPattern = isGranted ? MaterialConsumptionPatternEnum.BOM : MaterialConsumptionPatternEnum.RECORD;
|
|
907
|
-
this.tableControllers = {};
|
|
908
|
-
this.tmplBomList.forEach((cur) => {
|
|
909
|
-
const controller = new MaterialConsumeTableController(this, cur);
|
|
910
|
-
const [tableKey, fieldKey] = cur.table_key_.split(":");
|
|
911
|
-
this.tableControllers[tableKey] = controller;
|
|
912
|
-
this.field2TableMap[fieldKey] = tableKey;
|
|
913
|
-
}, {});
|
|
914
946
|
}
|
|
915
947
|
/**
|
|
916
948
|
* 根据字段key获取子表控制器
|
|
@@ -971,6 +1003,71 @@ class FormTmplBomController {
|
|
|
971
1003
|
};
|
|
972
1004
|
}
|
|
973
1005
|
}
|
|
1006
|
+
async function prepareObjectProductDefaults({
|
|
1007
|
+
enabled,
|
|
1008
|
+
fields,
|
|
1009
|
+
objectInitialValues = []
|
|
1010
|
+
}) {
|
|
1011
|
+
const defaults2 = /* @__PURE__ */ new WeakMap();
|
|
1012
|
+
if (!enabled) return defaults2;
|
|
1013
|
+
const requests = /* @__PURE__ */ new Map();
|
|
1014
|
+
const tasks = [];
|
|
1015
|
+
function fetchProduct(productId) {
|
|
1016
|
+
const existing = requests.get(productId);
|
|
1017
|
+
if (existing) return existing;
|
|
1018
|
+
const request = (async () => {
|
|
1019
|
+
const result = await api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey(
|
|
1020
|
+
{
|
|
1021
|
+
modelCategory: "entity",
|
|
1022
|
+
modelKey: "em_product",
|
|
1023
|
+
bsKey: "rdoGetVersionById"
|
|
1024
|
+
},
|
|
1025
|
+
// 沿用现有接口约定,传完整默认值,不拆分版本 ID。
|
|
1026
|
+
{ id: productId }
|
|
1027
|
+
);
|
|
1028
|
+
const product = result?.data;
|
|
1029
|
+
if (!product || typeof product !== "object" || Array.isArray(product) || Object.keys(product).length === 0) {
|
|
1030
|
+
throw new Error(`未找到默认物料详情:${productId}`);
|
|
1031
|
+
}
|
|
1032
|
+
return { ...product, _DICT: result?.dict ?? product._DICT };
|
|
1033
|
+
})();
|
|
1034
|
+
requests.set(productId, request);
|
|
1035
|
+
return request;
|
|
1036
|
+
}
|
|
1037
|
+
for (const entry of fields) {
|
|
1038
|
+
if (!entry || typeof entry !== "object") continue;
|
|
1039
|
+
const field = entry;
|
|
1040
|
+
if (typeof field.fieldId !== "string" || !field.belongingObject || field.fieldType !== FIELD_TYPE.PRODUCT || field.isFieldModel || field.subFieldKey || field.subModelKey) {
|
|
1041
|
+
continue;
|
|
1042
|
+
}
|
|
1043
|
+
const configured = objectInitialValues.find(
|
|
1044
|
+
(item) => item.objectField === field.belongingObject
|
|
1045
|
+
);
|
|
1046
|
+
if (!configured?.values || !Object.prototype.hasOwnProperty.call(configured.values, field.fieldId)) {
|
|
1047
|
+
continue;
|
|
1048
|
+
}
|
|
1049
|
+
const productDefault = {
|
|
1050
|
+
value: configured.values[field.fieldId]
|
|
1051
|
+
};
|
|
1052
|
+
defaults2.set(entry, productDefault);
|
|
1053
|
+
const productId = productDefault.value;
|
|
1054
|
+
const needsAutofill = field.enableAutofill !== false && field.autofillRules?.some((rule) => !!rule.toField);
|
|
1055
|
+
if (!needsAutofill || typeof productId !== "string" || productId === "") continue;
|
|
1056
|
+
tasks.push(
|
|
1057
|
+
fetchProduct(productId).then(
|
|
1058
|
+
(sourceData) => {
|
|
1059
|
+
productDefault.sourceData = sourceData;
|
|
1060
|
+
},
|
|
1061
|
+
(error) => {
|
|
1062
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
1063
|
+
throw new Error(`对象初始化数据填充失败,字段 ${field.fieldId}:${reason}`);
|
|
1064
|
+
}
|
|
1065
|
+
)
|
|
1066
|
+
);
|
|
1067
|
+
}
|
|
1068
|
+
await Promise.all(tasks);
|
|
1069
|
+
return defaults2;
|
|
1070
|
+
}
|
|
974
1071
|
async function getModelQueries(opts) {
|
|
975
1072
|
const isEdhr = await isEdhrSuite();
|
|
976
1073
|
if (!isEdhr || !opts.mainMaterialNo) {
|
|
@@ -1263,6 +1360,8 @@ function createRuntimeInstanceInitializer(props, payload, getConsumeData) {
|
|
|
1263
1360
|
}
|
|
1264
1361
|
await tmplBomC.init({
|
|
1265
1362
|
formInstBom: selfInfo.formInstBom,
|
|
1363
|
+
materialConsumeTableList: businessIndex.materialConsumeTableList,
|
|
1364
|
+
hasFormInstance: isFormInstance,
|
|
1266
1365
|
operationId: paramsConfig?.routingOperationId,
|
|
1267
1366
|
materialNo,
|
|
1268
1367
|
productQty: paramsConfig?.productQty
|
|
@@ -1334,7 +1433,13 @@ function createRuntimeInstanceInitializer(props, payload, getConsumeData) {
|
|
|
1334
1433
|
params: { id: paramsConfig?.warehouseId }
|
|
1335
1434
|
}
|
|
1336
1435
|
]);
|
|
1436
|
+
const objectProductDefaults = await prepareObjectProductDefaults({
|
|
1437
|
+
enabled: fillModeType === RenderModeEnum.FormMode && selfInfo.dataStatus !== "STASH" && selfInfo.dataStatus !== "SUBMIT",
|
|
1438
|
+
fields: fieldInfoMap.useDefaultValueFields,
|
|
1439
|
+
objectInitialValues: runtimeContext.formConfig.objectInitialValues
|
|
1440
|
+
});
|
|
1337
1441
|
const defaultDataMap = renderUtils.getDefaultValueMapByField({
|
|
1442
|
+
objectProductDefaults,
|
|
1338
1443
|
defaultValueFields: fieldInfoMap.useDefaultValueFields,
|
|
1339
1444
|
mainMaterialNo: paramsConfig?.materialNo || selfInfo.materialNo,
|
|
1340
1445
|
mainRelatedLotNo: paramsConfig?.relatedLotNo,
|
|
@@ -1424,6 +1529,15 @@ function createRuntimeInstanceInitializer(props, payload, getConsumeData) {
|
|
|
1424
1529
|
});
|
|
1425
1530
|
initializeSealFields(floatingFields, formState);
|
|
1426
1531
|
}
|
|
1532
|
+
await transformUtils.getEventInitDataLoaded({
|
|
1533
|
+
formConfig: runtimeContext.formConfig,
|
|
1534
|
+
formState,
|
|
1535
|
+
viewMode: fillModeType,
|
|
1536
|
+
dataStatus: selfInfo.dataStatus,
|
|
1537
|
+
ofCtx: { formPrint: payload.formPrint, id: result.id }
|
|
1538
|
+
}).catch((error) => {
|
|
1539
|
+
console.error("Error in getEventInitDataLoaded:", error);
|
|
1540
|
+
});
|
|
1427
1541
|
runtimeFormStateStore = new RuntimeFormStateStore(
|
|
1428
1542
|
formState,
|
|
1429
1543
|
// 子表信息覆盖普通/固定/检验表、二维关联列以及各类业务表;不能只依赖已放置字段。
|
|
@@ -1542,6 +1656,18 @@ function bindRuntimeBusinessServices(runtimeRegistry, record, dataStatus) {
|
|
|
1542
1656
|
uniqueId,
|
|
1543
1657
|
() => MaterialConsumeTableController.render?.destroyAllModals(uniqueId)
|
|
1544
1658
|
);
|
|
1659
|
+
runtimeRegistry.registerDisposable(
|
|
1660
|
+
uniqueId,
|
|
1661
|
+
watch(
|
|
1662
|
+
() => record.context.activeSheetId,
|
|
1663
|
+
(next, previous) => {
|
|
1664
|
+
if (next !== previous) {
|
|
1665
|
+
MaterialConsumeTableController.render?.destroyAllModals(uniqueId);
|
|
1666
|
+
}
|
|
1667
|
+
},
|
|
1668
|
+
{ flush: "sync" }
|
|
1669
|
+
)
|
|
1670
|
+
);
|
|
1545
1671
|
if (!mcList.length) return;
|
|
1546
1672
|
const tmplBomC = record.context.services.tmplBomController;
|
|
1547
1673
|
if (!tmplBomC) return;
|
|
@@ -1838,7 +1964,13 @@ function createRuntimePersistenceAccess(runtimeRegistry, props, payload) {
|
|
|
1838
1964
|
const signatureKeys = (runtimeRecord.context.businessIndex.useSignatureFields || []).map(
|
|
1839
1965
|
(item) => item.fieldId
|
|
1840
1966
|
);
|
|
1841
|
-
const idsFormState = transformUtils.getFormDataIdsMap(
|
|
1967
|
+
const idsFormState = transformUtils.getFormDataIdsMap(
|
|
1968
|
+
newFormState,
|
|
1969
|
+
signatureKeys,
|
|
1970
|
+
(path) => runtimeRecord.fields.findByPath(path).some(
|
|
1971
|
+
({ widget, subFieldKey }) => subFieldKey !== path && [FIELD_TYPE.DATE, FIELD_TYPE.DATE_TIME].includes(widget?.props.fieldType)
|
|
1972
|
+
)
|
|
1973
|
+
);
|
|
1842
1974
|
if (saveToken ? !runtimeRecord.persistence.completeSave(saveToken) : requestedRevision !== runtimeRecord.formState.revision) {
|
|
1843
1975
|
return false;
|
|
1844
1976
|
}
|
|
@@ -1915,6 +2047,139 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1915
2047
|
}
|
|
1916
2048
|
});
|
|
1917
2049
|
const InspectionDecisionPromptModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9c14035f"]]);
|
|
2050
|
+
function createMaterialConsumeObjectValidation(options) {
|
|
2051
|
+
const { record, getInfo, isCurrent, shouldSkip, applyComments } = options;
|
|
2052
|
+
let enabled = false;
|
|
2053
|
+
let disposed = false;
|
|
2054
|
+
let submitting = 0;
|
|
2055
|
+
let generation = 0;
|
|
2056
|
+
let lastRevision = -1;
|
|
2057
|
+
let timer;
|
|
2058
|
+
let paths = /* @__PURE__ */ new Set();
|
|
2059
|
+
const unlocated = /* @__PURE__ */ new Set();
|
|
2060
|
+
const alive = () => !disposed && isCurrent();
|
|
2061
|
+
function cancelLive() {
|
|
2062
|
+
generation++;
|
|
2063
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
2064
|
+
timer = void 0;
|
|
2065
|
+
}
|
|
2066
|
+
function calcObjectError(error) {
|
|
2067
|
+
const info = getInfo();
|
|
2068
|
+
const modelKey = info?.modelKey || record.context.businessIndex.modelDisplay.key;
|
|
2069
|
+
const descriptor = record.fields.findField({ modelKey, fieldId: error.field });
|
|
2070
|
+
const props = descriptor?.widget?.props;
|
|
2071
|
+
if (!props?.field || descriptor?.subFieldKey || props.subFieldKey) {
|
|
2072
|
+
const key = modelKey + "." + error.field;
|
|
2073
|
+
if (!unlocated.has(key)) {
|
|
2074
|
+
unlocated.add(key);
|
|
2075
|
+
console.warn("物料消耗对象错误未定位到主表控件,保留在校验清单:", key);
|
|
2076
|
+
}
|
|
2077
|
+
return { error, path: void 0 };
|
|
2078
|
+
}
|
|
2079
|
+
const path = buildRuntimeFieldPath({
|
|
2080
|
+
...props,
|
|
2081
|
+
modelKey: props.modelKey ?? info?.modelKey,
|
|
2082
|
+
fieldId: props.field
|
|
2083
|
+
});
|
|
2084
|
+
return { error: { ...error, field: path }, path };
|
|
2085
|
+
}
|
|
2086
|
+
function replaceObjectFields(fields) {
|
|
2087
|
+
if (!alive()) return;
|
|
2088
|
+
const next = { ...getInfo()?.mcValidatorMessageMap ?? {} };
|
|
2089
|
+
paths.forEach((path) => delete next[path]);
|
|
2090
|
+
Object.assign(next, fields);
|
|
2091
|
+
paths = new Set(Object.keys(fields));
|
|
2092
|
+
applyComments(next);
|
|
2093
|
+
}
|
|
2094
|
+
function replaceTableFields(fields) {
|
|
2095
|
+
if (!alive()) return;
|
|
2096
|
+
const current = getInfo()?.mcValidatorMessageMap ?? {};
|
|
2097
|
+
const next = { ...fields ?? {} };
|
|
2098
|
+
paths.forEach((path) => {
|
|
2099
|
+
if (current[path]) {
|
|
2100
|
+
next[path] = [...next[path] ?? [], ...current[path]];
|
|
2101
|
+
}
|
|
2102
|
+
});
|
|
2103
|
+
applyComments(next);
|
|
2104
|
+
}
|
|
2105
|
+
function clear() {
|
|
2106
|
+
cancelLive();
|
|
2107
|
+
enabled = false;
|
|
2108
|
+
lastRevision = -1;
|
|
2109
|
+
replaceObjectFields({});
|
|
2110
|
+
}
|
|
2111
|
+
async function validate(live = false) {
|
|
2112
|
+
cancelLive();
|
|
2113
|
+
if (!alive()) return;
|
|
2114
|
+
if (shouldSkip()) {
|
|
2115
|
+
clear();
|
|
2116
|
+
return { isValid: true };
|
|
2117
|
+
}
|
|
2118
|
+
const ticket = generation;
|
|
2119
|
+
const revision = record.formState.revision;
|
|
2120
|
+
const info = getInfo();
|
|
2121
|
+
const display = record.context.businessIndex.modelDisplay;
|
|
2122
|
+
const errors = await validateObjectBomQtyOnSubmit({
|
|
2123
|
+
formState: record.formState.state,
|
|
2124
|
+
objectFieldList: record.context.formConfig.objectFieldList,
|
|
2125
|
+
formInstBom: record.context.services.tmplBomController?.formInstBom,
|
|
2126
|
+
showModelName: display.name,
|
|
2127
|
+
showModelKey: display.key || info?.modelKey || ""
|
|
2128
|
+
});
|
|
2129
|
+
if (!alive() || generation !== ticket || record.formState.revision !== revision || live && getInfo()?.renderModeType !== RenderModeEnum.FormMode)
|
|
2130
|
+
return;
|
|
2131
|
+
const fields = {};
|
|
2132
|
+
const comments = {};
|
|
2133
|
+
for (const source of errors) {
|
|
2134
|
+
const adapted = calcObjectError(source);
|
|
2135
|
+
(fields[adapted.error.field] ??= []).push(adapted.error);
|
|
2136
|
+
if (adapted.path) (comments[adapted.path] ??= []).push(adapted.error);
|
|
2137
|
+
}
|
|
2138
|
+
enabled = !!record.context.formConfig.objectFieldList?.length;
|
|
2139
|
+
lastRevision = revision;
|
|
2140
|
+
replaceObjectFields(comments);
|
|
2141
|
+
return { isValid: !errors.length, fields: Object.keys(fields).length ? fields : void 0 };
|
|
2142
|
+
}
|
|
2143
|
+
function requestLive() {
|
|
2144
|
+
cancelLive();
|
|
2145
|
+
if (!alive() || !enabled || submitting > 0 || getInfo()?.renderModeType !== RenderModeEnum.FormMode)
|
|
2146
|
+
return;
|
|
2147
|
+
const ticket = generation;
|
|
2148
|
+
timer = setTimeout(() => {
|
|
2149
|
+
timer = void 0;
|
|
2150
|
+
void (async () => {
|
|
2151
|
+
await record.controller?.waitUntilPrepared();
|
|
2152
|
+
await record.asyncTasks.waitForRequired();
|
|
2153
|
+
if (!alive() || generation !== ticket || submitting > 0 || getInfo()?.renderModeType !== RenderModeEnum.FormMode)
|
|
2154
|
+
return;
|
|
2155
|
+
await validate(true);
|
|
2156
|
+
})().catch((error) => {
|
|
2157
|
+
if (alive()) console.error("物料消耗对象实时校验失败", error);
|
|
2158
|
+
});
|
|
2159
|
+
}, 300);
|
|
2160
|
+
}
|
|
2161
|
+
return {
|
|
2162
|
+
validate,
|
|
2163
|
+
requestLive,
|
|
2164
|
+
replaceTableFields,
|
|
2165
|
+
clear,
|
|
2166
|
+
beginSubmit() {
|
|
2167
|
+
submitting++;
|
|
2168
|
+
cancelLive();
|
|
2169
|
+
},
|
|
2170
|
+
endSubmit() {
|
|
2171
|
+
submitting--;
|
|
2172
|
+
if (alive() && submitting === 0 && enabled && lastRevision !== record.formState.revision)
|
|
2173
|
+
requestLive();
|
|
2174
|
+
},
|
|
2175
|
+
dispose() {
|
|
2176
|
+
disposed = true;
|
|
2177
|
+
cancelLive();
|
|
2178
|
+
paths.clear();
|
|
2179
|
+
unlocated.clear();
|
|
2180
|
+
}
|
|
2181
|
+
};
|
|
2182
|
+
}
|
|
1918
2183
|
function applyValidationComments(info, comments, kind) {
|
|
1919
2184
|
if (!info) return;
|
|
1920
2185
|
const locationKey = kind === "field" ? "validatorLocationList" : "mcValidatorLocationList";
|
|
@@ -1932,6 +2197,29 @@ function applyValidationComments(info, comments, kind) {
|
|
|
1932
2197
|
info[messageKey] = map;
|
|
1933
2198
|
}
|
|
1934
2199
|
function createRuntimeValidationBinding(runtimeRegistry, getInfo, platformType) {
|
|
2200
|
+
const objectValidations = /* @__PURE__ */ new WeakMap();
|
|
2201
|
+
function getObjectValidation(record) {
|
|
2202
|
+
const existing = objectValidations.get(record);
|
|
2203
|
+
if (existing) return existing;
|
|
2204
|
+
const uniqueId = record.context.uniqueId;
|
|
2205
|
+
const validation = createMaterialConsumeObjectValidation({
|
|
2206
|
+
record,
|
|
2207
|
+
getInfo: () => getInfo(uniqueId),
|
|
2208
|
+
isCurrent: () => runtimeRegistry.get(uniqueId) === record,
|
|
2209
|
+
shouldSkip: () => {
|
|
2210
|
+
const skip = syncInspectionDecisionRule(uniqueId);
|
|
2211
|
+
if (skip) clearInspectionValidationState(uniqueId);
|
|
2212
|
+
return skip;
|
|
2213
|
+
},
|
|
2214
|
+
applyComments: (fields) => applyValidationComments(getInfo(uniqueId), fields, "material")
|
|
2215
|
+
});
|
|
2216
|
+
objectValidations.set(record, validation);
|
|
2217
|
+
runtimeRegistry.registerDisposable(uniqueId, () => {
|
|
2218
|
+
validation.dispose();
|
|
2219
|
+
objectValidations.delete(record);
|
|
2220
|
+
});
|
|
2221
|
+
return validation;
|
|
2222
|
+
}
|
|
1935
2223
|
const inspectionDecisionMatched = /* @__PURE__ */ new WeakMap();
|
|
1936
2224
|
const inspectionDecisionPrompting = /* @__PURE__ */ new WeakSet();
|
|
1937
2225
|
function openInspectionDecisionPrompt(uniqueId, content) {
|
|
@@ -1972,11 +2260,14 @@ function createRuntimeValidationBinding(runtimeRegistry, getInfo, platformType)
|
|
|
1972
2260
|
return matched;
|
|
1973
2261
|
}
|
|
1974
2262
|
function clearInspectionValidationState(uniqueId) {
|
|
2263
|
+
const record = runtimeRegistry.get(uniqueId);
|
|
2264
|
+
if (record) objectValidations.get(record)?.clear();
|
|
1975
2265
|
applyValidationComments(getInfo(uniqueId), null, "field");
|
|
1976
2266
|
applyValidationComments(getInfo(uniqueId), null, "material");
|
|
1977
2267
|
}
|
|
1978
2268
|
function bindFormValidationSync(uniqueId) {
|
|
1979
2269
|
const record = runtimeRegistry.require(uniqueId);
|
|
2270
|
+
const objects = getObjectValidation(record);
|
|
1980
2271
|
syncInspectionDecisionRule(uniqueId);
|
|
1981
2272
|
const stop = record.formState.subscribe(() => {
|
|
1982
2273
|
if (runtimeRegistry.get(uniqueId) !== record) return;
|
|
@@ -1987,6 +2278,7 @@ function createRuntimeValidationBinding(runtimeRegistry, getInfo, platformType)
|
|
|
1987
2278
|
uniqueId,
|
|
1988
2279
|
!suppressed && info.renderModeType === RenderModeEnum.FormMode
|
|
1989
2280
|
);
|
|
2281
|
+
objects.requestLive();
|
|
1990
2282
|
if (suppressed) return;
|
|
1991
2283
|
if (info.renderModeType === RenderModeEnum.FormMode) {
|
|
1992
2284
|
record.validation.requestLive("change");
|
|
@@ -2019,48 +2311,43 @@ function createRuntimeValidationBinding(runtimeRegistry, getInfo, platformType)
|
|
|
2019
2311
|
}
|
|
2020
2312
|
async function runSubmissionValidation(uniqueId) {
|
|
2021
2313
|
const record = runtimeRegistry.require(uniqueId);
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
const res = await record.validation.validate();
|
|
2029
|
-
if (!res || runtimeRegistry.get(uniqueId) !== record) return;
|
|
2030
|
-
const revision = record.formState.revision;
|
|
2031
|
-
if (bomC) {
|
|
2032
|
-
const bomRes = await bomC.submitValidate();
|
|
2033
|
-
if (runtimeRegistry.get(uniqueId) !== record || record.formState.revision !== revision)
|
|
2034
|
-
return;
|
|
2035
|
-
applyValidationComments(getInfo(uniqueId), bomRes.fields ?? null, "material");
|
|
2036
|
-
if (!bomRes.isValid) {
|
|
2037
|
-
merge(res, bomRes);
|
|
2038
|
-
return res;
|
|
2314
|
+
const objects = getObjectValidation(record);
|
|
2315
|
+
objects.beginSubmit();
|
|
2316
|
+
try {
|
|
2317
|
+
if (syncInspectionDecisionRule(uniqueId)) {
|
|
2318
|
+
clearInspectionValidationState(uniqueId);
|
|
2319
|
+
return { isValid: true };
|
|
2039
2320
|
}
|
|
2040
|
-
const
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
const
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2321
|
+
const res = await record.validation.validate();
|
|
2322
|
+
if (!res || runtimeRegistry.get(uniqueId) !== record) return;
|
|
2323
|
+
const revision = record.formState.revision;
|
|
2324
|
+
const bomC = record.context.services.tmplBomController;
|
|
2325
|
+
if (bomC) {
|
|
2326
|
+
const bomRes = await bomC.submitValidate();
|
|
2327
|
+
if (runtimeRegistry.get(uniqueId) !== record || record.formState.revision !== revision)
|
|
2328
|
+
return;
|
|
2329
|
+
objects.replaceTableFields(bomRes.fields);
|
|
2330
|
+
if (!bomRes.isValid) {
|
|
2331
|
+
merge(res, bomRes);
|
|
2332
|
+
return res;
|
|
2333
|
+
}
|
|
2334
|
+
const objectRes = await objects.validate();
|
|
2335
|
+
if (!objectRes || runtimeRegistry.get(uniqueId) !== record || record.formState.revision !== revision)
|
|
2336
|
+
return;
|
|
2337
|
+
if (!objectRes.isValid) {
|
|
2338
|
+
const fields = { ...res.fields ?? {} };
|
|
2339
|
+
for (const [path, errors] of Object.entries(objectRes.fields ?? {})) {
|
|
2340
|
+
fields[path] = [...fields[path] ?? [], ...errors];
|
|
2341
|
+
}
|
|
2342
|
+
return { ...res, isValid: false, fields };
|
|
2343
|
+
}
|
|
2344
|
+
} else {
|
|
2345
|
+
objects.clear();
|
|
2061
2346
|
}
|
|
2347
|
+
return res;
|
|
2348
|
+
} finally {
|
|
2349
|
+
objects.endSubmit();
|
|
2062
2350
|
}
|
|
2063
|
-
return res;
|
|
2064
2351
|
}
|
|
2065
2352
|
function updateRenderModeType(uniqueId, mode, updateButton = false) {
|
|
2066
2353
|
const record = runtimeRegistry.require(uniqueId);
|
|
@@ -2078,7 +2365,9 @@ function createRuntimeValidationBinding(runtimeRegistry, getInfo, platformType)
|
|
|
2078
2365
|
if (!isCurrent() || runtimeRegistry.get(uniqueId) !== record) return;
|
|
2079
2366
|
await record.validation.settleAfterModeSwitch(mode === RenderModeEnum.FormMode);
|
|
2080
2367
|
}).catch((error) => {
|
|
2081
|
-
if (runtimeRegistry.get(uniqueId)
|
|
2368
|
+
if (runtimeRegistry.get(uniqueId) !== record) return;
|
|
2369
|
+
if (error instanceof Error && error.message.startsWith("以下异步任务执行失败:")) return;
|
|
2370
|
+
console.error("表单模式准备失败", error);
|
|
2082
2371
|
});
|
|
2083
2372
|
}
|
|
2084
2373
|
async function prepareInitialView(record) {
|
|
@@ -3060,75 +3349,77 @@ export {
|
|
|
3060
3349
|
A3 as AllocateTableCore,
|
|
3061
3350
|
B3 as BaseFormModelFetcher,
|
|
3062
3351
|
aQ as BinarizeMethodOptions,
|
|
3063
|
-
|
|
3352
|
+
b0 as BindCmpStyleEnum,
|
|
3064
3353
|
a1 as BooleanShowMode,
|
|
3065
3354
|
B2 as BorderTD,
|
|
3066
3355
|
BpmnNodeTypeEnum,
|
|
3067
|
-
|
|
3068
|
-
|
|
3356
|
+
bL as BpmnSignatureTypeEnum,
|
|
3357
|
+
bM as ButtonTypeEnum,
|
|
3069
3358
|
B as BwipCodeType,
|
|
3070
|
-
|
|
3359
|
+
bN as CHECK_TABLE_MEDPRO_PROTOCOL_KEY,
|
|
3071
3360
|
y as CellType,
|
|
3072
3361
|
ai as CellWidgetViewState,
|
|
3073
3362
|
CheckDsTypeEnum,
|
|
3074
|
-
|
|
3363
|
+
bO as CodeRunner,
|
|
3075
3364
|
ComponentTypeEnum,
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3365
|
+
bP as Config_Fields,
|
|
3366
|
+
bQ as ControlStatusEnum,
|
|
3367
|
+
bi as DEVICE_GROUP_QUERY_KEY,
|
|
3368
|
+
bR as DEVICE_SEARCH_API,
|
|
3080
3369
|
aT as DateFormat,
|
|
3081
3370
|
ay as DecimalDisplayMode,
|
|
3082
3371
|
aP as DenoiseMethodOptions,
|
|
3083
|
-
|
|
3372
|
+
a62 as DeviceConnector,
|
|
3084
3373
|
aM as DeviceLink,
|
|
3085
|
-
|
|
3374
|
+
e as DeviceLinkTmplUtil,
|
|
3086
3375
|
aN as DeviceParamsTypeTitle,
|
|
3087
3376
|
D as DevicePartConsumeTableCore,
|
|
3088
|
-
|
|
3377
|
+
bS as DeviceStatus,
|
|
3089
3378
|
aj as DiagonalDirection,
|
|
3090
3379
|
an as DiagonalVertex,
|
|
3091
3380
|
_ as DocumentLayout,
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3381
|
+
a72 as DocumentLoading,
|
|
3382
|
+
L2 as DocumentPaper,
|
|
3383
|
+
a8 as DynamicQuickFillModal,
|
|
3384
|
+
O2 as DynamicTableAction,
|
|
3385
|
+
bT as EBR_PROVIDE_ENUM,
|
|
3386
|
+
bU as EFieldBizTypeEnum,
|
|
3098
3387
|
E as EMPTY_PRODUCT_VERSION_ID,
|
|
3099
3388
|
aG as EmptySymbol,
|
|
3100
3389
|
a3 as FallbackSignTypeEnum,
|
|
3101
3390
|
ah as FieldSysVarDefaultValueEnum,
|
|
3102
3391
|
FillingTypeEnum,
|
|
3103
|
-
|
|
3392
|
+
a9 as FixedQuickFillModal,
|
|
3104
3393
|
FormAnnotationController,
|
|
3105
|
-
|
|
3394
|
+
F2 as FormModelController,
|
|
3106
3395
|
FormTmplBomController,
|
|
3107
|
-
|
|
3396
|
+
aa2 as FormTmplConfigController,
|
|
3108
3397
|
FormTypeEnum,
|
|
3109
3398
|
az as ImageDisplayModeEnum,
|
|
3110
3399
|
InstanceStatusValues,
|
|
3111
3400
|
aR as JoinModelTypeEum,
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3401
|
+
ab as LEGACY_RUNTIME_FORM_CONFIG_KEYS,
|
|
3402
|
+
ac as LEGACY_RUNTIME_SHEET_ID,
|
|
3403
|
+
ad as LEGACY_RUNTIME_SHEET_TITLE,
|
|
3115
3404
|
a0 as LabelPosition,
|
|
3116
3405
|
al as LineDirection,
|
|
3117
3406
|
L as LineType,
|
|
3118
|
-
|
|
3407
|
+
bV as MAX_FRONT_ROW_KEY_LENGTH,
|
|
3408
|
+
M as MAX_RUNTIME_SHEETS,
|
|
3409
|
+
a as MAX_RUNTIME_SHEET_TITLE_LENGTH,
|
|
3119
3410
|
M3 as MBRender,
|
|
3120
|
-
|
|
3411
|
+
ae as MCDataUtil,
|
|
3121
3412
|
a11 as MCRender,
|
|
3122
|
-
|
|
3413
|
+
b as MULTI_SHEET_SCHEMA_VERSION,
|
|
3123
3414
|
MaterialConsumeTableController,
|
|
3124
3415
|
MaterialConsumptionPatternEnum,
|
|
3125
3416
|
M2 as MaterialRequisitionTableCore,
|
|
3126
3417
|
MaterialStatusEnum,
|
|
3127
3418
|
a10 as MaterialSubstitutionTableCore,
|
|
3128
|
-
|
|
3419
|
+
bW as MobileFillTypeEnum,
|
|
3129
3420
|
NCB_PROVIDE,
|
|
3130
|
-
|
|
3131
|
-
|
|
3421
|
+
af as OCR_MODEL_PRECISION_ENUM_KEY,
|
|
3422
|
+
bX as OfficeTypeEnum,
|
|
3132
3423
|
O as Orientation,
|
|
3133
3424
|
p as PageSizeEnum,
|
|
3134
3425
|
P as PaginationFormat,
|
|
@@ -3138,24 +3429,24 @@ export {
|
|
|
3138
3429
|
A as ParamModelTypeEnum,
|
|
3139
3430
|
P2 as PartStocktakeTableCore,
|
|
3140
3431
|
PlatformEnum,
|
|
3141
|
-
|
|
3142
|
-
|
|
3432
|
+
bY as PosEnum,
|
|
3433
|
+
b4 as PretreatmentListTableCore,
|
|
3143
3434
|
c10 as ProfileDrivenSubTableCore,
|
|
3144
|
-
|
|
3435
|
+
bZ as RUNTIME_COLUMN_ROW_KEY,
|
|
3145
3436
|
ax as RangeCompareOp,
|
|
3146
3437
|
aw as RangeValidateMode,
|
|
3147
3438
|
RenderModeEnum,
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3439
|
+
ag as RuntimeAsyncTaskCoordinator,
|
|
3440
|
+
ah2 as RuntimeDependencyService,
|
|
3441
|
+
ai2 as RuntimeFieldRegistry,
|
|
3151
3442
|
RuntimeFormStateStore,
|
|
3152
3443
|
RuntimeInstanceController,
|
|
3153
|
-
|
|
3444
|
+
aj2 as RuntimeInstanceEventBus,
|
|
3154
3445
|
RuntimeInstanceRegistry,
|
|
3155
|
-
|
|
3446
|
+
ak2 as RuntimePersistenceCoordinator,
|
|
3156
3447
|
RuntimeRuleCompiler,
|
|
3157
3448
|
RuntimeSheetService,
|
|
3158
|
-
|
|
3449
|
+
al2 as RuntimeValidationService,
|
|
3159
3450
|
a6 as SignShowTypeEnum,
|
|
3160
3451
|
a2 as SignatureImageDirectionEnum,
|
|
3161
3452
|
a4 as SignatureNumberTypeEnum,
|
|
@@ -3163,10 +3454,10 @@ export {
|
|
|
3163
3454
|
a7 as SignatureTypeEnum,
|
|
3164
3455
|
d2 as SterilizeBatchTableCore,
|
|
3165
3456
|
e2 as StocktakeTableCore,
|
|
3166
|
-
|
|
3457
|
+
am2 as SubTableCore,
|
|
3167
3458
|
SubTableCoreFactory,
|
|
3168
3459
|
f as SubTableType,
|
|
3169
|
-
|
|
3460
|
+
b_ as SummaryApproveHisTypeEnum,
|
|
3170
3461
|
am as TimeDiffFormat,
|
|
3171
3462
|
aq as ViewTypeEnum,
|
|
3172
3463
|
W as WarehouseInTableCore,
|
|
@@ -3174,129 +3465,129 @@ export {
|
|
|
3174
3465
|
g as WarehouseOutTableCore,
|
|
3175
3466
|
h2 as WarehouseOutboundTableCore,
|
|
3176
3467
|
ak as WidgetImageSizeMode,
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3468
|
+
b$ as applyCheckDsDataToRuntime,
|
|
3469
|
+
w as applyConsumeObjectTraceChange,
|
|
3470
|
+
c0 as applyMedProCheckDsDataToRuntime,
|
|
3180
3471
|
baseDataUtils,
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3472
|
+
c1 as bindRuntimeTableColumns,
|
|
3473
|
+
c2 as buildDeviceBaseQuery,
|
|
3474
|
+
bh as buildDeviceFilterQuery,
|
|
3475
|
+
an2 as buildFormChangeDisplayRows,
|
|
3476
|
+
m as buildObjectLotExtraQuery,
|
|
3186
3477
|
buildRuntimeFieldPath,
|
|
3187
|
-
|
|
3188
|
-
|
|
3478
|
+
c3 as calcFillData,
|
|
3479
|
+
c4 as calcUtils,
|
|
3189
3480
|
calculateFormula,
|
|
3190
3481
|
collectAnnotationItemsByLocation,
|
|
3191
3482
|
collectFormChangeFieldLocations,
|
|
3192
3483
|
commonUtils,
|
|
3193
3484
|
convertHistoricalAnnotationLocation,
|
|
3194
|
-
|
|
3485
|
+
ao2 as convertV1Runtime,
|
|
3195
3486
|
c as createRuntimeDocumentV2,
|
|
3196
3487
|
createRuntimeInstanceContext,
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3488
|
+
c5 as decodeTableCellRowKey,
|
|
3489
|
+
ap as detailsHaveFormChangeRowOps,
|
|
3490
|
+
c6 as encodeTableCellRowKey,
|
|
3200
3491
|
enrichFormChangeRowDetails,
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3492
|
+
c7 as ensureFrontRowKey,
|
|
3493
|
+
c8 as ensureTableRowKeys,
|
|
3494
|
+
aq2 as extractFormChangeRowDetails,
|
|
3495
|
+
c9 as extractKeywordFromQueryData,
|
|
3496
|
+
ca as fetchCheckDsDataForTable,
|
|
3497
|
+
cb as fetchCustomCheckDsData,
|
|
3207
3498
|
fetchHistoryConsume,
|
|
3208
|
-
|
|
3499
|
+
cc as fetchMedProCheckDsData,
|
|
3209
3500
|
fetchOperationReceiveQty,
|
|
3210
3501
|
fetchUdi,
|
|
3211
3502
|
filterAnnotationItemsUpToCurrent,
|
|
3212
|
-
|
|
3213
|
-
|
|
3503
|
+
bm as findRuntimeParentRow,
|
|
3504
|
+
cd as findRuntimeTableCell,
|
|
3214
3505
|
findRuntimeTableRow,
|
|
3215
3506
|
getAppInfo,
|
|
3216
3507
|
getBusinessFieldKey,
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3508
|
+
ce as getCheckTableSnapshotKey,
|
|
3509
|
+
ar as getFormChangeRowKey,
|
|
3510
|
+
as as getFormChangeRowOp,
|
|
3220
3511
|
aZ as getLotLockedReason,
|
|
3221
|
-
|
|
3222
|
-
|
|
3512
|
+
l as getObjectBomMaterialLotQuery,
|
|
3513
|
+
x as getObjectBomProductQuery,
|
|
3223
3514
|
getParseFormulaVarInfos,
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3515
|
+
cf as getParseRuleConfig,
|
|
3516
|
+
b1 as getParseRuleInfo,
|
|
3517
|
+
b2 as getParseRuleValue,
|
|
3518
|
+
cg as getReinspectionDate,
|
|
3519
|
+
ch as getRenderedRuntimeTableCell,
|
|
3229
3520
|
getRuntimeDataFieldId,
|
|
3230
3521
|
getRuntimeDependencyOutputKey,
|
|
3231
|
-
|
|
3522
|
+
at as getSubTableQuickFillInfo,
|
|
3232
3523
|
getSuiteKey,
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3524
|
+
ci as handleOldConfig,
|
|
3525
|
+
cj as hasAnyCheckTableSnapshot,
|
|
3526
|
+
ck as hasByTableCheckTableSnapshot,
|
|
3527
|
+
cl as hasSharedCheckTableSnapshot,
|
|
3528
|
+
au as isAnnLocationSelected,
|
|
3529
|
+
av as isBlank,
|
|
3239
3530
|
isBomGranted,
|
|
3240
3531
|
isEdhrSuite,
|
|
3241
3532
|
isEqmSuite,
|
|
3242
|
-
|
|
3243
|
-
|
|
3533
|
+
aw2 as isFormChangeGhostRow,
|
|
3534
|
+
cm as isMedProSuite,
|
|
3244
3535
|
isRowAddedInCurrentFormChange,
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3536
|
+
cn as isTableRowKeyMatch,
|
|
3537
|
+
co as jsonSchemaUtils,
|
|
3538
|
+
cp as judgeUnique,
|
|
3248
3539
|
aY as materialCheck,
|
|
3249
|
-
|
|
3540
|
+
cq as migrateDiagonalDirectionToVertex,
|
|
3250
3541
|
nextFormChangeRowViewHistoryId,
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3542
|
+
f2 as normalizeAIOcrTmpl,
|
|
3543
|
+
y2 as normalizeHistoricalAutofillRow,
|
|
3544
|
+
d as normalizeHistoricalBusinessRow,
|
|
3545
|
+
ax2 as normalizeHistoricalFieldConfig,
|
|
3546
|
+
b3 as normalizeRefLoaderResult,
|
|
3256
3547
|
normalizeRuntime,
|
|
3257
3548
|
parseFrontConfig,
|
|
3258
3549
|
parseRuntimeFieldPath,
|
|
3259
3550
|
parseUdi,
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3551
|
+
ay2 as pickObjectFieldKeys,
|
|
3552
|
+
az2 as recordSubtableRowAdd,
|
|
3553
|
+
aA as recordSubtableRowDelete,
|
|
3554
|
+
bf as refUtils,
|
|
3555
|
+
cr as relocateDeletedRowsToEnd,
|
|
3265
3556
|
renderUtils,
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3557
|
+
cs as requestMedProCheckDsData,
|
|
3558
|
+
ct as requestNonMedProCheckDsData,
|
|
3559
|
+
aB as resolveAnnotationFieldLocation,
|
|
3269
3560
|
ao as resolveDiagonalVertex,
|
|
3270
3561
|
t as resolveFieldRenderComponent,
|
|
3271
|
-
|
|
3272
|
-
|
|
3562
|
+
aC as resolveFormChangeRowUi,
|
|
3563
|
+
p2 as resolveObjectBomEntry,
|
|
3273
3564
|
r as resolveObjectFieldKeys,
|
|
3274
|
-
|
|
3565
|
+
aD as resolveRowFormChangeMark,
|
|
3275
3566
|
resolveUdiQuery,
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3567
|
+
q as runWithFillProduct,
|
|
3568
|
+
j as setSelectAnnotationId,
|
|
3569
|
+
aE as setSelectMobileTdId,
|
|
3279
3570
|
s as setSelectValidatorId,
|
|
3280
3571
|
aS as sqlUtils,
|
|
3281
|
-
|
|
3282
|
-
|
|
3572
|
+
cu as stockCheck,
|
|
3573
|
+
aF as stripLegacyFormConfigFromPaper,
|
|
3283
3574
|
transformUtils,
|
|
3284
|
-
|
|
3575
|
+
C as useDependency,
|
|
3285
3576
|
useEbrWikiFactoryV2,
|
|
3286
|
-
|
|
3577
|
+
F as useFieldPresentation,
|
|
3287
3578
|
u2 as useFormModel,
|
|
3288
3579
|
u as useFormTmplConfig,
|
|
3289
3580
|
useMaterialBalance,
|
|
3290
3581
|
useNocodeEmitter,
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3582
|
+
t2 as useNocodeFormWidget,
|
|
3583
|
+
cv as useOnlineFormActionButton,
|
|
3584
|
+
bn as useOnlineFormTransformField2Component,
|
|
3294
3585
|
useRenderPageFactory,
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3586
|
+
G as useRuntimeEditorFlusher,
|
|
3587
|
+
i as useRuntimeInstanceServices,
|
|
3588
|
+
k as useRuntimeRowState,
|
|
3589
|
+
A2 as useStyles,
|
|
3590
|
+
h as useWidgetStaticAttrs,
|
|
3300
3591
|
v as validateObjectBomForScan,
|
|
3301
3592
|
validateObjectBomQtyOnSubmit,
|
|
3302
3593
|
a_ as validateReinspectionDate
|