@gct-paas/excel 0.1.39-beta.4 → 0.1.39-beta.41

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 (128) hide show
  1. package/dist/{BaseComponent-B8_qg2he.js → BaseComponent-hWfUDepU.js} +2 -2
  2. package/dist/{VueVideoPlayer-B-X9Kvhp.js → VueVideoPlayer-CTtss6-e.js} +2 -2
  3. package/dist/{align-editor-1IbAiPBg.js → align-editor-0EJDQ9xk.js} +1 -1
  4. package/dist/{barcode-design-DCm1U-OU.js → barcode-design-CH7C0nTV.js} +2 -2
  5. package/dist/base/index.es.js +545 -244
  6. package/dist/{diagonal-design-DBk2s8UD.js → diagonal-design-CKLfmzt9.js} +2 -2
  7. package/dist/{dynamic-table-action-JSevwsex.js → dynamic-table-action-Dhx1ZQSa.js} +948 -303
  8. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-ClcBVLO0.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-vRTNdchM.js} +636 -1140
  9. package/dist/{edit.utils-CXmmCnxE-88-QvdIv.js → edit.utils-CXmmCnxE-Cj0XviBc.js} +1 -1
  10. package/dist/excel.css +589 -338
  11. package/dist/{exceljs.min-M28cAz_z.js → exceljs.min-BNsMIPFn.js} +2 -2
  12. package/dist/{font-editor-nCQk5D1K.js → font-editor-CHZPtUHX.js} +3 -3
  13. package/dist/{image-design-B84grap7.js → image-design-AOi1nT_M.js} +2 -2
  14. package/dist/{index-jRA6sXVY.js → index-2SyQ6xAT.js} +1 -1
  15. package/dist/{index-UCNknVxk.js → index-B1JboJFx.js} +1 -1
  16. package/dist/{index-DEl0sxMk.js → index-B863k7Jl.js} +6 -5
  17. package/dist/{index-_-ORWa-m.js → index-BFhX3ACB.js} +1 -1
  18. package/dist/{index-CGsTW2E9.js → index-BNKKUueq.js} +2 -2
  19. package/dist/{index-ZEwe0MJj.js → index-BTr11l_g.js} +2 -2
  20. package/dist/{index-DPOE78Jf.js → index-BVSnhxY1.js} +2 -2
  21. package/dist/{index-I2HpU1BP.js → index-BZPA_AiO.js} +3 -3
  22. package/dist/{index-ChncMTkv.js → index-BeFJ_RCt.js} +1 -1
  23. package/dist/{index-DEN3-esb.js → index-BfIS3NOa.js} +6 -3
  24. package/dist/{index-BSXafKJS.js → index-BgV92L3Y.js} +2 -2
  25. package/dist/{index-CCsNdL4I.js → index-Bj3c4vZy.js} +2 -2
  26. package/dist/{index-CBiaZr1j.js → index-Bua1ArJ5.js} +2 -2
  27. package/dist/{index-BrkoN2-J.js → index-CDRNOYDd.js} +6 -5
  28. package/dist/{index-D0Q-6EtG.js → index-CDhZoiEf.js} +1 -1
  29. package/dist/{index-CCp6-NXH.js → index-C__SKZMl.js} +3 -3
  30. package/dist/{index-tZd-Us4e.js → index-Ca0fy776.js} +2 -2
  31. package/dist/{index-CKWcaJGI.js → index-CbXJ1XDJ.js} +5 -7
  32. package/dist/{index-CUHfI8cg.js → index-Cfe2Q-hG.js} +1 -1
  33. package/dist/{index-H_BLk7PI.js → index-CfvZdYSY.js} +2 -2
  34. package/dist/{index-Co1E4H0G.js → index-CiqInN9G.js} +2 -2
  35. package/dist/{index-CX6LqGJP.js → index-Cld2wf77.js} +1 -1
  36. package/dist/{index-D7IBmbmp.js → index-Cy4bHDfG.js} +2 -2
  37. package/dist/{index-bfXiwTE7.js → index-D1bE-oJR.js} +2047 -1745
  38. package/dist/{index-DT87VrvR.js → index-D7kir0tU.js} +2 -2
  39. package/dist/{index-B53fgzJo.js → index-DR6T7C4O.js} +2 -2
  40. package/dist/{index-DCzL4GOP.js → index-DThgFjEo.js} +53 -5
  41. package/dist/{index-BvJ7ZgvI.js → index-DnM4LcB4.js} +2 -2
  42. package/dist/{index-DkvjFyW6.js → index-DnOwWeey.js} +2 -2
  43. package/dist/{index-wcY1RYL_.js → index-ICNCCzD2.js} +2 -2
  44. package/dist/{index-CFjE5779.js → index-LVofttI7.js} +3 -2
  45. package/dist/{index-Doz8Gf_5.js → index-SXIZsVts.js} +1 -1
  46. package/dist/{index-XBuNXPu0.js → index-cnZ4ogvg.js} +2 -2
  47. package/dist/{index-DHHyy4mL.js → index-n97S5YRD.js} +1 -1
  48. package/dist/{index-MJFci9IB.js → index-nl7I1bLi.js} +1 -1
  49. package/dist/index.es.js +2 -2
  50. package/dist/{mb-render-BZDgmpm9.js → mb-render-FUO_-FXR.js} +9 -3
  51. package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-Ciue53Ue.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-DOYhOffQ.js} +8 -1
  52. package/dist/{pagination-design-BYqVZGdA.js → pagination-design-BjxLbj93.js} +2 -2
  53. package/dist/paper-widget-design-Cy2MxlCk.js +4 -0
  54. package/dist/{print-runtime-instance-D3BJGzia.js → print-runtime-instance-THb92xUW.js} +1 -1
  55. package/dist/{print-snapshot-renderer-MzkjvlA8.js → print-snapshot-renderer-4jQFaAjJ.js} +3 -3
  56. package/dist/{qrcode-design-B0YGEijA.js → qrcode-design-DM9kEawx.js} +1 -1
  57. package/dist/{revo-grid.entry-DdE6cuGJ.js → revo-grid.entry-DKvA7bUR.js} +1 -1
  58. package/dist/{revogr-attribution_7.entry-Er1fVrov.js → revogr-attribution_7.entry-C2PtJ_Tj.js} +3 -3
  59. package/dist/{revogr-clipboard_3.entry-COq2SN-B.js → revogr-clipboard_3.entry-BM7_JY0U.js} +2 -2
  60. package/dist/{revogr-data_4.entry--CfGDdVK.js → revogr-data_4.entry-CdMQPL7I.js} +2 -2
  61. package/dist/{revogr-filter-panel.entry-DoNXkBy6.js → revogr-filter-panel.entry-BJiGVhcw.js} +1 -1
  62. package/dist/seal-design-C5P3oQIa.js +4 -0
  63. package/dist/{serialnumber-design-fMRSi9jn.js → serialnumber-design-QaDIsxYT.js} +1 -1
  64. package/dist/shared/index.es.js +23 -21
  65. package/dist/{single-field-drop-BycxT2Kf.js → single-field-drop-BAiIyb2u.js} +2 -2
  66. package/dist/{size-editor-BKJfYgbR.js → size-editor-BV0KrQ37.js} +1 -1
  67. package/dist/src/domain/table/business/material/material-balance/profile/fields.d.ts +2 -0
  68. package/dist/src/domain/table/business/preprocess/pretreatment-list/profile/field-keys.d.ts +1 -7
  69. package/dist/src/domain/table/business/sterilize/entrust-steril-batch-list/profile/fields.d.ts +2 -0
  70. package/dist/src/nocode-base/src/core/sub-table/allocate-table-core.d.ts +2 -1
  71. package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +2 -1
  72. package/dist/src/nocode-base/src/hooks/form-model/form-model-controller.d.ts +2 -0
  73. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +1 -0
  74. package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +12 -7
  75. package/dist/src/nocode-base/src/hooks/material-consume-object/bom-validator.d.ts +4 -3
  76. package/dist/src/nocode-base/src/hooks/material-consume-object/initialize-autofill.d.ts +19 -0
  77. package/dist/src/nocode-base/src/hooks/material-consume-object/object-validation-controller.d.ts +24 -0
  78. package/dist/src/nocode-base/src/interface/render.d.ts +3 -1
  79. package/dist/src/nocode-base/src/interface/transform.d.ts +9 -1
  80. package/dist/src/nocode-base/src/runtime/async-task-coordinator.d.ts +6 -2
  81. package/dist/src/nocode-base/src/runtime/multi-sheet-runtime.d.ts +3 -1
  82. package/dist/src/nocode-base/src/runtime/runtime-context.d.ts +4 -0
  83. package/dist/src/nocode-base/src/runtime/runtime-field-initializer.d.ts +1 -1
  84. package/dist/src/nocode-base/src/runtime/runtime-validation-service.d.ts +1 -0
  85. package/dist/src/nocode-base/src/types/render/mc-render.d.ts +1 -1
  86. package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +5 -1
  87. package/dist/src/nocode-web-render/src/render/sub-table/common/inventory-scan-columns.d.ts +6 -0
  88. package/dist/src/nocode-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +1 -1
  89. package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-design.vue.d.ts +1 -0
  90. package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +2 -2
  91. package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search.util.d.ts +8 -0
  92. package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-option-select.vue.d.ts +1 -0
  93. package/dist/src/online-form/src/views/designer/conversions/normalize-paper-grid.d.ts +3 -0
  94. package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +11 -0
  95. package/dist/src/online-form/src/views/designer/modules/base/designer-wrapper.vue.d.ts +1 -0
  96. package/dist/src/online-form/src/views/designer/modules/duplicate-field-notice.vue.d.ts +2 -0
  97. package/dist/src/online-form/src/views/designer/modules/xlsx-import-summary.vue.d.ts +11 -0
  98. package/dist/src/online-form/src/views/designer/types/sheets.d.ts +2 -0
  99. package/dist/src/online-form/src/views/designer/utils/cell-field-placements.d.ts +12 -0
  100. package/dist/src/online-form/src/views/designer/utils/xlsx-parser.d.ts +9 -3
  101. package/dist/src/online-form/src/views/render/__components__/_field_/trace/utils/use-rule-props.d.ts +0 -3
  102. package/dist/src/shared/enum/field-type.d.ts +2 -0
  103. package/dist/src/shared/enum/index.d.ts +2 -0
  104. package/dist/src/shared/enum/product-type.d.ts +9 -0
  105. package/dist/src/shared/enum/production-identification.d.ts +19 -0
  106. package/dist/src/shared/utils/cell-wrap.d.ts +9 -0
  107. package/dist/src/shared/utils/grid-size.d.ts +2 -0
  108. package/dist/{sub-table-factory-BxG7QiiX.js → sub-table-factory-_mm1iwau.js} +19 -7
  109. package/dist/{text-design-BQKYk7aD.js → text-design-DfdH_3_b.js} +5 -4
  110. package/dist/{throttle-Cpk1LoGk-BI0wP2Le.js → throttle-Cpk1LoGk-HQvkISS4.js} +1 -1
  111. package/dist/{timediff-design-O1IfzLVD.js → timediff-design-CKjl56qS.js} +1 -1
  112. package/dist/{trace-like-wrapper-CdKGpstE.js → trace-like-wrapper-D6lJ8e-H.js} +5 -2
  113. package/dist/{value-editor.vue_vue_type_style_index_0_lang-CCv0wmKI.js → value-editor.vue_vue_type_style_index_0_lang-BmQGrlz8.js} +2 -2
  114. package/dist/web-render/index.es.js +3 -3
  115. package/dist/{widget-barcode-CK68yjvd.js → widget-barcode-By9P2d-R.js} +4 -4
  116. package/dist/{widget-diagonal-9F-6feRM.js → widget-diagonal-DMNfA-Tt.js} +3 -3
  117. package/dist/{widget-image-2GcRCaIf.js → widget-image-YM9YaMb-.js} +5 -5
  118. package/dist/{widget-line-flwy9kew.js → widget-line-Dl3TIfBO.js} +2 -2
  119. package/dist/{widget-pagination-pxpEH1UB.js → widget-pagination-9XxvQDIw.js} +5 -5
  120. package/dist/{widget-power-pFQ7lwCW.js → widget-power-A96VVJDG.js} +3 -3
  121. package/dist/{widget-qrcode-D_Ri0RG2.js → widget-qrcode-DWseHVIM.js} +3 -3
  122. package/dist/{widget-rangelimit-DB97heRc.js → widget-rangelimit-DK8oOmC_.js} +3 -3
  123. package/dist/{widget-serialnumber-I35Sov0R.js → widget-serialnumber-pue8WfA9.js} +1 -1
  124. package/dist/{widget-text-C93W0WWM.js → widget-text-B9O9UYK7.js} +5 -5
  125. package/dist/{widget-timediff-S4X81H7c.js → widget-timediff-PwNxXBrF.js} +2 -2
  126. package/package.json +2 -2
  127. package/dist/paper-widget-design-BcSUNaAF.js +0 -4
  128. package/dist/seal-design-CHOawN-k.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-ClcBVLO0.js";
