@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.
Files changed (114) hide show
  1. package/dist/{BaseComponent-vgYIyddq.js → BaseComponent-DuVlKAnk.js} +2 -2
  2. package/dist/{VueVideoPlayer-Ca2aYCnh.js → VueVideoPlayer-BlB2c7W0.js} +2 -2
  3. package/dist/{align-editor-Bpdx7EAg.js → align-editor-wPpZ_4zH.js} +1 -1
  4. package/dist/{barcode-design-l88FtSJH.js → barcode-design-CDhA1Xiw.js} +2 -2
  5. package/dist/base/index.es.js +485 -194
  6. package/dist/{diagonal-design-BrC_JEX_.js → diagonal-design-ThSef3Um.js} +2 -2
  7. package/dist/{dynamic-table-action--l3y-33T.js → dynamic-table-action-cb-6H4R2.js} +325 -258
  8. 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
  9. package/dist/{edit.utils-CXmmCnxE-CLHOa5aM.js → edit.utils-CXmmCnxE-CQiGidG5.js} +1 -1
  10. package/dist/excel.css +473 -284
  11. package/dist/{exceljs.min-DC03-hj2.js → exceljs.min-CULCDRW9.js} +2 -2
  12. package/dist/{font-editor-Cdbnw5gf.js → font-editor-trc2cWng.js} +3 -3
  13. package/dist/{image-design-B2Ujtrgf.js → image-design-DbOmyTpn.js} +2 -2
  14. package/dist/{index-Bt1-V2lW.js → index-1WZ6SgTp.js} +3 -3
  15. package/dist/{index-2FOQLZQX.js → index-2Vv4Nw6L.js} +2 -2
  16. package/dist/{index-CdmpbReR.js → index-B2lCwHgw.js} +2 -2
  17. package/dist/{index-CosS1BAQ.js → index-B4LBLC9w.js} +1 -1
  18. package/dist/{index-VbeM2qtu.js → index-BBfo_rmJ.js} +2 -2
  19. package/dist/{index-DAOq48BR.js → index-BhJGnoAZ.js} +2 -2
  20. package/dist/{index-BTt4zC25.js → index-BkznJYts.js} +1242 -1045
  21. package/dist/{index-Dfx_FNTM.js → index-BsSL0R1j.js} +2 -2
  22. package/dist/{index-NJMyznIn.js → index-BsgB6y7K.js} +3 -3
  23. package/dist/{index-q6aP_omk.js → index-C-urdRZ2.js} +1 -1
  24. package/dist/{index-BwPjN5_z.js → index-CAGghO4i.js} +2 -2
  25. package/dist/{index-CCJHoK5a.js → index-CCyMfv1Z.js} +2 -2
  26. package/dist/{index-DHi56KLO.js → index-CPQNMrdO.js} +1 -1
  27. package/dist/{index-OtzvrfOW.js → index-CRo6J80n.js} +2 -2
  28. package/dist/{index-CinlHNlv.js → index-CSlejyqH.js} +1 -1
  29. package/dist/{index-BObb1Ah_.js → index-CksQHOUM.js} +2 -2
  30. package/dist/{index-qIYTDaGB.js → index-CpQ_DR3c.js} +3 -3
  31. package/dist/{index-ElmEtsp1.js → index-CvPWXCmn.js} +1 -1
  32. package/dist/{index-d-BkSigM.js → index-CyX1kNkY.js} +1 -1
  33. package/dist/{index-Cy3W1BCw.js → index-DGZzlITI.js} +4 -4
  34. package/dist/{index-DoKgmcyb.js → index-DOiOWH2x.js} +2 -2
  35. package/dist/{index-BHrga-sR.js → index-DUXHvUXT.js} +2 -2
  36. package/dist/{index-DLURy62t.js → index-DYjYdrMD.js} +2 -2
  37. package/dist/{index-BP9XsPy_.js → index-DaYPI9DA.js} +1 -1
  38. package/dist/{index-isNDc9Eg.js → index-Dkj2h_zE.js} +2 -2
  39. package/dist/{index-CyRyKW5Z.js → index-Dq5kgEpr.js} +2 -2
  40. package/dist/{index-CFr4e8Xs.js → index-Dq8DSt0w.js} +1 -1
  41. package/dist/{index-BmkcFEIb.js → index-DrWkEAL9.js} +2 -2
  42. package/dist/{index-BqWM4biL.js → index-DyZzboE8.js} +2 -2
  43. package/dist/{index-BfvMXo6W.js → index-Dzqrtkn_.js} +2 -2
  44. package/dist/{index-1RcD_jJ_.js → index-N2ZMSuL6.js} +1 -1
  45. package/dist/{index-BOw6pLMO.js → index-XtiIrcx4.js} +4 -4
  46. package/dist/{index-CbXb5NUR.js → index-cunDtoJs.js} +2 -2
  47. package/dist/{index-C2NlobVm.js → index-haSf7Cn8.js} +1 -1
  48. package/dist/{index-Ls2829xQ.js → index-l8FZ6Q3X.js} +53 -5
  49. package/dist/index.es.js +2 -2
  50. package/dist/{mb-render-BcBofCau.js → mb-render-DjXYXimz.js} +9 -3
  51. 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
  52. package/dist/{pagination-design-C6BIV4Ko.js → pagination-design-Dlt_hRc9.js} +2 -2
  53. package/dist/paper-widget-design-CsNAYJIm.js +4 -0
  54. package/dist/{print-runtime-instance-BuO2RPZB.js → print-runtime-instance-C0P0bQ0t.js} +1 -1
  55. package/dist/{print-snapshot-renderer-CJiTu8_l.js → print-snapshot-renderer-hfbiNoQz.js} +3 -3
  56. package/dist/{qrcode-design-DCAMHxR6.js → qrcode-design-BKW9Ywq7.js} +1 -1
  57. package/dist/{revo-grid.entry-s6oHfg7z.js → revo-grid.entry-DORNB4cp.js} +1 -1
  58. package/dist/{revogr-attribution_7.entry-CBEbTBbC.js → revogr-attribution_7.entry-CrdX04rF.js} +3 -3
  59. package/dist/{revogr-clipboard_3.entry-DtE8OXYS.js → revogr-clipboard_3.entry-CWLVEZnP.js} +2 -2
  60. package/dist/{revogr-data_4.entry-seTKTkAE.js → revogr-data_4.entry-Bs8mqW3y.js} +2 -2
  61. package/dist/{revogr-filter-panel.entry-DSQR-lUK.js → revogr-filter-panel.entry-CTN0T0tx.js} +1 -1
  62. package/dist/seal-design-D1K9CloN.js +4 -0
  63. package/dist/{serialnumber-design-B3WHGrfc.js → serialnumber-design-BSgTQN0r.js} +1 -1
  64. package/dist/shared/index.es.js +10 -8
  65. package/dist/{single-field-drop-DFjo8ISo.js → single-field-drop-DkjfkD4a.js} +2 -2
  66. package/dist/{size-editor-DKJpM9UW.js → size-editor-DQJIuZCE.js} +1 -1
  67. package/dist/src/nocode-base/src/core/sub-table/pretreatment-list-table-core.d.ts +1 -0
  68. package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +2 -1
  69. package/dist/src/nocode-base/src/hooks/form-model/form-model-controller.d.ts +2 -0
  70. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +1 -0
  71. package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +12 -7
  72. package/dist/src/nocode-base/src/hooks/material-consume-object/bom-validator.d.ts +4 -3
  73. package/dist/src/nocode-base/src/hooks/material-consume-object/initialize-autofill.d.ts +17 -0
  74. package/dist/src/nocode-base/src/hooks/material-consume-object/object-validation-controller.d.ts +24 -0
  75. package/dist/src/nocode-base/src/interface/render.d.ts +3 -1
  76. package/dist/src/nocode-base/src/interface/transform.d.ts +9 -1
  77. package/dist/src/nocode-base/src/runtime/async-task-coordinator.d.ts +6 -2
  78. package/dist/src/nocode-base/src/runtime/multi-sheet-runtime.d.ts +2 -0
  79. package/dist/src/nocode-base/src/runtime/runtime-field-initializer.d.ts +1 -1
  80. package/dist/src/nocode-base/src/runtime/runtime-validation-service.d.ts +1 -0
  81. package/dist/src/nocode-base/src/types/render/mc-render.d.ts +1 -1
  82. package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +5 -1
  83. package/dist/src/nocode-web-render/src/render/sub-table/common/inventory-scan-columns.d.ts +6 -0
  84. package/dist/src/nocode-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +1 -1
  85. package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-design.vue.d.ts +1 -0
  86. package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +2 -2
  87. package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-option-select.vue.d.ts +1 -0
  88. package/dist/src/online-form/src/views/designer/conversions/normalize-paper-grid.d.ts +3 -0
  89. package/dist/src/online-form/src/views/render/__components__/_field_/trace/utils/use-rule-props.d.ts +0 -3
  90. package/dist/src/online-form/src/views/render/sheet-tab-bar.vue.d.ts +5 -3
  91. package/dist/src/shared/enum/index.d.ts +2 -0
  92. package/dist/src/shared/enum/product-type.d.ts +9 -0
  93. package/dist/src/shared/enum/production-identification.d.ts +19 -0
  94. package/dist/{sub-table-factory-5l0MTqvt.js → sub-table-factory-Bnb8zZTb.js} +31 -12
  95. package/dist/{text-design-B69j6Z_b.js → text-design-CJo1qzwn.js} +2 -2
  96. package/dist/{throttle-Cpk1LoGk-DfnQ57mt.js → throttle-Cpk1LoGk-w1fTQ4cj.js} +1 -1
  97. package/dist/{timediff-design-BUqlRNkO.js → timediff-design-BIyHZKid.js} +1 -1
  98. package/dist/{trace-like-wrapper-D5VFdJ3W.js → trace-like-wrapper-BQv5F61v.js} +2 -2
  99. 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
  100. package/dist/web-render/index.es.js +3 -3
  101. package/dist/{widget-barcode-Bt55wEEk.js → widget-barcode-Skwby19J.js} +4 -4
  102. package/dist/{widget-diagonal-BSkoDXjJ.js → widget-diagonal-2jkexxFy.js} +3 -3
  103. package/dist/{widget-image-BxycuGZB.js → widget-image-DzNGEvNB.js} +5 -5
  104. package/dist/{widget-line-DZ9sK1Zj.js → widget-line-CKztM9A8.js} +2 -2
  105. package/dist/{widget-pagination-WerXXmx2.js → widget-pagination-DewFBSHR.js} +5 -5
  106. package/dist/{widget-power-Bln2T1C-.js → widget-power-DXJJuRh4.js} +3 -3
  107. package/dist/{widget-qrcode-BQWQXzru.js → widget-qrcode-js88isHk.js} +3 -3
  108. package/dist/{widget-rangelimit-E8yqsqv3.js → widget-rangelimit-DLy_aqqT.js} +3 -3
  109. package/dist/{widget-serialnumber-Css27nM1.js → widget-serialnumber-BvpZV5f7.js} +1 -1
  110. package/dist/{widget-text-CD6_nGlp.js → widget-text-CrZN9uDY.js} +5 -5
  111. package/dist/{widget-timediff-DQPeQkkV.js → widget-timediff-DJLoE_Xk.js} +2 -2
  112. package/package.json +2 -2
  113. package/dist/paper-widget-design-DujWhnh6.js +0 -4
  114. package/dist/seal-design--ciGkbUu.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, 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-D-u5mq0C.js";
