@gct-paas/excel 0.1.39-beta.1 → 0.1.39-beta.10
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-wXAepA6P.js → BaseComponent-Dri2NRAY.js} +2 -2
- package/dist/{VueVideoPlayer-C--qHZWs.js → VueVideoPlayer-DPJyefX-.js} +2 -2
- package/dist/{align-editor-BMFoEgQf.js → align-editor-BvGUsoz3.js} +1 -1
- package/dist/{barcode-design-M3FjUJNm.js → barcode-design-BIAenf34.js} +2 -2
- package/dist/base/index.es.js +128 -107
- package/dist/{diagonal-design-C2lATeRX.js → diagonal-design-Bg0Wzojk.js} +2 -2
- package/dist/{dynamic-table-action-Cm8HO12b.js → dynamic-table-action-BQfJFJ4j.js} +178 -103
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CYRNF_U3.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DZRtpBe8.js} +288 -213
- package/dist/{edit.utils-CXmmCnxE-CaZuzVd6.js → edit.utils-CXmmCnxE-CvJGxh2v.js} +1 -1
- package/dist/excel.css +257 -142
- package/dist/{exceljs.min-CeIQpaOT.js → exceljs.min-oMo9w3-p.js} +2 -2
- package/dist/{font-editor-CPn2F_OZ.js → font-editor-JT-C4KUo.js} +3 -3
- package/dist/{image-design-DWjjBFQa.js → image-design-A8_t4F3t.js} +2 -2
- package/dist/{index-DxCN78vg.js → index-1Aq6q-wr.js} +3 -3
- package/dist/{index-BatfBVeN.js → index-3clyu1Q_.js} +4 -4
- package/dist/{index-B72KgWBu.js → index-B-Kwr44d.js} +1 -1
- package/dist/{index-DtS3ze0S.js → index-B8Vkmyc8.js} +3 -3
- package/dist/{index-DTSHn9ii.js → index-BE-3UQG0.js} +5 -4
- package/dist/{index-B3oqnny_.js → index-BLmR9aiG.js} +1 -1
- package/dist/{index-DSSJ8S81.js → index-BUK-p31i.js} +2 -2
- package/dist/{index-DC8dEMj4.js → index-B_GyS-E2.js} +1 -1
- package/dist/{index-CRGOLDI8.js → index-Bs8Xs0bo.js} +1 -1
- package/dist/{index-DqQ2ZxDn.js → index-C3k8QiLF.js} +2 -2
- package/dist/{index-CWmsgguT.js → index-CISAQtLd.js} +3 -3
- package/dist/{index-DdVlAV0_.js → index-CJdwj04Z.js} +1 -1
- package/dist/{index-BuNKNsIb.js → index-CJiOtrhx.js} +2 -2
- package/dist/{index-OIXBBHHu.js → index-CRloZ0HP.js} +2 -2
- package/dist/{index-ClVsGQoQ.js → index-CTASuQPn.js} +1 -1
- package/dist/{index-BrZiEGAB.js → index-Caygbi4F.js} +2 -2
- package/dist/{index-CNlb3Y3A.js → index-CfGLFrkj.js} +1 -1
- package/dist/{index-B3S5QpVz.js → index-Cls_jFJq.js} +700 -528
- package/dist/{index-C3GHvYcj.js → index-Cqcbgcw7.js} +2 -2
- package/dist/{index-CpN3c_Lk.js → index-D1jXU0ka.js} +2 -2
- package/dist/{index-mA7F37nK.js → index-D9444n1O.js} +2 -2
- package/dist/{index-CIiCyyBv.js → index-D9OUmbBs.js} +1 -1
- package/dist/{index-DhkQma-u.js → index-DERot0lx.js} +3 -3
- package/dist/{index-DHPRpllA.js → index-DFNVqlgA.js} +1 -1
- package/dist/{index-BEQELF4E.js → index-DIythXNr.js} +3 -3
- package/dist/{index-ChRhjdl_.js → index-DPHGDezJ.js} +1 -1
- package/dist/{index-Cg0trWkY.js → index-DT8qwYke.js} +2 -2
- package/dist/{index-pxBPpLrG.js → index-DWVhXPb-.js} +2 -2
- package/dist/{index-BcpTVyHa.js → index-DY7Xkd8n.js} +2 -2
- package/dist/{index-C__Qm3ub.js → index-DkwkBWEP.js} +2 -2
- package/dist/{index-yfTjcRJ8.js → index-DmBx27M9.js} +2 -2
- package/dist/{index-gra19syg.js → index-DsLZqLga.js} +2 -2
- package/dist/{index-CED1SWU9.js → index-H2nF4SP8.js} +2 -2
- package/dist/{index-CcBF1mOx.js → index-afC-rHNa.js} +2 -2
- package/dist/{index-BZcapeWR.js → index-bH6ERrWd.js} +2 -2
- package/dist/index.es.js +2 -2
- package/dist/{mb-render-BZXw-tG7.js → mb-render-DybPk-KF.js} +2 -2
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-uXt_kyMo.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-BEX02BrW.js} +1 -1
- package/dist/{pagination-design-CCRMgYhc.js → pagination-design-Ct6xpKO9.js} +2 -2
- package/dist/paper-widget-design-CEEWgUk_.js +4 -0
- package/dist/{print-runtime-instance-MA7UVZdA.js → print-runtime-instance-7aZCZWS4.js} +1 -1
- package/dist/{print-snapshot-renderer-BavXucNu.js → print-snapshot-renderer-DPFZBXE2.js} +3 -3
- package/dist/{qrcode-design-BC1PBKf_.js → qrcode-design-SOVTkKjY.js} +1 -1
- package/dist/{revo-grid.entry-DjiOpHRm.js → revo-grid.entry-EvEm_y2W.js} +1 -1
- package/dist/{revogr-attribution_7.entry-CDnB9lLs.js → revogr-attribution_7.entry-DgE6PR1L.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-C6O9JrN7.js → revogr-clipboard_3.entry-CNDxeVhF.js} +2 -2
- package/dist/{revogr-data_4.entry-y1feqF9h.js → revogr-data_4.entry-DKwV9DMF.js} +2 -2
- package/dist/{revogr-filter-panel.entry-By9rD4Y9.js → revogr-filter-panel.entry-1SAhHHfl.js} +1 -1
- package/dist/seal-design-DukOrO2g.js +4 -0
- package/dist/{serialnumber-design-Bb75HRGq.js → serialnumber-design-Cs3B0ZNE.js} +1 -1
- package/dist/shared/index.es.js +6 -6
- package/dist/{single-field-drop-BlAQcTBT.js → single-field-drop-C-i51iU4.js} +2 -2
- package/dist/{size-editor-BWnv8oH4.js → size-editor-B2TfX4_r.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/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-form-state-store.d.ts +6 -0
- package/dist/src/nocode-base/src/runtime/runtime-validation-service.d.ts +1 -0
- package/dist/src/nocode-base/src/runtime/table-row-identity.d.ts +11 -2
- package/dist/src/nocode-base/src/types/fields/i-sign.d.ts +1 -1
- 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/designer/conversions/normalize-paper-grid.d.ts +3 -0
- package/dist/src/online-form/src/views/render/sheet-tab-bar.vue.d.ts +5 -3
- package/dist/src/shared/components/Signature/logic/index.d.ts +1 -1
- package/dist/{sub-table-factory-CGELiUkd.js → sub-table-factory-CNkIUJTC.js} +20 -7
- package/dist/{text-design-CiWiGhwN.js → text-design-B-VmJzZy.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-B466AVFI.js → throttle-Cpk1LoGk-Ch-cqj2G.js} +1 -1
- package/dist/{timediff-design-CnCXGLgF.js → timediff-design-DASqeRcJ.js} +1 -1
- package/dist/{trace-like-wrapper-CPFayyjF.js → trace-like-wrapper-Cj-nluW3.js} +2 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-DyTtWYrg.js → value-editor.vue_vue_type_style_index_0_lang-D5fckkvA.js} +2 -2
- package/dist/web-render/index.es.js +3 -3
- package/dist/{widget-barcode-DMt5IwNO.js → widget-barcode-BOseDEJ_.js} +4 -4
- package/dist/{widget-diagonal-D073XXKw.js → widget-diagonal-CzWRf_zr.js} +3 -3
- package/dist/{widget-image-Bc-6H2uA.js → widget-image-CNtyaz7J.js} +5 -5
- package/dist/{widget-line-BtfMvVGp.js → widget-line-CrOS0l_-.js} +2 -2
- package/dist/{widget-pagination-CIlAAI2a.js → widget-pagination-wCWG30o6.js} +5 -5
- package/dist/{widget-power-Bu16c4bS.js → widget-power-ayN9em_Q.js} +3 -3
- package/dist/{widget-qrcode-AfILjhmH.js → widget-qrcode-CZatrCp4.js} +3 -3
- package/dist/{widget-rangelimit-B-mhBJN4.js → widget-rangelimit-CzboyNIZ.js} +3 -3
- package/dist/{widget-serialnumber-DVoe5bqh.js → widget-serialnumber-CHCW116y.js} +1 -1
- package/dist/{widget-text-DWNEbQUk.js → widget-text-rVl_vy60.js} +5 -5
- package/dist/{widget-timediff-B2mjc1qy.js → widget-timediff-BhTa83S9.js} +2 -2
- package/package.json +1 -1
- package/dist/paper-widget-design-BbQeY4Hv.js +0 -4
- package/dist/seal-design-CN_B6div.js +0 -4
|
@@ -1,10 +1,10 @@
|
|
|
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, b8 as RenderModeEnum, Y as FormTypeEnum, bE as BpmnNodeTypeEnum,
|
|
2
|
+
import { ai as CellWidgetViewState, F as FIELD_TYPE, b8 as RenderModeEnum, Y as FormTypeEnum, bE as BpmnNodeTypeEnum, cv as getFieldPlaceholder, bV as MobileFillTypeEnum, C as ComponentTypeEnum, $ as PlatformEnum, cw as isReferenceOptionActive, E as api, bu as uuid2, c3 as calcUtils, bj as findRuntimeTableRow, c7 as ensureTableRowKeys, c0 as bindRuntimeTableColumns, bi as getRowId, cx as FRONT_ROW_KEY, cm as isTableRowKeyMatch, bw as isAttachFieldActive, cy as filterRulesByTrigger, cz as isEmptyValue$1, c4 as decodeTableCellRowKey, c6 as ensureFrontRowKey, b0 as getParseRuleInfo, aF as transformUtils, aY as materialCheck, aZ as getLotLockedReason, a_ as validateReinspectionDate, bn as FormulaRuleFieldKeyEnum, f as SubTableType, b1 as getParseRuleValue, cA as buildError, H as CreateType, bl as findRuntimeParentRow, aI as Dependency_ENUM, aH as ASSIGNMENTSTRATEGY_ENUM, bJ as commonUtils, aM as DeviceLink, a8 as _export_sfc, cg as getRenderedRuntimeTableCell, y as CellType, cq 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-DZRtpBe8.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 { Modal, message } from "ant-design-vue";
|
|
7
|
-
import { u as useFormModel } from "./mb-render-
|
|
7
|
+
import { u as useFormModel } from "./mb-render-DybPk-KF.js";
|
|
8
8
|
var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
|
|
9
9
|
MaterialConsumptionPatternEnum2["RECORD"] = "record";
|
|
10
10
|
MaterialConsumptionPatternEnum2["BOM"] = "bom";
|
|
@@ -942,6 +942,8 @@ function convertV1Runtime(runtime) {
|
|
|
942
942
|
return { schemaVersion: 1, formConfig, sheets: [sheet] };
|
|
943
943
|
}
|
|
944
944
|
const MULTI_SHEET_SCHEMA_VERSION = 2;
|
|
945
|
+
const MAX_RUNTIME_SHEETS = 100;
|
|
946
|
+
const MAX_RUNTIME_SHEET_TITLE_LENGTH = 255;
|
|
945
947
|
function assertObject(value, message2) {
|
|
946
948
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(message2);
|
|
947
949
|
}
|
|
@@ -1007,7 +1009,9 @@ function normalizeRuntime(runtime) {
|
|
|
1007
1009
|
if (!Array.isArray(runtime.sheets) || runtime.sheets.length === 0) {
|
|
1008
1010
|
throw new Error("多 Sheet 运行时至少需要一个工作表");
|
|
1009
1011
|
}
|
|
1010
|
-
if (runtime.sheets.length >
|
|
1012
|
+
if (runtime.sheets.length > MAX_RUNTIME_SHEETS) {
|
|
1013
|
+
throw new Error(`每份表单最多支持 ${MAX_RUNTIME_SHEETS} 个工作表`);
|
|
1014
|
+
}
|
|
1011
1015
|
const formConfig = runtime.formConfig ?? {};
|
|
1012
1016
|
assertObject(formConfig, "多 Sheet 运行时的 formConfig 格式无效");
|
|
1013
1017
|
const ids = /* @__PURE__ */ new Set();
|
|
@@ -1018,7 +1022,9 @@ function normalizeRuntime(runtime) {
|
|
|
1018
1022
|
const sheetId = String(rawSheet.sheetId ?? "").trim();
|
|
1019
1023
|
const title = String(rawSheet.title ?? "").trim();
|
|
1020
1024
|
if (!sheetId) throw new Error(`第 ${index + 1} 个工作表缺少 sheetId`);
|
|
1021
|
-
if (!title || title.length >
|
|
1025
|
+
if (!title || title.length > MAX_RUNTIME_SHEET_TITLE_LENGTH) {
|
|
1026
|
+
throw new Error(`工作表名称必须为 1 到 ${MAX_RUNTIME_SHEET_TITLE_LENGTH} 个字符:${title}`);
|
|
1027
|
+
}
|
|
1022
1028
|
if (ids.has(sheetId)) throw new Error(`重复的 sheetId:${sheetId}`);
|
|
1023
1029
|
if (titles.has(title)) throw new Error(`重复的工作表名称:${title}`);
|
|
1024
1030
|
ids.add(sheetId);
|
|
@@ -1589,6 +1595,14 @@ class RuntimeFormStateStore {
|
|
|
1589
1595
|
const paths = Object.keys(values);
|
|
1590
1596
|
this.mutate(paths, source, () => this.assignValues(this.reactiveState, values));
|
|
1591
1597
|
}
|
|
1598
|
+
/**
|
|
1599
|
+
* 保存后只回填后端身份元数据,不能用仅含 id_/front_row_key_ 的数组覆盖当前业务行。
|
|
1600
|
+
* 二维内置复合键可通过原始子行键匹配保存前的本地行。
|
|
1601
|
+
*/
|
|
1602
|
+
patchSavedMetadata(values) {
|
|
1603
|
+
const paths = Object.keys(values);
|
|
1604
|
+
this.mutate(paths, "restore", () => this.mergeSavedMetadata(this.reactiveState, values));
|
|
1605
|
+
}
|
|
1592
1606
|
/**
|
|
1593
1607
|
* 用新对象整体替换实例数据,删除旧对象中多余的顶层字段。
|
|
1594
1608
|
* 草稿/接口恢复后会清空用户修改标记;restore 来源同时恢复为非脏状态。
|
|
@@ -1700,6 +1714,46 @@ class RuntimeFormStateStore {
|
|
|
1700
1714
|
target[key] = incoming;
|
|
1701
1715
|
});
|
|
1702
1716
|
}
|
|
1717
|
+
mergeSavedMetadata(target, incoming, path = "") {
|
|
1718
|
+
if (Array.isArray(incoming)) {
|
|
1719
|
+
const isTableRows = this.subtableFields.has(path) || path.endsWith("._2DTABLE_");
|
|
1720
|
+
if (!isTableRows || !Array.isArray(target)) return incoming;
|
|
1721
|
+
incoming.forEach((savedRow) => {
|
|
1722
|
+
const rowKey = savedRow?.[FRONT_ROW_KEY];
|
|
1723
|
+
const savedId = savedRow?.id_;
|
|
1724
|
+
let currentRow = target.find((row) => {
|
|
1725
|
+
if (!row || typeof row !== "object") return false;
|
|
1726
|
+
if (rowKey != null && isTableRowKeyMatch(rowKey, row[FRONT_ROW_KEY])) return true;
|
|
1727
|
+
return savedId != null && row.id_ != null && String(row.id_) === String(savedId);
|
|
1728
|
+
});
|
|
1729
|
+
let matchedByGroup = false;
|
|
1730
|
+
if (!currentRow && Array.isArray(savedRow?._2DTABLE_) && savedRow.group_ != null && String(savedRow.group_).trim() !== "") {
|
|
1731
|
+
const matchingGroups = target.filter(
|
|
1732
|
+
(row) => Array.isArray(row?._2DTABLE_) && row.group_ != null && String(row.group_) === String(savedRow.group_)
|
|
1733
|
+
);
|
|
1734
|
+
if (matchingGroups.length === 1) {
|
|
1735
|
+
currentRow = matchingGroups[0];
|
|
1736
|
+
matchedByGroup = true;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
if (currentRow) {
|
|
1740
|
+
this.mergeSavedMetadata(
|
|
1741
|
+
currentRow,
|
|
1742
|
+
matchedByGroup ? { ...savedRow, [FRONT_ROW_KEY]: currentRow[FRONT_ROW_KEY] } : savedRow,
|
|
1743
|
+
path
|
|
1744
|
+
);
|
|
1745
|
+
}
|
|
1746
|
+
});
|
|
1747
|
+
return target;
|
|
1748
|
+
}
|
|
1749
|
+
if (!incoming || typeof incoming !== "object") return incoming;
|
|
1750
|
+
if (!target || typeof target !== "object" || Array.isArray(target)) return incoming;
|
|
1751
|
+
Object.entries(incoming).forEach(([key, value]) => {
|
|
1752
|
+
const childPath = path ? `${path}.${key}` : key;
|
|
1753
|
+
target[key] = this.mergeSavedMetadata(target[key], value, childPath);
|
|
1754
|
+
});
|
|
1755
|
+
return target;
|
|
1756
|
+
}
|
|
1703
1757
|
/**
|
|
1704
1758
|
* 所有写入口共用的表格身份边界:整表恢复/回填、数组插入、二维子行替换均在通知前补齐。
|
|
1705
1759
|
* 只处理业务索引声明的表格及 _2DTABLE_,不把多选值、上传文件等数组当作表格。
|
|
@@ -1784,6 +1838,7 @@ class RuntimeAsyncTaskCoordinator {
|
|
|
1784
1838
|
fieldIdentity: options.fieldIdentity,
|
|
1785
1839
|
sheetId: options.sheetId,
|
|
1786
1840
|
required: options.required !== false,
|
|
1841
|
+
blockOnFailure: options.blockOnFailure !== false,
|
|
1787
1842
|
status: "pending",
|
|
1788
1843
|
sequence,
|
|
1789
1844
|
promise: task,
|
|
@@ -1827,7 +1882,7 @@ class RuntimeAsyncTaskCoordinator {
|
|
|
1827
1882
|
* 等待全部 required 任务达到稳定状态。
|
|
1828
1883
|
*
|
|
1829
1884
|
* 一轮任务完成后的字段回填可能触发新的公式或远程任务,因此这里循环读取任务表,直到
|
|
1830
|
-
* 没有新的 pending required
|
|
1885
|
+
* 没有新的 pending required 任务。稳定后只检查需要阻断提交的失败项。
|
|
1831
1886
|
*/
|
|
1832
1887
|
async waitForRequired(keyPrefix) {
|
|
1833
1888
|
const matches = (task) => task.required && (!keyPrefix || task.key.startsWith(keyPrefix));
|
|
@@ -1839,7 +1894,7 @@ class RuntimeAsyncTaskCoordinator {
|
|
|
1839
1894
|
await Promise.allSettled(pending.map((task) => task.promise));
|
|
1840
1895
|
}
|
|
1841
1896
|
const failed = Array.from(this.tasks.values()).filter(
|
|
1842
|
-
(task) => matches(task) && task.status === "rejected"
|
|
1897
|
+
(task) => matches(task) && task.blockOnFailure && task.status === "rejected"
|
|
1843
1898
|
);
|
|
1844
1899
|
if (failed.length) {
|
|
1845
1900
|
const details = failed.map((task) => {
|
|
@@ -3185,11 +3240,12 @@ class RuntimeValidationService {
|
|
|
3185
3240
|
this.pendingLive = this.pendingLive === "blur" ? "blur" : trigger;
|
|
3186
3241
|
if (this.liveTimer) clearTimeout(this.liveTimer);
|
|
3187
3242
|
this.liveTimer = void 0;
|
|
3188
|
-
if (immediate)
|
|
3243
|
+
if (immediate)
|
|
3244
|
+
void this.flushLive().catch((error) => this.logBackgroundError("字段校验失败", error));
|
|
3189
3245
|
else
|
|
3190
3246
|
this.liveTimer = setTimeout(() => {
|
|
3191
3247
|
this.liveTimer = void 0;
|
|
3192
|
-
void this.flushLive().catch((error) =>
|
|
3248
|
+
void this.flushLive().catch((error) => this.logBackgroundError("字段校验失败", error));
|
|
3193
3249
|
}, 300);
|
|
3194
3250
|
}
|
|
3195
3251
|
async flushLive() {
|
|
@@ -3211,11 +3267,17 @@ class RuntimeValidationService {
|
|
|
3211
3267
|
this.displayTimer = void 0;
|
|
3212
3268
|
const run = () => {
|
|
3213
3269
|
this.displayTimer = void 0;
|
|
3214
|
-
void this.validate("display").catch(
|
|
3270
|
+
void this.validate("display").catch(
|
|
3271
|
+
(error) => this.logBackgroundError("字段展示校验失败", error)
|
|
3272
|
+
);
|
|
3215
3273
|
};
|
|
3216
3274
|
if (immediate) run();
|
|
3217
3275
|
else this.displayTimer = setTimeout(run, 320);
|
|
3218
3276
|
}
|
|
3277
|
+
logBackgroundError(label, error) {
|
|
3278
|
+
if (error instanceof Error && error.message.startsWith("以下异步任务执行失败:")) return;
|
|
3279
|
+
console.error(label, error);
|
|
3280
|
+
}
|
|
3219
3281
|
pruneComments() {
|
|
3220
3282
|
if (!this.binding || this.disposed) return;
|
|
3221
3283
|
this.binding.applyComments(
|
|
@@ -3813,8 +3875,10 @@ const SNAPSHOT_SKIP = /* @__PURE__ */ new Set([
|
|
|
3813
3875
|
]);
|
|
3814
3876
|
function rowIdentityKeys(row) {
|
|
3815
3877
|
if (!row) return [];
|
|
3878
|
+
const frontRowKey = row[FRONT_ROW_KEY] != null && String(row[FRONT_ROW_KEY]).trim() !== "" ? String(row[FRONT_ROW_KEY]) : void 0;
|
|
3816
3879
|
return [
|
|
3817
|
-
|
|
3880
|
+
frontRowKey,
|
|
3881
|
+
decodeTableCellRowKey(frontRowKey)?.cellRowKey,
|
|
3818
3882
|
row.id_ != null && row.id_ !== "" ? String(row.id_) : void 0
|
|
3819
3883
|
].filter(Boolean);
|
|
3820
3884
|
}
|
|
@@ -4548,7 +4612,16 @@ class BomEntriesValidator {
|
|
|
4548
4612
|
memberIndexes.push(idx);
|
|
4549
4613
|
if (byLot && !row.material_no_) emptyLotIndexes.push(idx);
|
|
4550
4614
|
});
|
|
4551
|
-
const
|
|
4615
|
+
const targetExists = this.groupExistsInTable(arr, target);
|
|
4616
|
+
if (!targetExists) {
|
|
4617
|
+
const index = arr.findIndex((row2) => !row2.deleted_);
|
|
4618
|
+
const row = arr[index];
|
|
4619
|
+
const canReuse = row && !row.product_id_ && !row.bom_entry_id_ && !row.is_confirmed_ && arr.every((item, idx) => item.deleted_ || idx === index);
|
|
4620
|
+
if (canReuse) {
|
|
4621
|
+
emptyProductIndexes.push(index);
|
|
4622
|
+
}
|
|
4623
|
+
}
|
|
4624
|
+
const needInsert = !targetExists && emptyProductIndexes.length === 0;
|
|
4552
4625
|
const last2 = memberIndexes[memberIndexes.length - 1];
|
|
4553
4626
|
let groupInsertIndex = -1;
|
|
4554
4627
|
if (needInsert) {
|
|
@@ -8690,7 +8763,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
8690
8763
|
const {
|
|
8691
8764
|
showDisplayStatus,
|
|
8692
8765
|
dataRelationShip
|
|
8693
|
-
} = useWidgetStaticAttrs(props);
|
|
8766
|
+
} = useWidgetStaticAttrs(props.widget);
|
|
8694
8767
|
const sheetId = () => fields.value?.findWidgetById(props.widget.id)?.sheetId;
|
|
8695
8768
|
const formModelController = useFormModel().injectController();
|
|
8696
8769
|
const tableController = props.tableController;
|
|
@@ -10223,109 +10296,111 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10223
10296
|
});
|
|
10224
10297
|
const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53d7e66c"]]);
|
|
10225
10298
|
export {
|
|
10226
|
-
|
|
10227
|
-
|
|
10299
|
+
RuntimeSheetService as $,
|
|
10300
|
+
useStyles as A,
|
|
10228
10301
|
BorderTD as B,
|
|
10229
|
-
|
|
10302
|
+
useDependency as C,
|
|
10230
10303
|
DEFAULT_BOOLEAN_FIELD_WIDTH as D,
|
|
10231
10304
|
EMPTY_PRODUCT_VERSION_ID as E,
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10305
|
+
useFieldPresentation as F,
|
|
10306
|
+
useRuntimeEditorFlusher as G,
|
|
10307
|
+
createRuntimeInstanceContext as H,
|
|
10308
|
+
RuntimeInstanceRegistry as I,
|
|
10309
|
+
RequiredQtyCalcRule as J,
|
|
10310
|
+
registerFormulaFuncs as K,
|
|
10311
|
+
DocumentPaper as L,
|
|
10312
|
+
MAX_RUNTIME_SHEETS as M,
|
|
10240
10313
|
NCB_PROVIDE as N,
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10314
|
+
DynamicTableAction as O,
|
|
10315
|
+
getRuntimeDataFieldId as P,
|
|
10316
|
+
buildRuntimeFieldPath as Q,
|
|
10244
10317
|
RuntimeFormStateStore as R,
|
|
10245
10318
|
ScanParamType as S,
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10319
|
+
resolveRuntimeFieldProps as T,
|
|
10320
|
+
resolveRuntimeFieldState as U,
|
|
10321
|
+
getRuntimeDependencyOutputKey as V,
|
|
10322
|
+
isRowAddedInCurrentFormChange as W,
|
|
10323
|
+
MaterialConsumeTableController as X,
|
|
10324
|
+
setFormulaParamsConfig as Y,
|
|
10325
|
+
normalizeRuntime as Z,
|
|
10253
10326
|
_sfc_main$5 as _,
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10327
|
+
MAX_RUNTIME_SHEET_TITLE_LENGTH as a,
|
|
10328
|
+
validateObjectBomQtyOnSubmit as a0,
|
|
10329
|
+
closeValidatorPopovers as a1,
|
|
10330
|
+
enrichFormChangeRowDetails as a2,
|
|
10331
|
+
useMaterialBalance as a3,
|
|
10332
|
+
collectFormChangeFieldLocations as a4,
|
|
10333
|
+
nextFormChangeRowViewHistoryId as a5,
|
|
10334
|
+
DeviceConnector as a6,
|
|
10335
|
+
DocumentLoading as a7,
|
|
10336
|
+
DynamicQuickFillModal as a8,
|
|
10337
|
+
FixedQuickFillModal as a9,
|
|
10338
|
+
recordSubtableRowDelete as aA,
|
|
10339
|
+
resolveAnnotationFieldLocation as aB,
|
|
10340
|
+
resolveFormChangeRowUi as aC,
|
|
10341
|
+
resolveRowFormChangeMark as aD,
|
|
10342
|
+
setSelectMobileTdId as aE,
|
|
10343
|
+
stripLegacyFormConfigFromPaper as aF,
|
|
10344
|
+
SubTableActionMenuTypeEnum as aG,
|
|
10345
|
+
getMenuByAction as aH,
|
|
10346
|
+
SubTableActionEnum as aI,
|
|
10347
|
+
resolveScanFillData as aJ,
|
|
10348
|
+
getInsertSubMenu as aK,
|
|
10349
|
+
resolveScanAdjustType as aL,
|
|
10350
|
+
resolveScanQty as aM,
|
|
10351
|
+
toDateOnly as aN,
|
|
10352
|
+
getCopySubMenu as aO,
|
|
10353
|
+
resolveScanParsedValue as aP,
|
|
10354
|
+
isProductBatchEmptyRow as aQ,
|
|
10355
|
+
FormTmplConfigController as aa,
|
|
10356
|
+
LEGACY_RUNTIME_FORM_CONFIG_KEYS as ab,
|
|
10357
|
+
LEGACY_RUNTIME_SHEET_ID as ac,
|
|
10358
|
+
LEGACY_RUNTIME_SHEET_TITLE as ad,
|
|
10359
|
+
MCDataUtil as ae,
|
|
10360
|
+
OCR_MODEL_PRECISION_ENUM_KEY as af,
|
|
10361
|
+
RuntimeAsyncTaskCoordinator as ag,
|
|
10362
|
+
RuntimeDependencyService as ah,
|
|
10363
|
+
RuntimeFieldRegistry as ai,
|
|
10364
|
+
RuntimeInstanceEventBus as aj,
|
|
10365
|
+
RuntimePersistenceCoordinator as ak,
|
|
10366
|
+
RuntimeValidationService as al,
|
|
10367
|
+
SubTableCore as am,
|
|
10368
|
+
buildFormChangeDisplayRows as an,
|
|
10369
|
+
convertV1Runtime as ao,
|
|
10370
|
+
detailsHaveFormChangeRowOps as ap,
|
|
10371
|
+
extractFormChangeRowDetails as aq,
|
|
10372
|
+
getFormChangeRowKey as ar,
|
|
10373
|
+
getFormChangeRowOp as as,
|
|
10374
|
+
getSubTableQuickFillInfo as at,
|
|
10375
|
+
isAnnLocationSelected as au,
|
|
10376
|
+
isBlank as av,
|
|
10377
|
+
isFormChangeGhostRow as aw,
|
|
10378
|
+
normalizeHistoricalFieldConfig as ax,
|
|
10379
|
+
pickObjectFieldKeys as ay,
|
|
10380
|
+
recordSubtableRowAdd as az,
|
|
10381
|
+
MULTI_SHEET_SCHEMA_VERSION as b,
|
|
10307
10382
|
createRuntimeDocumentV2 as c,
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10383
|
+
normalizeHistoricalBusinessRow as d,
|
|
10384
|
+
DeviceLinkTmplUtil as e,
|
|
10385
|
+
normalizeAIOcrTmpl as f,
|
|
10311
10386
|
getBusinessFieldKey as g,
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10387
|
+
useWidgetStaticAttrs as h,
|
|
10388
|
+
useRuntimeInstanceServices as i,
|
|
10389
|
+
setSelectAnnotationId as j,
|
|
10390
|
+
useRuntimeRowState as k,
|
|
10391
|
+
getObjectBomMaterialLotQuery as l,
|
|
10392
|
+
buildObjectLotExtraQuery as m,
|
|
10318
10393
|
normalizeFieldWidth as n,
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10394
|
+
MaterialConsumptionPatternEnum as o,
|
|
10395
|
+
resolveObjectBomEntry as p,
|
|
10396
|
+
runWithFillProduct as q,
|
|
10322
10397
|
resolveObjectFieldKeys as r,
|
|
10323
10398
|
setSelectValidatorId as s,
|
|
10324
|
-
|
|
10399
|
+
useNocodeFormWidget as t,
|
|
10325
10400
|
useFormTmplConfig as u,
|
|
10326
10401
|
validateObjectBomForScan as v,
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10402
|
+
applyConsumeObjectTraceChange as w,
|
|
10403
|
+
getObjectBomProductQuery as x,
|
|
10404
|
+
normalizeHistoricalAutofillRow as y,
|
|
10405
|
+
parseRuntimeFieldPath as z
|
|
10331
10406
|
};
|