@gct-paas/excel 0.1.40-beta.1 → 0.1.40-beta.3
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-DXIDs5gk.js → BaseComponent-B9o59n-h.js} +2 -2
- package/dist/{VueVideoPlayer-DhyIm-g1.js → VueVideoPlayer-CAWYWBHi.js} +2 -2
- package/dist/{align-editor-BcbgVXRp.js → align-editor-a4DQt4Un.js} +1 -1
- package/dist/{barcode-design-BiCt0aS7.js → barcode-design-CBqUEPYu.js} +2 -2
- package/dist/base/index.es.js +234 -161
- package/dist/{diagonal-design-DmvWALIE.js → diagonal-design-u23896Ky.js} +2 -2
- package/dist/{dynamic-table-action-fDIIzS2J.js → dynamic-table-action-BWI4Gaqi.js} +208 -134
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DhWpxyhm.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BvrrN6te.js} +138 -132
- package/dist/{edit.utils-CXmmCnxE-DxArFSxZ.js → edit.utils-CXmmCnxE-XxpC8ALV.js} +1 -1
- package/dist/excel.css +3000 -4032
- package/dist/{exceljs.min-CjKNZPlo.js → exceljs.min-DfbB110X.js} +2 -2
- package/dist/{font-editor-DseGyVgB.js → font-editor-BtSCLMrM.js} +3 -3
- package/dist/{image-design-Dr-L9AdG.js → image-design-CtE-Lw7N.js} +2 -2
- package/dist/{index-BPgCZjqV.js → index-3WwCV4xR.js} +1 -1
- package/dist/{index-DKRpaNo1.js → index-51LtNdZ2.js} +1 -1
- package/dist/{index-DqLVW6ej.js → index-731OYkrc.js} +3 -3
- package/dist/{index-CXh-4yX8.js → index-7aS5L4ot.js} +3 -3
- package/dist/{index-DcjOJuDw.js → index-9S48hpoJ.js} +2 -2
- package/dist/{index-C4tVTc9U.js → index-B0cdcIWq.js} +2 -2
- package/dist/{index-CScWLXnC.js → index-BC8hQ4vo.js} +2 -2
- package/dist/{index-DKf57IGi.js → index-BFg5eUdY.js} +1 -1
- package/dist/{index-C6dFliaf.js → index-BGAcYDx-.js} +1 -1
- package/dist/{index-lwjRRvDn.js → index-BKXb3VJc.js} +2 -2
- package/dist/{index-BdJ4ouEl.js → index-BMoz_QhA.js} +1 -1
- package/dist/{index-BjI7JCne.js → index-BP-LhXXV.js} +4 -4
- package/dist/{index-BctQMMgh.js → index-BRQkrFQ9.js} +2 -2
- package/dist/{index-iRameN0x.js → index-Bc61F6Hm.js} +2 -2
- package/dist/{index-0W-MEvEf.js → index-BfBuxgcp.js} +2 -2
- package/dist/{index-B29_mID7.js → index-Bnb70qEi.js} +3 -3
- package/dist/{index-CAdGL3Vp.js → index-CAdDeEzJ.js} +2 -2
- package/dist/{index-r4MF8_-h.js → index-CIa37rQm.js} +2 -2
- package/dist/{index-B34ZIwqL.js → index-CL9K9orM.js} +2 -2
- package/dist/{index-DsCTXMxB.js → index-CPTGioxl.js} +1 -1
- package/dist/{index-4acBM2Lp.js → index-CVsoaxTR.js} +2 -2
- package/dist/{index-JkPJqZ_5.js → index-CYLAVQfT.js} +2 -2
- package/dist/{index-hcCJUBne.js → index-Ca9TLzUh.js} +1 -1
- package/dist/{index-CX_eR36M.js → index-CdHVHaxO.js} +2 -2
- package/dist/{index-BY7RGawr.js → index-CeEhYXl9.js} +2 -2
- package/dist/{index-CewKz2Ro.js → index-CpPk8P3L.js} +1 -1
- package/dist/{index-BxZ3M7eP.js → index-DNj0vFvx.js} +1 -1
- package/dist/{index-C8OPhJhI.js → index-DVEe11uM.js} +1 -1
- package/dist/{index-CEmRRPE7.js → index-DdWefZMa.js} +2 -2
- package/dist/{index-Nytm1-X9.js → index-DeHX7rte.js} +5 -4
- package/dist/{index-DNC5VG8P.js → index-Dyomjz3y.js} +2 -2
- package/dist/{index-DrmR7WIs.js → index-I1r5pfu5.js} +2 -2
- package/dist/{index-CJ9CrORT.js → index-IVc1dOet.js} +3 -3
- package/dist/{index-D5IrgJyh.js → index-aNV9T6LI.js} +2 -2
- package/dist/{index-C70T1sVm.js → index-ixQwAcB1.js} +18153 -20732
- package/dist/index.es.js +2 -2
- package/dist/{mb-render-BdRsSczc.js → mb-render-Bs9S9oFn.js} +2 -2
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-D32c_U8J.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-CRyGHP7k.js} +1 -1
- package/dist/{pagination-design-9Z_iRIKM.js → pagination-design-CmbsdlMe.js} +2 -2
- package/dist/paper-widget-design-DIhsk1I9.js +4 -0
- package/dist/{print-runtime-instance-BBOww4jg.js → print-runtime-instance-DQysbz5n.js} +1 -1
- package/dist/{print-snapshot-renderer-DGt44saz.js → print-snapshot-renderer-DWHjMsOC.js} +3 -3
- package/dist/{qrcode-design-qbUjPX-B.js → qrcode-design-CX0_2mLC.js} +1 -1
- package/dist/{revo-grid.entry-RzymRzb0.js → revo-grid.entry-DbmWFi7p.js} +1 -1
- package/dist/{revogr-attribution_7.entry-CxTEXm8Q.js → revogr-attribution_7.entry-BWQDu7fq.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-DQEid83u.js → revogr-clipboard_3.entry-BtTYHFZi.js} +2 -2
- package/dist/{revogr-data_4.entry-ASovYZWH.js → revogr-data_4.entry-CWPXyZ7g.js} +2 -2
- package/dist/{revogr-filter-panel.entry-j_V74kgz.js → revogr-filter-panel.entry-5gYct0XI.js} +1 -1
- package/dist/seal-design-BhzgwVju.js +4 -0
- package/dist/{serialnumber-design-DXKTYOY7.js → serialnumber-design-aSqL4gX6.js} +1 -1
- package/dist/shared/index.es.js +5 -5
- package/dist/{single-field-drop-CLjaHjL-.js → single-field-drop-C67wLHxK.js} +2 -2
- package/dist/{size-editor-C62H_eRP.js → size-editor-BHGTPLir.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/hooks/formula-params-cache.d.ts +15 -0
- package/dist/src/nocode-base/src/hooks/render-page/sterilization-date.d.ts +3 -0
- package/dist/src/nocode-base/src/hooks/useCalcFunction.d.ts +8 -2
- 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-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +1 -1
- 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/{sub-table-factory-sn1Ek1c9.js → sub-table-factory-DTtDvr17.js} +20 -7
- package/dist/{text-design-CwHfwel0.js → text-design-Dz0Qf2O3.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-BHDq1lM3.js → throttle-Cpk1LoGk-CgtsG2CV.js} +1 -1
- package/dist/{timediff-design-8kCO3aXz.js → timediff-design-D9JfNqH8.js} +1 -1
- package/dist/{trace-like-wrapper-CxPz9Trr.js → trace-like-wrapper-BXgr0Uv3.js} +2 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-CzEZ0CY7.js → value-editor.vue_vue_type_style_index_0_lang-doohzADY.js} +2 -2
- package/dist/web-render/index.es.js +3 -3
- package/dist/{widget-barcode-CRxh3tC2.js → widget-barcode-XF3nCU9v.js} +4 -4
- package/dist/{widget-diagonal-CO586oV2.js → widget-diagonal-DSym7fks.js} +3 -3
- package/dist/{widget-image-CE6kVnu5.js → widget-image-CmjwkVs7.js} +5 -5
- package/dist/{widget-line-Br4oIssb.js → widget-line-BX64xVfU.js} +2 -2
- package/dist/{widget-pagination-BHwjrBV5.js → widget-pagination-BV89Lvjt.js} +5 -5
- package/dist/{widget-power-BySYsE15.js → widget-power-DoSfQv92.js} +3 -3
- package/dist/{widget-qrcode-D6b0T_Qa.js → widget-qrcode-UGcRLC56.js} +3 -3
- package/dist/{widget-rangelimit-DTH7nrqC.js → widget-rangelimit-CUHD__1H.js} +3 -3
- package/dist/{widget-serialnumber-DVtxhNC3.js → widget-serialnumber-CAkZR5Xl.js} +1 -1
- package/dist/{widget-text-gBGybAXk.js → widget-text-DtYVTThu.js} +5 -5
- package/dist/{widget-timediff-aY-maVkE.js → widget-timediff-DX_IoCMO.js} +2 -2
- package/package.json +2 -2
- package/dist/paper-widget-design-BGotQsIf.js +0 -4
- package/dist/seal-design-DP1XaAY8.js +0 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { reactive, toRaw, computed, watch, onScopeDispose, inject, h, shallowReactive, markRaw, ref, nextTick, toRef, provide, defineComponent, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, Fragment, renderList, onUnmounted, isVNode, onMounted, onBeforeMount, resolveComponent, createBlock, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import { ai as CellWidgetViewState, F as FIELD_TYPE,
|
|
2
|
+
import { ai as CellWidgetViewState, F as FIELD_TYPE, b6 as RenderModeEnum, Y as FormTypeEnum, bC as BpmnNodeTypeEnum, cv as getFieldPlaceholder, bU as MobileFillTypeEnum, C as ComponentTypeEnum, $ as PlatformEnum, cw as isReferenceOptionActive, o as api, bs as uuid2, c2 as calcUtils, bh as findRuntimeTableRow, c6 as ensureTableRowKeys, b$ as bindRuntimeTableColumns, bg as getRowId, cx as FRONT_ROW_KEY, cl as isTableRowKeyMatch, bu as isAttachFieldActive, cy as filterRulesByTrigger, cz as isEmptyValue$1, c3 as decodeTableCellRowKey, c5 as ensureFrontRowKey, a_ as getParseRuleInfo, aF as transformUtils, aW as materialCheck, aX as getLotLockedReason, aY as validateReinspectionDate, bl as FormulaRuleFieldKeyEnum, f as SubTableType, a$ as getParseRuleValue, cA as buildError, H as CreateType, bj as findRuntimeParentRow, aI as Dependency_ENUM, aH as ASSIGNMENTSTRATEGY_ENUM, bH as commonUtils, aM as DeviceLink, a8 as _export_sfc, cf as getRenderedRuntimeTableCell, z as CellType, cp as relocateDeletedRowsToEnd, cB as resetTableRowIdentity, J as useModal, cC as q, cD as QUICK_FILL_ALLOWED_FIELDS, cE as groupFixedTableRows, cF as processQuickFillRows, cG as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BvrrN6te.js";
|
|
3
3
|
import { cloneDeep, isEmpty, has, pickBy, isNil, mergeWith, omit, last, pick, merge } from "lodash-es";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import { a as useNamespace, I as Icon } from "./AntdIcon-DCIaV352.js";
|
|
6
6
|
import "@gct-paas/form-base";
|
|
7
7
|
import { Modal, message } from "ant-design-vue";
|
|
8
|
-
import { u as useFormModel } from "./mb-render-
|
|
8
|
+
import { u as useFormModel } from "./mb-render-Bs9S9oFn.js";
|
|
9
9
|
var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
|
|
10
10
|
MaterialConsumptionPatternEnum2["RECORD"] = "record";
|
|
11
11
|
MaterialConsumptionPatternEnum2["BOM"] = "bom";
|
|
@@ -958,6 +958,8 @@ function convertV1Runtime(runtime) {
|
|
|
958
958
|
return { schemaVersion: 1, formConfig, sheets: [sheet] };
|
|
959
959
|
}
|
|
960
960
|
const MULTI_SHEET_SCHEMA_VERSION = 2;
|
|
961
|
+
const MAX_RUNTIME_SHEETS = 100;
|
|
962
|
+
const MAX_RUNTIME_SHEET_TITLE_LENGTH = 255;
|
|
961
963
|
function assertObject(value, message2) {
|
|
962
964
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(message2);
|
|
963
965
|
}
|
|
@@ -1023,7 +1025,9 @@ function normalizeRuntime(runtime) {
|
|
|
1023
1025
|
if (!Array.isArray(runtime.sheets) || runtime.sheets.length === 0) {
|
|
1024
1026
|
throw new Error("多 Sheet 运行时至少需要一个工作表");
|
|
1025
1027
|
}
|
|
1026
|
-
if (runtime.sheets.length >
|
|
1028
|
+
if (runtime.sheets.length > MAX_RUNTIME_SHEETS) {
|
|
1029
|
+
throw new Error(`每份表单最多支持 ${MAX_RUNTIME_SHEETS} 个工作表`);
|
|
1030
|
+
}
|
|
1027
1031
|
const formConfig = runtime.formConfig ?? {};
|
|
1028
1032
|
assertObject(formConfig, "多 Sheet 运行时的 formConfig 格式无效");
|
|
1029
1033
|
const ids = /* @__PURE__ */ new Set();
|
|
@@ -1034,7 +1038,9 @@ function normalizeRuntime(runtime) {
|
|
|
1034
1038
|
const sheetId = String(rawSheet.sheetId ?? "").trim();
|
|
1035
1039
|
const title = String(rawSheet.title ?? "").trim();
|
|
1036
1040
|
if (!sheetId) throw new Error(`第 ${index + 1} 个工作表缺少 sheetId`);
|
|
1037
|
-
if (!title || title.length >
|
|
1041
|
+
if (!title || title.length > MAX_RUNTIME_SHEET_TITLE_LENGTH) {
|
|
1042
|
+
throw new Error(`工作表名称必须为 1 到 ${MAX_RUNTIME_SHEET_TITLE_LENGTH} 个字符:${title}`);
|
|
1043
|
+
}
|
|
1038
1044
|
if (ids.has(sheetId)) throw new Error(`重复的 sheetId:${sheetId}`);
|
|
1039
1045
|
if (titles.has(title)) throw new Error(`重复的工作表名称:${title}`);
|
|
1040
1046
|
ids.add(sheetId);
|
|
@@ -1731,12 +1737,28 @@ class RuntimeFormStateStore {
|
|
|
1731
1737
|
incoming.forEach((savedRow) => {
|
|
1732
1738
|
const rowKey = savedRow?.[FRONT_ROW_KEY];
|
|
1733
1739
|
const savedId = savedRow?.id_;
|
|
1734
|
-
|
|
1740
|
+
let currentRow = target.find((row) => {
|
|
1735
1741
|
if (!row || typeof row !== "object") return false;
|
|
1736
1742
|
if (rowKey != null && isTableRowKeyMatch(rowKey, row[FRONT_ROW_KEY])) return true;
|
|
1737
1743
|
return savedId != null && row.id_ != null && String(row.id_) === String(savedId);
|
|
1738
1744
|
});
|
|
1739
|
-
|
|
1745
|
+
let matchedByGroup = false;
|
|
1746
|
+
if (!currentRow && Array.isArray(savedRow?._2DTABLE_) && savedRow.group_ != null && String(savedRow.group_).trim() !== "") {
|
|
1747
|
+
const matchingGroups = target.filter(
|
|
1748
|
+
(row) => Array.isArray(row?._2DTABLE_) && row.group_ != null && String(row.group_) === String(savedRow.group_)
|
|
1749
|
+
);
|
|
1750
|
+
if (matchingGroups.length === 1) {
|
|
1751
|
+
currentRow = matchingGroups[0];
|
|
1752
|
+
matchedByGroup = true;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
if (currentRow) {
|
|
1756
|
+
this.mergeSavedMetadata(
|
|
1757
|
+
currentRow,
|
|
1758
|
+
matchedByGroup ? { ...savedRow, [FRONT_ROW_KEY]: currentRow[FRONT_ROW_KEY] } : savedRow,
|
|
1759
|
+
path
|
|
1760
|
+
);
|
|
1761
|
+
}
|
|
1740
1762
|
});
|
|
1741
1763
|
return target;
|
|
1742
1764
|
}
|
|
@@ -1832,6 +1854,7 @@ class RuntimeAsyncTaskCoordinator {
|
|
|
1832
1854
|
fieldIdentity: options.fieldIdentity,
|
|
1833
1855
|
sheetId: options.sheetId,
|
|
1834
1856
|
required: options.required !== false,
|
|
1857
|
+
blockOnFailure: options.blockOnFailure !== false,
|
|
1835
1858
|
status: "pending",
|
|
1836
1859
|
sequence,
|
|
1837
1860
|
promise: task,
|
|
@@ -1875,7 +1898,7 @@ class RuntimeAsyncTaskCoordinator {
|
|
|
1875
1898
|
* 等待全部 required 任务达到稳定状态。
|
|
1876
1899
|
*
|
|
1877
1900
|
* 一轮任务完成后的字段回填可能触发新的公式或远程任务,因此这里循环读取任务表,直到
|
|
1878
|
-
* 没有新的 pending required
|
|
1901
|
+
* 没有新的 pending required 任务。稳定后只检查需要阻断提交的失败项。
|
|
1879
1902
|
*/
|
|
1880
1903
|
async waitForRequired(keyPrefix) {
|
|
1881
1904
|
const matches = (task) => task.required && (!keyPrefix || task.key.startsWith(keyPrefix));
|
|
@@ -1887,7 +1910,7 @@ class RuntimeAsyncTaskCoordinator {
|
|
|
1887
1910
|
await Promise.allSettled(pending.map((task) => task.promise));
|
|
1888
1911
|
}
|
|
1889
1912
|
const failed = Array.from(this.tasks.values()).filter(
|
|
1890
|
-
(task) => matches(task) && task.status === "rejected"
|
|
1913
|
+
(task) => matches(task) && task.blockOnFailure && task.status === "rejected"
|
|
1891
1914
|
);
|
|
1892
1915
|
if (failed.length) {
|
|
1893
1916
|
const details = failed.map((task) => {
|
|
@@ -3233,11 +3256,12 @@ class RuntimeValidationService {
|
|
|
3233
3256
|
this.pendingLive = this.pendingLive === "blur" ? "blur" : trigger;
|
|
3234
3257
|
if (this.liveTimer) clearTimeout(this.liveTimer);
|
|
3235
3258
|
this.liveTimer = void 0;
|
|
3236
|
-
if (immediate)
|
|
3259
|
+
if (immediate)
|
|
3260
|
+
void this.flushLive().catch((error) => this.logBackgroundError("字段校验失败", error));
|
|
3237
3261
|
else
|
|
3238
3262
|
this.liveTimer = setTimeout(() => {
|
|
3239
3263
|
this.liveTimer = void 0;
|
|
3240
|
-
void this.flushLive().catch((error) =>
|
|
3264
|
+
void this.flushLive().catch((error) => this.logBackgroundError("字段校验失败", error));
|
|
3241
3265
|
}, 300);
|
|
3242
3266
|
}
|
|
3243
3267
|
async flushLive() {
|
|
@@ -3259,11 +3283,17 @@ class RuntimeValidationService {
|
|
|
3259
3283
|
this.displayTimer = void 0;
|
|
3260
3284
|
const run = () => {
|
|
3261
3285
|
this.displayTimer = void 0;
|
|
3262
|
-
void this.validate("display").catch(
|
|
3286
|
+
void this.validate("display").catch(
|
|
3287
|
+
(error) => this.logBackgroundError("字段展示校验失败", error)
|
|
3288
|
+
);
|
|
3263
3289
|
};
|
|
3264
3290
|
if (immediate) run();
|
|
3265
3291
|
else this.displayTimer = setTimeout(run, 320);
|
|
3266
3292
|
}
|
|
3293
|
+
logBackgroundError(label, error) {
|
|
3294
|
+
if (error instanceof Error && error.message.startsWith("以下异步任务执行失败:")) return;
|
|
3295
|
+
console.error(label, error);
|
|
3296
|
+
}
|
|
3267
3297
|
pruneComments() {
|
|
3268
3298
|
if (!this.binding || this.disposed) return;
|
|
3269
3299
|
this.binding.applyComments(
|
|
@@ -4596,7 +4626,16 @@ class BomEntriesValidator {
|
|
|
4596
4626
|
memberIndexes.push(idx);
|
|
4597
4627
|
if (byLot && !row.material_no_) emptyLotIndexes.push(idx);
|
|
4598
4628
|
});
|
|
4599
|
-
const
|
|
4629
|
+
const targetExists = this.groupExistsInTable(arr, target);
|
|
4630
|
+
if (!targetExists) {
|
|
4631
|
+
const index = arr.findIndex((row2) => !row2.deleted_);
|
|
4632
|
+
const row = arr[index];
|
|
4633
|
+
const canReuse = row && !row.product_id_ && !row.bom_entry_id_ && !row.is_confirmed_ && arr.every((item, idx) => item.deleted_ || idx === index);
|
|
4634
|
+
if (canReuse) {
|
|
4635
|
+
emptyProductIndexes.push(index);
|
|
4636
|
+
}
|
|
4637
|
+
}
|
|
4638
|
+
const needInsert = !targetExists && emptyProductIndexes.length === 0;
|
|
4600
4639
|
const last2 = memberIndexes[memberIndexes.length - 1];
|
|
4601
4640
|
let groupInsertIndex = -1;
|
|
4602
4641
|
if (needInsert) {
|
|
@@ -6714,39 +6753,71 @@ class SubTableCore {
|
|
|
6714
6753
|
console.log(this.ctx.widget.props.tableTitle, "处理表单按钮点击事件", params);
|
|
6715
6754
|
}
|
|
6716
6755
|
}
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6756
|
+
const STORAGE_KEY = "gct:formula:params:v1";
|
|
6757
|
+
const PARAMS_CHANGED_EVENT = "gct:formula-params-updated:v1";
|
|
6758
|
+
function emptyConfig() {
|
|
6759
|
+
return {
|
|
6760
|
+
routingParamList: [],
|
|
6761
|
+
inspectionParamList: [],
|
|
6762
|
+
deviceParamList: []
|
|
6763
|
+
};
|
|
6724
6764
|
}
|
|
6725
|
-
|
|
6726
|
-
if (!
|
|
6727
|
-
|
|
6765
|
+
function normalizeList(value) {
|
|
6766
|
+
if (!Array.isArray(value)) return [];
|
|
6767
|
+
return value.filter(
|
|
6768
|
+
(item) => item !== null && typeof item === "object" && typeof item.customFieldKey === "string"
|
|
6769
|
+
);
|
|
6770
|
+
}
|
|
6771
|
+
function normalizeConfig(value) {
|
|
6772
|
+
const data = value !== null && typeof value === "object" ? value : {};
|
|
6773
|
+
return {
|
|
6774
|
+
routingParamList: normalizeList(data.routingParamList),
|
|
6775
|
+
inspectionParamList: normalizeList(data.inspectionParamList),
|
|
6776
|
+
deviceParamList: normalizeList(data.deviceParamList)
|
|
6777
|
+
};
|
|
6778
|
+
}
|
|
6779
|
+
let lastRaw;
|
|
6780
|
+
let cachedConfig = emptyConfig();
|
|
6781
|
+
function readFormulaParamsConfig() {
|
|
6782
|
+
const raw = window.localStorage.getItem(STORAGE_KEY);
|
|
6783
|
+
if (raw !== lastRaw) {
|
|
6784
|
+
try {
|
|
6785
|
+
cachedConfig = normalizeConfig(raw ? JSON.parse(raw) : null);
|
|
6786
|
+
} catch {
|
|
6787
|
+
cachedConfig = emptyConfig();
|
|
6788
|
+
}
|
|
6789
|
+
lastRaw = raw;
|
|
6790
|
+
}
|
|
6791
|
+
return cachedConfig;
|
|
6792
|
+
}
|
|
6793
|
+
const currentParamsConfig = {
|
|
6794
|
+
get routingParamList() {
|
|
6795
|
+
return readFormulaParamsConfig().routingParamList;
|
|
6796
|
+
},
|
|
6797
|
+
get inspectionParamList() {
|
|
6798
|
+
return readFormulaParamsConfig().inspectionParamList;
|
|
6728
6799
|
}
|
|
6729
|
-
const config = paramList?.find((e) => e.customFieldKey === key);
|
|
6730
|
-
if (!config) return null;
|
|
6731
|
-
const { upperLimit, lowerLimit } = config;
|
|
6732
|
-
if (lowerLimit == null || upperLimit == null) return null;
|
|
6733
|
-
const actual = Number(value);
|
|
6734
|
-
const min = Number(config.lowerLimit);
|
|
6735
|
-
const max = Number(config.upperLimit);
|
|
6736
|
-
if (![actual, min, max].every(Number.isFinite)) return null;
|
|
6737
|
-
return actual >= min && actual <= max;
|
|
6738
|
-
}
|
|
6739
|
-
const FORMULA_FUNCS = {
|
|
6740
|
-
RoutingParamCheck: (key, value) => CALC_IS_QUALIFIED(key, value, currentParamsConfig.routingParamList || []),
|
|
6741
|
-
InspectionParamCheck: (key, value) => CALC_IS_QUALIFIED(key, value, currentParamsConfig.inspectionParamList || []),
|
|
6742
|
-
DeviceParamCheck: (key, value) => CALC_IS_QUALIFIED(key, value, currentParamsConfig.deviceParamList || [])
|
|
6743
6800
|
};
|
|
6744
|
-
function
|
|
6745
|
-
const
|
|
6746
|
-
if (
|
|
6747
|
-
|
|
6748
|
-
|
|
6801
|
+
function setFormulaParamsConfig(paramsConfig = {}) {
|
|
6802
|
+
const raw = JSON.stringify(normalizeConfig(paramsConfig));
|
|
6803
|
+
if (window.localStorage.getItem(STORAGE_KEY) === raw) return;
|
|
6804
|
+
window.localStorage.setItem(STORAGE_KEY, raw);
|
|
6805
|
+
window.dispatchEvent(new Event(PARAMS_CHANGED_EVENT));
|
|
6806
|
+
}
|
|
6807
|
+
const boundCalculators = /* @__PURE__ */ new WeakSet();
|
|
6808
|
+
function bindFormulaCacheInvalidation(value) {
|
|
6809
|
+
if (typeof value !== "function") return;
|
|
6810
|
+
const calculator = value;
|
|
6811
|
+
if (typeof calculator.clear !== "function" || boundCalculators.has(calculator)) return;
|
|
6812
|
+
boundCalculators.add(calculator);
|
|
6813
|
+
const clearCache = () => calculator.clear();
|
|
6814
|
+
window.addEventListener(PARAMS_CHANGED_EVENT, clearCache);
|
|
6815
|
+
window.addEventListener("storage", (event) => {
|
|
6816
|
+
if (event.storageArea === window.localStorage && (event.key === STORAGE_KEY || event.key === null)) {
|
|
6817
|
+
clearCache();
|
|
6818
|
+
}
|
|
6749
6819
|
});
|
|
6820
|
+
clearCache();
|
|
6750
6821
|
}
|
|
6751
6822
|
function getGroupProductIds(entry) {
|
|
6752
6823
|
const ids = [entry.product_id_];
|
|
@@ -8746,7 +8817,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
8746
8817
|
const {
|
|
8747
8818
|
showDisplayStatus,
|
|
8748
8819
|
dataRelationShip
|
|
8749
|
-
} = useWidgetStaticAttrs(props);
|
|
8820
|
+
} = useWidgetStaticAttrs(props.widget);
|
|
8750
8821
|
const sheetId = () => fields.value?.findWidgetById(props.widget.id)?.sheetId;
|
|
8751
8822
|
const formModelController = useFormModel().injectController();
|
|
8752
8823
|
const tableController = props.tableController;
|
|
@@ -10279,109 +10350,112 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10279
10350
|
});
|
|
10280
10351
|
const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53d7e66c"]]);
|
|
10281
10352
|
export {
|
|
10282
|
-
|
|
10283
|
-
|
|
10353
|
+
normalizeRuntime as $,
|
|
10354
|
+
normalizeHistoricalAutofillRow as A,
|
|
10284
10355
|
BorderTD as B,
|
|
10285
|
-
|
|
10356
|
+
parseRuntimeFieldPath as C,
|
|
10286
10357
|
DEFAULT_BOOLEAN_FIELD_WIDTH as D,
|
|
10287
10358
|
EMPTY_PRODUCT_VERSION_ID as E,
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10359
|
+
useStyles as F,
|
|
10360
|
+
useDependency as G,
|
|
10361
|
+
useFieldPresentation as H,
|
|
10362
|
+
useRuntimeEditorFlusher as I,
|
|
10363
|
+
createRuntimeInstanceContext as J,
|
|
10364
|
+
RuntimeInstanceRegistry as K,
|
|
10365
|
+
RequiredQtyCalcRule as L,
|
|
10366
|
+
MAX_RUNTIME_SHEETS as M,
|
|
10296
10367
|
NCB_PROVIDE as N,
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10368
|
+
DocumentPaper as O,
|
|
10369
|
+
DynamicTableAction as P,
|
|
10370
|
+
getRuntimeDataFieldId as Q,
|
|
10300
10371
|
RuntimeFormStateStore as R,
|
|
10301
10372
|
ScanParamType as S,
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10373
|
+
buildRuntimeFieldPath as T,
|
|
10374
|
+
resolveRuntimeFieldProps as U,
|
|
10375
|
+
resolveRuntimeFieldState as V,
|
|
10376
|
+
getRuntimeDependencyOutputKey as W,
|
|
10377
|
+
isRowAddedInCurrentFormChange as X,
|
|
10378
|
+
MaterialConsumeTableController as Y,
|
|
10379
|
+
setFormulaParamsConfig as Z,
|
|
10309
10380
|
_sfc_main$5 as _,
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10381
|
+
MAX_RUNTIME_SHEET_TITLE_LENGTH as a,
|
|
10382
|
+
RuntimeSheetService as a0,
|
|
10383
|
+
validateObjectBomQtyOnSubmit as a1,
|
|
10384
|
+
closeValidatorPopovers as a2,
|
|
10385
|
+
enrichFormChangeRowDetails as a3,
|
|
10386
|
+
useMaterialBalance as a4,
|
|
10387
|
+
collectFormChangeFieldLocations as a5,
|
|
10388
|
+
nextFormChangeRowViewHistoryId as a6,
|
|
10389
|
+
DeviceConnector as a7,
|
|
10390
|
+
DocumentLoading as a8,
|
|
10391
|
+
DynamicQuickFillModal as a9,
|
|
10392
|
+
recordSubtableRowAdd as aA,
|
|
10393
|
+
recordSubtableRowDelete as aB,
|
|
10394
|
+
resolveAnnotationFieldLocation as aC,
|
|
10395
|
+
resolveFormChangeRowUi as aD,
|
|
10396
|
+
resolveRowFormChangeMark as aE,
|
|
10397
|
+
setSelectMobileTdId as aF,
|
|
10398
|
+
stripLegacyFormConfigFromPaper as aG,
|
|
10399
|
+
SubTableActionMenuTypeEnum as aH,
|
|
10400
|
+
getMenuByAction as aI,
|
|
10401
|
+
SubTableActionEnum as aJ,
|
|
10402
|
+
resolveScanFillData as aK,
|
|
10403
|
+
getInsertSubMenu as aL,
|
|
10404
|
+
resolveScanAdjustType as aM,
|
|
10405
|
+
resolveScanQty as aN,
|
|
10406
|
+
toDateOnly as aO,
|
|
10407
|
+
getCopySubMenu as aP,
|
|
10408
|
+
resolveScanParsedValue as aQ,
|
|
10409
|
+
isProductBatchEmptyRow as aR,
|
|
10410
|
+
FixedQuickFillModal as aa,
|
|
10411
|
+
FormTmplConfigController as ab,
|
|
10412
|
+
LEGACY_RUNTIME_FORM_CONFIG_KEYS as ac,
|
|
10413
|
+
LEGACY_RUNTIME_SHEET_ID as ad,
|
|
10414
|
+
LEGACY_RUNTIME_SHEET_TITLE as ae,
|
|
10415
|
+
MCDataUtil as af,
|
|
10416
|
+
OCR_MODEL_PRECISION_ENUM_KEY as ag,
|
|
10417
|
+
RuntimeAsyncTaskCoordinator as ah,
|
|
10418
|
+
RuntimeDependencyService as ai,
|
|
10419
|
+
RuntimeFieldRegistry as aj,
|
|
10420
|
+
RuntimeInstanceEventBus as ak,
|
|
10421
|
+
RuntimePersistenceCoordinator as al,
|
|
10422
|
+
RuntimeValidationService as am,
|
|
10423
|
+
SubTableCore as an,
|
|
10424
|
+
buildFormChangeDisplayRows as ao,
|
|
10425
|
+
convertV1Runtime as ap,
|
|
10426
|
+
detailsHaveFormChangeRowOps as aq,
|
|
10427
|
+
extractFormChangeRowDetails as ar,
|
|
10428
|
+
getFormChangeRowKey as as,
|
|
10429
|
+
getFormChangeRowOp as at,
|
|
10430
|
+
getSubTableQuickFillInfo as au,
|
|
10431
|
+
isAnnLocationSelected as av,
|
|
10432
|
+
isBlank as aw,
|
|
10433
|
+
isFormChangeGhostRow as ax,
|
|
10434
|
+
normalizeHistoricalFieldConfig as ay,
|
|
10435
|
+
pickObjectFieldKeys as az,
|
|
10436
|
+
bindFormulaCacheInvalidation as b,
|
|
10437
|
+
currentParamsConfig as c,
|
|
10438
|
+
MULTI_SHEET_SCHEMA_VERSION as d,
|
|
10439
|
+
createRuntimeDocumentV2 as e,
|
|
10440
|
+
normalizeHistoricalBusinessRow as f,
|
|
10367
10441
|
getBusinessFieldKey as g,
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10442
|
+
DeviceLinkTmplUtil as h,
|
|
10443
|
+
normalizeAIOcrTmpl as i,
|
|
10444
|
+
useWidgetStaticAttrs as j,
|
|
10445
|
+
useRuntimeInstanceServices as k,
|
|
10446
|
+
setSelectAnnotationId as l,
|
|
10447
|
+
useRuntimeRowState as m,
|
|
10374
10448
|
normalizeFieldWidth as n,
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10449
|
+
getObjectBomMaterialLotQuery as o,
|
|
10450
|
+
buildObjectLotExtraQuery as p,
|
|
10451
|
+
MaterialConsumptionPatternEnum as q,
|
|
10378
10452
|
resolveObjectFieldKeys as r,
|
|
10379
10453
|
setSelectValidatorId as s,
|
|
10380
|
-
|
|
10454
|
+
resolveObjectBomEntry as t,
|
|
10381
10455
|
useFormTmplConfig as u,
|
|
10382
10456
|
validateObjectBomForScan as v,
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10457
|
+
runWithFillProduct as w,
|
|
10458
|
+
useNocodeFormWidget as x,
|
|
10459
|
+
applyConsumeObjectTraceChange as y,
|
|
10460
|
+
getObjectBomProductQuery as z
|
|
10387
10461
|
};
|