3
- import { cloneDeep, isEmpty, has, pickBy, isNil, mergeWith, omit, last, pick, merge } from "lodash-es";
2
+ import { af as CellWidgetViewState, F as FIELD_TYPE, b4 as RenderModeEnum, X as FormTypeEnum, bs as BpmnNodeTypeEnum, ch as getFieldPlaceholder, bI as MobileFillTypeEnum, C as ComponentTypeEnum, bc as findRuntimeTableRow, aT as renderUtils, _ as PlatformEnum, E as api, bl as uuid2, bS as calcUtils, bW as ensureTableRowKeys, bP as bindRuntimeTableColumns, bb as getRowId, ci as FRONT_ROW_KEY, c9 as isTableRowKeyMatch, au as RangeCompareOp, at as RangeValidateMode, bT as decodeTableCellRowKey, bV as ensureFrontRowKey, a_ as getParseRuleInfo, aC as transformUtils, aV as materialCheck, aW as getLotLockedReason, aX as validateReinspectionDate, bf as FormulaRuleFieldKeyEnum, f as SubTableType, a$ as getParseRuleValue, H as CreateType, bd as findRuntimeParentRow, aF as Dependency_ENUM, aE as ASSIGNMENTSTRATEGY_ENUM, bw as commonUtils, aJ as DeviceLink, a7 as _export_sfc, c3 as getRenderedRuntimeTableCell, y as CellType, cj as resetTableRowIdentity, J as useModal, ck as q, cl as QUICK_FILL_ALLOWED_FIELDS, cm as groupFixedTableRows, cn as processQuickFillRows, co as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-vRTNdchM.js";
4
3
  import dayjs from "dayjs";
4
+ import { cloneDeep, isEmpty, isNil, pickBy, mergeWith, omit, last, pick, merge } from "lodash-es";
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-BZDgmpm9.js";
7
+ import { u as useFormModel } from "./mb-render-FUO_-FXR.js";
8
8
  var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
9
9
  MaterialConsumptionPatternEnum2["RECORD"] = "record";
10
10
  MaterialConsumptionPatternEnum2["BOM"] = "bom";
@@ -337,6 +337,11 @@ function parseRuntimeFieldPath(path) {
337
337
  return void 0;
338
338
  }
339
339
  }