2
+ import { ai as CellWidgetViewState, F as FIELD_TYPE, b9 as RenderModeEnum, Y as FormTypeEnum, bF as BpmnNodeTypeEnum, cw as getFieldPlaceholder, bW as MobileFillTypeEnum, C as ComponentTypeEnum, $ as PlatformEnum, cx as isReferenceOptionActive, E as api, bv as uuid2, c4 as calcUtils, bk as findRuntimeTableRow, c8 as ensureTableRowKeys, c1 as bindRuntimeTableColumns, bj as getRowId, cy as FRONT_ROW_KEY, cn as isTableRowKeyMatch, bx as isAttachFieldActive, cz as filterRulesByTrigger, cA as isEmptyValue$1, c5 as decodeTableCellRowKey, c7 as ensureFrontRowKey, b1 as getParseRuleInfo, aF as transformUtils, aY as materialCheck, aZ as getLotLockedReason, a_ as validateReinspectionDate, bo as FormulaRuleFieldKeyEnum, f as SubTableType, b2 as getParseRuleValue, cB as buildError, H as CreateType, bm as findRuntimeParentRow, aI as Dependency_ENUM, aH as ASSIGNMENTSTRATEGY_ENUM, bK as commonUtils, aM as DeviceLink, a8 as _export_sfc, ch as getRenderedRuntimeTableCell, y as CellType, cr as relocateDeletedRowsToEnd, cC as resetTableRowIdentity, J as useModal, cD as q, cE as QUICK_FILL_ALLOWED_FIELDS, cF as groupFixedTableRows, cG as processQuickFillRows, cH as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BmECtuSE.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-BcBofCau.js";
7
+ import { u as useFormModel } from "./mb-render-DjXYXimz.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 > 10) throw new Error("每份表单最多支持 10 个工作表");
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 > 20) throw new Error(`工作表名称必须为 1 到 20 个字符:${title}`);
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);
@@ -1715,12 +1721,28 @@ class RuntimeFormStateStore {
1715
1721
  incoming.forEach((savedRow) => {
1716
1722
  const rowKey = savedRow?.[FRONT_ROW_KEY];
1717
1723
  const savedId = savedRow?.id_;
1718
- const currentRow = target.find((row) => {
1724
+ let currentRow = target.find((row) => {
1719
1725
  if (!row || typeof row !== "object") return false;
1720
1726
  if (rowKey != null && isTableRowKeyMatch(rowKey, row[FRONT_ROW_KEY])) return true;
1721
1727
  return savedId != null && row.id_ != null && String(row.id_) === String(savedId);
1722
1728
  });
1723
- if (currentRow) this.mergeSavedMetadata(currentRow, savedRow, path);
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
+ }
1724
1746
  });
1725
1747
  return target;
1726
1748
  }
@@ -1816,6 +1838,7 @@ class RuntimeAsyncTaskCoordinator {
1816
1838
  fieldIdentity: options.fieldIdentity,
1817
1839
  sheetId: options.sheetId,
1818
1840
  required: options.required !== false,
1841
+ blockOnFailure: options.blockOnFailure !== false,
1819
1842
  status: "pending",
1820
1843
  sequence,
1821
1844
  promise: task,
@@ -1859,7 +1882,7 @@ class RuntimeAsyncTaskCoordinator {
1859
1882
  * 等待全部 required 任务达到稳定状态。
1860
1883
  *
1861
1884
  * 一轮任务完成后的字段回填可能触发新的公式或远程任务,因此这里循环读取任务表,直到
1862
- * 没有新的 pending required 任务。稳定后统一检查失败项,使提交事务得到明确失败原因。
1885
+ * 没有新的 pending required 任务。稳定后只检查需要阻断提交的失败项。
1863
1886
  */
1864
1887
  async waitForRequired(keyPrefix) {
1865
1888
  const matches = (task) => task.required && (!keyPrefix || task.key.startsWith(keyPrefix));
@@ -1871,7 +1894,7 @@ class RuntimeAsyncTaskCoordinator {
1871
1894
  await Promise.allSettled(pending.map((task) => task.promise));
1872
1895
  }
1873
1896
  const failed = Array.from(this.tasks.values()).filter(
1874
- (task) => matches(task) && task.status === "rejected"
1897
+ (task) => matches(task) && task.blockOnFailure && task.status === "rejected"
1875
1898
  );
1876
1899
  if (failed.length) {
1877
1900
  const details = failed.map((task) => {
@@ -3217,11 +3240,12 @@ class RuntimeValidationService {
3217
3240
  this.pendingLive = this.pendingLive === "blur" ? "blur" : trigger;
3218
3241
  if (this.liveTimer) clearTimeout(this.liveTimer);
3219
3242
  this.liveTimer = void 0;
3220
- if (immediate) void this.flushLive().catch((error) => console.error("字段校验失败", error));
3243
+ if (immediate)
3244
+ void this.flushLive().catch((error) => this.logBackgroundError("字段校验失败", error));
3221
3245
  else
3222
3246
  this.liveTimer = setTimeout(() => {
3223
3247
  this.liveTimer = void 0;
3224
- void this.flushLive().catch((error) => console.error("字段校验失败", error));
3248
+ void this.flushLive().catch((error) => this.logBackgroundError("字段校验失败", error));
3225
3249
  }, 300);
3226
3250
  }
3227
3251
  async flushLive() {
@@ -3243,11 +3267,17 @@ class RuntimeValidationService {
3243
3267
  this.displayTimer = void 0;
3244
3268
  const run = () => {
3245
3269
  this.displayTimer = void 0;
3246
- void this.validate("display").catch((error) => console.error("字段展示校验失败", error));
3270
+ void this.validate("display").catch(
3271
+ (error) => this.logBackgroundError("字段展示校验失败", error)
3272
+ );
3247
3273
  };
3248
3274
  if (immediate) run();
3249
3275
  else this.displayTimer = setTimeout(run, 320);
3250
3276
  }
3277
+ logBackgroundError(label, error) {
3278
+ if (error instanceof Error && error.message.startsWith("以下异步任务执行失败:")) return;
3279
+ console.error(label, error);
3280
+ }
3251
3281
  pruneComments() {
3252
3282
  if (!this.binding || this.disposed) return;
3253
3283
  this.binding.applyComments(
@@ -4582,7 +4612,16 @@ class BomEntriesValidator {
4582
4612
  memberIndexes.push(idx);
4583
4613
  if (byLot && !row.material_no_) emptyLotIndexes.push(idx);
4584
4614
  });
4585
- const needInsert = !this.groupExistsInTable(arr, target);
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;
4586
4625
  const last2 = memberIndexes[memberIndexes.length - 1];
4587
4626
  let groupInsertIndex = -1;
4588
4627
  if (needInsert) {
@@ -5207,7 +5246,8 @@ class MaterialConsumeTableController {
5207
5246
  constructor(tmplBomController, tmplBom, options = {}) {
5208
5247
  this.tmplBomController = tmplBomController;
5209
5248
  this.tmplBom = tmplBom;
5210
- if (!options.printOnly) this.initScanRule(this.tmplBom.barcode_parsing_rules_id_);
5249
+ if (!options.printOnly && this.hasFormInstance)
5250
+ this.initScanRule(this.tmplBom.barcode_parsing_rules_id_);
5211
5251
  this.scanParamType = this.tmplBom.scan_param_type_;
5212
5252
  markRaw(this);
5213
5253
  this.bomEntriesValidator = new BomEntriesValidator(
@@ -5270,6 +5310,9 @@ class MaterialConsumeTableController {
5270
5310
  get mcPattern() {
5271
5311
  return this.tmplBom.material_consumption_pattern_ ?? this.tmplBomController.defaultMCPattern;
5272
5312
  }
5313
+ get hasFormInstance() {
5314
+ return this.tmplBomController.hasFormInstance;
5315
+ }
5273
5316
  /**
5274
5317
  * 解析规则数据对象
5275
5318
  */
@@ -5522,6 +5565,10 @@ class MaterialConsumeTableController {
5522
5565
  }
5523
5566
  const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_;
5524
5567
  console.log("parseScanStr", data);
5568
+ if (!data.lot && !data.uniqueCode) {
5569
+ this.error($t("sys.edhr.mcTable.lotOrUniqueCodeRequired"));
5570
+ return;
5571
+ }
5525
5572
  const arr = await materialCheck({
5526
5573
  material_no_: data.materialCode,
5527
5574
  production_identification_name_: data.lot,
@@ -6016,7 +6063,16 @@ class MaterialConsumeTableController {
6016
6063
  this.error(msg);
6017
6064
  return;
6018
6065
  }
6019
- if (!value) return;
6066
+ if (!value) {
6067
+ if (row.product_id_ && !this.isCustomRequiredQty) {
6068
+ const util = this.bomEntriesValidator.findUtilByProductId(row.product_id_);
6069
+ if (util) {
6070
+ row.qty_required_ = util.total;
6071
+ }
6072
+ }
6073
+ this.updateDerivedQtyFields();
6074
+ return;
6075
+ }
6020
6076
  try {
6021
6077
  await validateReinspectionDate({
6022
6078
  product_id_: option.product_id_ ?? row.product_id_,
@@ -6040,6 +6096,7 @@ class MaterialConsumeTableController {
6040
6096
  const qty = oldGroupId && row.bom_entry_id_ === oldGroupId ? oldRequiredQty : this.getCustomGroupRequiredQty(row);
6041
6097
  this.setCustomGroupRequiredQty(row, qty);
6042
6098
  }
6099
+ this.updateDerivedQtyFields();
6043
6100
  } else if (field === "qty_") {
6044
6101
  this.updateDerivedQtyFields();
6045
6102
  }
@@ -6674,11 +6731,12 @@ class SubTableCore {
6674
6731
  /**
6675
6732
  * 扫码多条候选时选择一行(1 条自动选中)
6676
6733
  */
6677
- async pickScanRecord(records) {
6734
+ async pickScanRecord(records, options = {}) {
6678
6735
  if (!records.length) return void 0;
6679
6736
  if (records.length === 1) return records[0];
6680
6737
  return this.render.openMultiRowsModal({
6681
- rows: mapScanRecordsForPicker(records)
6738
+ rows: mapScanRecordsForPicker(records),
6739
+ ...options
6682
6740
  });
6683
6741
  }
6684
6742
  /**
@@ -6904,7 +6962,7 @@ async function validateObjectBomQtyOnSubmit(opts) {
6904
6962
  for (const obj of objectFieldList) {
6905
6963
  if (!obj?.objectField) continue;
6906
6964
  const objectBom = findObjectBom(formInstBom, obj.objectField);
6907
- if (objectBom?.material_consumption_pattern_ === MaterialConsumptionPatternEnum.RECORD) {
6965
+ if (objectBom?.material_consumption_pattern_ === MaterialConsumptionPatternEnum.RECORD && !objectBom.personal_bom_enabled_) {
6908
6966
  continue;
6909
6967
  }
6910
6968
  const { productKey, productFieldName, qtyKey, qtyRequiredKey, qtyFieldName } = pickObjectFieldKeys(obj.subFields, obj.objectField);
@@ -6965,150 +7023,6 @@ async function validateObjectBomQtyOnSubmit(opts) {
6965
7023
  }
6966
7024
  return errors;
6967
7025
  }
6968
- function isBlank(value) {
6969
- return value == null || value === "";
6970
- }
6971
- function pickPresent(preferred, fallback) {
6972
- return isBlank(preferred) ? fallback : preferred;
6973
- }
6974
- function resolveObjectFieldKeys(opts) {
6975
- const obj = opts.objectFieldList?.find((item) => item.objectField === opts.belongingObject);
6976
- const fromList = obj?.subFields ? pickObjectFieldKeys(obj.subFields, opts.belongingObject) : {};
6977
- const fromFallback = pickObjectFieldKeys(opts.fallbackFields, opts.belongingObject, {
6978
- requireUsed: false
6979
- });
6980
- return {
6981
- productKey: pickPresent(fromList.productKey, fromFallback.productKey),
6982
- productFieldName: fromList.productFieldName ?? fromFallback.productFieldName,
6983
- materialNoKey: pickPresent(fromList.materialNoKey, fromFallback.materialNoKey),
6984
- materialNoFieldName: fromList.materialNoFieldName ?? fromFallback.materialNoFieldName,
6985
- qtyKey: pickPresent(fromList.qtyKey, fromFallback.qtyKey),
6986
- qtyRequiredKey: pickPresent(fromList.qtyRequiredKey, fromFallback.qtyRequiredKey),
6987
- qtyFieldName: fromList.qtyFieldName ?? fromFallback.qtyFieldName,
6988
- bomEntryIdKey: pickPresent(fromList.bomEntryIdKey, fromFallback.bomEntryIdKey)
6989
- };
6990
- }
6991
- function buildObjectLotExtraQuery(productId) {
6992
- if (isBlank(productId)) return {};
6993
- const versionId = String(productId).split(":").pop();
6994
- if (!versionId) return {};
6995
- return { "product_id_.versionEq": versionId };
6996
- }
6997
- function clearedLotFields(materialNoKey) {
6998
- if (!materialNoKey) return {};
6999
- return {
7000
- [materialNoKey]: void 0,
7001
- [`${materialNoKey}_id_`]: void 0,
7002
- [`${materialNoKey}_lb_`]: void 0
7003
- };
7004
- }
7005
- function shouldClearLotOnProductChange(opts) {
7006
- const { prevProduct, nextProduct, lotValue } = opts;
7007
- if (isBlank(prevProduct) && isBlank(nextProduct)) return false;
7008
- if (prevProduct === nextProduct) return false;
7009
- if (isBlank(prevProduct) && !isBlank(nextProduct) && !isBlank(lotValue)) {
7010
- return false;
7011
- }
7012
- return true;
7013
- }
7014
- let fillingProduct = false;
7015
- function runWithFillProduct(fn) {
7016
- fillingProduct = true;
7017
- try {
7018
- fn();
7019
- } finally {
7020
- nextTick(() => {
7021
- fillingProduct = false;
7022
- });
7023
- }
7024
- }
7025
- function resolveLotValidateParams(keys, formData, option) {
7026
- return {
7027
- product_id_: option?.product_id_ ?? option?._item?.product_id_ ?? (keys.productKey ? formData[keys.productKey] : void 0),
7028
- material_no_: option?.name_ ?? option?.__VALUE__ ?? (keys.materialNoKey ? formData[keys.materialNoKey] : void 0),
7029
- material_no_id_: option?.id_ ?? (keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0)
7030
- };
7031
- }
7032
- async function applyConsumeObjectTraceChange(opts) {
7033
- const { belongingObject, role, formData } = opts;
7034
- if (!belongingObject || !formData) return {};
7035
- const keys = resolveObjectFieldKeys({
7036
- belongingObject,
7037
- objectFieldList: opts.objectFieldList,
7038
- fallbackFields: opts.fallbackFields
7039
- });
7040
- if (role === FIELD_TYPE.PRODUCT) {
7041
- if (!("prevProduct" in opts) || fillingProduct) return {};
7042
- const values = {};
7043
- if (shouldClearLotOnProductChange({
7044
- prevProduct: opts.prevProduct,
7045
- nextProduct: opts.nextValue,
7046
- lotValue: keys.materialNoKey ? formData[keys.materialNoKey] : void 0
7047
- })) {
7048
- Object.assign(values, clearedLotFields(keys.materialNoKey));
7049
- }
7050
- if (keys.bomEntryIdKey) {
7051
- values[keys.bomEntryIdKey] = null;
7052
- if (!isBlank(opts.nextValue) && opts.formInstBom) {
7053
- const entry = resolveObjectBomEntry({
7054
- formInstBom: opts.formInstBom,
7055
- belongingObject,
7056
- productId: String(opts.nextValue)
7057
- });
7058
- if (entry) values[keys.bomEntryIdKey] = entry.id_;
7059
- }
7060
- }
7061
- opts.rowWriter.patchRow(values, "autofill");
7062
- const lotValue = keys.materialNoKey ? formData[keys.materialNoKey] : void 0;
7063
- if (!isBlank(opts.nextValue) && !isBlank(lotValue)) {
7064
- try {
7065
- await validateReinspectionDate({
7066
- product_id_: String(opts.nextValue),
7067
- material_no_: lotValue,
7068
- material_no_id_: keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0
7069
- });
7070
- } catch (e) {
7071
- return { abortReinspection: e?.message || String(e) };
7072
- }
7073
- }
7074
- return {};
7075
- }
7076
- if (role === FIELD_TYPE.MATERIAL_NO) {
7077
- if (opts.option?.is_locked_) {
7078
- opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "autofill");
7079
- return { abortLocked: opts.option.id_ };
7080
- }
7081
- const params = resolveLotValidateParams(keys, formData, opts.option);
7082
- if (isBlank(params.material_no_) && isBlank(params.material_no_id_)) return {};
7083
- try {
7084
- await validateReinspectionDate(params);
7085
- } catch (e) {
7086
- opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "async");
7087
- return { abortReinspection: e?.message || String(e) };
7088
- }
7089
- const values = {};
7090
- const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
7091
- if (keys.productKey && !isBlank(productId)) values[keys.productKey] = productId;
7092
- if (keys.bomEntryIdKey && opts.formInstBom) {
7093
- if (!isBlank(productId)) {
7094
- const entry = resolveObjectBomEntry({
7095
- formInstBom: opts.formInstBom,
7096
- belongingObject,
7097
- productId: String(productId)
7098
- });
7099
- if (entry) values[keys.bomEntryIdKey] = entry.id_;
7100
- }
7101
- }
7102
- const patchRelatedFields = () => opts.rowWriter.patchRow(values, "autofill");
7103
- if (keys.productKey && !isBlank(productId)) {
7104
- runWithFillProduct(patchRelatedFields);
7105
- } else {
7106
- patchRelatedFields();
7107
- }
7108
- return {};
7109
- }
7110
- return {};
7111
- }
7112
7026
  function useRuntimeRowState(rowSource) {
7113
7027
  const { formStateStore } = useRuntimeInstanceServices();
7114
7028
  function requireStore() {
@@ -7855,6 +7769,150 @@ function useFormTmplConfig() {
7855
7769
  injectController
7856
7770
  };
7857
7771
  }
7772
+ function isBlank(value) {
7773
+ return value == null || value === "";
7774
+ }
7775
+ function pickPresent(preferred, fallback) {
7776
+ return isBlank(preferred) ? fallback : preferred;
7777
+ }
7778
+ function resolveObjectFieldKeys(opts) {
7779
+ const obj = opts.objectFieldList?.find((item) => item.objectField === opts.belongingObject);
7780
+ const fromList = obj?.subFields ? pickObjectFieldKeys(obj.subFields, opts.belongingObject) : {};
7781
+ const fromFallback = pickObjectFieldKeys(opts.fallbackFields, opts.belongingObject, {
7782
+ requireUsed: false
7783
+ });
7784
+ return {
7785
+ productKey: pickPresent(fromList.productKey, fromFallback.productKey),
7786
+ productFieldName: fromList.productFieldName ?? fromFallback.productFieldName,
7787
+ materialNoKey: pickPresent(fromList.materialNoKey, fromFallback.materialNoKey),
7788
+ materialNoFieldName: fromList.materialNoFieldName ?? fromFallback.materialNoFieldName,
7789
+ qtyKey: pickPresent(fromList.qtyKey, fromFallback.qtyKey),
7790
+ qtyRequiredKey: pickPresent(fromList.qtyRequiredKey, fromFallback.qtyRequiredKey),
7791
+ qtyFieldName: fromList.qtyFieldName ?? fromFallback.qtyFieldName,
7792
+ bomEntryIdKey: pickPresent(fromList.bomEntryIdKey, fromFallback.bomEntryIdKey)
7793
+ };
7794
+ }
7795
+ function buildObjectLotExtraQuery(productId) {
7796
+ if (isBlank(productId)) return {};
7797
+ const versionId = String(productId).split(":").pop();
7798
+ if (!versionId) return {};
7799
+ return { "product_id_.versionEq": versionId };
7800
+ }
7801
+ function clearedLotFields(materialNoKey) {
7802
+ if (!materialNoKey) return {};
7803
+ return {
7804
+ [materialNoKey]: void 0,
7805
+ [`${materialNoKey}_id_`]: void 0,
7806
+ [`${materialNoKey}_lb_`]: void 0
7807
+ };
7808
+ }
7809
+ function shouldClearLotOnProductChange(opts) {
7810
+ const { prevProduct, nextProduct, lotValue } = opts;
7811
+ if (isBlank(prevProduct) && isBlank(nextProduct)) return false;
7812
+ if (prevProduct === nextProduct) return false;
7813
+ if (isBlank(prevProduct) && !isBlank(nextProduct) && !isBlank(lotValue)) {
7814
+ return false;
7815
+ }
7816
+ return true;
7817
+ }
7818
+ let fillingProduct = false;
7819
+ function runWithFillProduct(fn) {
7820
+ fillingProduct = true;
7821
+ try {
7822
+ fn();
7823
+ } finally {
7824
+ nextTick(() => {
7825
+ fillingProduct = false;
7826
+ });
7827
+ }
7828
+ }
7829
+ function resolveLotValidateParams(keys, formData, option) {
7830
+ return {
7831
+ product_id_: option?.product_id_ ?? option?._item?.product_id_ ?? (keys.productKey ? formData[keys.productKey] : void 0),
7832
+ material_no_: option?.name_ ?? option?.__VALUE__ ?? (keys.materialNoKey ? formData[keys.materialNoKey] : void 0),
7833
+ material_no_id_: option?.id_ ?? (keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0)
7834
+ };
7835
+ }
7836
+ async function applyConsumeObjectTraceChange(opts) {
7837
+ const { belongingObject, role, formData } = opts;
7838
+ if (!belongingObject || !formData) return {};
7839
+ const keys = resolveObjectFieldKeys({
7840
+ belongingObject,
7841
+ objectFieldList: opts.objectFieldList,
7842
+ fallbackFields: opts.fallbackFields
7843
+ });
7844
+ if (role === FIELD_TYPE.PRODUCT) {
7845
+ if (!("prevProduct" in opts) || fillingProduct) return {};
7846
+ const values = {};
7847
+ if (shouldClearLotOnProductChange({
7848
+ prevProduct: opts.prevProduct,
7849
+ nextProduct: opts.nextValue,
7850
+ lotValue: keys.materialNoKey ? formData[keys.materialNoKey] : void 0
7851
+ })) {
7852
+ Object.assign(values, clearedLotFields(keys.materialNoKey));
7853
+ }
7854
+ if (keys.bomEntryIdKey) {
7855
+ values[keys.bomEntryIdKey] = null;
7856
+ if (!isBlank(opts.nextValue) && opts.formInstBom) {
7857
+ const entry = resolveObjectBomEntry({
7858
+ formInstBom: opts.formInstBom,
7859
+ belongingObject,
7860
+ productId: String(opts.nextValue)
7861
+ });
7862
+ if (entry) values[keys.bomEntryIdKey] = entry.id_;
7863
+ }
7864
+ }
7865
+ opts.rowWriter.patchRow(values, "autofill");
7866
+ const lotValue = keys.materialNoKey ? formData[keys.materialNoKey] : void 0;
7867
+ if (!isBlank(opts.nextValue) && !isBlank(lotValue)) {
7868
+ try {
7869
+ await validateReinspectionDate({
7870
+ product_id_: String(opts.nextValue),
7871
+ material_no_: lotValue,
7872
+ material_no_id_: keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0
7873
+ });
7874
+ } catch (e) {
7875
+ return { abortReinspection: e?.message || String(e) };
7876
+ }
7877
+ }
7878
+ return {};
7879
+ }
7880
+ if (role === FIELD_TYPE.MATERIAL_NO) {
7881
+ if (opts.option?.is_locked_) {
7882
+ opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "autofill");
7883
+ return { abortLocked: opts.option.id_ };
7884
+ }
7885
+ const params = resolveLotValidateParams(keys, formData, opts.option);
7886
+ if (isBlank(params.material_no_) && isBlank(params.material_no_id_)) return {};
7887
+ try {
7888
+ await validateReinspectionDate(params);
7889
+ } catch (e) {
7890
+ opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "async");
7891
+ return { abortReinspection: e?.message || String(e) };
7892
+ }
7893
+ const values = {};
7894
+ const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
7895
+ if (keys.productKey && !isBlank(productId)) values[keys.productKey] = productId;
7896
+ if (keys.bomEntryIdKey && opts.formInstBom) {
7897
+ if (!isBlank(productId)) {
7898
+ const entry = resolveObjectBomEntry({
7899
+ formInstBom: opts.formInstBom,
7900
+ belongingObject,
7901
+ productId: String(productId)
7902
+ });
7903
+ if (entry) values[keys.bomEntryIdKey] = entry.id_;
7904
+ }
7905
+ }
7906
+ const patchRelatedFields = () => opts.rowWriter.patchRow(values, "autofill");
7907
+ if (keys.productKey && !isBlank(productId)) {
7908
+ runWithFillProduct(patchRelatedFields);
7909
+ } else {
7910
+ patchRelatedFields();
7911
+ }
7912
+ return {};
7913
+ }
7914
+ return {};
7915
+ }
7858
7916
  const _hoisted_1$5 = ["data-merge", "data-fill-direction"];
7859
7917
  const _hoisted_2$1 = {
7860
7918
  key: 0,
@@ -8175,6 +8233,7 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
8175
8233
  showDisplayStatus,
8176
8234
  dataRelationShip
8177
8235
  } = useWidgetStaticAttrs(props.widget);
8236
+ const isMockMaterialConsume = computed(() => !!dataRelationShip?.isMockReport && !!props.widget.props.isMaterialConsumeTable);
8178
8237
  const sheetId = () => fields.value?.findWidgetById(props.widget.id)?.sheetId;
8179
8238
  const subTableCore = props.subTableCore;
8180
8239
  provide(NCB_PROVIDE.SUB_TABLE_CORE, subTableCore);
@@ -8315,6 +8374,9 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
8315
8374
  key,
8316
8375
  actionValue
8317
8376
  }) => {
8377
+ if (isMockMaterialConsume.value && (key === SubTableActionEnum.SCAN || key === SubTableActionEnum.Insert1GroupAfter)) {
8378
+ return;
8379
+ }
8318
8380
  switch (key) {
8319
8381
  case "insertRowBefore":
8320
8382
  handleAddRow({
@@ -8408,10 +8470,11 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
8408
8470
  showRowWatermark,
8409
8471
  rowGroupKey
8410
8472
  }) => {
8411
- const menus = subTableCore?.calcSubTableActionMenu({
8473
+ const baseMenus = subTableCore?.calcSubTableActionMenu({
8412
8474
  rowData,
8413
8475
  showDelBtn
8414
8476
  });
8477
+ const menus = isMockMaterialConsume.value ? [getMenuByAction(SubTableActionEnum.SCAN), getMenuByAction(SubTableActionEnum.Insert1GroupAfter), ...baseMenus ?? []] : baseMenus;
8415
8478
  const annRowDetails = dataRelationShip?.annRowDetails;
8416
8479
  const rowMark = dataIdx !== -1 && annRowDetails?.length ? resolveRowFormChangeMark(field, rowData, annRowDetails) : null;
8417
8480
  const rowUi = resolveFormChangeRowUi(rowData, rowMark);
@@ -8724,7 +8787,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
8724
8787
  const {
8725
8788
  showDisplayStatus,
8726
8789
  dataRelationShip
8727
- } = useWidgetStaticAttrs(props);
8790
+ } = useWidgetStaticAttrs(props.widget);
8728
8791
  const sheetId = () => fields.value?.findWidgetById(props.widget.id)?.sheetId;
8729
8792
  const formModelController = useFormModel().injectController();
8730
8793
  const tableController = props.tableController;
@@ -8913,6 +8976,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
8913
8976
  }));
8914
8977
  };
8915
8978
  const handleAction = (action, rowData) => {
8979
+ if (!tableController.hasFormInstance) return;
8916
8980
  switch (action) {
8917
8981
  case MaterialConsumeActionType.CONFIRM:
8918
8982
  tableController.confirm(rowData);
@@ -8985,6 +9049,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
8985
9049
  key,
8986
9050
  actionValue
8987
9051
  }) => {
9052
+ if (!tableController.hasFormInstance) return;
8988
9053
  switch (key) {
8989
9054
  case "rowEdit":
8990
9055
  await tableController.editRow(rowData);
@@ -9355,7 +9420,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9355
9420
  createElementVNode("i", { class: "iconfont icon-zhuyi" }),
9356
9421
  createElementVNode("ul", { class: "tips-list" }, [
9357
9422
  createElementVNode("li", null, "可将Excel内容粘贴到表格中,支持使用复制、粘贴、删除快捷键"),
9358
- createElementVNode("li", null, " 表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、LOT/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割) ")
9423
+ createElementVNode("li", null, " 表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、批次/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割) ")
9359
9424
  ])
9360
9425
  ], -1)),
9361
9426
  createElementVNode("div", {
@@ -9380,7 +9445,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9380
9445
  };
9381
9446
  }
9382
9447
  });
9383
- const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b589958f"]]);
9448
+ const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-58540cb3"]]);
9384
9449
  const _hoisted_1$1 = {
9385
9450
  key: 1,
9386
9451
  class: "sub-table-action__subtitle"
@@ -10153,7 +10218,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10153
10218
  createElementVNode("i", { class: "iconfont icon-zhuyi" }),
10154
10219
  createElementVNode("ul", { class: "tips-list" }, [
10155
10220
  createElementVNode("li", null, "可将Excel内容粘贴到表格中,支持使用复制、粘贴、删除快捷键"),
10156
- createElementVNode("li", null, "表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、LOT/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割)"),
10221
+ createElementVNode("li", null, "表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、批次/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割)"),
10157
10222
  createElementVNode("li", null, "当前快速填报最多支持200行")
10158
10223
  ])
10159
10224
  ], -1)),
@@ -10173,7 +10238,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10173
10238
  };
10174
10239
  }
10175
10240
  });
10176
- const DynamicQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ae9acd3f"]]);
10241
+ const DynamicQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-840aca0a"]]);
10177
10242
  const _sfc_main = /* @__PURE__ */ defineComponent({
10178
10243
  __name: "dynamic-table-action",
10179
10244
  props: {
@@ -10257,109 +10322,111 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10257
10322
  });
10258
10323
  const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53d7e66c"]]);
10259
10324
  export {
10260
- closeValidatorPopovers as $,
10261
- useFieldPresentation as A,
10325
+ RuntimeSheetService as $,
10326
+ useStyles as A,
10262
10327
  BorderTD as B,
10263
- useRuntimeEditorFlusher as C,
10328
+ useDependency as C,
10264
10329
  DEFAULT_BOOLEAN_FIELD_WIDTH as D,
10265
10330
  EMPTY_PRODUCT_VERSION_ID as E,
10266
- createRuntimeInstanceContext as F,
10267
- RuntimeInstanceRegistry as G,
10268
- RequiredQtyCalcRule as H,
10269
- registerFormulaFuncs as I,
10270
- DocumentPaper as J,
10271
- DynamicTableAction as K,
10272
- getRuntimeDataFieldId as L,
10273
- MULTI_SHEET_SCHEMA_VERSION as M,
10331
+ useFieldPresentation as F,
10332
+ useRuntimeEditorFlusher as G,
10333
+ createRuntimeInstanceContext as H,
10334
+ RuntimeInstanceRegistry as I,
10335
+ RequiredQtyCalcRule as J,
10336
+ registerFormulaFuncs as K,
10337
+ DocumentPaper as L,
10338
+ MAX_RUNTIME_SHEETS as M,
10274
10339
  NCB_PROVIDE as N,
10275
- buildRuntimeFieldPath as O,
10276
- resolveRuntimeFieldProps as P,
10277
- resolveRuntimeFieldState as Q,
10340
+ DynamicTableAction as O,
10341
+ getRuntimeDataFieldId as P,
10342
+ buildRuntimeFieldPath as Q,
10278
10343
  RuntimeFormStateStore as R,
10279
10344
  ScanParamType as S,
10280
- getRuntimeDependencyOutputKey as T,
10281
- isRowAddedInCurrentFormChange as U,
10282
- MaterialConsumeTableController as V,
10283
- setFormulaParamsConfig as W,
10284
- normalizeRuntime as X,
10285
- RuntimeSheetService as Y,
10286
- validateObjectBomQtyOnSubmit as Z,
10345
+ resolveRuntimeFieldProps as T,
10346
+ resolveRuntimeFieldState as U,
10347
+ getRuntimeDependencyOutputKey as V,
10348
+ isRowAddedInCurrentFormChange as W,
10349
+ MaterialConsumeTableController as X,
10350
+ setFormulaParamsConfig as Y,
10351
+ normalizeRuntime as Z,
10287
10352
  _sfc_main$5 as _,
10288
- normalizeHistoricalBusinessRow as a,
10289
- enrichFormChangeRowDetails as a0,
10290
- useMaterialBalance as a1,
10291
- collectFormChangeFieldLocations as a2,
10292
- nextFormChangeRowViewHistoryId as a3,
10293
- DeviceConnector as a4,
10294
- DocumentLoading as a5,
10295
- DynamicQuickFillModal as a6,
10296
- FixedQuickFillModal as a7,
10297
- FormTmplConfigController as a8,
10298
- LEGACY_RUNTIME_FORM_CONFIG_KEYS as a9,
10299
- resolveFormChangeRowUi as aA,
10300
- resolveRowFormChangeMark as aB,
10301
- setSelectMobileTdId as aC,
10302
- stripLegacyFormConfigFromPaper as aD,
10303
- SubTableActionMenuTypeEnum as aE,
10304
- getMenuByAction as aF,
10305
- SubTableActionEnum as aG,
10306
- resolveScanFillData as aH,
10307
- getInsertSubMenu as aI,
10308
- resolveScanAdjustType as aJ,
10309
- resolveScanQty as aK,
10310
- toDateOnly as aL,
10311
- getCopySubMenu as aM,
10312
- resolveScanParsedValue as aN,
10313
- isProductBatchEmptyRow as aO,
10314
- LEGACY_RUNTIME_SHEET_ID as aa,
10315
- LEGACY_RUNTIME_SHEET_TITLE as ab,
10316
- MCDataUtil as ac,
10317
- OCR_MODEL_PRECISION_ENUM_KEY as ad,
10318
- RuntimeAsyncTaskCoordinator as ae,
10319
- RuntimeDependencyService as af,
10320
- RuntimeFieldRegistry as ag,
10321
- RuntimeInstanceEventBus as ah,
10322
- RuntimePersistenceCoordinator as ai,
10323
- RuntimeValidationService as aj,
10324
- SubTableCore as ak,
10325
- buildFormChangeDisplayRows as al,
10326
- convertV1Runtime as am,
10327
- detailsHaveFormChangeRowOps as an,
10328
- extractFormChangeRowDetails as ao,
10329
- getFormChangeRowKey as ap,
10330
- getFormChangeRowOp as aq,
10331
- getSubTableQuickFillInfo as ar,
10332
- isAnnLocationSelected as as,
10333
- isBlank as at,
10334
- isFormChangeGhostRow as au,
10335
- normalizeHistoricalFieldConfig as av,
10336
- pickObjectFieldKeys as aw,
10337
- recordSubtableRowAdd as ax,
10338
- recordSubtableRowDelete as ay,
10339
- resolveAnnotationFieldLocation as az,
10340
- DeviceLinkTmplUtil as b,
10353
+ MAX_RUNTIME_SHEET_TITLE_LENGTH as a,
10354
+ validateObjectBomQtyOnSubmit as a0,
10355
+ closeValidatorPopovers as a1,
10356
+ enrichFormChangeRowDetails as a2,
10357
+ useMaterialBalance as a3,
10358
+ collectFormChangeFieldLocations as a4,
10359
+ nextFormChangeRowViewHistoryId as a5,
10360
+ DeviceConnector as a6,
10361
+ DocumentLoading as a7,
10362
+ DynamicQuickFillModal as a8,
10363
+ FixedQuickFillModal as a9,
10364
+ recordSubtableRowDelete as aA,
10365
+ resolveAnnotationFieldLocation as aB,
10366
+ resolveFormChangeRowUi as aC,
10367
+ resolveRowFormChangeMark as aD,
10368
+ setSelectMobileTdId as aE,
10369
+ stripLegacyFormConfigFromPaper as aF,
10370
+ SubTableActionMenuTypeEnum as aG,
10371
+ getMenuByAction as aH,
10372
+ SubTableActionEnum as aI,
10373
+ resolveScanFillData as aJ,
10374
+ getInsertSubMenu as aK,
10375
+ resolveScanAdjustType as aL,
10376
+ resolveScanQty as aM,
10377
+ toDateOnly as aN,
10378
+ getCopySubMenu as aO,
10379
+ resolveScanParsedValue as aP,
10380
+ isProductBatchEmptyRow as aQ,
10381
+ FormTmplConfigController as aa,
10382
+ LEGACY_RUNTIME_FORM_CONFIG_KEYS as ab,
10383
+ LEGACY_RUNTIME_SHEET_ID as ac,
10384
+ LEGACY_RUNTIME_SHEET_TITLE as ad,
10385
+ MCDataUtil as ae,
10386
+ OCR_MODEL_PRECISION_ENUM_KEY as af,
10387
+ RuntimeAsyncTaskCoordinator as ag,
10388
+ RuntimeDependencyService as ah,
10389
+ RuntimeFieldRegistry as ai,
10390
+ RuntimeInstanceEventBus as aj,
10391
+ RuntimePersistenceCoordinator as ak,
10392
+ RuntimeValidationService as al,
10393
+ SubTableCore as am,
10394
+ buildFormChangeDisplayRows as an,
10395
+ convertV1Runtime as ao,
10396
+ detailsHaveFormChangeRowOps as ap,
10397
+ extractFormChangeRowDetails as aq,
10398
+ getFormChangeRowKey as ar,
10399
+ getFormChangeRowOp as as,
10400
+ getSubTableQuickFillInfo as at,
10401
+ isAnnLocationSelected as au,
10402
+ isBlank as av,
10403
+ isFormChangeGhostRow as aw,
10404
+ normalizeHistoricalFieldConfig as ax,
10405
+ pickObjectFieldKeys as ay,
10406
+ recordSubtableRowAdd as az,
10407
+ MULTI_SHEET_SCHEMA_VERSION as b,
10341
10408
  createRuntimeDocumentV2 as c,
10342
- normalizeAIOcrTmpl as d,
10343
- useWidgetStaticAttrs as e,
10344
- useRuntimeInstanceServices as f,
10409
+ normalizeHistoricalBusinessRow as d,
10410
+ DeviceLinkTmplUtil as e,
10411
+ normalizeAIOcrTmpl as f,
10345
10412
  getBusinessFieldKey as g,
10346
- setSelectAnnotationId as h,
10347
- useRuntimeRowState as i,
10348
- getObjectBomMaterialLotQuery as j,
10349
- buildObjectLotExtraQuery as k,
10350
- MaterialConsumptionPatternEnum as l,
10351
- resolveObjectBomEntry as m,
10413
+ useWidgetStaticAttrs as h,
10414
+ useRuntimeInstanceServices as i,
10415
+ setSelectAnnotationId as j,
10416
+ useRuntimeRowState as k,
10417
+ getObjectBomMaterialLotQuery as l,
10418
+ buildObjectLotExtraQuery as m,
10352
10419
  normalizeFieldWidth as n,
10353
- runWithFillProduct as o,
10354
- useNocodeFormWidget as p,
10355
- applyConsumeObjectTraceChange as q,
10420
+ MaterialConsumptionPatternEnum as o,
10421
+ resolveObjectBomEntry as p,
10422
+ runWithFillProduct as q,
10356
10423
  resolveObjectFieldKeys as r,
10357
10424
  setSelectValidatorId as s,
10358
- getObjectBomProductQuery as t,
10425
+ useNocodeFormWidget as t,
10359
10426
  useFormTmplConfig as u,
10360
10427
  validateObjectBomForScan as v,
10361
- normalizeHistoricalAutofillRow as w,
10362
- parseRuntimeFieldPath as x,
10363
- useStyles as y,
10364
- useDependency as z
10428
+ applyConsumeObjectTraceChange as w,
10429
+ getObjectBomProductQuery as x,
10430
+ normalizeHistoricalAutofillRow as y,
10431
+ parseRuntimeFieldPath as z
10365
10432
  };