340
+ function isCellAutoLineBreak(style) {
341
+ const whiteSpace = style?.whiteSpace ?? style?.["white-space"];
342
+ const wordBreak = style?.wordBreak ?? style?.["word-break"];
343
+ return whiteSpace === "pre-wrap" && wordBreak === "break-all" || whiteSpace === "pre-line";
344
+ }
340
345
  var NCB_PROVIDE = /* @__PURE__ */ ((NCB_PROVIDE2) => {
341
346
  NCB_PROVIDE2["IS_PDF"] = "NCB_IsPdf";
342
347
  NCB_PROVIDE2["RUNTIME_INSTANCE_REGISTRY"] = "NCB_RuntimeInstanceRegistry";
@@ -454,12 +459,7 @@ function useWidgetStaticAttrs(widget) {
454
459
  dataRelationShip
455
460
  )
456
461
  );
457
- const isAutoLineBreak = computed(() => {
458
- if (!isEmpty(widget.style) && has(widget.style, "whiteSpace") && has(widget.style, "wordBreak") && widget.style.whiteSpace === "pre-wrap" && widget.style.wordBreak === "break-all") {
459
- return true;
460
- }
461
- return false;
462
- });
462
+ const isAutoLineBreak = computed(() => isCellAutoLineBreak(widget.style));
463
463
  return {
464
464
  field,
465
465
  fieldType,
@@ -703,6 +703,49 @@ function getSubTableQuickFillInfo(subTableFieldId, mobileTdIdGroups) {
703
703
  if (!subTableFieldId) return;
704
704
  return assignWidgetInfo(MobileFillTypeEnum.SUB_TABLE, { rowSubFieldKey: subTableFieldId });
705
705
  }
706
+ function getCurrentFormData(_rule, options) {
707
+ if (!_rule._subtableFieldId) return options?.formData;
708
+ return findRuntimeTableRow(options?.formData?.[_rule._subtableFieldId], _rule._rowKey);
709
+ }
710
+ function isSameOptionValue(current, expected) {
711
+ if (typeof expected === "boolean") {
712
+ return renderUtils.getBoolValue(current) === expected;
713
+ }
714
+ if (current === void 0 || current === null || current === "") {
715
+ return false;
716
+ }
717
+ return String(current) === String(expected);
718
+ }
719
+ function isAttachFieldActive(attach, formData) {
720
+ if (attach?.parent && !isAttachFieldActive(attach.parent, formData)) return false;
721
+ if (!attach?.belongFieldId || isNil(attach.optionValue)) {
722
+ return true;
723
+ }
724
+ const row = attach.subtableFieldId ? findRuntimeTableRow(formData?.[attach.subtableFieldId], attach.rowKey) : formData;
725
+ if (attach.subtableFieldId && (!attach.rowKey || !row || row === formData)) {
726
+ return false;
727
+ }
728
+ const raw = row?.[attach.belongFieldId];
729
+ if (attach.multiple) {
730
+ const current = renderUtils.getValue(raw, true);
731
+ if (!Array.isArray(current)) return false;
732
+ return current.some((v) => isSameOptionValue(v, attach.optionValue));
733
+ }
734
+ return isSameOptionValue(raw, attach.optionValue);
735
+ }
736
+ function isReferenceOptionActive(referenceInfo, rowFormData) {
737
+ if (!referenceInfo?.belongFieldId || isNil(referenceInfo.optionValue)) {
738
+ return true;
739
+ }
740
+ return isAttachFieldActive(
741
+ {
742
+ belongFieldId: referenceInfo.belongFieldId,
743
+ optionValue: referenceInfo.optionValue,
744
+ multiple: referenceInfo.multiple
745
+ },
746
+ rowFormData
747
+ );
748
+ }
706
749
  function fieldChromeStyles(state) {
707
750
  const required4 = state === "required";
708
751
  const disabled = state === "disabled";
@@ -854,6 +897,9 @@ function useMaterialBalance() {
854
897
  destoryConsumeModal
855
898
  };
856
899
  }
900
+ function normalizeGridColumnWidth(value) {
901
+ return typeof value === "number" && Number.isFinite(value) ? Math.max(0, value) : 75;
902
+ }
857
903
  function normalizeHistoricalFieldConfig(value) {
858
904
  if (!value || typeof value !== "object") return value;
859
905
  if (Array.isArray(value)) {
@@ -871,10 +917,17 @@ function normalizeHistoricalFieldConfig(value) {
871
917
  const props = result.props;
872
918
  const attachment = props.fieldType === FIELD_TYPE.ATTACHMENT && props.viewState === CellWidgetViewState.Auto;
873
919
  const autofill = Array.isArray(props.autofillRules) && props.enableAutofill === void 0;
874
- if (attachment || autofill) {
920
+ const wrap = result.component === "td" && props.autoLineBreak !== true && isCellAutoLineBreak(result.cellWidget?.style);
921
+ const colsWidth = Array.isArray(props.colsWidth) ? props.colsWidth.map(
922
+ (width) => typeof width === "number" && Number.isFinite(width) ? normalizeGridColumnWidth(width) : width
923
+ ) : void 0;
924
+ const columnWidths = colsWidth?.some((width, index) => width !== props.colsWidth[index]);
925
+ if (attachment || autofill || wrap || columnWidths) {
875
926
  result = { ...result, props: { ...props } };
876
927
  if (attachment) result.props.viewState = CellWidgetViewState.Readonly;
877
928
  if (autofill) result.props.enableAutofill = true;
929
+ if (wrap) result.props.autoLineBreak = true;
930
+ if (columnWidths) result.props.colsWidth = colsWidth;
878
931
  }
879
932
  }
880
933
  return result;
@@ -976,16 +1029,17 @@ function validateSheetGraph(sheet) {
976
1029
  }
977
1030
  function normalizeSheetMetadata(sheet) {
978
1031
  const nodes = normalizeHistoricalFieldConfig(sheet.nodes);
1032
+ const sourcePaper = normalizeHistoricalFieldConfig(sheet.paper);
979
1033
  const paper = {
980
- ...sheet.paper,
1034
+ ...sourcePaper,
981
1035
  props: {
982
- ...sheet.paper.props,
1036
+ ...sourcePaper.props,
983
1037
  subTableWidgetIds: Object.entries(nodes).filter(([, node]) => node.component === ComponentTypeEnum.SUB_TABLE).map(([id]) => id)
984
1038
  }
985
1039
  };
986
1040
  return { ...sheet, paper, nodes, dataCenter: { [ComponentTypeEnum.PAPER]: paper, ...nodes } };
987
1041
  }
988
- function normalizeRuntime(runtime) {
1042
+ function normalizeRuntime(runtime, formType) {
989
1043
  if (typeof runtime === "string") {
990
1044
  if (!runtime.trim()) throw new Error("运行时数据不能为空");
991
1045
  try {
@@ -996,7 +1050,16 @@ function normalizeRuntime(runtime) {
996
1050
  }
997
1051
  assertObject(runtime, "运行时数据格式无效");
998
1052
  if (runtime.schemaVersion == null || runtime.schemaVersion === 1) {
999
- const normalized = convertV1Runtime(runtime);
1053
+ const legacyRuntime = formType === FormTypeEnum.FILE && runtime[ComponentTypeEnum.PAPER] == null ? {
1054
+ ...runtime,
1055
+ [ComponentTypeEnum.PAPER]: {
1056
+ id: ComponentTypeEnum.PAPER,
1057
+ component: ComponentTypeEnum.PAPER,
1058
+ props: {},
1059
+ nextIds: []
1060
+ }
1061
+ } : runtime;
1062
+ const normalized = convertV1Runtime(legacyRuntime);
1000
1063
  normalized.sheets.forEach(validateSheetGraph);
1001
1064
  return { ...normalized, sheets: normalized.sheets.map(normalizeSheetMetadata) };
1002
1065
  }
@@ -1133,6 +1196,7 @@ function createRuntimeInstanceContext(options) {
1133
1196
  uniqueId: options.uniqueId,
1134
1197
  instanceId: options.instanceId,
1135
1198
  templateId: options.templateId,
1199
+ formType: options.formType,
1136
1200
  schemaVersion: options.runtime.schemaVersion,
1137
1201
  formConfig: options.runtime.formConfig,
1138
1202
  defaultData: options.defaultData,
@@ -1222,7 +1286,7 @@ class RuntimeSheetService {
1222
1286
  this.calculatingDepth += 1;
1223
1287
  let succeeded = false;
1224
1288
  try {
1225
- const pageData = RuntimeSheetService.calculatePages(sheet.dataCenter, this.formState.state);
1289
+ const pageData = this.context.formType === FormTypeEnum.FILE ? [] : RuntimeSheetService.calculatePages(sheet.dataCenter, this.formState.state);
1226
1290
  this.assertAlive();
1227
1291
  sheet.pageData = pageData;
1228
1292
  sheet.paginationError = void 0;
@@ -1577,9 +1641,15 @@ class RuntimeFormStateStore {
1577
1641
  target = this.unwrap(target);
1578
1642
  value = this.unwrap(value);
1579
1643
  this.ensureIncomingRowKeys(target, fieldKey, value);
1580
- if (Object.is(toRaw(this.unwrap(target[fieldKey])), toRaw(value))) return;
1581
- this.mutate([path], source, () => {
1582
- target[fieldKey] = value;
1644
+ const valueChanged = !Object.is(toRaw(this.unwrap(target[fieldKey])), toRaw(value));
1645
+ const labelKey = `${fieldKey}_lb_`;
1646
+ const clearLabel = (value == null || value === "" || Array.isArray(value) && value.length === 0) && target[labelKey] != null;
1647
+ if (!valueChanged && !clearLabel) return;
1648
+ const paths = valueChanged ? [path] : [];
1649
+ if (clearLabel) paths.push(`${path}_lb_`);
1650
+ this.mutate(paths, source, () => {
1651
+ if (valueChanged) target[fieldKey] = value;
1652
+ if (clearLabel) target[labelKey] = null;
1583
1653
  });
1584
1654
  }
1585
1655
  /** 合并当前行的一组关联字段,累计稳定业务路径,只提交一次变更。 */
@@ -1721,12 +1791,28 @@ class RuntimeFormStateStore {
1721
1791
  incoming.forEach((savedRow) => {
1722
1792
  const rowKey = savedRow?.[FRONT_ROW_KEY];
1723
1793
  const savedId = savedRow?.id_;
1724
- const currentRow = target.find((row) => {
1794
+ let currentRow = target.find((row) => {
1725
1795
  if (!row || typeof row !== "object") return false;
1726
1796
  if (rowKey != null && isTableRowKeyMatch(rowKey, row[FRONT_ROW_KEY])) return true;
1727
1797
  return savedId != null && row.id_ != null && String(row.id_) === String(savedId);
1728
1798
  });
1729
- if (currentRow) this.mergeSavedMetadata(currentRow, savedRow, path);
1799
+ let matchedByGroup = false;
1800
+ if (!currentRow && Array.isArray(savedRow?._2DTABLE_) && savedRow.group_ != null && String(savedRow.group_).trim() !== "") {
1801
+ const matchingGroups = target.filter(
1802
+ (row) => Array.isArray(row?._2DTABLE_) && row.group_ != null && String(row.group_) === String(savedRow.group_)
1803
+ );
1804
+ if (matchingGroups.length === 1) {
1805
+ currentRow = matchingGroups[0];
1806
+ matchedByGroup = true;
1807
+ }
1808
+ }
1809
+ if (currentRow) {
1810
+ this.mergeSavedMetadata(
1811
+ currentRow,
1812
+ matchedByGroup ? { ...savedRow, [FRONT_ROW_KEY]: currentRow[FRONT_ROW_KEY] } : savedRow,
1813
+ path
1814
+ );
1815
+ }
1730
1816
  });
1731
1817
  return target;
1732
1818
  }
@@ -1822,6 +1908,7 @@ class RuntimeAsyncTaskCoordinator {
1822
1908
  fieldIdentity: options.fieldIdentity,
1823
1909
  sheetId: options.sheetId,
1824
1910
  required: options.required !== false,
1911
+ blockOnFailure: options.blockOnFailure !== false,
1825
1912
  status: "pending",
1826
1913
  sequence,
1827
1914
  promise: task,
@@ -1865,7 +1952,7 @@ class RuntimeAsyncTaskCoordinator {
1865
1952
  * 等待全部 required 任务达到稳定状态。
1866
1953
  *
1867
1954
  * 一轮任务完成后的字段回填可能触发新的公式或远程任务,因此这里循环读取任务表,直到
1868
- * 没有新的 pending required 任务。稳定后统一检查失败项,使提交事务得到明确失败原因。
1955
+ * 没有新的 pending required 任务。稳定后只检查需要阻断提交的失败项。
1869
1956
  */
1870
1957
  async waitForRequired(keyPrefix) {
1871
1958
  const matches = (task) => task.required && (!keyPrefix || task.key.startsWith(keyPrefix));
@@ -1877,7 +1964,7 @@ class RuntimeAsyncTaskCoordinator {
1877
1964
  await Promise.allSettled(pending.map((task) => task.promise));
1878
1965
  }
1879
1966
  const failed = Array.from(this.tasks.values()).filter(
1880
- (task) => matches(task) && task.status === "rejected"
1967
+ (task) => matches(task) && task.blockOnFailure && task.status === "rejected"
1881
1968
  );
1882
1969
  if (failed.length) {
1883
1970
  const details = failed.map((task) => {
@@ -2053,7 +2140,7 @@ function format(template) {
2053
2140
  function isNativeStringType(type4) {
2054
2141
  return type4 === "string" || type4 === "url" || type4 === "hex" || type4 === "email" || type4 === "date" || type4 === "pattern";
2055
2142
  }
2056
- function isEmptyValue(value, type4) {
2143
+ function isEmptyValue$1(value, type4) {
2057
2144
  if (value === void 0 || value === null) {
2058
2145
  return true;
2059
2146
  }
@@ -2212,7 +2299,7 @@ function deepMerge(target, source) {
2212
2299
  return target;
2213
2300
  }
2214
2301
  var required$1 = function required(rule, value, source, errors, options, type4) {
2215
- if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type4 || rule.type))) {
2302
+ if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue$1(value, type4 || rule.type))) {
2216
2303
  errors.push(format(options.messages.required, rule.fullField));
2217
2304
  }
2218
2305
  };
@@ -2399,11 +2486,11 @@ var string = function string2(rule, value, callback, source, options) {
2399
2486
  var errors = [];
2400
2487
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2401
2488
  if (validate) {
2402
- if (isEmptyValue(value, "string") && !rule.required) {
2489
+ if (isEmptyValue$1(value, "string") && !rule.required) {
2403
2490
  return callback();
2404
2491
  }
2405
2492
  rules.required(rule, value, source, errors, options, "string");
2406
- if (!isEmptyValue(value, "string")) {
2493
+ if (!isEmptyValue$1(value, "string")) {
2407
2494
  rules.type(rule, value, source, errors, options);
2408
2495
  rules.range(rule, value, source, errors, options);
2409
2496
  rules.pattern(rule, value, source, errors, options);
@@ -2418,7 +2505,7 @@ var method2 = function method3(rule, value, callback, source, options) {
2418
2505
  var errors = [];
2419
2506
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2420
2507
  if (validate) {
2421
- if (isEmptyValue(value) && !rule.required) {
2508
+ if (isEmptyValue$1(value) && !rule.required) {
2422
2509
  return callback();
2423
2510
  }
2424
2511
  rules.required(rule, value, source, errors, options);
@@ -2435,7 +2522,7 @@ var number2 = function number3(rule, value, callback, source, options) {
2435
2522
  if (value === "") {
2436
2523
  value = void 0;
2437
2524
  }
2438
- if (isEmptyValue(value) && !rule.required) {
2525
+ if (isEmptyValue$1(value) && !rule.required) {
2439
2526
  return callback();
2440
2527
  }
2441
2528
  rules.required(rule, value, source, errors, options);
@@ -2450,7 +2537,7 @@ var _boolean = function _boolean2(rule, value, callback, source, options) {
2450
2537
  var errors = [];
2451
2538
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2452
2539
  if (validate) {
2453
- if (isEmptyValue(value) && !rule.required) {
2540
+ if (isEmptyValue$1(value) && !rule.required) {
2454
2541
  return callback();
2455
2542
  }
2456
2543
  rules.required(rule, value, source, errors, options);
@@ -2464,11 +2551,11 @@ var regexp2 = function regexp3(rule, value, callback, source, options) {
2464
2551
  var errors = [];
2465
2552
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2466
2553
  if (validate) {
2467
- if (isEmptyValue(value) && !rule.required) {
2554
+ if (isEmptyValue$1(value) && !rule.required) {
2468
2555
  return callback();
2469
2556
  }
2470
2557
  rules.required(rule, value, source, errors, options);
2471
- if (!isEmptyValue(value)) {
2558
+ if (!isEmptyValue$1(value)) {
2472
2559
  rules.type(rule, value, source, errors, options);
2473
2560
  }
2474
2561
  }
@@ -2478,7 +2565,7 @@ var integer2 = function integer3(rule, value, callback, source, options) {
2478
2565
  var errors = [];
2479
2566
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2480
2567
  if (validate) {
2481
- if (isEmptyValue(value) && !rule.required) {
2568
+ if (isEmptyValue$1(value) && !rule.required) {
2482
2569
  return callback();
2483
2570
  }
2484
2571
  rules.required(rule, value, source, errors, options);
@@ -2493,7 +2580,7 @@ var floatFn = function floatFn2(rule, value, callback, source, options) {
2493
2580
  var errors = [];
2494
2581
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2495
2582
  if (validate) {
2496
- if (isEmptyValue(value) && !rule.required) {
2583
+ if (isEmptyValue$1(value) && !rule.required) {
2497
2584
  return callback();
2498
2585
  }
2499
2586
  rules.required(rule, value, source, errors, options);
@@ -2523,7 +2610,7 @@ var object2 = function object3(rule, value, callback, source, options) {
2523
2610
  var errors = [];
2524
2611
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2525
2612
  if (validate) {
2526
- if (isEmptyValue(value) && !rule.required) {
2613
+ if (isEmptyValue$1(value) && !rule.required) {
2527
2614
  return callback();
2528
2615
  }
2529
2616
  rules.required(rule, value, source, errors, options);
@@ -2538,7 +2625,7 @@ var enumerable2 = function enumerable3(rule, value, callback, source, options) {
2538
2625
  var errors = [];
2539
2626
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2540
2627
  if (validate) {
2541
- if (isEmptyValue(value) && !rule.required) {
2628
+ if (isEmptyValue$1(value) && !rule.required) {
2542
2629
  return callback();
2543
2630
  }
2544
2631
  rules.required(rule, value, source, errors, options);
@@ -2552,11 +2639,11 @@ var pattern2 = function pattern3(rule, value, callback, source, options) {
2552
2639
  var errors = [];
2553
2640
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2554
2641
  if (validate) {
2555
- if (isEmptyValue(value, "string") && !rule.required) {
2642
+ if (isEmptyValue$1(value, "string") && !rule.required) {
2556
2643
  return callback();
2557
2644
  }
2558
2645
  rules.required(rule, value, source, errors, options);
2559
- if (!isEmptyValue(value, "string")) {
2646
+ if (!isEmptyValue$1(value, "string")) {
2560
2647
  rules.pattern(rule, value, source, errors, options);
2561
2648
  }
2562
2649
  }
@@ -2566,11 +2653,11 @@ var date2 = function date3(rule, value, callback, source, options) {
2566
2653
  var errors = [];
2567
2654
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2568
2655
  if (validate) {
2569
- if (isEmptyValue(value, "date") && !rule.required) {
2656
+ if (isEmptyValue$1(value, "date") && !rule.required) {
2570
2657
  return callback();
2571
2658
  }
2572
2659
  rules.required(rule, value, source, errors, options);
2573
- if (!isEmptyValue(value, "date")) {
2660
+ if (!isEmptyValue$1(value, "date")) {
2574
2661
  var dateObject;
2575
2662
  if (value instanceof Date) {
2576
2663
  dateObject = value;
@@ -2596,11 +2683,11 @@ var type2 = function type3(rule, value, callback, source, options) {
2596
2683
  var errors = [];
2597
2684
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2598
2685
  if (validate) {
2599
- if (isEmptyValue(value, ruleType) && !rule.required) {
2686
+ if (isEmptyValue$1(value, ruleType) && !rule.required) {
2600
2687
  return callback();
2601
2688
  }
2602
2689
  rules.required(rule, value, source, errors, options, ruleType);
2603
- if (!isEmptyValue(value, ruleType)) {
2690
+ if (!isEmptyValue$1(value, ruleType)) {
2604
2691
  rules.type(rule, value, source, errors, options);
2605
2692
  }
2606
2693
  }
@@ -2610,7 +2697,7 @@ var any = function any2(rule, value, callback, source, options) {
2610
2697
  var errors = [];
2611
2698
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
2612
2699
  if (validate) {
2613
- if (isEmptyValue(value) && !rule.required) {
2700
+ if (isEmptyValue$1(value) && !rule.required) {
2614
2701
  return callback();
2615
2702
  }
2616
2703
  rules.required(rule, value, source, errors, options);
@@ -2947,6 +3034,504 @@ Schema.register = function register(type4, validator) {
2947
3034
  Schema.warning = warning;
2948
3035
  Schema.messages = messages;
2949
3036
  Schema.validators = validators;
3037
+ const stampKeys = [
3038
+ "sealId",
3039
+ "sealName",
3040
+ "sealType",
3041
+ "sealImage",
3042
+ "sealUserId",
3043
+ "sealUserName",
3044
+ "sealUserTime"
3045
+ ];
3046
+ function isSealPosition(value) {
3047
+ if (!value || typeof value !== "object") return false;
3048
+ const p = value;
3049
+ return typeof p.sheetId === "string" && !!p.sheetId && Number.isInteger(p.pageIndex) && p.pageIndex >= 0 && Number.isFinite(p.leftMm) && p.leftMm >= 0 && Number.isFinite(p.topMm) && p.topMm >= 0;
3050
+ }
3051
+ function readSealValue(raw, fallback) {
3052
+ let parsed = {};
3053
+ try {
3054
+ const value = typeof raw === "string" ? JSON.parse(raw || "{}") : raw;
3055
+ if (value && typeof value === "object" && !Array.isArray(value)) parsed = value;
3056
+ } catch {
3057
+ }
3058
+ const stamp = Object.fromEntries(
3059
+ stampKeys.map((key) => [key, typeof parsed[key] === "string" ? parsed[key] : ""])
3060
+ );
3061
+ return {
3062
+ ...stamp,
3063
+ sealPosition: { ...isSealPosition(parsed.sealPosition) ? parsed.sealPosition : fallback }
3064
+ };
3065
+ }
3066
+ function isSealStamped(raw) {
3067
+ try {
3068
+ const value = typeof raw === "string" ? JSON.parse(raw || "{}") : raw;
3069
+ return !!value && typeof value.sealId === "string" && !!value.sealId && typeof value.sealImage === "string" && !!value.sealImage;
3070
+ } catch {
3071
+ return false;
3072
+ }
3073
+ }
3074
+ function isValidSealValue(raw) {
3075
+ try {
3076
+ const value = typeof raw === "string" ? JSON.parse(raw || "{}") : raw;
3077
+ return !!value && stampKeys.every((key) => typeof value[key] === "string") && isSealPosition(value.sealPosition) && (stampKeys.every((key) => !value[key]) || stampKeys.every((key) => !!value[key]));
3078
+ } catch {
3079
+ return false;
3080
+ }
3081
+ }
3082
+ function moveSealValue(raw, fallback, position) {
3083
+ return JSON.stringify({ ...readSealValue(raw, fallback), sealPosition: { ...position } });
3084
+ }
3085
+ function stampSealValue(raw, fallback, stamp) {
3086
+ const current = readSealValue(raw, fallback);
3087
+ const next = readSealValue({ ...stamp, sealPosition: current.sealPosition }, fallback);
3088
+ return JSON.stringify(next);
3089
+ }
3090
+ function clearSealValue(raw, fallback) {
3091
+ return JSON.stringify(
3092
+ readSealValue({ sealPosition: readSealValue(raw, fallback).sealPosition }, fallback)
3093
+ );
3094
+ }
3095
+ function normalizeSealDiameter(value) {
3096
+ const diameter = Number(value);
3097
+ return Number.isFinite(diameter) && diameter > 0 ? Math.min(diameter, 200) : 42;
3098
+ }
3099
+ function clampSealPosition(position, widthMm, heightMm, diameterMm) {
3100
+ return {
3101
+ ...position,
3102
+ leftMm: Math.max(0, Math.min(position.leftMm, Math.max(0, widthMm - diameterMm))),
3103
+ topMm: Math.max(0, Math.min(position.topMm, Math.max(0, heightMm - diameterMm)))
3104
+ };
3105
+ }
3106
+ function initializeSealFields(fields, formData) {
3107
+ for (const { props } of fields) {
3108
+ if (!props.field || props.isFieldModel || props.subFieldKey) continue;
3109
+ const raw = formData[props.field];
3110
+ if (raw == null || raw === "") {
3111
+ formData[props.field] = JSON.stringify(readSealValue("", props.sealPosition));
3112
+ continue;
3113
+ }
3114
+ try {
3115
+ const parsed = typeof raw === "string" ? JSON.parse(raw) : raw;
3116
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) continue;
3117
+ if (!isSealPosition(parsed.sealPosition)) {
3118
+ formData[props.field] = JSON.stringify({
3119
+ ...parsed,
3120
+ sealPosition: { ...props.sealPosition }
3121
+ });
3122
+ } else if (typeof raw !== "string") {
3123
+ formData[props.field] = JSON.stringify(parsed);
3124
+ }
3125
+ } catch {
3126
+ }
3127
+ }
3128
+ }
3129
+ const { identify, calculate: calculate$1 } = {
3130
+ identify: (expression) => window.NocodeAdapter.utils?.formulaIdentify?.(expression) ?? [],
3131
+ calculate: (expression, data) => window.NocodeAdapter.utils?.formulaCalculate?.(expression, data)
3132
+ };
3133
+ const getFieldDataValue = (parseInfo, formData) => {
3134
+ const getTextValue = (processedKey, value) => {
3135
+ const textValue = value ?? formData?.[processedKey] ?? "";
3136
+ return Array.isArray(textValue) ? textValue.join() : textValue;
3137
+ };
3138
+ const { type: type4, processed, hashValue } = parseInfo;
3139
+ if (type4 === "hash") {
3140
+ const tableData = toRaw(formData?.[hashValue] || []);
3141
+ return tableData.filter((d) => !d.deleted_).map((row) => getTextValue(processed, row?.[processed])).filter((i) => !isNil(i));
3142
+ }
3143
+ return getTextValue(processed, formData?.[processed]);
3144
+ };
3145
+ const parseFormulaVar = (formulaVar) => {
3146
+ const result = {
3147
+ original: formulaVar,
3148
+ type: "",
3149
+ processed: "",
3150
+ hashValue: "",
3151
+ dataType: ""
3152
+ };
3153
+ if (/^\$([^$]+)\$\.(.+)$/.test(formulaVar)) {
3154
+ const match = formulaVar.match(/^\$([^$]+)\$\.(.+)$/);
3155
+ result.type = "hash";
3156
+ result.processed = match[2];
3157
+ result.hashValue = match[1];
3158
+ result.dataType = "globType";
3159
+ } else if (/^_\.(.+)$/.test(formulaVar)) {
3160
+ const match = formulaVar.match(/^_\.(.+)$/);
3161
+ result.type = "underscore";
3162
+ result.processed = match[1];
3163
+ result.dataType = "currentRowType";
3164
+ } else {
3165
+ result.type = "plain";
3166
+ result.processed = formulaVar;
3167
+ result.dataType = "globType";
3168
+ }
3169
+ return result;
3170
+ };
3171
+ const getParseFormulaVarInfos = (expr) => {
3172
+ const rowArgs = expr ? identify(expr) : [];
3173
+ return {
3174
+ rowArgs,
3175
+ parseInfos: rowArgs.map((curr) => parseFormulaVar(curr))
3176
+ };
3177
+ };
3178
+ const calculateFormula = async (expr, formData, instanceFormState) => {
3179
+ const rowArgs = identify(expr);
3180
+ const formulaData = isEmpty(rowArgs) ? {} : rowArgs.reduce((total, curr) => {
3181
+ const parseInfo = parseFormulaVar(curr);
3182
+ total[curr] = getFieldDataValue(
3183
+ parseInfo,
3184
+ parseInfo.dataType === "currentRowType" ? formData : instanceFormState
3185
+ );
3186
+ return total;
3187
+ }, {});
3188
+ return calculate$1(expr, formulaData);
3189
+ };
3190
+ const isEmptyValue = (value) => {
3191
+ return value === void 0 || value === null || typeof value === "string" && value.trim() === "" || Array.isArray(value) && value.length === 0;
3192
+ };
3193
+ const compareByOp = (left, right, op) => {
3194
+ switch (op) {
3195
+ case RangeCompareOp.LT:
3196
+ return left < right;
3197
+ case RangeCompareOp.LE:
3198
+ return left <= right;
3199
+ case RangeCompareOp.GT:
3200
+ return left > right;
3201
+ case RangeCompareOp.GE:
3202
+ default:
3203
+ return left >= right;
3204
+ }
3205
+ };
3206
+ const rangeCompareMessage = (op, val) => {
3207
+ switch (op) {
3208
+ case RangeCompareOp.LT:
3209
+ return $t("sys.fieldValueNotGreaterOrEqual", { val });
3210
+ case RangeCompareOp.LE:
3211
+ return $t("sys.fieldValueNoMoreThan", { val });
3212
+ case RangeCompareOp.GT:
3213
+ return $t("sys.fieldValueNotLessOrEqual", { val });
3214
+ case RangeCompareOp.GE:
3215
+ default:
3216
+ return $t("sys.fieldValueNotLessThan", { val });
3217
+ }
3218
+ };
3219
+ const toUnixTimestamp = (input) => {
3220
+ if (isNil(input) || input === "") return null;
3221
+ const asNumber = typeof input === "number" || typeof input === "string" && /^-?\d+(\.\d+)?$/.test(input.trim());
3222
+ if (asNumber) {
3223
+ const n = Number(input);
3224
+ if (Number.isNaN(n)) return null;
3225
+ const parsed2 = n > 1e12 ? dayjs(n) : dayjs.unix(n);
3226
+ return parsed2.isValid() ? parsed2.unix() : null;
3227
+ }
3228
+ const parsed = dayjs(input);
3229
+ return parsed.isValid() ? parsed.unix() : null;
3230
+ };
3231
+ const buildError = (validatorInfo, message2) => JSON.stringify({ ...validatorInfo, message: message2 });
3232
+ function areValidationCommentsEqual(left, right) {
3233
+ const serialize = (comments) => JSON.stringify(
3234
+ comments,
3235
+ (_key, value) => value && typeof value === "object" && "message" in value ? { ...value, message: value.message } : value
3236
+ );
3237
+ return serialize(left) === serialize(right);
3238
+ }
3239
+ const createRule = (validator, message2, trigger = "change") => ({
3240
+ required: true,
3241
+ validator,
3242
+ message: message2,
3243
+ trigger
3244
+ });
3245
+ function relocateDeletedRowsToEnd(rows = []) {
3246
+ const active = [];
3247
+ const deleted = [];
3248
+ for (const row of rows) {
3249
+ if (row?.deleted_) deleted.push(row);
3250
+ else active.push(row);
3251
+ }
3252
+ return [...active, ...deleted];
3253
+ }
3254
+ function filterRulesByTrigger(rules2, trigger) {
3255
+ return rules2.filter((rule) => {
3256
+ const ruleTrigger = rule.trigger;
3257
+ if (!ruleTrigger) return trigger === "change";
3258
+ if (trigger === "blur") {
3259
+ return ruleTrigger === "blur" || ruleTrigger === "change";
3260
+ }
3261
+ return ruleTrigger === trigger;
3262
+ });
3263
+ }
3264
+ function assembleRules(input) {
3265
+ const { showRequired, fieldType, validatorInfo, props } = input;
3266
+ const {
3267
+ minlength,
3268
+ maxlength,
3269
+ regex,
3270
+ regexHint,
3271
+ validateTrue,
3272
+ validateFalse,
3273
+ enableRangeValidate,
3274
+ maxValidateMode,
3275
+ minValidateMode,
3276
+ maxCompareOp,
3277
+ minCompareOp,
3278
+ minValue,
3279
+ maxValue,
3280
+ minFormulaExpr,
3281
+ maxFormulaExpr,
3282
+ minDate,
3283
+ maxDate,
3284
+ minDateFormulaExpr,
3285
+ maxDateFormulaExpr,
3286
+ maxDateValidateMode,
3287
+ minDateValidateMode
3288
+ } = props;
3289
+ const resolvedMaxCompareOp = maxCompareOp ?? RangeCompareOp.LE;
3290
+ const resolvedMinCompareOp = minCompareOp ?? RangeCompareOp.GE;
3291
+ const RuleProps = [];
3292
+ if (props.bizType === FIELD_TYPE.SEAL) {
3293
+ if (showRequired) {
3294
+ RuleProps.push(
3295
+ createRule(
3296
+ (_rule, value) => isSealStamped(value),
3297
+ buildError(
3298
+ { ...validatorInfo, validationCode: "seal-required" },
3299
+ $t("sys.fieldRequired")
3300
+ ),
3301
+ "manual"
3302
+ )
3303
+ );
3304
+ }
3305
+ RuleProps.push(createRule((_rule, value) => isEmptyValue(value) || isValidSealValue(value), buildError(validatorInfo, $t("sys.seal.invalid"))));
3306
+ return RuleProps;
3307
+ }
3308
+ if (showRequired) {
3309
+ RuleProps.push(
3310
+ createRule(
3311
+ (_rule, value) => !isEmptyValue(value),
3312
+ buildError(validatorInfo, $t("sys.fieldRequired")),
3313
+ "manual"
3314
+ )
3315
+ );
3316
+ }
3317
+ if (!isNil(minlength)) {
3318
+ RuleProps.push(
3319
+ createRule((_rule, value) => {
3320
+ if (isEmptyValue(value)) return true;
3321
+ return String(value).length >= minlength;
3322
+ }, buildError(validatorInfo, $t("sys.fieldLengthNotLessThan", { len: minlength })))
3323
+ );
3324
+ }
3325
+ const effectiveMaxlength = isNil(maxlength) && fieldType === FIELD_TYPE.TEXT ? 1024 : maxlength;
3326
+ if (!isNil(effectiveMaxlength)) {
3327
+ RuleProps.push(
3328
+ createRule((_rule, value) => {
3329
+ if (isEmptyValue(value)) return true;
3330
+ return String(value).length <= effectiveMaxlength;
3331
+ }, buildError(validatorInfo, $t("sys.fieldLengthNoMoreThan", { len: effectiveMaxlength })))
3332
+ );
3333
+ }
3334
+ if (regex) {
3335
+ RuleProps.push(
3336
+ createRule((_rule, value) => {
3337
+ if (isEmptyValue(value)) return true;
3338
+ return new RegExp(regex).test(value);
3339
+ }, buildError(validatorInfo, regexHint ?? $t("sys.fieldFormatError")))
3340
+ );
3341
+ }
3342
+ if (validateTrue) {
3343
+ RuleProps.push({
3344
+ required: true,
3345
+ trigger: "manual",
3346
+ validator: (_rule, value) => value === true,
3347
+ message: buildError(validatorInfo, $t("sys.fieldValueNeedTrue"))
3348
+ });
3349
+ }
3350
+ if (validateFalse) {
3351
+ RuleProps.push({
3352
+ required: true,
3353
+ trigger: "manual",
3354
+ validator: (_rule, value) => value === false,
3355
+ message: buildError(validatorInfo, $t("sys.fieldValueNeedFalse"))
3356
+ });
3357
+ }
3358
+ if (!enableRangeValidate) {
3359
+ return RuleProps;
3360
+ }
3361
+ if (minValidateMode === RangeValidateMode.Fixed_Number && !isEmptyValue(minValue)) {
3362
+ RuleProps.push(
3363
+ createRule((_rule, value) => {
3364
+ if (isEmptyValue(value)) return true;
3365
+ return compareByOp(Number(value), Number(minValue), resolvedMinCompareOp);
3366
+ }, buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, minValue)))
3367
+ );
3368
+ }
3369
+ if (minValidateMode === RangeValidateMode.Variable_Validate && minFormulaExpr) {
3370
+ RuleProps.push({
3371
+ required: true,
3372
+ trigger: "change",
3373
+ validator: async (_rule, value, _callback, _source, options) => {
3374
+ const currentFormData = getCurrentFormData(_rule, options);
3375
+ const formulaValue = await calculateFormula(
3376
+ minFormulaExpr,
3377
+ currentFormData,
3378
+ options?.formData
3379
+ );
3380
+ if (isEmptyValue(formulaValue)) {
3381
+ return Promise.resolve();
3382
+ }
3383
+ const parsedMin = parseFloat(formulaValue);
3384
+ if (!isNaN(parsedMin)) {
3385
+ if (isEmptyValue(value)) {
3386
+ return Promise.resolve();
3387
+ }
3388
+ if (!compareByOp(Number(value), parsedMin, resolvedMinCompareOp)) {
3389
+ return Promise.reject(
3390
+ new Error(
3391
+ buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, parsedMin))
3392
+ )
3393
+ );
3394
+ }
3395
+ }
3396
+ return Promise.resolve();
3397
+ }
3398
+ });
3399
+ }
3400
+ if (maxValidateMode === RangeValidateMode.Fixed_Number && !isEmptyValue(maxValue)) {
3401
+ RuleProps.push(
3402
+ createRule((_rule, value) => {
3403
+ if (isEmptyValue(value)) return true;
3404
+ return compareByOp(Number(value), Number(maxValue), resolvedMaxCompareOp);
3405
+ }, buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, maxValue)))
3406
+ );
3407
+ }
3408
+ if (maxValidateMode === RangeValidateMode.Variable_Validate && maxFormulaExpr) {
3409
+ RuleProps.push({
3410
+ required: true,
3411
+ trigger: "change",
3412
+ validator: async (_rule, value, _callback, _source, options) => {
3413
+ const currentFormData = getCurrentFormData(_rule, options);
3414
+ const formulaValue = await calculateFormula(
3415
+ maxFormulaExpr,
3416
+ currentFormData,
3417
+ options?.formData
3418
+ );
3419
+ if (isEmptyValue(formulaValue)) {
3420
+ return Promise.resolve();
3421
+ }
3422
+ const parsedMax = parseFloat(formulaValue);
3423
+ if (!isNaN(parsedMax)) {
3424
+ if (isEmptyValue(value)) {
3425
+ return Promise.resolve();
3426
+ }
3427
+ if (!compareByOp(Number(value), parsedMax, resolvedMaxCompareOp)) {
3428
+ return Promise.reject(
3429
+ new Error(
3430
+ buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, parsedMax))
3431
+ )
3432
+ );
3433
+ }
3434
+ }
3435
+ return Promise.resolve();
3436
+ }
3437
+ });
3438
+ }
3439
+ if (minDateValidateMode === RangeValidateMode.Fixed_Number && minDate) {
3440
+ RuleProps.push(
3441
+ createRule((_rule, value) => {
3442
+ if (isEmptyValue(value)) return true;
3443
+ const inputTime = dayjs(value).unix();
3444
+ const minTimestamp = dayjs(minDate).unix();
3445
+ if (!dayjs(value).isValid() || !dayjs(minDate).isValid()) return true;
3446
+ return compareByOp(inputTime, minTimestamp, resolvedMinCompareOp);
3447
+ }, buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, minDate)))
3448
+ );
3449
+ }
3450
+ if (maxDateValidateMode === RangeValidateMode.Fixed_Number && maxDate) {
3451
+ RuleProps.push(
3452
+ createRule((_rule, value) => {
3453
+ if (isEmptyValue(value)) return true;
3454
+ const inputTime = dayjs(value).unix();
3455
+ const maxTimestamp = dayjs(maxDate).unix();
3456
+ if (!dayjs(value).isValid() || !dayjs(maxDate).isValid()) return true;
3457
+ return compareByOp(inputTime, maxTimestamp, resolvedMaxCompareOp);
3458
+ }, buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, maxDate)))
3459
+ );
3460
+ }
3461
+ if (minDateValidateMode === RangeValidateMode.Variable_Validate && minDateFormulaExpr) {
3462
+ RuleProps.push({
3463
+ required: true,
3464
+ trigger: "change",
3465
+ validator: async (_rule, value, _callback, _source, options) => {
3466
+ const currentFormData = getCurrentFormData(_rule, options);
3467
+ const formulaValue = await calculateFormula(
3468
+ minDateFormulaExpr,
3469
+ currentFormData,
3470
+ options?.formData
3471
+ );
3472
+ const limitTime = toUnixTimestamp(formulaValue);
3473
+ if (limitTime !== null) {
3474
+ if (isEmptyValue(value)) {
3475
+ return Promise.resolve();
3476
+ }
3477
+ if (!dayjs(value).isValid()) {
3478
+ return Promise.resolve();
3479
+ }
3480
+ const inputTime = dayjs(value).unix();
3481
+ const fmt = fieldType === FIELD_TYPE.DATE_TIME ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
3482
+ if (!compareByOp(inputTime, limitTime, resolvedMinCompareOp)) {
3483
+ return Promise.reject(
3484
+ new Error(
3485
+ buildError(
3486
+ validatorInfo,
3487
+ rangeCompareMessage(resolvedMinCompareOp, dayjs.unix(limitTime).format(fmt))
3488
+ )
3489
+ )
3490
+ );
3491
+ }
3492
+ }
3493
+ return Promise.resolve();
3494
+ }
3495
+ });
3496
+ }
3497
+ if (maxDateValidateMode === RangeValidateMode.Variable_Validate && maxDateFormulaExpr) {
3498
+ RuleProps.push({
3499
+ required: true,
3500
+ trigger: "change",
3501
+ validator: async (_rule, value, _callback, _source, options) => {
3502
+ const currentFormData = getCurrentFormData(_rule, options);
3503
+ const formulaValue = await calculateFormula(
3504
+ maxDateFormulaExpr,
3505
+ currentFormData,
3506
+ options?.formData
3507
+ );
3508
+ const limitTime = toUnixTimestamp(formulaValue);
3509
+ if (limitTime !== null) {
3510
+ if (isEmptyValue(value)) {
3511
+ return Promise.resolve();
3512
+ }
3513
+ if (!dayjs(value).isValid()) {
3514
+ return Promise.resolve();
3515
+ }
3516
+ const inputTime = dayjs(value).unix();
3517
+ const fmt = fieldType === FIELD_TYPE.DATE_TIME ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
3518
+ if (!compareByOp(inputTime, limitTime, resolvedMaxCompareOp)) {
3519
+ return Promise.reject(
3520
+ new Error(
3521
+ buildError(
3522
+ validatorInfo,
3523
+ rangeCompareMessage(resolvedMaxCompareOp, dayjs.unix(limitTime).format(fmt))
3524
+ )
3525
+ )
3526
+ );
3527
+ }
3528
+ }
3529
+ return Promise.resolve();
3530
+ }
3531
+ });
3532
+ }
3533
+ return RuleProps;
3534
+ }
2950
3535
  function resolveKeepExceptionHighlight(formValue, fieldValue) {
2951
3536
  if (typeof fieldValue === "boolean") {
2952
3537
  return fieldValue;
@@ -3072,7 +3657,7 @@ function clearResolvedManualErrors(map, resolvePayload) {
3072
3657
  if (!payload) continue;
3073
3658
  const hasManual = filterRulesByTrigger(payload.rules, "manual").length > 0;
3074
3659
  const hasLive = filterRulesByTrigger(payload.rules, "change").length > 0;
3075
- if (hasManual && !hasLive && !isEmptyValue$1(payload.value)) {
3660
+ if (hasManual && !hasLive && !isEmptyValue(payload.value)) {
3076
3661
  delete next[path];
3077
3662
  }
3078
3663
  }
@@ -3086,7 +3671,7 @@ function mergeLiveValidation(current, liveResult, livePaths, resolvePayload) {
3086
3671
  continue;
3087
3672
  }
3088
3673
  const payload = resolvePayload(path);
3089
- const keepManualComment = !!payload && filterRulesByTrigger(payload.rules, "manual").length > 0 && isEmptyValue$1(payload.value) && !!base[path]?.length;
3674
+ const keepManualComment = !!payload && filterRulesByTrigger(payload.rules, "manual").length > 0 && isEmptyValue(payload.value) && !!base[path]?.length;
3090
3675
  if (!keepManualComment) {
3091
3676
  delete base[path];
3092
3677
  }
@@ -3129,7 +3714,7 @@ function mergeDisplayValidation(current, displayResult, ruleKeys, validatedPaths
3129
3714
  next[path] = displayResult[path];
3130
3715
  } else {
3131
3716
  const payload = resolvePayload(path);
3132
- const keepManualComment = !!payload && filterRulesByTrigger(payload.rules, "manual").length > 0 && isEmptyValue$1(payload.value) && !!next[path]?.length;
3717
+ const keepManualComment = !!payload && filterRulesByTrigger(payload.rules, "manual").length > 0 && isEmptyValue(payload.value) && !!next[path]?.length;
3133
3718
  if (!keepManualComment) delete next[path];
3134
3719
  }
3135
3720
  }
@@ -3223,11 +3808,12 @@ class RuntimeValidationService {
3223
3808
  this.pendingLive = this.pendingLive === "blur" ? "blur" : trigger;
3224
3809
  if (this.liveTimer) clearTimeout(this.liveTimer);
3225
3810
  this.liveTimer = void 0;
3226
- if (immediate) void this.flushLive().catch((error) => console.error("字段校验失败", error));
3811
+ if (immediate)
3812
+ void this.flushLive().catch((error) => this.logBackgroundError("字段校验失败", error));
3227
3813
  else
3228
3814
  this.liveTimer = setTimeout(() => {
3229
3815
  this.liveTimer = void 0;
3230
- void this.flushLive().catch((error) => console.error("字段校验失败", error));
3816
+ void this.flushLive().catch((error) => this.logBackgroundError("字段校验失败", error));
3231
3817
  }, 300);
3232
3818
  }
3233
3819
  async flushLive() {
@@ -3249,11 +3835,17 @@ class RuntimeValidationService {
3249
3835
  this.displayTimer = void 0;
3250
3836
  const run = () => {
3251
3837
  this.displayTimer = void 0;
3252
- void this.validate("display").catch((error) => console.error("字段展示校验失败", error));
3838
+ void this.validate("display").catch(
3839
+ (error) => this.logBackgroundError("字段展示校验失败", error)
3840
+ );
3253
3841
  };
3254
3842
  if (immediate) run();
3255
3843
  else this.displayTimer = setTimeout(run, 320);
3256
3844
  }
3845
+ logBackgroundError(label, error) {
3846
+ if (error instanceof Error && error.message.startsWith("以下异步任务执行失败:")) return;
3847
+ console.error(label, error);
3848
+ }
3257
3849
  pruneComments() {
3258
3850
  if (!this.binding || this.disposed) return;
3259
3851
  this.binding.applyComments(
@@ -4588,7 +5180,16 @@ class BomEntriesValidator {
4588
5180
  memberIndexes.push(idx);
4589
5181
  if (byLot && !row.material_no_) emptyLotIndexes.push(idx);
4590
5182
  });
4591
- const needInsert = !this.groupExistsInTable(arr, target);
5183
+ const targetExists = this.groupExistsInTable(arr, target);
5184
+ if (!targetExists) {
5185
+ const index = arr.findIndex((row2) => !row2.deleted_);
5186
+ const row = arr[index];
5187
+ const canReuse = row && !row.product_id_ && !row.bom_entry_id_ && !row.is_confirmed_ && arr.every((item, idx) => item.deleted_ || idx === index);
5188
+ if (canReuse) {
5189
+ emptyProductIndexes.push(index);
5190
+ }
5191
+ }
5192
+ const needInsert = !targetExists && emptyProductIndexes.length === 0;
4592
5193
  const last2 = memberIndexes[memberIndexes.length - 1];
4593
5194
  let groupInsertIndex = -1;
4594
5195
  if (needInsert) {
@@ -5213,7 +5814,8 @@ class MaterialConsumeTableController {
5213
5814
  constructor(tmplBomController, tmplBom, options = {}) {
5214
5815
  this.tmplBomController = tmplBomController;
5215
5816
  this.tmplBom = tmplBom;
5216
- if (!options.printOnly) this.initScanRule(this.tmplBom.barcode_parsing_rules_id_);
5817
+ if (!options.printOnly && this.hasFormInstance)
5818
+ this.initScanRule(this.tmplBom.barcode_parsing_rules_id_);
5217
5819
  this.scanParamType = this.tmplBom.scan_param_type_;
5218
5820
  markRaw(this);
5219
5821
  this.bomEntriesValidator = new BomEntriesValidator(
@@ -5276,6 +5878,9 @@ class MaterialConsumeTableController {
5276
5878
  get mcPattern() {
5277
5879
  return this.tmplBom.material_consumption_pattern_ ?? this.tmplBomController.defaultMCPattern;
5278
5880
  }
5881
+ get hasFormInstance() {
5882
+ return this.tmplBomController.hasFormInstance;
5883
+ }
5279
5884
  /**
5280
5885
  * 解析规则数据对象
5281
5886
  */
@@ -5528,6 +6133,10 @@ class MaterialConsumeTableController {
5528
6133
  }
5529
6134
  const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_;
5530
6135
  console.log("parseScanStr", data);
6136
+ if (!data.lot && !data.uniqueCode) {
6137
+ this.error($t("sys.edhr.mcTable.lotOrUniqueCodeRequired"));
6138
+ return;
6139
+ }
5531
6140
  const arr = await materialCheck({
5532
6141
  material_no_: data.materialCode,
5533
6142
  production_identification_name_: data.lot,
@@ -6022,7 +6631,16 @@ class MaterialConsumeTableController {
6022
6631
  this.error(msg);
6023
6632
  return;
6024
6633
  }
6025
- if (!value) return;
6634
+ if (!value) {
6635
+ if (row.product_id_ && !this.isCustomRequiredQty) {
6636
+ const util = this.bomEntriesValidator.findUtilByProductId(row.product_id_);
6637
+ if (util) {
6638
+ row.qty_required_ = util.total;
6639
+ }
6640
+ }
6641
+ this.updateDerivedQtyFields();
6642
+ return;
6643
+ }
6026
6644
  try {
6027
6645
  await validateReinspectionDate({
6028
6646
  product_id_: option.product_id_ ?? row.product_id_,
@@ -6046,6 +6664,7 @@ class MaterialConsumeTableController {
6046
6664
  const qty = oldGroupId && row.bom_entry_id_ === oldGroupId ? oldRequiredQty : this.getCustomGroupRequiredQty(row);
6047
6665
  this.setCustomGroupRequiredQty(row, qty);
6048
6666
  }
6667
+ this.updateDerivedQtyFields();
6049
6668
  } else if (field === "qty_") {
6050
6669
  this.updateDerivedQtyFields();
6051
6670
  }
@@ -6680,11 +7299,12 @@ class SubTableCore {
6680
7299
  /**
6681
7300
  * 扫码多条候选时选择一行(1 条自动选中)
6682
7301
  */
6683
- async pickScanRecord(records) {
7302
+ async pickScanRecord(records, options = {}) {
6684
7303
  if (!records.length) return void 0;
6685
7304
  if (records.length === 1) return records[0];
6686
7305
  return this.render.openMultiRowsModal({
6687
- rows: mapScanRecordsForPicker(records)
7306
+ rows: mapScanRecordsForPicker(records),
7307
+ ...options
6688
7308
  });
6689
7309
  }
6690
7310
  /**
@@ -6910,7 +7530,7 @@ async function validateObjectBomQtyOnSubmit(opts) {
6910
7530
  for (const obj of objectFieldList) {
6911
7531
  if (!obj?.objectField) continue;
6912
7532
  const objectBom = findObjectBom(formInstBom, obj.objectField);
6913
- if (objectBom?.material_consumption_pattern_ === MaterialConsumptionPatternEnum.RECORD) {
7533
+ if (objectBom?.material_consumption_pattern_ === MaterialConsumptionPatternEnum.RECORD && !objectBom.personal_bom_enabled_) {
6914
7534
  continue;
6915
7535
  }
6916
7536
  const { productKey, productFieldName, qtyKey, qtyRequiredKey, qtyFieldName } = pickObjectFieldKeys(obj.subFields, obj.objectField);
@@ -6971,150 +7591,6 @@ async function validateObjectBomQtyOnSubmit(opts) {
6971
7591
  }
6972
7592
  return errors;
6973
7593
  }
6974
- function isBlank(value) {
6975
- return value == null || value === "";
6976
- }
6977
- function pickPresent(preferred, fallback) {
6978
- return isBlank(preferred) ? fallback : preferred;
6979
- }
6980
- function resolveObjectFieldKeys(opts) {
6981
- const obj = opts.objectFieldList?.find((item) => item.objectField === opts.belongingObject);
6982
- const fromList = obj?.subFields ? pickObjectFieldKeys(obj.subFields, opts.belongingObject) : {};
6983
- const fromFallback = pickObjectFieldKeys(opts.fallbackFields, opts.belongingObject, {
6984
- requireUsed: false
6985
- });
6986
- return {
6987
- productKey: pickPresent(fromList.productKey, fromFallback.productKey),
6988
- productFieldName: fromList.productFieldName ?? fromFallback.productFieldName,
6989
- materialNoKey: pickPresent(fromList.materialNoKey, fromFallback.materialNoKey),
6990
- materialNoFieldName: fromList.materialNoFieldName ?? fromFallback.materialNoFieldName,
6991
- qtyKey: pickPresent(fromList.qtyKey, fromFallback.qtyKey),
6992
- qtyRequiredKey: pickPresent(fromList.qtyRequiredKey, fromFallback.qtyRequiredKey),
6993
- qtyFieldName: fromList.qtyFieldName ?? fromFallback.qtyFieldName,
6994
- bomEntryIdKey: pickPresent(fromList.bomEntryIdKey, fromFallback.bomEntryIdKey)
6995
- };
6996
- }
6997
- function buildObjectLotExtraQuery(productId) {
6998
- if (isBlank(productId)) return {};
6999
- const versionId = String(productId).split(":").pop();
7000
- if (!versionId) return {};
7001
- return { "product_id_.versionEq": versionId };
7002
- }
7003
- function clearedLotFields(materialNoKey) {
7004
- if (!materialNoKey) return {};
7005
- return {
7006
- [materialNoKey]: void 0,
7007
- [`${materialNoKey}_id_`]: void 0,
7008
- [`${materialNoKey}_lb_`]: void 0
7009
- };
7010
- }
7011
- function shouldClearLotOnProductChange(opts) {
7012
- const { prevProduct, nextProduct, lotValue } = opts;
7013
- if (isBlank(prevProduct) && isBlank(nextProduct)) return false;
7014
- if (prevProduct === nextProduct) return false;
7015
- if (isBlank(prevProduct) && !isBlank(nextProduct) && !isBlank(lotValue)) {
7016
- return false;
7017
- }
7018
- return true;
7019
- }
7020
- let fillingProduct = false;
7021
- function runWithFillProduct(fn) {
7022
- fillingProduct = true;
7023
- try {
7024
- fn();
7025
- } finally {
7026
- nextTick(() => {
7027
- fillingProduct = false;
7028
- });
7029
- }
7030
- }
7031
- function resolveLotValidateParams(keys, formData, option) {
7032
- return {
7033
- product_id_: option?.product_id_ ?? option?._item?.product_id_ ?? (keys.productKey ? formData[keys.productKey] : void 0),
7034
- material_no_: option?.name_ ?? option?.__VALUE__ ?? (keys.materialNoKey ? formData[keys.materialNoKey] : void 0),
7035
- material_no_id_: option?.id_ ?? (keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0)
7036
- };
7037
- }
7038
- async function applyConsumeObjectTraceChange(opts) {
7039
- const { belongingObject, role, formData } = opts;
7040
- if (!belongingObject || !formData) return {};
7041
- const keys = resolveObjectFieldKeys({
7042
- belongingObject,
7043
- objectFieldList: opts.objectFieldList,
7044
- fallbackFields: opts.fallbackFields
7045
- });
7046
- if (role === FIELD_TYPE.PRODUCT) {
7047
- if (!("prevProduct" in opts) || fillingProduct) return {};
7048
- const values = {};
7049
- if (shouldClearLotOnProductChange({
7050
- prevProduct: opts.prevProduct,
7051
- nextProduct: opts.nextValue,
7052
- lotValue: keys.materialNoKey ? formData[keys.materialNoKey] : void 0
7053
- })) {
7054
- Object.assign(values, clearedLotFields(keys.materialNoKey));
7055
- }
7056
- if (keys.bomEntryIdKey) {
7057
- values[keys.bomEntryIdKey] = null;
7058
- if (!isBlank(opts.nextValue) && opts.formInstBom) {
7059
- const entry = resolveObjectBomEntry({
7060
- formInstBom: opts.formInstBom,
7061
- belongingObject,
7062
- productId: String(opts.nextValue)
7063
- });
7064
- if (entry) values[keys.bomEntryIdKey] = entry.id_;
7065
- }
7066
- }
7067
- opts.rowWriter.patchRow(values, "autofill");
7068
- const lotValue = keys.materialNoKey ? formData[keys.materialNoKey] : void 0;
7069
- if (!isBlank(opts.nextValue) && !isBlank(lotValue)) {
7070
- try {
7071
- await validateReinspectionDate({
7072
- product_id_: String(opts.nextValue),
7073
- material_no_: lotValue,
7074
- material_no_id_: keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0
7075
- });
7076
- } catch (e) {
7077
- return { abortReinspection: e?.message || String(e) };
7078
- }
7079
- }
7080
- return {};
7081
- }
7082
- if (role === FIELD_TYPE.MATERIAL_NO) {
7083
- if (opts.option?.is_locked_) {
7084
- opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "autofill");
7085
- return { abortLocked: opts.option.id_ };
7086
- }
7087
- const params = resolveLotValidateParams(keys, formData, opts.option);
7088
- if (isBlank(params.material_no_) && isBlank(params.material_no_id_)) return {};
7089
- try {
7090
- await validateReinspectionDate(params);
7091
- } catch (e) {
7092
- opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "async");
7093
- return { abortReinspection: e?.message || String(e) };
7094
- }
7095
- const values = {};
7096
- const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
7097
- if (keys.productKey && !isBlank(productId)) values[keys.productKey] = productId;
7098
- if (keys.bomEntryIdKey && opts.formInstBom) {
7099
- if (!isBlank(productId)) {
7100
- const entry = resolveObjectBomEntry({
7101
- formInstBom: opts.formInstBom,
7102
- belongingObject,
7103
- productId: String(productId)
7104
- });
7105
- if (entry) values[keys.bomEntryIdKey] = entry.id_;
7106
- }
7107
- }
7108
- const patchRelatedFields = () => opts.rowWriter.patchRow(values, "autofill");
7109
- if (keys.productKey && !isBlank(productId)) {
7110
- runWithFillProduct(patchRelatedFields);
7111
- } else {
7112
- patchRelatedFields();
7113
- }
7114
- return {};
7115
- }
7116
- return {};
7117
- }
7118
7594
  function useRuntimeRowState(rowSource) {
7119
7595
  const { formStateStore } = useRuntimeInstanceServices();
7120
7596
  function requireStore() {
@@ -7861,6 +8337,150 @@ function useFormTmplConfig() {
7861
8337
  injectController
7862
8338
  };
7863
8339
  }
8340
+ function isBlank(value) {
8341
+ return value == null || value === "";
8342
+ }
8343
+ function pickPresent(preferred, fallback) {
8344
+ return isBlank(preferred) ? fallback : preferred;
8345
+ }
8346
+ function resolveObjectFieldKeys(opts) {
8347
+ const obj = opts.objectFieldList?.find((item) => item.objectField === opts.belongingObject);
8348
+ const fromList = obj?.subFields ? pickObjectFieldKeys(obj.subFields, opts.belongingObject) : {};
8349
+ const fromFallback = pickObjectFieldKeys(opts.fallbackFields, opts.belongingObject, {
8350
+ requireUsed: false
8351
+ });
8352
+ return {
8353
+ productKey: pickPresent(fromList.productKey, fromFallback.productKey),
8354
+ productFieldName: fromList.productFieldName ?? fromFallback.productFieldName,
8355
+ materialNoKey: pickPresent(fromList.materialNoKey, fromFallback.materialNoKey),
8356
+ materialNoFieldName: fromList.materialNoFieldName ?? fromFallback.materialNoFieldName,
8357
+ qtyKey: pickPresent(fromList.qtyKey, fromFallback.qtyKey),
8358
+ qtyRequiredKey: pickPresent(fromList.qtyRequiredKey, fromFallback.qtyRequiredKey),
8359
+ qtyFieldName: fromList.qtyFieldName ?? fromFallback.qtyFieldName,
8360
+ bomEntryIdKey: pickPresent(fromList.bomEntryIdKey, fromFallback.bomEntryIdKey)
8361
+ };
8362
+ }
8363
+ function buildObjectLotExtraQuery(productId) {
8364
+ if (isBlank(productId)) return {};
8365
+ const versionId = String(productId).split(":").pop();
8366
+ if (!versionId) return {};
8367
+ return { "product_id_.versionEq": versionId };
8368
+ }
8369
+ function clearedLotFields(materialNoKey) {
8370
+ if (!materialNoKey) return {};
8371
+ return {
8372
+ [materialNoKey]: void 0,
8373
+ [`${materialNoKey}_id_`]: void 0,
8374
+ [`${materialNoKey}_lb_`]: void 0
8375
+ };
8376
+ }
8377
+ function shouldClearLotOnProductChange(opts) {
8378
+ const { prevProduct, nextProduct, lotValue } = opts;
8379
+ if (isBlank(prevProduct) && isBlank(nextProduct)) return false;
8380
+ if (prevProduct === nextProduct) return false;
8381
+ if (isBlank(prevProduct) && !isBlank(nextProduct) && !isBlank(lotValue)) {
8382
+ return false;
8383
+ }
8384
+ return true;
8385
+ }
8386
+ let fillingProduct = false;
8387
+ function runWithFillProduct(fn) {
8388
+ fillingProduct = true;
8389
+ try {
8390
+ fn();
8391
+ } finally {
8392
+ nextTick(() => {
8393
+ fillingProduct = false;
8394
+ });
8395
+ }
8396
+ }
8397
+ function resolveLotValidateParams(keys, formData, option) {
8398
+ return {
8399
+ product_id_: option?.product_id_ ?? option?._item?.product_id_ ?? (keys.productKey ? formData[keys.productKey] : void 0),
8400
+ material_no_: option?.name_ ?? option?.__VALUE__ ?? (keys.materialNoKey ? formData[keys.materialNoKey] : void 0),
8401
+ material_no_id_: option?.id_ ?? (keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0)
8402
+ };
8403
+ }
8404
+ async function applyConsumeObjectTraceChange(opts) {
8405
+ const { belongingObject, role, formData } = opts;
8406
+ if (!belongingObject || !formData) return {};
8407
+ const keys = resolveObjectFieldKeys({
8408
+ belongingObject,
8409
+ objectFieldList: opts.objectFieldList,
8410
+ fallbackFields: opts.fallbackFields
8411
+ });
8412
+ if (role === FIELD_TYPE.PRODUCT) {
8413
+ if (!("prevProduct" in opts) || fillingProduct) return {};
8414
+ const values = {};
8415
+ if (shouldClearLotOnProductChange({
8416
+ prevProduct: opts.prevProduct,
8417
+ nextProduct: opts.nextValue,
8418
+ lotValue: keys.materialNoKey ? formData[keys.materialNoKey] : void 0
8419
+ })) {
8420
+ Object.assign(values, clearedLotFields(keys.materialNoKey));
8421
+ }
8422
+ if (keys.bomEntryIdKey) {
8423
+ values[keys.bomEntryIdKey] = null;
8424
+ if (!isBlank(opts.nextValue) && opts.formInstBom) {
8425
+ const entry = resolveObjectBomEntry({
8426
+ formInstBom: opts.formInstBom,
8427
+ belongingObject,
8428
+ productId: String(opts.nextValue)
8429
+ });
8430
+ if (entry) values[keys.bomEntryIdKey] = entry.id_;
8431
+ }
8432
+ }
8433
+ opts.rowWriter.patchRow(values, "autofill");
8434
+ const lotValue = keys.materialNoKey ? formData[keys.materialNoKey] : void 0;
8435
+ if (!isBlank(opts.nextValue) && !isBlank(lotValue)) {
8436
+ try {
8437
+ await validateReinspectionDate({
8438
+ product_id_: String(opts.nextValue),
8439
+ material_no_: lotValue,
8440
+ material_no_id_: keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0
8441
+ });
8442
+ } catch (e) {
8443
+ return { abortReinspection: e?.message || String(e) };
8444
+ }
8445
+ }
8446
+ return {};
8447
+ }
8448
+ if (role === FIELD_TYPE.MATERIAL_NO) {
8449
+ if (opts.option?.is_locked_) {
8450
+ opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "autofill");
8451
+ return { abortLocked: opts.option.id_ };
8452
+ }
8453
+ const params = resolveLotValidateParams(keys, formData, opts.option);
8454
+ if (isBlank(params.material_no_) && isBlank(params.material_no_id_)) return {};
8455
+ try {
8456
+ await validateReinspectionDate(params);
8457
+ } catch (e) {
8458
+ opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "async");
8459
+ return { abortReinspection: e?.message || String(e) };
8460
+ }
8461
+ const values = {};
8462
+ const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
8463
+ if (keys.productKey && !isBlank(productId)) values[keys.productKey] = productId;
8464
+ if (keys.bomEntryIdKey && opts.formInstBom) {
8465
+ if (!isBlank(productId)) {
8466
+ const entry = resolveObjectBomEntry({
8467
+ formInstBom: opts.formInstBom,
8468
+ belongingObject,
8469
+ productId: String(productId)
8470
+ });
8471
+ if (entry) values[keys.bomEntryIdKey] = entry.id_;
8472
+ }
8473
+ }
8474
+ const patchRelatedFields = () => opts.rowWriter.patchRow(values, "autofill");
8475
+ if (keys.productKey && !isBlank(productId)) {
8476
+ runWithFillProduct(patchRelatedFields);
8477
+ } else {
8478
+ patchRelatedFields();
8479
+ }
8480
+ return {};
8481
+ }
8482
+ return {};
8483
+ }
7864
8484
  const _hoisted_1$5 = ["data-merge", "data-fill-direction"];
7865
8485
  const _hoisted_2$1 = {
7866
8486
  key: 0,
@@ -8181,6 +8801,7 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
8181
8801
  showDisplayStatus,
8182
8802
  dataRelationShip
8183
8803
  } = useWidgetStaticAttrs(props.widget);
8804
+ const isMockMaterialConsume = computed(() => !!dataRelationShip?.isMockReport && !!props.widget.props.isMaterialConsumeTable);
8184
8805
  const sheetId = () => fields.value?.findWidgetById(props.widget.id)?.sheetId;
8185
8806
  const subTableCore = props.subTableCore;
8186
8807
  provide(NCB_PROVIDE.SUB_TABLE_CORE, subTableCore);
@@ -8321,6 +8942,9 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
8321
8942
  key,
8322
8943
  actionValue
8323
8944
  }) => {
8945
+ if (isMockMaterialConsume.value && (key === SubTableActionEnum.SCAN || key === SubTableActionEnum.Insert1GroupAfter)) {
8946
+ return;
8947
+ }
8324
8948
  switch (key) {
8325
8949
  case "insertRowBefore":
8326
8950
  handleAddRow({
@@ -8414,10 +9038,11 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
8414
9038
  showRowWatermark,
8415
9039
  rowGroupKey
8416
9040
  }) => {
8417
- const menus = subTableCore?.calcSubTableActionMenu({
9041
+ const baseMenus = subTableCore?.calcSubTableActionMenu({
8418
9042
  rowData,
8419
9043
  showDelBtn
8420
9044
  });
9045
+ const menus = isMockMaterialConsume.value ? [getMenuByAction(SubTableActionEnum.SCAN), getMenuByAction(SubTableActionEnum.Insert1GroupAfter), ...baseMenus ?? []] : baseMenus;
8421
9046
  const annRowDetails = dataRelationShip?.annRowDetails;
8422
9047
  const rowMark = dataIdx !== -1 && annRowDetails?.length ? resolveRowFormChangeMark(field, rowData, annRowDetails) : null;
8423
9048
  const rowUi = resolveFormChangeRowUi(rowData, rowMark);
@@ -8730,7 +9355,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
8730
9355
  const {
8731
9356
  showDisplayStatus,
8732
9357
  dataRelationShip
8733
- } = useWidgetStaticAttrs(props);
9358
+ } = useWidgetStaticAttrs(props.widget);
8734
9359
  const sheetId = () => fields.value?.findWidgetById(props.widget.id)?.sheetId;
8735
9360
  const formModelController = useFormModel().injectController();
8736
9361
  const tableController = props.tableController;
@@ -8919,6 +9544,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
8919
9544
  }));
8920
9545
  };
8921
9546
  const handleAction = (action, rowData) => {
9547
+ if (!tableController.hasFormInstance) return;
8922
9548
  switch (action) {
8923
9549
  case MaterialConsumeActionType.CONFIRM:
8924
9550
  tableController.confirm(rowData);
@@ -8991,6 +9617,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
8991
9617
  key,
8992
9618
  actionValue
8993
9619
  }) => {
9620
+ if (!tableController.hasFormInstance) return;
8994
9621
  switch (key) {
8995
9622
  case "rowEdit":
8996
9623
  await tableController.editRow(rowData);
@@ -9361,7 +9988,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9361
9988
  createElementVNode("i", { class: "iconfont icon-zhuyi" }),
9362
9989
  createElementVNode("ul", { class: "tips-list" }, [
9363
9990
  createElementVNode("li", null, "可将Excel内容粘贴到表格中,支持使用复制、粘贴、删除快捷键"),
9364
- createElementVNode("li", null, " 表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、LOT/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割) ")
9991
+ createElementVNode("li", null, " 表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、批次/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割) ")
9365
9992
  ])
9366
9993
  ], -1)),
9367
9994
  createElementVNode("div", {
@@ -9386,7 +10013,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9386
10013
  };
9387
10014
  }
9388
10015
  });
9389
- const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b589958f"]]);
10016
+ const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-58540cb3"]]);
9390
10017
  const _hoisted_1$1 = {
9391
10018
  key: 1,
9392
10019
  class: "sub-table-action__subtitle"
@@ -10088,7 +10715,7 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
10088
10715
  }) : null,
10089
10716
  // 在[固定表]顶部的可见单元格上加装操作按钮
10090
10717
  tableAction: (() => {
10091
- const fixedTableActionVisible = fixedTableInfo?.quickFillVisible && !filledFixedTableKeys.value.includes(fixedTableInfo.subFieldKey);
10718
+ const fixedTableActionVisible = props.basicInfo.renderModeType !== RenderModeEnum.ViewMode && fixedTableInfo?.quickFillVisible && !filledFixedTableKeys.value.includes(fixedTableInfo.subFieldKey);
10092
10719
  return () => fixedTableActionVisible ? createVNode(_sfc_main$2, {
10093
10720
  "tdId": tdId,
10094
10721
  "formState": formState.value,
@@ -10159,7 +10786,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10159
10786
  createElementVNode("i", { class: "iconfont icon-zhuyi" }),
10160
10787
  createElementVNode("ul", { class: "tips-list" }, [
10161
10788
  createElementVNode("li", null, "可将Excel内容粘贴到表格中,支持使用复制、粘贴、删除快捷键"),
10162
- createElementVNode("li", null, "表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、LOT/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割)"),
10789
+ createElementVNode("li", null, "表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、批次/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割)"),
10163
10790
  createElementVNode("li", null, "当前快速填报最多支持200行")
10164
10791
  ])
10165
10792
  ], -1)),
@@ -10179,7 +10806,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10179
10806
  };
10180
10807
  }
10181
10808
  });
10182
- const DynamicQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ae9acd3f"]]);
10809
+ const DynamicQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-840aca0a"]]);
10183
10810
  const _sfc_main = /* @__PURE__ */ defineComponent({
10184
10811
  __name: "dynamic-table-action",
10185
10812
  props: {
@@ -10263,111 +10890,129 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10263
10890
  });
10264
10891
  const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53d7e66c"]]);
10265
10892
  export {
10266
- RuntimeSheetService as $,
10267
- useStyles as A,
10893
+ DocumentPaper as $,
10894
+ useNocodeFormWidget as A,
10268
10895
  BorderTD as B,
10269
- useDependency as C,
10896
+ applyConsumeObjectTraceChange as C,
10270
10897
  DEFAULT_BOOLEAN_FIELD_WIDTH as D,
10271
- EMPTY_PRODUCT_VERSION_ID as E,
10272
- useFieldPresentation as F,
10273
- useRuntimeEditorFlusher as G,
10274
- createRuntimeInstanceContext as H,
10275
- RuntimeInstanceRegistry as I,
10276
- RequiredQtyCalcRule as J,
10277
- registerFormulaFuncs as K,
10278
- DocumentPaper as L,
10898
+ getObjectBomProductQuery as E,
10899
+ EMPTY_PRODUCT_VERSION_ID as F,
10900
+ normalizeHistoricalAutofillRow as G,
10901
+ readSealValue as H,
10902
+ isSealStamped as I,
10903
+ stampSealValue as J,
10904
+ isValidSealValue as K,
10905
+ clearSealValue as L,
10279
10906
  MAX_RUNTIME_SHEETS as M,
10280
10907
  NCB_PROVIDE as N,
10281
- DynamicTableAction as O,
10282
- getRuntimeDataFieldId as P,
10283
- buildRuntimeFieldPath as Q,
10284
- RuntimeFormStateStore as R,
10285
- ScanParamType as S,
10286
- resolveRuntimeFieldProps as T,
10287
- resolveRuntimeFieldState as U,
10288
- getRuntimeDependencyOutputKey as V,
10289
- isRowAddedInCurrentFormChange as W,
10290
- MaterialConsumeTableController as X,
10291
- setFormulaParamsConfig as Y,
10292
- normalizeRuntime as Z,
10293
- _sfc_main$5 as _,
10908
+ parseRuntimeFieldPath as O,
10909
+ calculateFormula as P,
10910
+ useStyles as Q,
10911
+ useDependency as R,
10912
+ useFieldPresentation as S,
10913
+ useRuntimeEditorFlusher as T,
10914
+ RuntimeFormStateStore as U,
10915
+ createRuntimeInstanceContext as V,
10916
+ RuntimeInstanceRegistry as W,
10917
+ ScanParamType as X,
10918
+ RequiredQtyCalcRule as Y,
10919
+ registerFormulaFuncs as Z,
10920
+ moveSealValue as _,
10294
10921
  MAX_RUNTIME_SHEET_TITLE_LENGTH as a,
10295
- validateObjectBomQtyOnSubmit as a0,
10296
- closeValidatorPopovers as a1,
10297
- enrichFormChangeRowDetails as a2,
10298
- useMaterialBalance as a3,
10299
- collectFormChangeFieldLocations as a4,
10300
- nextFormChangeRowViewHistoryId as a5,
10301
- DeviceConnector as a6,
10302
- DocumentLoading as a7,
10303
- DynamicQuickFillModal as a8,
10304
- FixedQuickFillModal as a9,
10305
- recordSubtableRowDelete as aA,
10306
- resolveAnnotationFieldLocation as aB,
10307
- resolveFormChangeRowUi as aC,
10308
- resolveRowFormChangeMark as aD,
10309
- setSelectMobileTdId as aE,
10310
- stripLegacyFormConfigFromPaper as aF,
10311
- SubTableActionMenuTypeEnum as aG,
10312
- getMenuByAction as aH,
10313
- SubTableActionEnum as aI,
10314
- resolveScanFillData as aJ,
10315
- getInsertSubMenu as aK,
10316
- resolveScanAdjustType as aL,
10317
- resolveScanQty as aM,
10318
- toDateOnly as aN,
10319
- getCopySubMenu as aO,
10320
- resolveScanParsedValue as aP,
10321
- isProductBatchEmptyRow as aQ,
10322
- FormTmplConfigController as aa,
10323
- LEGACY_RUNTIME_FORM_CONFIG_KEYS as ab,
10324
- LEGACY_RUNTIME_SHEET_ID as ac,
10325
- LEGACY_RUNTIME_SHEET_TITLE as ad,
10326
- MCDataUtil as ae,
10327
- OCR_MODEL_PRECISION_ENUM_KEY as af,
10328
- RuntimeAsyncTaskCoordinator as ag,
10329
- RuntimeDependencyService as ah,
10330
- RuntimeFieldRegistry as ai,
10331
- RuntimeInstanceEventBus as aj,
10332
- RuntimePersistenceCoordinator as ak,
10333
- RuntimeValidationService as al,
10334
- SubTableCore as am,
10335
- buildFormChangeDisplayRows as an,
10336
- convertV1Runtime as ao,
10337
- detailsHaveFormChangeRowOps as ap,
10338
- extractFormChangeRowDetails as aq,
10339
- getFormChangeRowKey as ar,
10340
- getFormChangeRowOp as as,
10341
- getSubTableQuickFillInfo as at,
10342
- isAnnLocationSelected as au,
10343
- isBlank as av,
10344
- isFormChangeGhostRow as aw,
10345
- normalizeHistoricalFieldConfig as ax,
10346
- pickObjectFieldKeys as ay,
10347
- recordSubtableRowAdd as az,
10922
+ getInsertSubMenu as a$,
10923
+ DynamicTableAction as a0,
10924
+ _sfc_main$5 as a1,
10925
+ getRuntimeDataFieldId as a2,
10926
+ buildRuntimeFieldPath as a3,
10927
+ resolveRuntimeFieldProps as a4,
10928
+ resolveRuntimeFieldState as a5,
10929
+ assembleRules as a6,
10930
+ isAttachFieldActive as a7,
10931
+ getRuntimeDependencyOutputKey as a8,
10932
+ isRowAddedInCurrentFormChange as a9,
10933
+ RuntimePersistenceCoordinator as aA,
10934
+ RuntimeValidationService as aB,
10935
+ SubTableCore as aC,
10936
+ buildFormChangeDisplayRows as aD,
10937
+ convertV1Runtime as aE,
10938
+ detailsHaveFormChangeRowOps as aF,
10939
+ extractFormChangeRowDetails as aG,
10940
+ getFormChangeRowKey as aH,
10941
+ getFormChangeRowOp as aI,
10942
+ getSubTableQuickFillInfo as aJ,
10943
+ isAnnLocationSelected as aK,
10944
+ isBlank as aL,
10945
+ isFormChangeGhostRow as aM,
10946
+ normalizeHistoricalFieldConfig as aN,
10947
+ pickObjectFieldKeys as aO,
10948
+ recordSubtableRowAdd as aP,
10949
+ recordSubtableRowDelete as aQ,
10950
+ relocateDeletedRowsToEnd as aR,
10951
+ resolveAnnotationFieldLocation as aS,
10952
+ resolveFormChangeRowUi as aT,
10953
+ resolveRowFormChangeMark as aU,
10954
+ setSelectMobileTdId as aV,
10955
+ stripLegacyFormConfigFromPaper as aW,
10956
+ SubTableActionMenuTypeEnum as aX,
10957
+ getMenuByAction as aY,
10958
+ SubTableActionEnum as aZ,
10959
+ resolveScanFillData as a_,
10960
+ MaterialConsumeTableController as aa,
10961
+ setFormulaParamsConfig as ab,
10962
+ normalizeRuntime as ac,
10963
+ initializeSealFields as ad,
10964
+ RuntimeSheetService as ae,
10965
+ validateObjectBomQtyOnSubmit as af,
10966
+ areValidationCommentsEqual as ag,
10967
+ closeValidatorPopovers as ah,
10968
+ enrichFormChangeRowDetails as ai,
10969
+ useMaterialBalance as aj,
10970
+ collectFormChangeFieldLocations as ak,
10971
+ nextFormChangeRowViewHistoryId as al,
10972
+ DeviceConnector as am,
10973
+ DocumentLoading as an,
10974
+ DynamicQuickFillModal as ao,
10975
+ FixedQuickFillModal as ap,
10976
+ FormTmplConfigController as aq,
10977
+ LEGACY_RUNTIME_FORM_CONFIG_KEYS as ar,
10978
+ LEGACY_RUNTIME_SHEET_ID as as,
10979
+ LEGACY_RUNTIME_SHEET_TITLE as at,
10980
+ MCDataUtil as au,
10981
+ OCR_MODEL_PRECISION_ENUM_KEY as av,
10982
+ RuntimeAsyncTaskCoordinator as aw,
10983
+ RuntimeDependencyService as ax,
10984
+ RuntimeFieldRegistry as ay,
10985
+ RuntimeInstanceEventBus as az,
10348
10986
  MULTI_SHEET_SCHEMA_VERSION as b,
10349
- createRuntimeDocumentV2 as c,
10350
- normalizeHistoricalBusinessRow as d,
10351
- DeviceLinkTmplUtil as e,
10352
- normalizeAIOcrTmpl as f,
10987
+ resolveScanAdjustType as b0,
10988
+ resolveScanQty as b1,
10989
+ toDateOnly as b2,
10990
+ hasSubtableBusinessData as b3,
10991
+ getCopySubMenu as b4,
10992
+ resolveScanParsedValue as b5,
10993
+ isProductBatchEmptyRow as b6,
10994
+ getParseFormulaVarInfos as c,
10995
+ createRuntimeDocumentV2 as d,
10996
+ clampSealPosition as e,
10997
+ normalizeSealDiameter as f,
10353
10998
  getBusinessFieldKey as g,
10354
- useWidgetStaticAttrs as h,
10355
- useRuntimeInstanceServices as i,
10356
- setSelectAnnotationId as j,
10357
- useRuntimeRowState as k,
10358
- getObjectBomMaterialLotQuery as l,
10359
- buildObjectLotExtraQuery as m,
10360
- normalizeFieldWidth as n,
10361
- MaterialConsumptionPatternEnum as o,
10362
- resolveObjectBomEntry as p,
10363
- runWithFillProduct as q,
10364
- resolveObjectFieldKeys as r,
10999
+ normalizeFieldWidth as h,
11000
+ isCellAutoLineBreak as i,
11001
+ normalizeHistoricalBusinessRow as j,
11002
+ DeviceLinkTmplUtil as k,
11003
+ normalizeAIOcrTmpl as l,
11004
+ useWidgetStaticAttrs as m,
11005
+ normalizeGridColumnWidth as n,
11006
+ useRuntimeInstanceServices as o,
11007
+ setSelectAnnotationId as p,
11008
+ useRuntimeRowState as q,
11009
+ getObjectBomMaterialLotQuery as r,
10365
11010
  setSelectValidatorId as s,
10366
- useNocodeFormWidget as t,
11011
+ buildObjectLotExtraQuery as t,
10367
11012
  useFormTmplConfig as u,
10368
- validateObjectBomForScan as v,
10369
- applyConsumeObjectTraceChange as w,
10370
- getObjectBomProductQuery as x,
10371
- normalizeHistoricalAutofillRow as y,
10372
- parseRuntimeFieldPath as z
11013
+ resolveObjectFieldKeys as v,
11014
+ MaterialConsumptionPatternEnum as w,
11015
+ validateObjectBomForScan as x,
11016
+ resolveObjectBomEntry as y,
11017
+ runWithFillProduct as z
10373
11018
  };