@gct-paas/excel 0.1.40-beta.3 → 0.1.40-beta.5

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-B9o59n-h.js → BaseComponent-BlDgF4NL.js} +2 -2
  2. package/dist/{VueVideoPlayer-CAWYWBHi.js → VueVideoPlayer-abpwAqu3.js} +2 -2
  3. package/dist/{align-editor-a4DQt4Un.js → align-editor-BdF6r-Gs.js} +1 -1
  4. package/dist/{barcode-design-CBqUEPYu.js → barcode-design-Dqzu8TED.js} +2 -2
  5. package/dist/base/index.es.js +291 -205
  6. package/dist/{diagonal-design-u23896Ky.js → diagonal-design-OOLJ1YWE.js} +2 -2
  7. package/dist/{dynamic-table-action-BWI4Gaqi.js → dynamic-table-action-C__4AVW6.js} +175 -95
  8. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BvrrN6te.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js} +654 -405
  9. package/dist/{edit.utils-CXmmCnxE-XxpC8ALV.js → edit.utils-CXmmCnxE-CaVD32MC.js} +1 -1
  10. package/dist/excel.css +345 -178
  11. package/dist/{exceljs.min-DfbB110X.js → exceljs.min-C3uJ_Ieg.js} +2 -2
  12. package/dist/{font-editor-BtSCLMrM.js → font-editor-BZvGZaYO.js} +3 -3
  13. package/dist/{image-design-CtE-Lw7N.js → image-design-Dt_97Q--.js} +2 -2
  14. package/dist/{index-Ca9TLzUh.js → index--9zZnmyE.js} +1 -1
  15. package/dist/{index-ixQwAcB1.js → index-6_pgVPOb.js} +860 -488
  16. package/dist/{index-CPTGioxl.js → index-B2xCe29Z.js} +1 -1
  17. package/dist/{index-DdWefZMa.js → index-BDvLu-0F.js} +2 -2
  18. package/dist/{index-DeHX7rte.js → index-BGHQz2Uj.js} +50 -3
  19. package/dist/{index-CAdDeEzJ.js → index-BOehk-Mo.js} +2 -2
  20. package/dist/{index-BRQkrFQ9.js → index-BcSq5laa.js} +2 -2
  21. package/dist/{index-CL9K9orM.js → index-Bes3atoZ.js} +2 -2
  22. package/dist/{index-BfBuxgcp.js → index-Bn4BqmG_.js} +2 -2
  23. package/dist/{index-51LtNdZ2.js → index-Bxdq78c9.js} +1 -1
  24. package/dist/{index-I1r5pfu5.js → index-C-wSYnoD.js} +2 -2
  25. package/dist/{index-BGAcYDx-.js → index-CD04dkRd.js} +1 -1
  26. package/dist/{index-CeEhYXl9.js → index-CKnArHCM.js} +2 -2
  27. package/dist/{index-CIa37rQm.js → index-CMzci3SX.js} +2 -2
  28. package/dist/{index-BC8hQ4vo.js → index-CVJadZzs.js} +2 -2
  29. package/dist/{index-CpPk8P3L.js → index-Cvj6_0dy.js} +1 -1
  30. package/dist/{index-Bnb70qEi.js → index-CwvVx_5V.js} +3 -3
  31. package/dist/{index-BKXb3VJc.js → index-Cy17m87b.js} +2 -2
  32. package/dist/{index-7aS5L4ot.js → index-Cy3658Zd.js} +3 -3
  33. package/dist/{index-Bc61F6Hm.js → index-D2bXGJMB.js} +2 -2
  34. package/dist/{index-Dyomjz3y.js → index-D4lTMizD.js} +2 -2
  35. package/dist/{index-731OYkrc.js → index-DF5OI_Xj.js} +3 -3
  36. package/dist/{index-CdHVHaxO.js → index-DJqTfkOe.js} +2 -2
  37. package/dist/{index-BP-LhXXV.js → index-DLx-4gQ_.js} +4 -4
  38. package/dist/{index-DVEe11uM.js → index-DMVoiSyn.js} +1 -1
  39. package/dist/{index-IVc1dOet.js → index-DVFXRZRw.js} +3 -3
  40. package/dist/{index-9S48hpoJ.js → index-DbN8jrOK.js} +2 -2
  41. package/dist/{index-CVsoaxTR.js → index-DfAWRc7u.js} +2 -2
  42. package/dist/{index-B0cdcIWq.js → index-DgvOxMoA.js} +2 -2
  43. package/dist/{index-BFg5eUdY.js → index-DhJQOZHh.js} +1 -1
  44. package/dist/{index-BMoz_QhA.js → index-DiZHDEas.js} +1 -1
  45. package/dist/{index-CYLAVQfT.js → index-DzAPpHun.js} +2 -2
  46. package/dist/{index-aNV9T6LI.js → index-Lrse9db3.js} +2 -2
  47. package/dist/{index-3WwCV4xR.js → index-NiQurze3.js} +1 -1
  48. package/dist/{index-DNj0vFvx.js → index-ZBaLDzvn.js} +1 -1
  49. package/dist/index.es.js +12 -10
  50. package/dist/{mb-render-Bs9S9oFn.js → mb-render-CDFmykM_.js} +1 -1
  51. package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-CRyGHP7k.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-Db5Hce6z.js} +8 -1
  52. package/dist/{pagination-design-CmbsdlMe.js → pagination-design-Dz7y8YKu.js} +2 -2
  53. package/dist/paper-widget-design-BlIbv2tj.js +4 -0
  54. package/dist/{print-runtime-instance-DQysbz5n.js → print-runtime-instance-Bq1p758u.js} +1 -1
  55. package/dist/{print-snapshot-renderer-DWHjMsOC.js → print-snapshot-renderer-BWVZ-Lql.js} +3 -3
  56. package/dist/{qrcode-design-CX0_2mLC.js → qrcode-design-Dq0tczvD.js} +1 -1
  57. package/dist/{revo-grid.entry-DbmWFi7p.js → revo-grid.entry-BKZT_dju.js} +1 -1
  58. package/dist/{revogr-attribution_7.entry-BWQDu7fq.js → revogr-attribution_7.entry-CXdkYl1q.js} +3 -3
  59. package/dist/{revogr-clipboard_3.entry-BtTYHFZi.js → revogr-clipboard_3.entry-Dq9k6E4q.js} +2 -2
  60. package/dist/{revogr-data_4.entry-CWPXyZ7g.js → revogr-data_4.entry-CpBkj9S_.js} +2 -2
  61. package/dist/{revogr-filter-panel.entry-5gYct0XI.js → revogr-filter-panel.entry-Bu5hYWK7.js} +1 -1
  62. package/dist/seal-design-LHZWDjEb.js +4 -0
  63. package/dist/{serialnumber-design-aSqL4gX6.js → serialnumber-design-DUqW6M9C.js} +1 -1
  64. package/dist/shared/index.es.js +26 -24
  65. package/dist/{single-field-drop-C67wLHxK.js → single-field-drop-MXmkrdjF.js} +2 -2
  66. package/dist/{size-editor-BHGTPLir.js → size-editor-DCVa84rA.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/material/material-consume/profile/fields.d.ts +2 -0
  69. package/dist/src/domain/table/business/material/material-substitution/profile/field-keys.d.ts +13 -0
  70. package/dist/src/domain/table/business/warehouse/shared/autofill-source-labels.d.ts +19 -0
  71. package/dist/src/domain/table/design/autofill-expander.d.ts +2 -0
  72. package/dist/src/domain/table/design/hooks/on-field-attach.d.ts +6 -0
  73. package/dist/src/domain/table/index.d.ts +1 -1
  74. package/dist/src/domain/table/types.d.ts +2 -0
  75. package/dist/src/index.d.ts +2 -0
  76. package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +2 -1
  77. package/dist/src/nocode-base/src/hooks/inspection-module-qty.d.ts +4 -0
  78. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +1 -0
  79. package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +12 -7
  80. package/dist/src/nocode-base/src/hooks/render-page/initialize-runtime.d.ts +2 -7
  81. package/dist/src/nocode-base/src/hooks/render-page/types.d.ts +4 -1
  82. package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +4 -6
  83. package/dist/src/nocode-base/src/hooks/validation/createValidateFactory.d.ts +1 -0
  84. package/dist/src/nocode-base/src/runtime/runtime-field-initializer.d.ts +1 -0
  85. package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +5 -1
  86. package/dist/src/nocode-web-render/src/render/sub-table/common/inventory-scan-columns.d.ts +6 -0
  87. package/dist/src/online-form/src/views/designer/conversions/normalize-paper-grid.d.ts +3 -0
  88. package/dist/src/online-form/src/views/designer/utils/placed-fields.d.ts +9 -0
  89. package/dist/src/online-form/src/views/designer/utils/template-placed-fields.d.ts +7 -0
  90. package/dist/src/shared/components/Signature/logic/index.d.ts +14 -0
  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-DTtDvr17.js → sub-table-factory-BBiAj7oz.js} +13 -62
  95. package/dist/{text-design-Dz0Qf2O3.js → text-design-BfXr3TcH.js} +2 -2
  96. package/dist/{throttle-Cpk1LoGk-CgtsG2CV.js → throttle-Cpk1LoGk-BtY6yO1U.js} +1 -1
  97. package/dist/{timediff-design-D9JfNqH8.js → timediff-design-BF-mVD2d.js} +1 -1
  98. package/dist/{trace-like-wrapper-BXgr0Uv3.js → trace-like-wrapper-2AsEoSS7.js} +2 -2
  99. package/dist/{value-editor.vue_vue_type_style_index_0_lang-doohzADY.js → value-editor.vue_vue_type_style_index_0_lang-D8_zt9JM.js} +2 -2
  100. package/dist/web-render/index.es.js +3 -3
  101. package/dist/{widget-barcode-XF3nCU9v.js → widget-barcode-BMnwSzpx.js} +4 -4
  102. package/dist/{widget-diagonal-DSym7fks.js → widget-diagonal-iuAFZn-R.js} +3 -3
  103. package/dist/{widget-image-CmjwkVs7.js → widget-image-sZeIt4K6.js} +5 -5
  104. package/dist/{widget-line-BX64xVfU.js → widget-line-izrJUAAT.js} +2 -2
  105. package/dist/{widget-pagination-BV89Lvjt.js → widget-pagination-CTANdU2l.js} +5 -5
  106. package/dist/{widget-power-DoSfQv92.js → widget-power-OZD7bTxW.js} +3 -3
  107. package/dist/{widget-qrcode-UGcRLC56.js → widget-qrcode-xvyklot3.js} +3 -3
  108. package/dist/{widget-rangelimit-CUHD__1H.js → widget-rangelimit-BZhTuRkT.js} +3 -3
  109. package/dist/{widget-serialnumber-CAkZR5Xl.js → widget-serialnumber-BwUHV475.js} +1 -1
  110. package/dist/{widget-text-DtYVTThu.js → widget-text-B8MzTxa3.js} +5 -5
  111. package/dist/{widget-timediff-DX_IoCMO.js → widget-timediff-YAH8bbso.js} +2 -2
  112. package/package.json +1 -1
  113. package/dist/paper-widget-design-DIhsk1I9.js +0 -4
  114. package/dist/seal-design-BhzgwVju.js +0 -4
@@ -1,17 +1,17 @@
1
1
  import * as Vue from "vue";
2
2
  import { createVNode, computed, unref, ref, defineComponent, onMounted, resolveComponent, openBlock, createElementBlock, withCtx, watch, toRaw, inject, reactive, createBlock, Fragment, renderList, createTextVNode, toDisplayString as toDisplayString$1, createCommentVNode, createElementVNode, normalizeClass, h, normalizeStyle, watchEffect, renderSlot, shallowRef, defineAsyncComponent, resolveDynamicComponent, mergeProps, normalizeProps, guardReactiveProps, onUnmounted, Text, nextTick, onBeforeUnmount, withModifiers, withDirectives, vShow, Teleport, withKeys, vModelText, isRef, provide, isVNode as isVNode$1, createApp, render, TransitionGroup, toRefs, useAttrs, createSlots, onScopeDispose, useCssVars, onBeforeMount, toRef, mergeDefaults, toHandlers, getCurrentInstance as getCurrentInstance$1, Transition, useModel, mergeModels as mergeModels$1, onErrorCaptured, markRaw } from "vue";
3
- import { g as getAllDataProfiles, i as isDataTableProfile, a as getProfile, b as isBusinessSubTableProfile, c as getProfileByTableType, r as resolveCreateTargetByTableType, d as getBusinessProfileByRefModelType, S as SUB_TABLE_PANEL_TYPE_NAME, e as expandAutofillTemplates, f as SubTableType, h as getAllBusinessRefModelTypes, D as DateObjectContext, j as isBlank$1, F as FIELD_TYPE, k as isSameFieldValue$1, l as runDateObjectHandler, m as companionIdKey, n as companionLabelKey, o as api, P as PaginationFormat, p as PaperWidgeType, B as BwipCodeType, L as LineType, q as PageSizeEnum, O as Orientation, s as src, T as TRACE_FIELD_TYPES, t as BUSINESS_FIELD_TYPES, u as resolveFieldRenderComponent, C as ComponentTypeEnum, v as parse$1, w as estraverse, x as Syntax, y as isDynamicCreateTarget, z as CellType, A as isDynamicCellSubTable, E as ParamModelTypeEnum, G as FieldTypeToJs, H as CreateType, I as uuid2, J as useModal, K as requireEstraverse, M as commonjsGlobal, N as getDefaultExportFromCjs, Q as PaperWidgeValueType, R as getParseFormulaVarInfos, U as onlineFormMasterModelTypeEnum, W as WAREHOUSE_FIELD_TYPES, V as UniqueConstraintType, X as FieldDefaultValueTypeEnum, Y as FormTypeEnum, Z as mitt, _ as isDateObjectField, $ as PlatformEnum, a0 as LabelPosition, a1 as BooleanShowMode, a2 as SignatureImageDirectionEnum, a3 as FallbackSignTypeEnum, a4 as SignatureNumberTypeEnum, a5 as SignatureTimeTypeEnum, a6 as SignShowTypeEnum, a7 as SignatureTypeEnum, a8 as _export_sfc, a9 as normalizeFieldType, aa as PaperSizeMap, ab as clampSealPosition, ac as normalizeSealDiameter, ad as getFieldMain, ae as buildUUID, af as FieldIconMap, ag as BigNumber, ah as FieldSysVarDefaultValueEnum, ai as CellWidgetViewState, aj as DiagonalDirection, ak as WidgetImageSizeMode, al as LineDirection, am as TimeDiffFormat, an as DiagonalVertex, ao as resolveDiagonalVertex, ap as getThemeColorByTableType, aq as ViewTypeEnum, ar as isDynamicSubTablePanelType, as as isFixedSubTablePanelType, at as ExpressionModeEnum, au as ReturnTypeEnum, av as ExpressionTabEnum, aw as RangeValidateMode, ax as RangeCompareOp, ay as DecimalDisplayMode$1, az as ImageDisplayModeEnum, aA as FormDesignEnum, aB as BASIC_FIELD_TYPES, aC as getExclusiveBusinessTypeTokens, aD as getSubTableTypeByRefModelType, aE as getAllTableProfiles, aF as transformUtils, aG as EmptySymbol, aH as ASSIGNMENTSTRATEGY_ENUM, aI as Dependency_ENUM, aJ as EntityModelCategoryEnum, aK as resolveLotDisplayLabel, aL as CheckDsTypeEnum, aM as DeviceLink, aN as DeviceParamsTypeTitle, aO as AITooltips, aP as DenoiseMethodOptions, aQ as BinarizeMethodOptions, aR as DateFormat, aS as LOT_CONTAINER_ROLE, aT as buildLotSnListQuery, aU as renderUtils, aV as resolveLotRecordByValue, aW as materialCheck, aX as getLotLockedReason, aY as validateReinspectionDate, aZ as BindCmpStyleEnum, a_ as getParseRuleInfo, a$ as getParseRuleValue, b0 as normalizeRefLoaderResult, b1 as STOCKTAKE_DIMENSION, b2 as F, b3 as resolveStocktakeSelectApi, b4 as readSealValue, b5 as isSealStamped, b6 as RenderModeEnum, b7 as stampSealValue, b8 as isValidSealValue, b9 as clearSealValue, ba as normalizeProductionContainerOptions, bb as buildProductionLotListQuery, bc as refUtils, bd as buildInspectionLotListQuery, be as buildDeviceFilterQuery, bf as DEVICE_GROUP_QUERY_KEY, bg as getRowId, bh as findRuntimeTableRow, bi as calculateFormula, bj as findRuntimeParentRow, bk as useOnlineFormTransformField2Component, bl as FormulaRuleFieldKeyEnum, bm as formulaRuleFieldDict, bn as resolveDesignPanelFeatures, bo as BIZ_TABLE_CONFIG_SEED_TYPES, bp as STOCKTAKE_DIMENSION_OPTIONS, bq as isRepeatingSubTablePanelType, br as moveSealValue, bs as uuid2$1 } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BvrrN6te.js";
3
+ import { g as getAllDataProfiles, i as isDataTableProfile, a as getProfile, b as isBusinessSubTableProfile, c as getProfileByTableType, r as resolveCreateTargetByTableType, d as getBusinessProfileByRefModelType, S as SUB_TABLE_PANEL_TYPE_NAME, e as expandAutofillTemplates, f as resolveAutofillToField, h as SubTableType, j as getAllBusinessRefModelTypes, D as DateObjectContext, k as isBlank$1, F as FIELD_TYPE, l as isSameFieldValue$1, m as runDateObjectHandler, n as companionIdKey, o as companionLabelKey, p as api, P as PaginationFormat, q as PaperWidgeType, B as BwipCodeType, L as LineType, s as PageSizeEnum, O as Orientation, t as src, T as TRACE_FIELD_TYPES, u as BUSINESS_FIELD_TYPES, v as resolveFieldRenderComponent, C as ComponentTypeEnum, w as parse$1, x as estraverse, y as Syntax, z as isDynamicCreateTarget, A as CellType, E as isDynamicCellSubTable, G as ParamModelTypeEnum, H as FieldTypeToJs, I as CreateType, J as uuid2, K as useModal, M as requireEstraverse, N as commonjsGlobal, Q as getDefaultExportFromCjs, R as PaperWidgeValueType, U as getParseFormulaVarInfos, V as onlineFormMasterModelTypeEnum, W as WAREHOUSE_FIELD_TYPES, X as UniqueConstraintType, Y as FieldDefaultValueTypeEnum, Z as FormTypeEnum, _ as mitt, $ as isDateObjectField, a0 as PlatformEnum, a1 as LabelPosition, a2 as BooleanShowMode, a3 as SignatureImageDirectionEnum, a4 as FallbackSignTypeEnum, a5 as SignatureNumberTypeEnum, a6 as SignatureTimeTypeEnum, a7 as SignShowTypeEnum, a8 as SignatureTypeEnum, a9 as _export_sfc, aa as normalizeFieldType, ab as PaperSizeMap, ac as clampSealPosition, ad as normalizeSealDiameter, ae as getFieldMain, af as buildUUID, ag as FieldIconMap, ah as BigNumber, ai as FieldSysVarDefaultValueEnum, aj as CellWidgetViewState, ak as DiagonalDirection, al as WidgetImageSizeMode, am as LineDirection, an as TimeDiffFormat, ao as DiagonalVertex, ap as resolveDiagonalVertex, aq as getThemeColorByTableType, ar as ViewTypeEnum, as as isDynamicSubTablePanelType, at as isFixedSubTablePanelType, au as ExpressionModeEnum, av as ReturnTypeEnum, aw as ExpressionTabEnum, ax as RangeValidateMode, ay as RangeCompareOp, az as getExclusiveBusinessTypeTokens, aA as getSubTableTypeByRefModelType, aB as findFieldMain, aC as DecimalDisplayMode$1, aD as ImageDisplayModeEnum, aE as FormDesignEnum, aF as BASIC_FIELD_TYPES, aG as getAllTableProfiles, aH as transformUtils, aI as EmptySymbol, aJ as ASSIGNMENTSTRATEGY_ENUM, aK as Dependency_ENUM, aL as EntityModelCategoryEnum, aM as resolveLotDisplayLabel, aN as CheckDsTypeEnum, aO as DeviceLink, aP as DeviceParamsTypeTitle, aQ as AITooltips, aR as DenoiseMethodOptions, aS as BinarizeMethodOptions, aT as DateFormat, aU as LOT_CONTAINER_ROLE, aV as buildLotSnListQuery, aW as renderUtils, aX as resolveLotRecordByValue, aY as materialCheck, aZ as getLotLockedReason, a_ as validateReinspectionDate, a$ as ProductionIdentificationTypeEnum, b0 as BindCmpStyleEnum, b1 as getParseRuleInfo, b2 as getParseRuleValue, b3 as normalizeRefLoaderResult, b4 as STOCKTAKE_DIMENSION, b5 as F, b6 as resolveStocktakeSelectApi, b7 as readSealValue, b8 as isSealStamped, b9 as RenderModeEnum, ba as stampSealValue, bb as isValidSealValue, bc as clearSealValue, bd as normalizeProductionContainerOptions, be as buildProductionLotListQuery, bf as refUtils, bg as buildInspectionLotListQuery, bh as buildDeviceFilterQuery, bi as DEVICE_GROUP_QUERY_KEY, bj as getRowId, bk as findRuntimeTableRow, bl as calculateFormula, bm as findRuntimeParentRow, bn as useOnlineFormTransformField2Component, bo as FormulaRuleFieldKeyEnum, bp as formulaRuleFieldDict, bq as resolveDesignPanelFeatures, br as BIZ_TABLE_CONFIG_SEED_TYPES, bs as STOCKTAKE_DIMENSION_OPTIONS, bt as isRepeatingSubTablePanelType, bu as moveSealValue, bv as uuid2$1 } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
4
4
  import { range, cloneDeep, get as get$3, merge, isEmpty, zip, pick, omit, has, debounce, isNil, times, clone as clone$3, differenceBy, mapValues, last, set as set$2, hasIn, isEqual } from "lodash-es";
5
5
  import dayjs from "dayjs";
6
6
  import { DataSourceChangeEvent, useFormBaseModal, getBuiltinContextFields, DataSources, FieldFills, FormBaseModalPlugin } from "@gct-paas/form-base";
7
7
  import * as Antd from "ant-design-vue";
8
8
  import { message, Modal, notification, Empty, InputSearch, Cascader, ConfigProvider, Tooltip as Tooltip$1, Input, Tree, Transfer, Select, Tag, AutoComplete, TimePicker, DatePicker, Textarea, TreeSelect, CheckboxGroup, Checkbox, Radio, RadioGroup } from "ant-design-vue";
9
- import { b as bindFormulaCacheInvalidation, c as currentParamsConfig, M as MAX_RUNTIME_SHEETS, a as MAX_RUNTIME_SHEET_TITLE_LENGTH, d as MULTI_SHEET_SCHEMA_VERSION, e as createRuntimeDocumentV2, g as getBusinessFieldKey, n as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, B as BorderTD, u as useFormTmplConfig, f as normalizeHistoricalBusinessRow, h as DeviceLinkTmplUtil, i as normalizeAIOcrTmpl, j as useWidgetStaticAttrs, k as useRuntimeInstanceServices, s as setSelectValidatorId, l as setSelectAnnotationId, m as useRuntimeRowState, o as getObjectBomMaterialLotQuery, p as buildObjectLotExtraQuery, r as resolveObjectFieldKeys, q as MaterialConsumptionPatternEnum, v as validateObjectBomForScan, t as resolveObjectBomEntry, w as runWithFillProduct, x as useNocodeFormWidget, y as applyConsumeObjectTraceChange, z as getObjectBomProductQuery, E as EMPTY_PRODUCT_VERSION_ID, A as normalizeHistoricalAutofillRow, N as NCB_PROVIDE, C as parseRuntimeFieldPath, F as useStyles, G as useDependency, H as useFieldPresentation, I as useRuntimeEditorFlusher, R as RuntimeFormStateStore, J as createRuntimeInstanceContext, K as RuntimeInstanceRegistry, S as ScanParamType, L as RequiredQtyCalcRule, O as DocumentPaper, P as DynamicTableAction, _ as _sfc_main$6g } from "./dynamic-table-action-BWI4Gaqi.js";
10
- import { S as SEARCH_SEVICE, V as VersionSelect, C as CloseOutlined, E as EmptyImg$2 } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-CRyGHP7k.js";
9
+ import { b as bindFormulaCacheInvalidation, c as currentParamsConfig, M as MAX_RUNTIME_SHEETS, a as MAX_RUNTIME_SHEET_TITLE_LENGTH, d as MULTI_SHEET_SCHEMA_VERSION, e as createRuntimeDocumentV2, g as getBusinessFieldKey, n as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, B as BorderTD, u as useFormTmplConfig, f as findFieldProfile, h as normalizeHistoricalBusinessRow, i as DeviceLinkTmplUtil, j as normalizeAIOcrTmpl, k as useWidgetStaticAttrs, l as useRuntimeInstanceServices, s as setSelectValidatorId, m as setSelectAnnotationId, o as useRuntimeRowState, p as getObjectBomMaterialLotQuery, q as buildObjectLotExtraQuery, r as resolveObjectFieldKeys, t as MaterialConsumptionPatternEnum, v as validateObjectBomForScan, w as resolveObjectBomEntry, x as runWithFillProduct, y as useNocodeFormWidget, z as applyConsumeObjectTraceChange, A as getObjectBomProductQuery, E as EMPTY_PRODUCT_VERSION_ID, C as normalizeHistoricalAutofillRow, N as NCB_PROVIDE, F as parseRuntimeFieldPath, G as useStyles, H as useDependency, I as useFieldPresentation, J as useRuntimeEditorFlusher, R as RuntimeFormStateStore, K as createRuntimeInstanceContext, L as RuntimeInstanceRegistry, S as ScanParamType, O as RequiredQtyCalcRule, P as DocumentPaper, Q as DynamicTableAction, _ as _sfc_main$6g } from "./dynamic-table-action-C__4AVW6.js";
10
+ import { S as SEARCH_SEVICE, V as VersionSelect, C as CloseOutlined, E as EmptyImg$2, P as ProductTypeEnum } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-Db5Hce6z.js";
11
11
  import { I as Icon$1, w as warning, u as useInsertStyles, s as svgBaseProps, a as useNamespace } from "./AntdIcon-DCIaV352.js";
12
- import { u as useWebUpload, i as initWebPaasUploadApis, a as useThrottleFn, d as defaultWindow, n as noop, b as useEventListener, c as isIOS, e as unrefElement, r as require$$0, U as Uploader, f as useIntersectionObserver, g as cacheAdapter, w as watchDebounced, A as AddRuleBtn, M as ModalWrapper, F as FormFieldSelect, o as onClickOutside$1, _ as _sfc_main$6f, h as initWebNocodeAdapter } from "./index-DeHX7rte.js";
12
+ import { u as useWebUpload, i as initWebPaasUploadApis, a as useThrottleFn, d as defaultWindow, n as noop, b as useEventListener, c as isIOS, e as unrefElement, r as require$$0, U as Uploader, f as useIntersectionObserver, g as cacheAdapter, w as watchDebounced, A as AddRuleBtn, M as ModalWrapper, F as FormFieldSelect, o as onClickOutside$1, _ as _sfc_main$6f, h as initWebNocodeAdapter } from "./index-BGHQz2Uj.js";
13
13
  import { Tooltip, Grid, Table, Column, Icon as Icon$2, Edit, Validator, VxeGrid } from "vxe-table";
14
- import { u as useFormModel, F as FormModelController } from "./mb-render-Bs9S9oFn.js";
14
+ import { u as useFormModel, F as FormModelController } from "./mb-render-CDFmykM_.js";
15
15
  import { HttpUtil } from "@gct-paas/api";
16
16
  import { useModal as useModal$1, t as t$2 } from "@gct-paas/core";
17
17
  import { useRoute } from "vue-router";
@@ -218,6 +218,17 @@ function matchBusinessField(field, profile) {
218
218
  function resolveBusinessFieldProfile(field, fieldProfiles = []) {
219
219
  return fieldProfiles.find((profile) => matchBusinessField(field, profile));
220
220
  }
221
+ function getBuiltInAutofillRules(field) {
222
+ if (!field.subModelType || !field.fieldKey) return [];
223
+ const tableProfile = getProfileByTableType(field.subModelType);
224
+ const businessProfile = tableProfile && isBusinessSubTableProfile(tableProfile) ? tableProfile : getBusinessProfileByRefModelType(field.subModelType);
225
+ const fieldProfile = resolveBusinessFieldProfile(field, businessProfile?.fields);
226
+ return (fieldProfile?.autofillTemplates ?? []).map((template) => ({
227
+ fromField: template.fromField,
228
+ toField: resolveAutofillToField(template, field.fieldKey),
229
+ fromFieldLabel: template.fromFieldLabel
230
+ }));
231
+ }
221
232
  function applyFieldProfileOnAttach(widget2, field) {
222
233
  if (!field.subModelType || !field.fieldKey) return widget2;
223
234
  const tableProfile = getProfileByTableType(field.subModelType);
@@ -1410,8 +1421,8 @@ const NumColMap = Array(1e3).fill("").reduce((m, e, i) => {
1410
1421
  m[i + 1] = num2Col(i + 1);
1411
1422
  return m;
1412
1423
  }, {});
1413
- const DEFAULT_ROW_HEIGHT = 30;
1414
- const DEFAULT_COL_WIDTH = 75;
1424
+ const DEFAULT_ROW_HEIGHT$1 = 30;
1425
+ const DEFAULT_COL_WIDTH$1 = 75;
1415
1426
  const PaperWidgetDropBoxId = "PaperWidgetDropBoxId";
1416
1427
  const ValueEditorFieldDropBoxId = "ValueEditorFieldDropBoxId";
1417
1428
  const FontSizeOptions = [5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
@@ -1437,10 +1448,10 @@ const DefaultPaper = {
1437
1448
  },
1438
1449
  orientation: Orientation.Portrait,
1439
1450
  cols: Array(10).fill("").map(() => ({
1440
- width: DEFAULT_COL_WIDTH
1451
+ width: DEFAULT_COL_WIDTH$1
1441
1452
  })),
1442
1453
  rows: Array(20).fill("").map(() => ({
1443
- height: DEFAULT_ROW_HEIGHT
1454
+ height: DEFAULT_ROW_HEIGHT$1
1444
1455
  })),
1445
1456
  cells: Array(20).fill("").map(
1446
1457
  () => Array(12).fill("").map(() => ({}))
@@ -2002,7 +2013,7 @@ function openWindow(url, opt) {
2002
2013
  const FieldPropLabels = Object.entries(FIELD_PROP_LABEL_MAP);
2003
2014
  const FieldTypeLabels = Object.entries(FIELD_TYPE_LABEL_MAP);
2004
2015
  async function createWorkbook() {
2005
- const ExcelJs = (await import("./exceljs.min-DfbB110X.js").then((n) => n.e)).default;
2016
+ const ExcelJs = (await import("./exceljs.min-C3uJ_Ieg.js").then((n) => n.e)).default;
2006
2017
  return new ExcelJs.Workbook();
2007
2018
  }
2008
2019
  class XlsxParser {
@@ -2330,39 +2341,39 @@ class XlsxParser {
2330
2341
  }
2331
2342
  function asyncImportClassModules() {
2332
2343
  const modules = /* @__PURE__ */ Object.assign({
2333
- "./_field_/auto-complete/index.ts": () => import("./index-731OYkrc.js").then((m) => m["default"]),
2334
- "./_field_/datepicker/index.ts": () => import("./index-B0cdcIWq.js").then((m) => m["default"]),
2335
- "./_field_/datetimepicker/index.ts": () => import("./index-CdHVHaxO.js").then((m) => m["default"]),
2336
- "./_field_/department/index.ts": () => import("./index-aNV9T6LI.js").then((m) => m["default"]),
2337
- "./_field_/enum-select/index.ts": () => import("./index-IVc1dOet.js").then((m) => m["default"]),
2338
- "./_field_/input/index.ts": () => import("./index-Dyomjz3y.js").then((m) => m["default"]),
2339
- "./_field_/inputdouble/index.ts": () => import("./index-BKXb3VJc.js").then((m) => m["default"]),
2340
- "./_field_/inputnumber/index.ts": () => import("./index-CeEhYXl9.js").then((m) => m["default"]),
2341
- "./_field_/rdo-select/index.ts": () => import("./index-Bnb70qEi.js").then((m) => m["default"]),
2342
- "./_field_/seal/index.ts": () => import("./index-CIa37rQm.js").then((m) => m["default"]),
2343
- "./_field_/select/index.ts": () => import("./index-7aS5L4ot.js").then((m) => m["default"]),
2344
- "./_field_/sign/index.ts": () => import("./index-CYLAVQfT.js").then((m) => m["default"]),
2345
- "./_field_/switch/index.ts": () => import("./index-BP-LhXXV.js").then((m) => m["default"]),
2346
- "./_field_/textarea/index.ts": () => import("./index-CVsoaxTR.js").then((m) => m["default"]),
2347
- "./_field_/timepicker/index.ts": () => import("./index-I1r5pfu5.js").then((m) => m["default"]),
2348
- "./_field_/upload-file/index.ts": () => import("./index-BC8hQ4vo.js").then((m) => m["default"]),
2349
- "./_field_/upload-image/index.ts": () => import("./index-BfBuxgcp.js").then((m) => m["default"]),
2350
- "./_field_/userpicker/index.ts": () => import("./index-CAdDeEzJ.js").then((m) => m["default"]),
2351
- "./_widget_/barcode/index.ts": () => import("./index-BFg5eUdY.js").then((m) => m["default"]),
2352
- "./_widget_/combine-fields/index.ts": () => import("./index-CL9K9orM.js").then((m) => m["default"]),
2353
- "./_widget_/diagonal/index.ts": () => import("./index-9S48hpoJ.js").then((m) => m["default"]),
2354
- "./_widget_/dyn-value/index.ts": () => import("./index-BRQkrFQ9.js").then((m) => m["default"]),
2355
- "./_widget_/image/index.ts": () => import("./index-CPTGioxl.js").then((m) => m["default"]),
2356
- "./_widget_/line/index.ts": () => import("./index-3WwCV4xR.js").then((m) => m["default"]),
2357
- "./_widget_/power/index.ts": () => import("./index-51LtNdZ2.js").then((m) => m["default"]),
2358
- "./_widget_/qrcode/index.ts": () => import("./index-BGAcYDx-.js").then((m) => m["default"]),
2359
- "./_widget_/ro/index.ts": () => import("./index-DNj0vFvx.js").then((m) => m["default"]),
2360
- "./_widget_/serialnumber/index.ts": () => import("./index-BMoz_QhA.js").then((m) => m["default"]),
2361
- "./_widget_/sub-table/index.ts": () => import("./index-DVEe11uM.js").then((m) => m["default"]),
2362
- "./_widget_/timediff/index.ts": () => import("./index-CpPk8P3L.js").then((m) => m["default"]),
2363
- "./paper/index.ts": () => import("./index-Ca9TLzUh.js").then((m) => m["default"]),
2364
- "./td/index.ts": () => import("./index-Bc61F6Hm.js").then((m) => m["default"]),
2365
- "./tr/index.ts": () => import("./index-DdWefZMa.js").then((m) => m["default"])
2344
+ "./_field_/auto-complete/index.ts": () => import("./index-DF5OI_Xj.js").then((m) => m["default"]),
2345
+ "./_field_/datepicker/index.ts": () => import("./index-DgvOxMoA.js").then((m) => m["default"]),
2346
+ "./_field_/datetimepicker/index.ts": () => import("./index-DJqTfkOe.js").then((m) => m["default"]),
2347
+ "./_field_/department/index.ts": () => import("./index-Lrse9db3.js").then((m) => m["default"]),
2348
+ "./_field_/enum-select/index.ts": () => import("./index-DVFXRZRw.js").then((m) => m["default"]),
2349
+ "./_field_/input/index.ts": () => import("./index-D4lTMizD.js").then((m) => m["default"]),
2350
+ "./_field_/inputdouble/index.ts": () => import("./index-Cy17m87b.js").then((m) => m["default"]),
2351
+ "./_field_/inputnumber/index.ts": () => import("./index-CKnArHCM.js").then((m) => m["default"]),
2352
+ "./_field_/rdo-select/index.ts": () => import("./index-CwvVx_5V.js").then((m) => m["default"]),
2353
+ "./_field_/seal/index.ts": () => import("./index-CMzci3SX.js").then((m) => m["default"]),
2354
+ "./_field_/select/index.ts": () => import("./index-Cy3658Zd.js").then((m) => m["default"]),
2355
+ "./_field_/sign/index.ts": () => import("./index-DzAPpHun.js").then((m) => m["default"]),
2356
+ "./_field_/switch/index.ts": () => import("./index-DLx-4gQ_.js").then((m) => m["default"]),
2357
+ "./_field_/textarea/index.ts": () => import("./index-DfAWRc7u.js").then((m) => m["default"]),
2358
+ "./_field_/timepicker/index.ts": () => import("./index-C-wSYnoD.js").then((m) => m["default"]),
2359
+ "./_field_/upload-file/index.ts": () => import("./index-CVJadZzs.js").then((m) => m["default"]),
2360
+ "./_field_/upload-image/index.ts": () => import("./index-Bn4BqmG_.js").then((m) => m["default"]),
2361
+ "./_field_/userpicker/index.ts": () => import("./index-BOehk-Mo.js").then((m) => m["default"]),
2362
+ "./_widget_/barcode/index.ts": () => import("./index-DhJQOZHh.js").then((m) => m["default"]),
2363
+ "./_widget_/combine-fields/index.ts": () => import("./index-Bes3atoZ.js").then((m) => m["default"]),
2364
+ "./_widget_/diagonal/index.ts": () => import("./index-DbN8jrOK.js").then((m) => m["default"]),
2365
+ "./_widget_/dyn-value/index.ts": () => import("./index-BcSq5laa.js").then((m) => m["default"]),
2366
+ "./_widget_/image/index.ts": () => import("./index-B2xCe29Z.js").then((m) => m["default"]),
2367
+ "./_widget_/line/index.ts": () => import("./index-NiQurze3.js").then((m) => m["default"]),
2368
+ "./_widget_/power/index.ts": () => import("./index-Bxdq78c9.js").then((m) => m["default"]),
2369
+ "./_widget_/qrcode/index.ts": () => import("./index-CD04dkRd.js").then((m) => m["default"]),
2370
+ "./_widget_/ro/index.ts": () => import("./index-ZBaLDzvn.js").then((m) => m["default"]),
2371
+ "./_widget_/serialnumber/index.ts": () => import("./index-DiZHDEas.js").then((m) => m["default"]),
2372
+ "./_widget_/sub-table/index.ts": () => import("./index-DMVoiSyn.js").then((m) => m["default"]),
2373
+ "./_widget_/timediff/index.ts": () => import("./index-Cvj6_0dy.js").then((m) => m["default"]),
2374
+ "./paper/index.ts": () => import("./index--9zZnmyE.js").then((m) => m["default"]),
2375
+ "./td/index.ts": () => import("./index-D2bXGJMB.js").then((m) => m["default"]),
2376
+ "./tr/index.ts": () => import("./index-BDvLu-0F.js").then((m) => m["default"])
2366
2377
  });
2367
2378
  return modules;
2368
2379
  }
@@ -2958,26 +2969,13 @@ function compileRuntimeFormConfig(formConfig2) {
2958
2969
  subFieldKey: item.subFieldKey
2959
2970
  }))
2960
2971
  );
2961
- const customDataSource = (formConfig2.customDataSource ?? []).map((item) => ({
2962
- joinModelKey: item.joinModelKey,
2963
- joinSubModel: item.joinSubModel,
2964
- joinModelType: item.joinModelType,
2965
- joinFormRefId: item.joinFormRefId,
2966
- joinSqlJson: item.joinSqlJson,
2967
- joinBuiltinConfig: item.joinBuiltinConfig,
2968
- joinIpaasConfig: item.joinIpaasConfig,
2969
- query: (item.onExpressions ?? []).filter((expression) => expression.fieldKey && expression.operator).map((expression) => ({
2970
- exp: `${expression.fieldKey}.${expression.operator}:${expression.id}`,
2971
- formKey: expression.formKey
2972
- })),
2973
- onFieldMap: item.onFieldMap
2974
- }));
2975
2972
  return {
2976
2973
  globalParams,
2977
2974
  paramsMapList,
2978
2975
  unitConversionRules: cloneDeep(formConfig2.unitConversionRules ?? []),
2979
2976
  inspectionDecisionRule: cloneDeep(formConfig2.inspectionDecisionRule),
2980
- customDataSource,
2977
+ // 新生成的运行模板不再携带隐藏的旧数源;旧单据仍消费其已保存的运行模板。
2978
+ customDataSource: [],
2981
2979
  dataSources: cloneDeep(formConfig2.dataSources ?? []),
2982
2980
  fieldFills: cloneDeep(formConfig2.fieldFills ?? []),
2983
2981
  objectInitialValues: cloneDeep(formConfig2.objectInitialValues ?? []),
@@ -4054,6 +4052,62 @@ function migrateDesignerToV2(maps, info, createPaper) {
4054
4052
  })
4055
4053
  };
4056
4054
  }
4055
+ const DEFAULT_ROW_HEIGHT = 30;
4056
+ const DEFAULT_COL_WIDTH = 75;
4057
+ const positiveSize = (value, fallback) => typeof value === "number" && Number.isFinite(value) && value > 0 ? value : fallback;
4058
+ const normalizeCell = (value) => {
4059
+ if (value && typeof value === "object" && !Array.isArray(value)) return value;
4060
+ return value == null ? {} : { value };
4061
+ };
4062
+ const normalizeRange = (range2, rows, cols) => {
4063
+ if (!range2 || ![range2.t, range2.b, range2.l, range2.r].every(Number.isInteger)) return;
4064
+ const t2 = Math.max(1, range2.t);
4065
+ const b = Math.min(rows, range2.b);
4066
+ const l = Math.max(1, range2.l);
4067
+ const r = Math.min(cols, range2.r);
4068
+ if (t2 > b || l > r) return;
4069
+ return { ...range2, t: t2, b, l, r };
4070
+ };
4071
+ const normalizeTable = (table, rows, cols) => {
4072
+ if (!table || typeof table !== "object") return;
4073
+ const range2 = normalizeRange(table.range, rows, cols);
4074
+ if (!range2) return;
4075
+ table.range = range2;
4076
+ if (table.thRange) table.thRange = normalizeRange(table.thRange, rows, cols);
4077
+ if (table.dgRange) table.dgRange = normalizeRange(table.dgRange, rows, cols);
4078
+ if (table.rowRange) table.rowRange = normalizeRange(table.rowRange, rows, cols);
4079
+ return table;
4080
+ };
4081
+ function normalizePaperGrid(paper2) {
4082
+ const sourceRows = Array.isArray(paper2.rows) ? paper2.rows : [];
4083
+ const sourceCols = Array.isArray(paper2.cols) ? paper2.cols : [];
4084
+ const sourceCells = Array.isArray(paper2.cells) ? paper2.cells : [];
4085
+ const rowCount = Math.max(1, sourceRows.length, sourceCells.length);
4086
+ const widestRow = sourceCells.reduce(
4087
+ (width, row) => Math.max(width, Array.isArray(row) ? row.length : 0),
4088
+ 0
4089
+ );
4090
+ const colCount = Math.max(1, sourceCols.length, widestRow);
4091
+ paper2.rows = Array.from({ length: rowCount }, (_, index2) => ({
4092
+ ...sourceRows[index2],
4093
+ height: positiveSize(sourceRows[index2]?.height, DEFAULT_ROW_HEIGHT)
4094
+ }));
4095
+ paper2.cols = Array.from({ length: colCount }, (_, index2) => ({
4096
+ ...sourceCols[index2],
4097
+ width: positiveSize(sourceCols[index2]?.width, DEFAULT_COL_WIDTH)
4098
+ }));
4099
+ paper2.cells = Array.from({ length: rowCount }, (_, rowIndex) => {
4100
+ const row = Array.isArray(sourceCells[rowIndex]) ? sourceCells[rowIndex] : [];
4101
+ return Array.from({ length: colCount }, (_2, colIndex) => normalizeCell(row[colIndex]));
4102
+ });
4103
+ paper2.mergedCells = (Array.isArray(paper2.mergedCells) ? paper2.mergedCells : []).map((range2) => normalizeRange(range2, rowCount, colCount)).filter((range2) => !!range2);
4104
+ if (paper2.thead?.thRange) {
4105
+ paper2.thead.thRange = normalizeRange(paper2.thead.thRange, rowCount, colCount);
4106
+ }
4107
+ paper2.dynamicTables = (Array.isArray(paper2.dynamicTables) ? paper2.dynamicTables : []).map((table) => normalizeTable(table, rowCount, colCount)).filter((table) => !!table);
4108
+ paper2.fixedTables = (Array.isArray(paper2.fixedTables) ? paper2.fixedTables : []).map((table) => normalizeTable(table, rowCount, colCount)).filter((table) => !!table);
4109
+ return paper2;
4110
+ }
4057
4111
  const _hoisted_1$3q = { class: "p24px" };
4058
4112
  const _sfc_main$6e = /* @__PURE__ */ defineComponent({
4059
4113
  __name: "add-sheet",
@@ -9946,14 +10000,7 @@ const setActive = (sheetId) => {
9946
10000
  const getSheet = (paperId) => {
9947
10001
  return sheetsData$1.value.find((item) => item.sheetId === paperId);
9948
10002
  };
9949
- const alignSheetColumns = (sheet) => {
9950
- const { paper: paper2 } = sheet;
9951
- const colCount = paper2.cols.length;
9952
- paper2.cells = paper2.cells.map(
9953
- (row) => Array.from({ length: colCount }, (_, index2) => row[index2] ?? {})
9954
- );
9955
- paper2.mergedCells = paper2.mergedCells.filter((range2) => range2.l < colCount).map((range2) => ({ ...range2, r: Math.min(range2.r, colCount - 1) }));
9956
- };
10003
+ const normalizeSheetGrid = (sheet) => normalizePaperGrid(sheet.paper);
9957
10004
  const normalizeSterilizeInputProps = (sheet) => {
9958
10005
  sheet.paper.cells.flat().forEach((cell) => {
9959
10006
  for (const content of [cell, ...cell.multiFieldsContent ?? []]) {
@@ -10088,7 +10135,7 @@ const useAllSpreadSheets = () => {
10088
10135
  designerConfig.value = { mainModelKey, modelMetaMap: modelMetaMap2 };
10089
10136
  formConfig$3.value = cloneDeep(designer.formConfig);
10090
10137
  sheetsData$1.value = cloneDeep(designer.sheets);
10091
- sheetsData$1.value.forEach(alignSheetColumns);
10138
+ sheetsData$1.value.forEach(normalizeSheetGrid);
10092
10139
  sheetsData$1.value.forEach(normalizeSterilizeInputProps);
10093
10140
  mergeFormTmplBomList(info.formTmplBomList);
10094
10141
  mergeFormTmplObjectBomList(info.formTmplObjectBomList);
@@ -10150,7 +10197,7 @@ const useAllSpreadSheets = () => {
10150
10197
  sheetId
10151
10198
  })
10152
10199
  };
10153
- alignSheetColumns(sheet);
10200
+ normalizeSheetGrid(sheet);
10154
10201
  normalizeSterilizeInputProps(sheet);
10155
10202
  cacheStep();
10156
10203
  sheetsData$1.value.push(sheet);
@@ -10205,7 +10252,7 @@ const useAllSpreadSheets = () => {
10205
10252
  sheetId
10206
10253
  })
10207
10254
  };
10208
- alignSheetColumns(sheet);
10255
+ normalizeSheetGrid(sheet);
10209
10256
  normalizeSterilizeInputProps(sheet);
10210
10257
  return sheet;
10211
10258
  });
@@ -10301,7 +10348,7 @@ const useAllSpreadSheets = () => {
10301
10348
  }
10302
10349
  function saveSheets2(isEasyEdition2) {
10303
10350
  try {
10304
- sheetsData$1.value.forEach(alignSheetColumns);
10351
+ sheetsData$1.value.forEach(normalizeSheetGrid);
10305
10352
  sheetsData$1.value.forEach(normalizeSterilizeInputProps);
10306
10353
  validateSheetsBeforeSave();
10307
10354
  if (isEasyEdition2) {
@@ -12222,7 +12269,7 @@ function useSpreadSheet() {
12222
12269
  function resizeCol(e) {
12223
12270
  const x = Number(e.target.parentNode.dataset.x);
12224
12271
  const startX = e.clientX;
12225
- const startWidth = paper$1.value.cols[x - 1]?.width ?? DEFAULT_COL_WIDTH;
12272
+ const startWidth = paper$1.value.cols[x - 1]?.width ?? DEFAULT_COL_WIDTH$1;
12226
12273
  function handleMouseMove(e2) {
12227
12274
  const nextWidth = Math.max(1, startWidth + e2.clientX - startX);
12228
12275
  setColWidth(x, nextWidth);
@@ -12457,7 +12504,7 @@ function useSpreadSheet() {
12457
12504
  function insertRow(row, inheritRow) {
12458
12505
  const rowIndex = (row ?? paper$1.value.rows.length) - 1;
12459
12506
  paper$1.value.rows.splice(rowIndex, 0, {
12460
- height: DEFAULT_ROW_HEIGHT
12507
+ height: DEFAULT_ROW_HEIGHT$1
12461
12508
  });
12462
12509
  const _inheritRow = isNil(inheritRow) ? new Array(paper$1.value.cols.length).fill(void 0) : inheritRow;
12463
12510
  paper$1.value.cells.splice(
@@ -12502,7 +12549,7 @@ function useSpreadSheet() {
12502
12549
  }
12503
12550
  function insertCol(col, insertCols2) {
12504
12551
  const colIndex = (col ?? paper$1.value.cols.length) - 1;
12505
- paper$1.value.cols.splice(colIndex, 0, { width: DEFAULT_COL_WIDTH });
12552
+ paper$1.value.cols.splice(colIndex, 0, { width: DEFAULT_COL_WIDTH$1 });
12506
12553
  paper$1.value.cells.forEach((row, index2) => {
12507
12554
  const cell = insertCols2 ? insertCols2[index2] : void 0;
12508
12555
  const style = cell?.style ? cloneDeep(cell?.style) : void 0;
@@ -13053,7 +13100,19 @@ function useSpreadSheet() {
13053
13100
  subModelType: data.subModelType
13054
13101
  });
13055
13102
  const { fieldMetaMap: fieldMetaMap2 } = useModelFields();
13056
- const modelDefaultValue = fieldMetaMap2.value[`${data.model}.${data.field}`]?.defaultValue;
13103
+ const modelField = fieldMetaMap2.value[`${data.model}.${data.field}`];
13104
+ if (data.fieldType === FIELD_TYPE.BOOLEAN) {
13105
+ const config2 = modelField?.specificConfig;
13106
+ const trueText = config2?.["true"];
13107
+ const falseText = config2?.["false"];
13108
+ if (typeof trueText === "string" || typeof trueText === "number") {
13109
+ Object.assign(profiledWidget, { trueText: String(trueText) });
13110
+ }
13111
+ if (typeof falseText === "string" || typeof falseText === "number") {
13112
+ Object.assign(profiledWidget, { falseText: String(falseText) });
13113
+ }
13114
+ }
13115
+ const modelDefaultValue = modelField?.defaultValue;
13057
13116
  if (modelDefaultValue?.type !== FieldDefaultValueTypeEnum.NONE && !isNil(modelDefaultValue?.value)) {
13058
13117
  Object.assign(profiledWidget, { defaultValue: cloneDeep(modelDefaultValue.value) });
13059
13118
  }
@@ -13612,14 +13671,14 @@ function useSpreadSheet() {
13612
13671
  const pageHeightPx = parseInt(src(`${size[1]}mm`));
13613
13672
  const availableWidthPx = pageWidthPx - DefaultPaper.padding.l - DefaultPaper.padding.r;
13614
13673
  const availableHeightPx = pageHeightPx - DefaultPaper.padding.t - DefaultPaper.padding.b;
13615
- const cols = Math.max(1, Math.floor(availableWidthPx / DEFAULT_COL_WIDTH));
13616
- const rows = Math.max(1, Math.floor(availableHeightPx / DEFAULT_ROW_HEIGHT));
13674
+ const cols = Math.max(1, Math.floor(availableWidthPx / DEFAULT_COL_WIDTH$1));
13675
+ const rows = Math.max(1, Math.floor(availableHeightPx / DEFAULT_ROW_HEIGHT$1));
13617
13676
  Object.assign(config2, {
13618
13677
  cols: Array(cols).fill("").map(() => ({
13619
- width: DEFAULT_COL_WIDTH
13678
+ width: DEFAULT_COL_WIDTH$1
13620
13679
  })),
13621
13680
  rows: Array(rows).fill("").map(() => ({
13622
- height: DEFAULT_ROW_HEIGHT
13681
+ height: DEFAULT_ROW_HEIGHT$1
13623
13682
  })),
13624
13683
  cells: Array(rows).fill("").map(
13625
13684
  () => Array(cols).fill("").map(() => ({}))
@@ -15940,7 +15999,7 @@ function asyncImportWidgetConfigList() {
15940
15999
  return widgetConfigList;
15941
16000
  }
15942
16001
  function asyncImportWidgetDesign() {
15943
- const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-BhzgwVju.js"), "./barcode/barcode-design.vue": () => import("./barcode-design-CBqUEPYu.js"), "./diagonal/diagonal-design.vue": () => import("./diagonal-design-u23896Ky.js"), "./image/image-design.vue": () => import("./image-design-CtE-Lw7N.js"), "./line/line-design.vue": () => Promise.resolve().then(() => lineDesign), "./pagination/pagination-design.vue": () => import("./pagination-design-CmbsdlMe.js"), "./paper-widget-design.vue": () => import("./paper-widget-design-DIhsk1I9.js"), "./power/power-design.vue": () => Promise.resolve().then(() => powerDesign), "./qrcode/qrcode-design.vue": () => import("./qrcode-design-CX0_2mLC.js"), "./rangelimit/rangelimit-design.vue": () => Promise.resolve().then(() => rangelimitDesign), "./serialnumber/serialnumber-design.vue": () => import("./serialnumber-design-aSqL4gX6.js"), "./text/text-design.vue": () => import("./text-design-Dz0Qf2O3.js"), "./timediff/timediff-design.vue": () => import("./timediff-design-D9JfNqH8.js") });
16002
+ const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-LHZWDjEb.js"), "./barcode/barcode-design.vue": () => import("./barcode-design-Dqzu8TED.js"), "./diagonal/diagonal-design.vue": () => import("./diagonal-design-OOLJ1YWE.js"), "./image/image-design.vue": () => import("./image-design-Dt_97Q--.js"), "./line/line-design.vue": () => Promise.resolve().then(() => lineDesign), "./pagination/pagination-design.vue": () => import("./pagination-design-Dz7y8YKu.js"), "./paper-widget-design.vue": () => import("./paper-widget-design-BlIbv2tj.js"), "./power/power-design.vue": () => Promise.resolve().then(() => powerDesign), "./qrcode/qrcode-design.vue": () => import("./qrcode-design-Dq0tczvD.js"), "./rangelimit/rangelimit-design.vue": () => Promise.resolve().then(() => rangelimitDesign), "./serialnumber/serialnumber-design.vue": () => import("./serialnumber-design-DUqW6M9C.js"), "./text/text-design.vue": () => import("./text-design-BfXr3TcH.js"), "./timediff/timediff-design.vue": () => import("./timediff-design-BF-mVD2d.js") });
15944
16003
  const widgetDesignMap = Object.keys(modules).reduce((map2, path) => {
15945
16004
  const mKey = path.match(/\/([a-z]+)-design\.vue$/)?.[1];
15946
16005
  if (mKey) {
@@ -21636,6 +21695,8 @@ function resolveCellContentStyle(cellStyle = {}, isDroppedField) {
21636
21695
  display: "flex",
21637
21696
  boxSizing: "border-box",
21638
21697
  lineHeight: "1.5",
21698
+ // 纯文本与渲染器一致,保留原始换行;显式设置的 white-space 优先。
21699
+ "white-space": isDroppedField ? void 0 : cellStyle["white-space"] ?? "pre",
21639
21700
  "align-items": alignItems,
21640
21701
  "justify-content": justifyContent,
21641
21702
  paddingLeft: effectiveTextAlign === "left" ? textInset : "0px",
@@ -21813,6 +21874,11 @@ const _sfc_main$5G = /* @__PURE__ */ defineComponent({
21813
21874
  if (!isEmpty(props2.cell.style) && has(props2.cell.style, "white-space") && has(props2.cell.style, "word-break") && props2.cell.style["white-space"] === "pre-wrap" && props2.cell.style["word-break"] === "break-all") {
21814
21875
  styles["--auto-line-break"] = "wrap";
21815
21876
  }
21877
+ if (props2.cell.multiFields) {
21878
+ const mode = styles["writing-mode"] ?? styles.writingMode;
21879
+ styles["--composite-text-writing-mode"] = mode && mode !== "unset" ? mode : "horizontal-tb";
21880
+ styles.writingMode = styles["writing-mode"] = "horizontal-tb";
21881
+ }
21816
21882
  return styles;
21817
21883
  });
21818
21884
  const divStyle2 = computed(
@@ -21920,7 +21986,7 @@ const _sfc_main$5G = /* @__PURE__ */ defineComponent({
21920
21986
  };
21921
21987
  }
21922
21988
  });
21923
- const SpreadSheetCell = /* @__PURE__ */ _export_sfc(_sfc_main$5G, [["__scopeId", "data-v-23e833d0"]]);
21989
+ const SpreadSheetCell = /* @__PURE__ */ _export_sfc(_sfc_main$5G, [["__scopeId", "data-v-ae22e414"]]);
21924
21990
  const ThresholdValue = 8;
21925
21991
  function getOffsetValue(left, width, points) {
21926
21992
  let offset2 = left;
@@ -23813,7 +23879,7 @@ const _hoisted_2$2b = ["data-x", "width"];
23813
23879
  const _hoisted_3$1G = ["data-x"];
23814
23880
  const _hoisted_4$1a = ["onMouseenter"];
23815
23881
  const _hoisted_5$W = ["onClick"];
23816
- const _hoisted_6$H = ["data-x"];
23882
+ const _hoisted_6$I = ["data-x"];
23817
23883
  const _sfc_main$5o = /* @__PURE__ */ defineComponent({
23818
23884
  __name: "table-x",
23819
23885
  setup(__props) {
@@ -23921,7 +23987,7 @@ const _sfc_main$5o = /* @__PURE__ */ defineComponent({
23921
23987
  style: normalizeStyle({
23922
23988
  height: tableHeight.value + "px"
23923
23989
  })
23924
- }, null, 14, _hoisted_6$H);
23990
+ }, null, 14, _hoisted_6$I);
23925
23991
  }), 128))
23926
23992
  ], 4)
23927
23993
  ])
@@ -23940,8 +24006,8 @@ const _hoisted_2$2a = {
23940
24006
  const _hoisted_3$1F = ["width"];
23941
24007
  const _hoisted_4$19 = ["data-y", "height"];
23942
24008
  const _hoisted_5$V = { style: { "position": "relative" } };
23943
- const _hoisted_6$G = ["onMouseenter"];
23944
- const _hoisted_7$t = ["onClick"];
24009
+ const _hoisted_6$H = ["onMouseenter"];
24010
+ const _hoisted_7$u = ["onClick"];
23945
24011
  const _sfc_main$5n = /* @__PURE__ */ defineComponent({
23946
24012
  __name: "table-y",
23947
24013
  setup(__props) {
@@ -24018,8 +24084,8 @@ const _sfc_main$5n = /* @__PURE__ */ defineComponent({
24018
24084
  createElementVNode("i", {
24019
24085
  class: "iconfont icon-tianjia hover-icon",
24020
24086
  onClick: (e) => addRow(e, rowIndex + 1)
24021
- }, null, 8, _hoisted_7$t)
24022
- ], 42, _hoisted_6$G)
24087
+ }, null, 8, _hoisted_7$u)
24088
+ ], 42, _hoisted_6$H)
24023
24089
  ]),
24024
24090
  createElementVNode("td", {
24025
24091
  class: normalizeClass([
@@ -24206,8 +24272,8 @@ const _hoisted_2$28 = { class: "item-box" };
24206
24272
  const _hoisted_3$1D = ["onClick"];
24207
24273
  const _hoisted_4$17 = ["onClick"];
24208
24274
  const _hoisted_5$T = ["onClick"];
24209
- const _hoisted_6$F = ["title"];
24210
- const _hoisted_7$s = {
24275
+ const _hoisted_6$G = ["title"];
24276
+ const _hoisted_7$t = {
24211
24277
  key: 0,
24212
24278
  class: "swapper-btn"
24213
24279
  };
@@ -24311,7 +24377,7 @@ const _sfc_main$5j = /* @__PURE__ */ defineComponent({
24311
24377
  style: normalizeStyle({
24312
24378
  "pointer-events": __props.readonly ? "none" : "unset"
24313
24379
  })
24314
- }, toDisplayString$1(item.title), 13, _hoisted_6$F)
24380
+ }, toDisplayString$1(item.title), 13, _hoisted_6$G)
24315
24381
  ]),
24316
24382
  _: 2
24317
24383
  }, 1032, ["onVisibleChange"])
@@ -24319,7 +24385,7 @@ const _sfc_main$5j = /* @__PURE__ */ defineComponent({
24319
24385
  }), 128))
24320
24386
  ])
24321
24387
  ], 512),
24322
- showMoreBtn.value ? (openBlock(), createElementBlock("div", _hoisted_7$s, [
24388
+ showMoreBtn.value ? (openBlock(), createElementBlock("div", _hoisted_7$t, [
24323
24389
  createElementVNode("i", {
24324
24390
  class: normalizeClass(["iconfont icon-arrow_left_more", [curPage.value <= 1 && "disabled-btn"]]),
24325
24391
  onClick: _cache[0] || (_cache[0] = ($event) => onMove(true))
@@ -25365,21 +25431,21 @@ const _hoisted_3$1y = { style: {
25365
25431
  } };
25366
25432
  const _hoisted_4$14 = { class: "color-picker-middle" };
25367
25433
  const _hoisted_5$R = { style: { "flex": "auto" } };
25368
- const _hoisted_6$E = { class: "color-picker-diamond" };
25369
- const _hoisted_7$r = { class: "color-picker-value" };
25370
- const _hoisted_8$m = { class: "hex" };
25371
- const _hoisted_9$g = ["value"];
25372
- const _hoisted_10$e = { class: "rgba-r" };
25373
- const _hoisted_11$c = ["value"];
25374
- const _hoisted_12$9 = { class: "rgba-g" };
25375
- const _hoisted_13$8 = ["value"];
25376
- const _hoisted_14$6 = { class: "rgba-b" };
25377
- const _hoisted_15$4 = ["value"];
25378
- const _hoisted_16$4 = { class: "rgba-a" };
25379
- const _hoisted_17$3 = ["value"];
25380
- const _hoisted_18$3 = { class: "presetColor" };
25381
- const _hoisted_19$3 = { class: "preset" };
25382
- const _hoisted_20$3 = ["onClick"];
25434
+ const _hoisted_6$F = { class: "color-picker-diamond" };
25435
+ const _hoisted_7$s = { class: "color-picker-value" };
25436
+ const _hoisted_8$n = { class: "hex" };
25437
+ const _hoisted_9$h = ["value"];
25438
+ const _hoisted_10$f = { class: "rgba-r" };
25439
+ const _hoisted_11$d = ["value"];
25440
+ const _hoisted_12$a = { class: "rgba-g" };
25441
+ const _hoisted_13$9 = ["value"];
25442
+ const _hoisted_14$7 = { class: "rgba-b" };
25443
+ const _hoisted_15$5 = ["value"];
25444
+ const _hoisted_16$5 = { class: "rgba-a" };
25445
+ const _hoisted_17$4 = ["value"];
25446
+ const _hoisted_18$4 = { class: "presetColor" };
25447
+ const _hoisted_19$4 = { class: "preset" };
25448
+ const _hoisted_20$4 = ["onClick"];
25383
25449
  const _sfc_main$5a = /* @__PURE__ */ defineComponent({
25384
25450
  __name: "ColorPicker",
25385
25451
  props: {
@@ -25806,69 +25872,69 @@ const _sfc_main$5a = /* @__PURE__ */ defineComponent({
25806
25872
  }, null, 4)
25807
25873
  ], 544)
25808
25874
  ]),
25809
- createElementVNode("div", _hoisted_6$E, [
25875
+ createElementVNode("div", _hoisted_6$F, [
25810
25876
  createElementVNode("div", {
25811
25877
  style: normalizeStyle(`background-color: ${colorObj.value.rgba};width: 100%;height: 100%;box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), inset 0 0 4px rgba(0, 0, 0, .25);`)
25812
25878
  }, null, 4)
25813
25879
  ])
25814
25880
  ]),
25815
- createElementVNode("div", _hoisted_7$r, [
25816
- createElementVNode("div", _hoisted_8$m, [
25881
+ createElementVNode("div", _hoisted_7$s, [
25882
+ createElementVNode("div", _hoisted_8$n, [
25817
25883
  createElementVNode("label", null, [
25818
25884
  createElementVNode("input", {
25819
25885
  value: colorObj.value.hex8,
25820
25886
  onInput: hexChange,
25821
25887
  spellcheck: "false"
25822
- }, null, 40, _hoisted_9$g)
25888
+ }, null, 40, _hoisted_9$h)
25823
25889
  ]),
25824
25890
  _cache[2] || (_cache[2] = createElementVNode("p", null, "Hex", -1))
25825
25891
  ]),
25826
- createElementVNode("div", _hoisted_10$e, [
25892
+ createElementVNode("div", _hoisted_10$f, [
25827
25893
  createElementVNode("label", null, [
25828
25894
  createElementVNode("input", {
25829
25895
  value: red.value,
25830
25896
  onInput: redChange
25831
- }, null, 40, _hoisted_11$c)
25897
+ }, null, 40, _hoisted_11$d)
25832
25898
  ]),
25833
25899
  _cache[3] || (_cache[3] = createElementVNode("p", null, "R", -1))
25834
25900
  ]),
25835
- createElementVNode("div", _hoisted_12$9, [
25901
+ createElementVNode("div", _hoisted_12$a, [
25836
25902
  createElementVNode("label", null, [
25837
25903
  createElementVNode("input", {
25838
25904
  value: green.value,
25839
25905
  onInput: greenChange
25840
- }, null, 40, _hoisted_13$8)
25906
+ }, null, 40, _hoisted_13$9)
25841
25907
  ]),
25842
25908
  _cache[4] || (_cache[4] = createElementVNode("p", null, "G", -1))
25843
25909
  ]),
25844
- createElementVNode("div", _hoisted_14$6, [
25910
+ createElementVNode("div", _hoisted_14$7, [
25845
25911
  createElementVNode("label", null, [
25846
25912
  createElementVNode("input", {
25847
25913
  value: blue.value,
25848
25914
  onInput: blueChange
25849
- }, null, 40, _hoisted_15$4)
25915
+ }, null, 40, _hoisted_15$5)
25850
25916
  ]),
25851
25917
  _cache[5] || (_cache[5] = createElementVNode("p", null, "B", -1))
25852
25918
  ]),
25853
- createElementVNode("div", _hoisted_16$4, [
25919
+ createElementVNode("div", _hoisted_16$5, [
25854
25920
  createElementVNode("label", null, [
25855
25921
  createElementVNode("input", {
25856
25922
  value: alpha.value,
25857
25923
  onInput: alphaChange
25858
- }, null, 40, _hoisted_17$3)
25924
+ }, null, 40, _hoisted_17$4)
25859
25925
  ]),
25860
25926
  _cache[6] || (_cache[6] = createElementVNode("p", null, "A", -1))
25861
25927
  ])
25862
25928
  ]),
25863
- createElementVNode("div", _hoisted_18$3, [
25929
+ createElementVNode("div", _hoisted_18$4, [
25864
25930
  _cache[7] || (_cache[7] = createElementVNode("div", { class: "title" }, "推荐颜色", -1)),
25865
- createElementVNode("ul", _hoisted_19$3, [
25931
+ createElementVNode("ul", _hoisted_19$4, [
25866
25932
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.preset, (item) => {
25867
25933
  return openBlock(), createElementBlock("li", {
25868
25934
  key: item,
25869
25935
  style: normalizeStyle(`background-color: ${item}`),
25870
25936
  onClick: ($event) => presetChange(item)
25871
- }, null, 12, _hoisted_20$3);
25937
+ }, null, 12, _hoisted_20$4);
25872
25938
  }), 128))
25873
25939
  ])
25874
25940
  ])
@@ -26074,34 +26140,34 @@ const _hoisted_2$22 = { class: "inline-media-modal__header" };
26074
26140
  const _hoisted_3$1x = ["aria-label"];
26075
26141
  const _hoisted_4$13 = ["aria-selected"];
26076
26142
  const _hoisted_5$Q = ["aria-selected"];
26077
- const _hoisted_6$D = {
26143
+ const _hoisted_6$E = {
26078
26144
  key: 0,
26079
26145
  class: "inline-media-modal__body icon-picker"
26080
26146
  };
26081
- const _hoisted_7$q = ["aria-label"];
26082
- const _hoisted_8$l = {
26147
+ const _hoisted_7$r = ["aria-label"];
26148
+ const _hoisted_8$m = {
26083
26149
  key: 0,
26084
26150
  class: "icon-picker__group-block"
26085
26151
  };
26086
- const _hoisted_9$f = ["aria-expanded"];
26087
- const _hoisted_10$d = ["src"];
26088
- const _hoisted_11$b = {
26152
+ const _hoisted_9$g = ["aria-expanded"];
26153
+ const _hoisted_10$e = ["src"];
26154
+ const _hoisted_11$c = {
26089
26155
  key: 0,
26090
26156
  class: "icon-picker__group-children"
26091
26157
  };
26092
- const _hoisted_12$8 = ["title", "onClick"];
26093
- const _hoisted_13$7 = { class: "icon-picker__group-block" };
26094
- const _hoisted_14$5 = ["aria-expanded"];
26095
- const _hoisted_15$3 = ["src"];
26096
- const _hoisted_16$3 = {
26158
+ const _hoisted_12$9 = ["title", "onClick"];
26159
+ const _hoisted_13$8 = { class: "icon-picker__group-block" };
26160
+ const _hoisted_14$6 = ["aria-expanded"];
26161
+ const _hoisted_15$4 = ["src"];
26162
+ const _hoisted_16$4 = {
26097
26163
  key: 0,
26098
26164
  class: "icon-picker__group-children"
26099
26165
  };
26100
- const _hoisted_17$2 = ["title", "onClick"];
26101
- const _hoisted_18$2 = { class: "icon-picker__main" };
26102
- const _hoisted_19$2 = { class: "icon-picker__search" };
26103
- const _hoisted_20$2 = ["src"];
26104
- const _hoisted_21$2 = ["placeholder", "onKeydown"];
26166
+ const _hoisted_17$3 = ["title", "onClick"];
26167
+ const _hoisted_18$3 = { class: "icon-picker__main" };
26168
+ const _hoisted_19$3 = { class: "icon-picker__search" };
26169
+ const _hoisted_20$3 = ["src"];
26170
+ const _hoisted_21$3 = ["placeholder", "onKeydown"];
26105
26171
  const _hoisted_22$2 = ["aria-label"];
26106
26172
  const _hoisted_23$2 = ["src"];
26107
26173
  const _hoisted_24$2 = { class: "icon-picker__results-viewport" };
@@ -26356,7 +26422,7 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
26356
26422
  }, toDisplayString$1(_ctx.$t("sys.image")), 11, _hoisted_5$Q)
26357
26423
  ], 8, _hoisted_3$1x)
26358
26424
  ]),
26359
- activeTab.value === "icon" ? (openBlock(), createElementBlock("div", _hoisted_6$D, [
26425
+ activeTab.value === "icon" ? (openBlock(), createElementBlock("div", _hoisted_6$E, [
26360
26426
  createElementVNode("aside", {
26361
26427
  class: "icon-picker__sidebar",
26362
26428
  "aria-label": _ctx.$t("sys.onlineForm.inlineMedia.categoryAriaLabel")
@@ -26366,7 +26432,7 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
26366
26432
  class: normalizeClass(["icon-picker__category", activeGroupId.value === "all" && "icon-picker__category--active"]),
26367
26433
  onClick: _cache[2] || (_cache[2] = ($event) => activeGroupId.value = "all")
26368
26434
  }, toDisplayString$1(_ctx.$t("sys.all")), 3),
26369
- unref(assetIconGroups).length ? (openBlock(), createElementBlock("div", _hoisted_8$l, [
26435
+ unref(assetIconGroups).length ? (openBlock(), createElementBlock("div", _hoisted_8$m, [
26370
26436
  createElementVNode("button", {
26371
26437
  type: "button",
26372
26438
  class: "icon-picker__group-heading",
@@ -26379,11 +26445,11 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
26379
26445
  createElementVNode("img", {
26380
26446
  src: unref(CaretDownIcon),
26381
26447
  alt: ""
26382
- }, null, 8, _hoisted_10$d)
26448
+ }, null, 8, _hoisted_10$e)
26383
26449
  ], 2),
26384
26450
  createElementVNode("span", null, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.assetIcons")), 1)
26385
- ], 8, _hoisted_9$f),
26386
- assetExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_11$b, [
26451
+ ], 8, _hoisted_9$g),
26452
+ assetExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_11$c, [
26387
26453
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(assetIconGroups), (group) => {
26388
26454
  return openBlock(), createElementBlock("button", {
26389
26455
  key: group.id,
@@ -26391,11 +26457,11 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
26391
26457
  class: normalizeClass(["icon-picker__category", activeGroupId.value === group.id && "icon-picker__category--active"]),
26392
26458
  title: group.name,
26393
26459
  onClick: ($event) => activeGroupId.value = group.id
26394
- }, toDisplayString$1(group.name), 11, _hoisted_12$8);
26460
+ }, toDisplayString$1(group.name), 11, _hoisted_12$9);
26395
26461
  }), 128))
26396
26462
  ])) : createCommentVNode("", true)
26397
26463
  ])) : createCommentVNode("", true),
26398
- createElementVNode("div", _hoisted_13$7, [
26464
+ createElementVNode("div", _hoisted_13$8, [
26399
26465
  createElementVNode("button", {
26400
26466
  type: "button",
26401
26467
  class: "icon-picker__group-heading",
@@ -26408,11 +26474,11 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
26408
26474
  createElementVNode("img", {
26409
26475
  src: unref(CaretDownIcon),
26410
26476
  alt: ""
26411
- }, null, 8, _hoisted_15$3)
26477
+ }, null, 8, _hoisted_15$4)
26412
26478
  ], 2),
26413
26479
  createElementVNode("span", null, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.builtinIcons")), 1)
26414
- ], 8, _hoisted_14$5),
26415
- builtinExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_16$3, [
26480
+ ], 8, _hoisted_14$6),
26481
+ builtinExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_16$4, [
26416
26482
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(builtinIconGroups), (group) => {
26417
26483
  return openBlock(), createElementBlock("button", {
26418
26484
  key: group.id,
@@ -26420,25 +26486,25 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
26420
26486
  class: normalizeClass(["icon-picker__category", activeGroupId.value === group.id && "icon-picker__category--active"]),
26421
26487
  title: _ctx.$t("sys.onlineForm.inlineMedia.medicalDevice"),
26422
26488
  onClick: ($event) => activeGroupId.value = group.id
26423
- }, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.medicalDevice")), 11, _hoisted_17$2);
26489
+ }, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.medicalDevice")), 11, _hoisted_17$3);
26424
26490
  }), 128))
26425
26491
  ])) : createCommentVNode("", true)
26426
26492
  ])
26427
- ], 8, _hoisted_7$q),
26428
- createElementVNode("main", _hoisted_18$2, [
26429
- createElementVNode("label", _hoisted_19$2, [
26493
+ ], 8, _hoisted_7$r),
26494
+ createElementVNode("main", _hoisted_18$3, [
26495
+ createElementVNode("label", _hoisted_19$3, [
26430
26496
  createElementVNode("img", {
26431
26497
  class: "icon-picker__search-icon",
26432
26498
  src: unref(SearchIcon),
26433
26499
  alt: ""
26434
- }, null, 8, _hoisted_20$2),
26500
+ }, null, 8, _hoisted_20$3),
26435
26501
  withDirectives(createElementVNode("input", {
26436
26502
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => searchInputValue.value = $event),
26437
26503
  type: "text",
26438
26504
  placeholder: _ctx.$t("sys.onlineForm.inlineMedia.searchIconPlaceholder"),
26439
26505
  onInput: handleSearchInput,
26440
26506
  onKeydown: withKeys(withModifiers(handleSearchConfirm, ["prevent"]), ["enter"])
26441
- }, null, 40, _hoisted_21$2), [
26507
+ }, null, 40, _hoisted_21$3), [
26442
26508
  [vModelText, searchInputValue.value]
26443
26509
  ]),
26444
26510
  searchInputValue.value ? (openBlock(), createElementBlock("button", {
@@ -26657,22 +26723,22 @@ const _hoisted_2$21 = { class: "designer__toolbar__left" };
26657
26723
  const _hoisted_3$1w = { class: "designer__toolbar__left__second" };
26658
26724
  const _hoisted_4$12 = { class: "second__top" };
26659
26725
  const _hoisted_5$P = { class: "tool--dropdown" };
26660
- const _hoisted_6$C = { class: "flex items-center text-14px" };
26661
- const _hoisted_7$p = { class: "tool--dropdown" };
26662
- const _hoisted_8$k = { class: "tool--dropdown" };
26663
- const _hoisted_9$e = { class: "designer__toolbar__left__third" };
26664
- const _hoisted_10$c = ["onClick"];
26665
- const _hoisted_11$a = ["aria-disabled"];
26666
- const _hoisted_12$7 = ["src"];
26667
- const _hoisted_13$6 = { class: "tool--dropdown tool--dropdown-expand" };
26668
- const _hoisted_14$4 = ["src"];
26669
- const _hoisted_15$2 = { class: "expand-text" };
26670
- const _hoisted_16$2 = { class: "flex items-center text-14px" };
26671
- const _hoisted_17$1 = ["src"];
26672
- const _hoisted_18$1 = { class: "tool--dropdown tool--dropdown-expand" };
26673
- const _hoisted_19$1 = ["src"];
26674
- const _hoisted_20$1 = { class: "expand-text" };
26675
- const _hoisted_21$1 = { class: "menu-item-subtitle" };
26726
+ const _hoisted_6$D = { class: "flex items-center text-14px" };
26727
+ const _hoisted_7$q = { class: "tool--dropdown" };
26728
+ const _hoisted_8$l = { class: "tool--dropdown" };
26729
+ const _hoisted_9$f = { class: "designer__toolbar__left__third" };
26730
+ const _hoisted_10$d = ["onClick"];
26731
+ const _hoisted_11$b = ["aria-disabled"];
26732
+ const _hoisted_12$8 = ["src"];
26733
+ const _hoisted_13$7 = { class: "tool--dropdown tool--dropdown-expand" };
26734
+ const _hoisted_14$5 = ["src"];
26735
+ const _hoisted_15$3 = { class: "expand-text" };
26736
+ const _hoisted_16$3 = { class: "flex items-center text-14px" };
26737
+ const _hoisted_17$2 = ["src"];
26738
+ const _hoisted_18$2 = { class: "tool--dropdown tool--dropdown-expand" };
26739
+ const _hoisted_19$2 = ["src"];
26740
+ const _hoisted_20$2 = { class: "expand-text" };
26741
+ const _hoisted_21$2 = { class: "menu-item-subtitle" };
26676
26742
  const _hoisted_22$1 = { class: "flex items-center text-14px" };
26677
26743
  const _hoisted_23$1 = ["src"];
26678
26744
  const _hoisted_24$1 = { class: "designer__toolbar__right" };
@@ -26991,7 +27057,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
26991
27057
  key: item.type
26992
27058
  }, {
26993
27059
  default: withCtx(() => [
26994
- createElementVNode("div", _hoisted_6$C, [
27060
+ createElementVNode("div", _hoisted_6$D, [
26995
27061
  createVNode(BorderIcon, {
26996
27062
  type: item.type,
26997
27063
  class: "mr-6px relative -top-1px"
@@ -27012,7 +27078,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27012
27078
  _: 1
27013
27079
  })
27014
27080
  ]),
27015
- createElementVNode("div", _hoisted_7$p, [
27081
+ createElementVNode("div", _hoisted_7$q, [
27016
27082
  createElementVNode("i", null, [
27017
27083
  _cache[18] || (_cache[18] = createElementVNode("i", { class: "iconfont icon-wenziyanse" }, null, -1)),
27018
27084
  createElementVNode("div", {
@@ -27039,7 +27105,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27039
27105
  _: 1
27040
27106
  }, 8, ["color"])
27041
27107
  ]),
27042
- createElementVNode("div", _hoisted_8$k, [
27108
+ createElementVNode("div", _hoisted_8$l, [
27043
27109
  createElementVNode("i", null, [
27044
27110
  _cache[20] || (_cache[20] = createElementVNode("i", { class: "iconfont icon-tianchongyanse relative left-1px" }, null, -1)),
27045
27111
  createElementVNode("div", {
@@ -27068,7 +27134,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27068
27134
  ])
27069
27135
  ]),
27070
27136
  _cache[28] || (_cache[28] = createElementVNode("div", { class: "vertical-divider" }, null, -1)),
27071
- createElementVNode("div", _hoisted_9$e, [
27137
+ createElementVNode("div", _hoisted_9$f, [
27072
27138
  (openBlock(true), createElementBlock(Fragment, null, renderList(alignList.value, (item, index2) => {
27073
27139
  return openBlock(), createBlock(_component_a_tooltip, {
27074
27140
  placement: "bottom",
@@ -27089,7 +27155,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27089
27155
  createElementVNode("i", {
27090
27156
  class: normalizeClass(item.icon)
27091
27157
  }, null, 2)
27092
- ], 10, _hoisted_10$c)
27158
+ ], 10, _hoisted_10$d)
27093
27159
  ]),
27094
27160
  _: 2
27095
27161
  }, 1032, ["align"]);
@@ -27121,9 +27187,9 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27121
27187
  src: unref(ToolbarInsertIcon),
27122
27188
  alt: "",
27123
27189
  "aria-hidden": "true"
27124
- }, null, 8, _hoisted_12$7),
27190
+ }, null, 8, _hoisted_12$8),
27125
27191
  createElementVNode("span", null, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.insert")), 1)
27126
- ], 42, _hoisted_11$a)
27192
+ ], 42, _hoisted_11$b)
27127
27193
  ]),
27128
27194
  _: 1
27129
27195
  }),
@@ -27206,13 +27272,13 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27206
27272
  onClick: ($event) => onDataMenuClick(item)
27207
27273
  }, {
27208
27274
  default: withCtx(() => [
27209
- createElementVNode("div", _hoisted_16$2, [
27275
+ createElementVNode("div", _hoisted_16$3, [
27210
27276
  createElementVNode("img", {
27211
27277
  class: "expand-img m-r-6px",
27212
27278
  src: item.iconSrc,
27213
27279
  alt: "",
27214
27280
  srcset: ""
27215
- }, null, 8, _hoisted_17$1),
27281
+ }, null, 8, _hoisted_17$2),
27216
27282
  createElementVNode("span", null, toDisplayString$1(item.label), 1)
27217
27283
  ])
27218
27284
  ]),
@@ -27224,15 +27290,15 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27224
27290
  })
27225
27291
  ]),
27226
27292
  default: withCtx(() => [
27227
- createElementVNode("div", _hoisted_13$6, [
27293
+ createElementVNode("div", _hoisted_13$7, [
27228
27294
  createElementVNode("img", {
27229
27295
  class: "expand-img",
27230
27296
  src: unref(TABLE_CATEGORY_SVG).dataTable,
27231
27297
  alt: "",
27232
27298
  srcset: ""
27233
- }, null, 8, _hoisted_14$4),
27299
+ }, null, 8, _hoisted_14$5),
27234
27300
  _cache[25] || (_cache[25] = createElementVNode("i", { class: "arrow" }, null, -1)),
27235
- createElementVNode("div", _hoisted_15$2, toDisplayString$1(_ctx.$t("sys.dataSet.dataTableLabel")), 1)
27301
+ createElementVNode("div", _hoisted_15$3, toDisplayString$1(_ctx.$t("sys.dataSet.dataTableLabel")), 1)
27236
27302
  ])
27237
27303
  ]),
27238
27304
  _: 1
@@ -27252,7 +27318,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27252
27318
  return openBlock(), createElementBlock(Fragment, {
27253
27319
  key: group.title
27254
27320
  }, [
27255
- createElementVNode("div", _hoisted_21$1, toDisplayString$1(group.title), 1),
27321
+ createElementVNode("div", _hoisted_21$2, toDisplayString$1(group.title), 1),
27256
27322
  (openBlock(true), createElementBlock(Fragment, null, renderList(group.items, (item) => {
27257
27323
  return openBlock(), createBlock(_component_a_menu_item, {
27258
27324
  key: item.type,
@@ -27279,15 +27345,15 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
27279
27345
  })
27280
27346
  ]),
27281
27347
  default: withCtx(() => [
27282
- createElementVNode("div", _hoisted_18$1, [
27348
+ createElementVNode("div", _hoisted_18$2, [
27283
27349
  createElementVNode("img", {
27284
27350
  class: "expand-img",
27285
27351
  src: unref(TABLE_CATEGORY_SVG).businessTable,
27286
27352
  alt: "",
27287
27353
  srcset: ""
27288
- }, null, 8, _hoisted_19$1),
27354
+ }, null, 8, _hoisted_19$2),
27289
27355
  _cache[26] || (_cache[26] = createElementVNode("i", { class: "arrow" }, null, -1)),
27290
- createElementVNode("div", _hoisted_20$1, toDisplayString$1(_ctx.$t("sys.printDesigner.businessTable")), 1)
27356
+ createElementVNode("div", _hoisted_20$2, toDisplayString$1(_ctx.$t("sys.printDesigner.businessTable")), 1)
27291
27357
  ])
27292
27358
  ]),
27293
27359
  _: 1
@@ -27498,7 +27564,7 @@ const FIELD_TYPE_PANEL_LABELS = {
27498
27564
  [FIELD_TYPE.WAREHOUSE_IN_OUT]: "出入库明细表",
27499
27565
  [FIELD_TYPE.STOCKTAKE]: "库存盘点表",
27500
27566
  [FIELD_TYPE.ALLOCATE]: "库存调拨表",
27501
- [FIELD_TYPE.STERILIZE_BATCH]: "委托灭菌生产批次列表",
27567
+ [FIELD_TYPE.STERILIZE_BATCH]: "生产批次灭菌表",
27502
27568
  [FIELD_TYPE.PRETREATMENT_LIST]: "产前表",
27503
27569
  [FIELD_TYPE.INSPECTION]: "检验表",
27504
27570
  [FIELD_TYPE.MATERIAL_CONSUME_TABLE]: "物料消耗表",
@@ -32180,8 +32246,8 @@ const _hoisted_2$1R = { class: "option-container" };
32180
32246
  const _hoisted_3$1n = { class: "option" };
32181
32247
  const _hoisted_4$$ = { class: "option__label" };
32182
32248
  const _hoisted_5$M = { class: "option-container" };
32183
- const _hoisted_6$B = { class: "option" };
32184
- const _hoisted_7$o = { class: "option__label" };
32249
+ const _hoisted_6$C = { class: "option" };
32250
+ const _hoisted_7$p = { class: "option__label" };
32185
32251
  const _sfc_main$4M = /* @__PURE__ */ defineComponent({
32186
32252
  __name: "boolean-props",
32187
32253
  props: {
@@ -32275,8 +32341,8 @@ const _sfc_main$4M = /* @__PURE__ */ defineComponent({
32275
32341
  }, null, 8, ["disabled", "items"])) : createCommentVNode("", true)
32276
32342
  ]),
32277
32343
  createElementVNode("div", _hoisted_5$M, [
32278
- createElementVNode("div", _hoisted_6$B, [
32279
- createElementVNode("span", _hoisted_7$o, toDisplayString$1(`${_ctx.$t("sys.fake")}`), 1),
32344
+ createElementVNode("div", _hoisted_6$C, [
32345
+ createElementVNode("span", _hoisted_7$p, toDisplayString$1(`${_ctx.$t("sys.fake")}`), 1),
32280
32346
  createVNode(_component_a_input, {
32281
32347
  class: "option__input",
32282
32348
  size: "small",
@@ -33341,6 +33407,52 @@ const _sfc_main$4G = /* @__PURE__ */ defineComponent({
33341
33407
  }
33342
33408
  });
33343
33409
  const IndicesEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4G, [["__scopeId", "data-v-97c50769"]]);
33410
+ const ASSOC_FILTER_SOURCE_TYPES = /* @__PURE__ */ new Set([
33411
+ FIELD_TYPE.MATERIAL_NO,
33412
+ FIELD_TYPE.MFG_ORDER
33413
+ ]);
33414
+ const BUSINESS_SUB_TABLE_TYPES = getExclusiveBusinessTypeTokens();
33415
+ function isSubTableField(fieldMeta) {
33416
+ return !!(fieldMeta.subModelKey && fieldMeta.subFieldKey);
33417
+ }
33418
+ function isFieldOnSubModel(fieldMeta, masterModelKey) {
33419
+ if (isSubTableField(fieldMeta)) return true;
33420
+ return !!(fieldMeta.model && masterModelKey && fieldMeta.model !== masterModelKey);
33421
+ }
33422
+ function normalizeSubTableType(type) {
33423
+ if (!type) return void 0;
33424
+ return getSubTableTypeByRefModelType(type) ?? type;
33425
+ }
33426
+ function isBusinessSubTableType(type) {
33427
+ if (!type) return false;
33428
+ const normalized = normalizeSubTableType(type);
33429
+ return BUSINESS_SUB_TABLE_TYPES.has(type) || !!normalized && BUSINESS_SUB_TABLE_TYPES.has(normalized);
33430
+ }
33431
+ function resolveSubTableType(fieldMeta, ctx = {}) {
33432
+ const fromFieldMeta = normalizeSubTableType(fieldMeta.subModelType);
33433
+ if (fromFieldMeta) return fromFieldMeta;
33434
+ const fromCell = normalizeSubTableType(ctx.cellSubTableType);
33435
+ if (fromCell) return fromCell;
33436
+ const { tables = [], masterModelKey } = ctx;
33437
+ const matchedTable = tables.find(
33438
+ (t2) => fieldMeta.subFieldKey && t2.field === fieldMeta.subFieldKey || fieldMeta.subModelKey && t2.model === fieldMeta.subModelKey || fieldMeta.model && masterModelKey && fieldMeta.model !== masterModelKey && t2.model === fieldMeta.model
33439
+ );
33440
+ const fromTable = normalizeSubTableType(matchedTable?.type);
33441
+ if (fromTable) return fromTable;
33442
+ return normalizeSubTableType(ctx.modelMetaSubModelType);
33443
+ }
33444
+ function canShowAssocFilter(fieldMeta, fieldType, ctx = {}) {
33445
+ if (fieldType !== FIELD_TYPE.PRODUCT) return false;
33446
+ const onSubModel = isFieldOnSubModel(fieldMeta, ctx.masterModelKey);
33447
+ const subType = resolveSubTableType(fieldMeta, ctx);
33448
+ if (!onSubModel && !subType) return true;
33449
+ if (isBusinessSubTableType(subType)) return false;
33450
+ if (onSubModel && !subType) return false;
33451
+ return true;
33452
+ }
33453
+ function buildAssocSourceFieldValue(fieldKey, subFieldKey) {
33454
+ return subFieldKey ? `${subFieldKey}.${fieldKey}` : fieldKey;
33455
+ }
33344
33456
  const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33345
33457
  __name: "number-range-editor",
33346
33458
  props: {
@@ -33352,6 +33464,8 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33352
33464
  },
33353
33465
  setup(__props) {
33354
33466
  const ns = useNamespace("number-range-editor");
33467
+ const { currentCell: currentCell2, paper: paper2, doc: doc2 } = useSpreadSheet();
33468
+ const { modelMetaMap: modelMetaMap2 } = useModelFields();
33355
33469
  const props2 = __props;
33356
33470
  const formState = computed({
33357
33471
  get() {
@@ -33367,13 +33481,31 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33367
33481
  const minInputRef = ref(null);
33368
33482
  const isIntegerField = computed(() => props2.fieldMeta?.fieldType === FIELD_TYPE.INTEGER);
33369
33483
  const inputMax = computed(() => isIntegerField.value ? 21e8 : Infinity);
33484
+ const lowerBoundInputMin = computed(() => {
33485
+ const field = props2.fieldMeta;
33486
+ const manifestProps = findFieldMain(field.bizType, field.fieldType)?.defaultProps;
33487
+ const modelKey = field.subModelKey || field.model;
33488
+ const cellSubTableType = currentCell2.value?.dynamicTable?.type || currentCell2.value?.fixedTable?.type || currentCell2.value?.dataGroup2D?.type || currentCell2.value?.dataGroup?.type;
33489
+ const subModelType = resolveSubTableType(field, {
33490
+ masterModelKey: doc2.value.modelKey,
33491
+ cellSubTableType,
33492
+ tables: [...paper2.value.dynamicTables ?? [], ...paper2.value.fixedTables ?? []],
33493
+ modelMetaSubModelType: modelKey ? modelMetaMap2.value[modelKey]?.meta?.subModelType : void 0
33494
+ });
33495
+ const tableProfile = getProfileByTableType(subModelType) ?? getBusinessProfileByRefModelType(subModelType);
33496
+ const tableProps = tableProfile && isBusinessSubTableProfile(tableProfile) ? findFieldProfile(tableProfile, field.field ?? "")?.defaultProps : void 0;
33497
+ return [tableProps, manifestProps].some(
33498
+ (defaults2) => defaults2?.enableRangeValidate === true && defaults2.minValidateMode === RangeValidateMode.Fixed_Number && defaults2.minValue === 0
33499
+ ) ? 0 : void 0;
33500
+ });
33370
33501
  const withinLimit = (text) => (text.match(/[0-9]/g) ?? []).length <= (isIntegerField.value ? 10 : 15);
33371
33502
  const fitsLength = (number2) => {
33372
33503
  const digits = props2.precision;
33373
33504
  const display = typeof digits === "number" && Number.isInteger(digits) && digits >= 0 ? number2.toFixed(digits) : number2.toFixed();
33374
33505
  return withinLimit(display);
33375
33506
  };
33376
- const canInput = (text) => {
33507
+ const canInput = (text, target) => {
33508
+ if (target === "min" && lowerBoundInputMin.value === 0 && text.startsWith("-")) return false;
33377
33509
  if (!withinLimit(text)) return false;
33378
33510
  if (!/^[+-]?(?:\d+(?:\.\d*)?|\.\d*)?$/.test(text)) return false;
33379
33511
  const number2 = new BigNumber(text);
@@ -33384,19 +33516,21 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33384
33516
  const end = input.selectionEnd ?? start;
33385
33517
  return input.value.slice(0, start) + insertedText + input.value.slice(end);
33386
33518
  };
33387
- const onBeforeInput = (event2) => {
33519
+ const onBeforeInput = (event2, target) => {
33388
33520
  if (!event2.inputType.startsWith("insert") || event2.isComposing) return;
33389
33521
  const text = event2.data ?? event2.dataTransfer?.getData("text");
33390
33522
  if (text == null) return;
33391
- if (!canInput(nextInput(event2.target, text))) event2.preventDefault();
33523
+ if (!canInput(nextInput(event2.target, text), target))
33524
+ event2.preventDefault();
33392
33525
  };
33393
- const onPaste = (event2) => {
33526
+ const onPaste = (event2, target) => {
33394
33527
  const text = event2.clipboardData?.getData("text");
33395
33528
  if (text == null) return;
33396
- if (!canInput(nextInput(event2.target, text))) event2.preventDefault();
33529
+ if (!canInput(nextInput(event2.target, text), target))
33530
+ event2.preventDefault();
33397
33531
  };
33398
33532
  const onInput = (text, target) => {
33399
- if (canInput(text)) return;
33533
+ if (canInput(text, target)) return;
33400
33534
  if (target === "max") {
33401
33535
  maxInputKey.value += 1;
33402
33536
  nextTick(() => maxInputRef.value?.focus());
@@ -33420,7 +33554,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33420
33554
  set: (value) => {
33421
33555
  if (value == null) {
33422
33556
  formState.value.min = void 0;
33423
- } else if (Number.isFinite(value) && fitsLength(new BigNumber(value))) {
33557
+ } else if (Number.isFinite(value) && (lowerBoundInputMin.value === void 0 || value >= lowerBoundInputMin.value) && fitsLength(new BigNumber(value))) {
33424
33558
  formState.value.min = value;
33425
33559
  }
33426
33560
  }
@@ -33472,7 +33606,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33472
33606
  { label: $t("sys.rangeCompareOp.gt"), value: RangeCompareOp.GT }
33473
33607
  ];
33474
33608
  const minLimit = computed(() => ({
33475
- lowerLimit: -Infinity,
33609
+ lowerLimit: lowerBoundInputMin.value ?? -Infinity,
33476
33610
  upperLimit: Math.min(formState.value.max ?? Infinity, inputMax.value)
33477
33611
  }));
33478
33612
  const maxLimit = computed(() => ({
@@ -33552,9 +33686,9 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33552
33686
  placeholder: _ctx.$t("sys.inputTextTip", { name: _ctx.$t("sys.maxNumber") }),
33553
33687
  disabled: __props.disabled || __props.readonly,
33554
33688
  maxlength: 17,
33555
- onBeforeinput: onBeforeInput,
33556
- onPaste,
33557
- onInput: _cache[4] || (_cache[4] = (text) => onInput(text, "max"))
33689
+ onBeforeinput: _cache[4] || (_cache[4] = (event2) => onBeforeInput(event2, "max")),
33690
+ onPaste: _cache[5] || (_cache[5] = (event2) => onPaste(event2, "max")),
33691
+ onInput: _cache[6] || (_cache[6] = (text) => onInput(text, "max"))
33558
33692
  }, null, 8, ["class", "value", "min", "max", "precision", "placeholder", "disabled"]))
33559
33693
  ]),
33560
33694
  _: 1
@@ -33566,9 +33700,9 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33566
33700
  modelKey: __props.fieldMeta.model,
33567
33701
  disabled: __props.disabled,
33568
33702
  expr: formState.value.maxExpr,
33569
- "onUpdate:expr": _cache[5] || (_cache[5] = ($event) => formState.value.maxExpr = $event),
33703
+ "onUpdate:expr": _cache[7] || (_cache[7] = ($event) => formState.value.maxExpr = $event),
33570
33704
  "expr-echo": formState.value.maxExprEcho,
33571
- "onUpdate:exprEcho": _cache[6] || (_cache[6] = ($event) => formState.value.maxExprEcho = $event)
33705
+ "onUpdate:exprEcho": _cache[8] || (_cache[8] = ($event) => formState.value.maxExprEcho = $event)
33572
33706
  }, null, 8, ["class", "modelKey", "disabled", "expr", "expr-echo"])) : createCommentVNode("", true),
33573
33707
  createVNode(FormItem, {
33574
33708
  label: _ctx.$t("sys.minValidateMode"),
@@ -33583,7 +33717,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33583
33717
  options: unref(validateModeOptions),
33584
33718
  disabled: __props.disabled,
33585
33719
  value: formState.value.minValidateMode,
33586
- "onUpdate:value": _cache[7] || (_cache[7] = ($event) => formState.value.minValidateMode = $event)
33720
+ "onUpdate:value": _cache[9] || (_cache[9] = ($event) => formState.value.minValidateMode = $event)
33587
33721
  }, null, 8, ["options", "disabled", "value"])
33588
33722
  ]),
33589
33723
  _: 1
@@ -33602,7 +33736,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33602
33736
  disabled: __props.disabled || __props.readonly,
33603
33737
  "dropdown-match-select-width": false,
33604
33738
  "dropdown-style": { minWidth: "110px" },
33605
- onChange: _cache[8] || (_cache[8] = (v) => formState.value.minCompareOp = v)
33739
+ onChange: _cache[10] || (_cache[10] = (v) => formState.value.minCompareOp = v)
33606
33740
  }, null, 8, ["class", "value", "disabled"]),
33607
33741
  (openBlock(), createBlock(_component_a_input_number, {
33608
33742
  key: minInputKey.value,
@@ -33611,7 +33745,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33611
33745
  size: "small",
33612
33746
  class: normalizeClass([unref(ns).e("value")]),
33613
33747
  value: minValue.value,
33614
- "onUpdate:value": _cache[9] || (_cache[9] = ($event) => minValue.value = $event),
33748
+ "onUpdate:value": _cache[11] || (_cache[11] = ($event) => minValue.value = $event),
33615
33749
  min: minLimit.value.lowerLimit,
33616
33750
  max: minLimit.value.upperLimit,
33617
33751
  precision: __props.precision,
@@ -33619,9 +33753,9 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33619
33753
  placeholder: _ctx.$t("sys.inputTextTip", { name: _ctx.$t("sys.minNumber") }),
33620
33754
  disabled: __props.disabled || __props.readonly,
33621
33755
  maxlength: 17,
33622
- onBeforeinput: onBeforeInput,
33623
- onPaste,
33624
- onInput: _cache[10] || (_cache[10] = (text) => onInput(text, "min"))
33756
+ onBeforeinput: _cache[12] || (_cache[12] = (event2) => onBeforeInput(event2, "min")),
33757
+ onPaste: _cache[13] || (_cache[13] = (event2) => onPaste(event2, "min")),
33758
+ onInput: _cache[14] || (_cache[14] = (text) => onInput(text, "min"))
33625
33759
  }, null, 8, ["class", "value", "min", "max", "precision", "placeholder", "disabled"]))
33626
33760
  ]),
33627
33761
  _: 1
@@ -33633,16 +33767,16 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
33633
33767
  modelKey: __props.fieldMeta.model,
33634
33768
  disabled: __props.disabled,
33635
33769
  expr: formState.value.minExpr,
33636
- "onUpdate:expr": _cache[11] || (_cache[11] = ($event) => formState.value.minExpr = $event),
33770
+ "onUpdate:expr": _cache[15] || (_cache[15] = ($event) => formState.value.minExpr = $event),
33637
33771
  "expr-echo": formState.value.minExprEcho,
33638
- "onUpdate:exprEcho": _cache[12] || (_cache[12] = ($event) => formState.value.minExprEcho = $event)
33772
+ "onUpdate:exprEcho": _cache[16] || (_cache[16] = ($event) => formState.value.minExprEcho = $event)
33639
33773
  }, null, 8, ["class", "modelKey", "disabled", "expr", "expr-echo"])) : createCommentVNode("", true)
33640
33774
  ], 64)) : createCommentVNode("", true)
33641
33775
  ], 2);
33642
33776
  };
33643
33777
  }
33644
33778
  });
33645
- const NumberRangeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4F, [["__scopeId", "data-v-6ae2d5c0"]]);
33779
+ const NumberRangeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4F, [["__scopeId", "data-v-31445c84"]]);
33646
33780
  function normalizeNumberText(value) {
33647
33781
  const text = value == null ? "" : typeof value === "number" && Number.isFinite(value) ? new BigNumber(value).toFixed() : String(value);
33648
33782
  return text.replace(/。/g, ".").replace(/\$\s?|,|,|\s/g, "");
@@ -37611,11 +37745,36 @@ const matchAutofillTargetField = (fromMeta, toMeta) => {
37611
37745
  }
37612
37746
  return matched;
37613
37747
  };
37614
- const _hoisted_1$2p = { class: "px24px mt20px" };
37615
- const _hoisted_2$1F = { class: "text-[#8B8B8B]" };
37616
- const _hoisted_3$1g = { class: "atuofill-field-icon" };
37617
- const _hoisted_4$Y = { class: "form-table-label" };
37618
- const _hoisted_5$L = ["onClick"];
37748
+ const _hoisted_1$2p = {
37749
+ key: 0,
37750
+ class: "built-in-section"
37751
+ };
37752
+ const _hoisted_2$1F = { class: "section-heading" };
37753
+ const _hoisted_3$1g = { class: "section-title" };
37754
+ const _hoisted_4$Y = { class: "rule-count" };
37755
+ const _hoisted_5$L = { class: "section-hint" };
37756
+ const _hoisted_6$B = { class: "built-in-table" };
37757
+ const _hoisted_7$o = { class: "built-in-table-head" };
37758
+ const _hoisted_8$k = ["title"];
37759
+ const _hoisted_9$e = { class: "field-name" };
37760
+ const _hoisted_10$c = { class: "field-key" };
37761
+ const _hoisted_11$a = ["aria-label"];
37762
+ const _hoisted_12$7 = ["title"];
37763
+ const _hoisted_13$6 = { class: "field-name" };
37764
+ const _hoisted_14$4 = { class: "field-key" };
37765
+ const _hoisted_15$2 = {
37766
+ key: 1,
37767
+ class: "custom-section-heading"
37768
+ };
37769
+ const _hoisted_16$2 = { class: "section-title" };
37770
+ const _hoisted_17$1 = {
37771
+ key: 3,
37772
+ class: "custom-empty"
37773
+ };
37774
+ const _hoisted_18$1 = { class: "text-[#8B8B8B]" };
37775
+ const _hoisted_19$1 = { class: "atuofill-field-icon" };
37776
+ const _hoisted_20$1 = { class: "form-table-label" };
37777
+ const _hoisted_21$1 = ["onClick"];
37619
37778
  const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37620
37779
  __name: "autofill-rules-modal",
37621
37780
  props: {
@@ -37649,15 +37808,37 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37649
37808
  const bindFiledList = ref([]);
37650
37809
  const allFieldInFormWithout = ref([]);
37651
37810
  const formModelName = ref("");
37811
+ const builtInDefinitions = computed(
37812
+ () => getBuiltInAutofillRules({
37813
+ fieldKey: props2.fieldMeta.field,
37814
+ bizType: props2.fieldMeta.bizType,
37815
+ subModelType: props2.fieldMeta.subModelType || modelMetaMap2.value[modelKey.value]?.meta?.subModelType
37816
+ })
37817
+ );
37818
+ const persistedBuiltInRules = ref([]);
37819
+ const getBuiltInSourceLabel = (rule) => rule.fromFieldLabel || bindFiledList.value.find((field) => field.key === rule.fromField)?.name || rule.fromField || "";
37820
+ const getBuiltInTargetLabel = (fieldKey) => allFieldInFormWithout.value.find((field) => field.key === fieldKey)?.name || fieldKey;
37821
+ const builtInDisplayRules = computed(
37822
+ () => persistedBuiltInRules.value.map((rule) => {
37823
+ const fromFieldLabel = builtInDefinitions.value.find(
37824
+ (definition) => definition.fromField === rule.fromField && definition.toField === rule.toField
37825
+ )?.fromFieldLabel;
37826
+ const sourceLabel = getBuiltInSourceLabel({ ...rule, fromFieldLabel });
37827
+ const targetLabel = getBuiltInTargetLabel(rule.toField || "");
37828
+ return {
37829
+ ...rule,
37830
+ sourceLabel,
37831
+ targetLabel
37832
+ };
37833
+ })
37834
+ );
37652
37835
  onMounted(async () => {
37653
37836
  const modelDetail = await api.apaas.modelMeta.getDetail({
37654
37837
  modelKey: modelKey.value
37655
37838
  });
37656
37839
  allFieldInFormWithout.value = modelDetail?.fieldMetaList?.filter((d) => d.createType !== "SYSTEM") || [];
37657
37840
  formModelName.value = modelDetail?.name || "";
37658
- if (props2.rules) {
37659
- onDataReceive({ rules: props2.rules });
37660
- }
37841
+ onDataReceive({ rules: props2.rules || [] });
37661
37842
  });
37662
37843
  const fromFieldTreeData = computed(() => {
37663
37844
  const children = bindFiledList.value.filter((f) => f.key !== "id_").map((f) => ({
@@ -37785,12 +37966,16 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37785
37966
  return treeData;
37786
37967
  };
37787
37968
  const onDataReceive = async ({ rules }) => {
37788
- formState.rules = stripSubTableRuleFields(cloneDeep(rules));
37789
- if (formState.rules?.length == 0) {
37790
- formState.rules.push({
37791
- fromField: void 0,
37792
- toField: void 0
37793
- });
37969
+ const remainingRules = cloneDeep(rules);
37970
+ persistedBuiltInRules.value = builtInDefinitions.value.flatMap((definition) => {
37971
+ const index2 = remainingRules.findIndex(
37972
+ (rule) => rule.fromField === definition.fromField && rule.toField === definition.toField
37973
+ );
37974
+ return index2 >= 0 ? remainingRules.splice(index2, 1) : [];
37975
+ });
37976
+ formState.rules = stripSubTableRuleFields(remainingRules);
37977
+ if (!persistedBuiltInRules.value.length && !formState.rules.length) {
37978
+ formState.rules.push({ fromField: void 0, toField: void 0 });
37794
37979
  }
37795
37980
  const res = await api.apaas.modelMeta.getDetail({
37796
37981
  modelKey: refModelKey.value
@@ -37810,10 +37995,10 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37810
37995
  };
37811
37996
  const modal = useModal$1(async () => {
37812
37997
  if (props2.readonly) return null;
37813
- await autofillForm.value.validate();
37998
+ await autofillForm.value?.validate();
37814
37999
  return {
37815
38000
  ok: true,
37816
- data: stripSubTableRuleFields(formState.rules)
38001
+ data: [...persistedBuiltInRules.value, ...stripSubTableRuleFields(formState.rules)]
37817
38002
  };
37818
38003
  });
37819
38004
  onMounted(() => {
@@ -37871,14 +38056,73 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37871
38056
  return openBlock(), createElementBlock("div", {
37872
38057
  class: normalizeClass(["px-16px py-16px", { "is-readonly": __props.readonly }])
37873
38058
  }, [
37874
- !__props.readonly ? (openBlock(), createBlock(_component_a_button, {
37875
- key: 0,
38059
+ builtInDisplayRules.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$2p, [
38060
+ createElementVNode("div", _hoisted_2$1F, [
38061
+ createElementVNode("div", _hoisted_3$1g, [
38062
+ createTextVNode(toDisplayString$1(unref($t2)("sys.pageDesigner.builtInFillRules")) + " ", 1),
38063
+ createElementVNode("span", _hoisted_4$Y, toDisplayString$1(builtInDisplayRules.value.length), 1)
38064
+ ]),
38065
+ createElementVNode("span", _hoisted_5$L, toDisplayString$1(unref($t2)("sys.pageDesigner.builtInFillRulesTip")), 1)
38066
+ ]),
38067
+ createElementVNode("div", _hoisted_6$B, [
38068
+ createElementVNode("div", _hoisted_7$o, [
38069
+ createElementVNode("span", null, toDisplayString$1(unref($t2)("sys.pageDesigner.valueSource")), 1),
38070
+ _cache[0] || (_cache[0] = createElementVNode("span", null, null, -1)),
38071
+ createElementVNode("span", null, toDisplayString$1(unref($t2)("sys.pageDesigner.targetField")), 1)
38072
+ ]),
38073
+ (openBlock(true), createElementBlock(Fragment, null, renderList(builtInDisplayRules.value, (rule) => {
38074
+ return openBlock(), createElementBlock("div", {
38075
+ key: `${rule.fromField}:${rule.toField}`,
38076
+ class: "built-in-table-row"
38077
+ }, [
38078
+ createElementVNode("div", {
38079
+ class: "field-cell",
38080
+ title: rule.fromField
38081
+ }, [
38082
+ createElementVNode("span", _hoisted_9$e, toDisplayString$1(rule.sourceLabel), 1),
38083
+ createElementVNode("code", _hoisted_10$c, toDisplayString$1(rule.fromField), 1)
38084
+ ], 8, _hoisted_8$k),
38085
+ createElementVNode("span", {
38086
+ class: "rule-arrow",
38087
+ "aria-label": unref($t2)("sys.pageDesigner.valueFillTip")
38088
+ }, "→", 8, _hoisted_11$a),
38089
+ createElementVNode("div", {
38090
+ class: "field-cell",
38091
+ title: rule.toField
38092
+ }, [
38093
+ createElementVNode("span", _hoisted_13$6, toDisplayString$1(rule.targetLabel), 1),
38094
+ createElementVNode("code", _hoisted_14$4, toDisplayString$1(rule.toField), 1)
38095
+ ], 8, _hoisted_12$7)
38096
+ ]);
38097
+ }), 128))
38098
+ ])
38099
+ ])) : createCommentVNode("", true),
38100
+ builtInDisplayRules.value.length ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
38101
+ createElementVNode("span", _hoisted_16$2, toDisplayString$1(unref($t2)("sys.pageDesigner.customFillRules")), 1),
38102
+ !__props.readonly ? (openBlock(), createBlock(_component_a_button, {
38103
+ key: 0,
38104
+ type: "link",
38105
+ class: "custom-add-button",
38106
+ onClick: addRule
38107
+ }, {
38108
+ default: withCtx(() => [
38109
+ _cache[1] || (_cache[1] = createElementVNode("i", {
38110
+ class: "iconfont icon-chuangjian mr8px",
38111
+ style: { "vertical-align": "-1px" }
38112
+ }, null, -1)),
38113
+ createTextVNode(" " + toDisplayString$1(unref($t2)("sys.pageDesigner.fillRules")), 1)
38114
+ ]),
38115
+ _: 1
38116
+ })) : createCommentVNode("", true)
38117
+ ])) : createCommentVNode("", true),
38118
+ !builtInDisplayRules.value.length && !__props.readonly ? (openBlock(), createBlock(_component_a_button, {
38119
+ key: 2,
37876
38120
  type: "link",
37877
38121
  onClick: addRule,
37878
38122
  class: "mv10px pl24px mt4px"
37879
38123
  }, {
37880
38124
  default: withCtx(() => [
37881
- _cache[0] || (_cache[0] = createElementVNode("i", {
38125
+ _cache[2] || (_cache[2] = createElementVNode("i", {
37882
38126
  class: "iconfont icon-chuangjian mr8px",
37883
38127
  style: { "vertical-align": "-1px" }
37884
38128
  }, null, -1)),
@@ -37886,7 +38130,11 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37886
38130
  ]),
37887
38131
  _: 1
37888
38132
  })) : createCommentVNode("", true),
37889
- createElementVNode("div", _hoisted_1$2p, [
38133
+ builtInDisplayRules.value.length && !formState.rules.length ? (openBlock(), createElementBlock("div", _hoisted_17$1, toDisplayString$1(unref($t2)("sys.pageDesigner.noCustomFillRules")), 1)) : createCommentVNode("", true),
38134
+ formState.rules.length || !builtInDisplayRules.value.length ? (openBlock(), createElementBlock("div", {
38135
+ key: 4,
38136
+ class: normalizeClass(["px24px", builtInDisplayRules.value.length ? "mt8px" : "mt20px"])
38137
+ }, [
37890
38138
  createVNode(_component_a_row, {
37891
38139
  gutter: 4,
37892
38140
  style: { "margin-bottom": "4px", "padding": "0 10px" },
@@ -37903,7 +38151,7 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37903
38151
  createVNode(_component_a_col, { span: 11 }, {
37904
38152
  default: withCtx(() => [
37905
38153
  createTextVNode(toDisplayString$1(unref($t2)("sys.pageDesigner.targetField")) + " ", 1),
37906
- createElementVNode("span", _hoisted_2$1F, " ( " + toDisplayString$1(unref($t2)("sys.pageDesigner.onlineFormFieldInForm")) + ") ", 1)
38154
+ createElementVNode("span", _hoisted_18$1, " ( " + toDisplayString$1(unref($t2)("sys.pageDesigner.onlineFormFieldInForm")) + ") ", 1)
37907
38155
  ]),
37908
38156
  _: 1
37909
38157
  })
@@ -37962,7 +38210,7 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37962
38210
  onChange: ($event) => handleFromChange(element)
37963
38211
  }, {
37964
38212
  title: withCtx((data) => [
37965
- createElementVNode("span", _hoisted_3$1g, [
38213
+ createElementVNode("span", _hoisted_19$1, [
37966
38214
  data.type ? (openBlock(), createElementBlock("i", {
37967
38215
  key: 0,
37968
38216
  class: normalizeClass(["iconfont", unref(FieldIconMap)[data.type] || "text"])
@@ -37980,7 +38228,7 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
37980
38228
  }, 1024),
37981
38229
  createVNode(_component_a_col, { span: 4 }, {
37982
38230
  default: withCtx(() => [
37983
- createElementVNode("span", _hoisted_4$Y, toDisplayString$1(unref($t2)("sys.pageDesigner.valueFillTip")), 1)
38231
+ createElementVNode("span", _hoisted_20$1, toDisplayString$1(unref($t2)("sys.pageDesigner.valueFillTip")), 1)
37984
38232
  ]),
37985
38233
  _: 1
37986
38234
  }),
@@ -38055,8 +38303,8 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
38055
38303
  withDirectives(createElementVNode("i", {
38056
38304
  class: "iconfont icon-shanchu2 text-[#797A7D] error-gct-hover cursor-pointer",
38057
38305
  onClick: ($event) => removeRule(index2)
38058
- }, null, 8, _hoisted_5$L), [
38059
- [vShow, !__props.readonly && formState.rules.length > 1]
38306
+ }, null, 8, _hoisted_21$1), [
38307
+ [vShow, !__props.readonly]
38060
38308
  ])
38061
38309
  ]),
38062
38310
  _: 2
@@ -38070,12 +38318,12 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
38070
38318
  ]),
38071
38319
  _: 1
38072
38320
  }, 8, ["model"])
38073
- ])
38321
+ ], 2)) : createCommentVNode("", true)
38074
38322
  ], 2);
38075
38323
  };
38076
38324
  }
38077
38325
  });
38078
- const AutofillRulesModal = /* @__PURE__ */ _export_sfc(_sfc_main$4g, [["__scopeId", "data-v-e674d854"]]);
38326
+ const AutofillRulesModal = /* @__PURE__ */ _export_sfc(_sfc_main$4g, [["__scopeId", "data-v-06fec19c"]]);
38079
38327
  const _hoisted_1$2o = { class: "muted" };
38080
38328
  const _hoisted_2$1E = ["onClick"];
38081
38329
  const _sfc_main$4f = /* @__PURE__ */ defineComponent({
@@ -38671,52 +38919,6 @@ function useDefaultValueOptions({ source, getFields, fetchPage }) {
38671
38919
  resolveSelected
38672
38920
  };
38673
38921
  }
38674
- const ASSOC_FILTER_SOURCE_TYPES = /* @__PURE__ */ new Set([
38675
- FIELD_TYPE.MATERIAL_NO,
38676
- FIELD_TYPE.MFG_ORDER
38677
- ]);
38678
- const BUSINESS_SUB_TABLE_TYPES = getExclusiveBusinessTypeTokens();
38679
- function isSubTableField(fieldMeta) {
38680
- return !!(fieldMeta.subModelKey && fieldMeta.subFieldKey);
38681
- }
38682
- function isFieldOnSubModel(fieldMeta, masterModelKey) {
38683
- if (isSubTableField(fieldMeta)) return true;
38684
- return !!(fieldMeta.model && masterModelKey && fieldMeta.model !== masterModelKey);
38685
- }
38686
- function normalizeSubTableType(type) {
38687
- if (!type) return void 0;
38688
- return getSubTableTypeByRefModelType(type) ?? type;
38689
- }
38690
- function isBusinessSubTableType(type) {
38691
- if (!type) return false;
38692
- const normalized = normalizeSubTableType(type);
38693
- return BUSINESS_SUB_TABLE_TYPES.has(type) || !!normalized && BUSINESS_SUB_TABLE_TYPES.has(normalized);
38694
- }
38695
- function resolveSubTableType(fieldMeta, ctx = {}) {
38696
- const fromFieldMeta = normalizeSubTableType(fieldMeta.subModelType);
38697
- if (fromFieldMeta) return fromFieldMeta;
38698
- const fromCell = normalizeSubTableType(ctx.cellSubTableType);
38699
- if (fromCell) return fromCell;
38700
- const { tables = [], masterModelKey } = ctx;
38701
- const matchedTable = tables.find(
38702
- (t2) => fieldMeta.subFieldKey && t2.field === fieldMeta.subFieldKey || fieldMeta.subModelKey && t2.model === fieldMeta.subModelKey || fieldMeta.model && masterModelKey && fieldMeta.model !== masterModelKey && t2.model === fieldMeta.model
38703
- );
38704
- const fromTable = normalizeSubTableType(matchedTable?.type);
38705
- if (fromTable) return fromTable;
38706
- return normalizeSubTableType(ctx.modelMetaSubModelType);
38707
- }
38708
- function canShowAssocFilter(fieldMeta, fieldType, ctx = {}) {
38709
- if (fieldType !== FIELD_TYPE.PRODUCT) return false;
38710
- const onSubModel = isFieldOnSubModel(fieldMeta, ctx.masterModelKey);
38711
- const subType = resolveSubTableType(fieldMeta, ctx);
38712
- if (!onSubModel && !subType) return true;
38713
- if (isBusinessSubTableType(subType)) return false;
38714
- if (onSubModel && !subType) return false;
38715
- return true;
38716
- }
38717
- function buildAssocSourceFieldValue(fieldKey, subFieldKey) {
38718
- return subFieldKey ? `${subFieldKey}.${fieldKey}` : fieldKey;
38719
- }
38720
38922
  const HIDDEN_TABLE_TYPES = /* @__PURE__ */ new Set([
38721
38923
  SubTableType.WAREHOUSE_IN,
38722
38924
  SubTableType.WAREHOUSE_OUT,
@@ -45753,121 +45955,167 @@ async function completeSignInfo(partial) {
45753
45955
  }
45754
45956
  return partial;
45755
45957
  }
45756
- function wrapText(text, maxWidth, context) {
45757
- const characters = text.split("");
45758
- const lines = [];
45759
- let currentLine = "";
45760
- for (const char of characters) {
45761
- const testLine = currentLine + char;
45762
- const metrics = context.measureText(testLine);
45763
- if (metrics.width > maxWidth && currentLine !== "") {
45764
- lines.push(currentLine);
45765
- currentLine = char;
45766
- } else {
45767
- currentLine = testLine;
45768
- }
45769
- }
45770
- if (currentLine) {
45771
- lines.push(currentLine);
45772
- }
45773
- return lines;
45958
+ const FALLBACK_SIGN_DPR = 2;
45959
+ const FALLBACK_SIGN_DISPLAY_SIZE = { width: 120, height: 68 };
45960
+ const SIGN_NAME_FONT_SIZE = 26;
45961
+ const SIGN_LONG_NAME_FONT_SIZE = 16;
45962
+ const SIGN_META_FONT_SIZE = 12;
45963
+ const FORM_SIGN_PADDING = 8;
45964
+ const FORM_SIGN_SECTION_GAP = 8;
45965
+ const FORM_SIGN_MAX_WIDTH = 360;
45966
+ const FORM_SIGN_LONG_NAME_MAX_WIDTH = 120;
45967
+ function getSignNameFontSize(name) {
45968
+ return Array.from(name).length >= 6 ? SIGN_LONG_NAME_FONT_SIZE : SIGN_NAME_FONT_SIZE;
45969
+ }
45970
+ function getSignNameFont(name) {
45971
+ return `600 ${getSignNameFontSize(name)}px Arial, sans-serif`;
45774
45972
  }
45775
- function splitBalancedNameLines(name, maxLines) {
45776
- if (name.length <= 1 || maxLines <= 1) {
45777
- return [name];
45973
+ function measureLinesWidth(lines, ctx) {
45974
+ return Math.max(...lines.map((line) => ctx.measureText(line).width));
45975
+ }
45976
+ function fitTextWithEllipsis(text, maxWidth, ctx) {
45977
+ if (ctx.measureText(text).width <= maxWidth) return text;
45978
+ const ellipsis = "…";
45979
+ let fitted = "";
45980
+ for (const character of Array.from(text)) {
45981
+ if (ctx.measureText(fitted + character + ellipsis).width > maxWidth) break;
45982
+ fitted += character;
45778
45983
  }
45779
- const lineCount = Math.min(maxLines, name.length);
45780
- const chunkSize = Math.ceil(name.length / lineCount);
45984
+ return fitted + ellipsis;
45985
+ }
45986
+ function layoutFormSignName(name, maxWidth, ctx) {
45987
+ const remaining = Array.from(name);
45781
45988
  const lines = [];
45782
- for (let i = 0; i < name.length; i += chunkSize) {
45783
- lines.push(name.slice(i, i + chunkSize));
45989
+ for (let lineIndex = 0; lineIndex < 2 && remaining.length; lineIndex++) {
45990
+ let line = "";
45991
+ while (remaining.length && ctx.measureText(line + remaining[0]).width <= maxWidth) {
45992
+ line += remaining.shift();
45993
+ }
45994
+ if (!line) line = remaining.shift();
45995
+ if (lineIndex === 1 && remaining.length) {
45996
+ line = fitTextWithEllipsis(line + remaining.join(""), maxWidth, ctx);
45997
+ }
45998
+ lines.push(line);
45784
45999
  }
45785
46000
  return lines;
45786
46001
  }
45787
- function measureLinesWidth(lines, ctx) {
45788
- return Math.max(...lines.map((line) => ctx.measureText(line).width));
46002
+ function layoutSimpleNameLines(name, ctx) {
46003
+ const characters = Array.from(name);
46004
+ if (characters.length < 6) return [name];
46005
+ const maxTextWidth = FORM_SIGN_MAX_WIDTH - FORM_SIGN_PADDING * 2;
46006
+ let splitIndex = Math.ceil(characters.length / 2);
46007
+ while (splitIndex > 1 && ctx.measureText(characters.slice(0, splitIndex).join("")).width > maxTextWidth) {
46008
+ splitIndex--;
46009
+ }
46010
+ return [
46011
+ characters.slice(0, splitIndex).join(""),
46012
+ fitTextWithEllipsis(characters.slice(splitIndex).join(""), maxTextWidth, ctx)
46013
+ ];
45789
46014
  }
45790
- function fitNameInSection(name, maxWidth, maxHeight, ctx, initialFontSize, minFontSize = 10) {
45791
- const tryFitLines = (lines2, startFontSize) => {
45792
- let fontSize2 = startFontSize;
45793
- while (fontSize2 >= minFontSize) {
45794
- const lineHeight2 = fontSize2 * 1.2;
45795
- ctx.font = `bold ${fontSize2}px Arial, sans-serif`;
45796
- const fitsWidth = measureLinesWidth(lines2, ctx) <= maxWidth;
45797
- const fitsHeight = lines2.length * lineHeight2 <= maxHeight;
45798
- if (fitsWidth && fitsHeight) {
45799
- return { fontSize: fontSize2, lines: lines2, lineHeight: lineHeight2 };
45800
- }
45801
- fontSize2--;
45802
- }
45803
- return null;
46015
+ function measureFormSignFallback(name, time2, height = FALLBACK_SIGN_DISPLAY_SIZE.height) {
46016
+ const ctx = document.createElement("canvas").getContext("2d");
46017
+ const nameFontSize = getSignNameFontSize(name);
46018
+ const dateStr = time2 ? dayjs(time2).format("YYYY-MM-DD") : dayjs().format("YYYY-MM-DD");
46019
+ const sourceMetaLines = [
46020
+ `${$t("sys.onlineForm.electronicSignatureLabel")}:${name}`,
46021
+ `${$t("sys.onlineForm.dateLabel")}:${dateStr}`
46022
+ ];
46023
+ ctx.font = getSignNameFont(name);
46024
+ const naturalNameWidth = ctx.measureText(name).width;
46025
+ const nameMaxWidth = nameFontSize === SIGN_LONG_NAME_FONT_SIZE ? Math.min(naturalNameWidth, FORM_SIGN_LONG_NAME_MAX_WIDTH) : naturalNameWidth;
46026
+ const nameLines = layoutFormSignName(name, nameMaxWidth, ctx);
46027
+ const nameWidth = nameLines.length ? Math.min(nameMaxWidth, measureLinesWidth(nameLines, ctx)) : 0;
46028
+ ctx.font = `${SIGN_META_FONT_SIZE}px Arial, sans-serif`;
46029
+ const naturalMetaWidth = measureLinesWidth(sourceMetaLines, ctx);
46030
+ const maxWidth = Math.min(
46031
+ FORM_SIGN_MAX_WIDTH,
46032
+ Math.ceil(FORM_SIGN_PADDING * 2 + nameWidth + FORM_SIGN_SECTION_GAP + naturalMetaWidth)
46033
+ );
46034
+ const metaMaxWidth = maxWidth - FORM_SIGN_PADDING * 2 - nameWidth - FORM_SIGN_SECTION_GAP;
46035
+ const metaLines = sourceMetaLines.map((line) => fitTextWithEllipsis(line, metaMaxWidth, ctx));
46036
+ const metaWidth = measureLinesWidth(metaLines, ctx);
46037
+ const width = Math.ceil(FORM_SIGN_PADDING * 2 + nameWidth + FORM_SIGN_SECTION_GAP + metaWidth);
46038
+ return { width, height, nameFontSize, nameWidth, nameLines, metaWidth, metaLines };
46039
+ }
46040
+ function getFormSignFallbackSize(name, time2, height = FALLBACK_SIGN_DISPLAY_SIZE.height) {
46041
+ const layout = measureFormSignFallback(name, time2, height);
46042
+ return { width: layout.width, height: layout.height };
46043
+ }
46044
+ function getSimpleNameFallbackSize(name, height) {
46045
+ const ctx = document.createElement("canvas").getContext("2d");
46046
+ ctx.font = getSignNameFont(name);
46047
+ const lines = layoutSimpleNameLines(name, ctx);
46048
+ return {
46049
+ width: Math.min(
46050
+ FORM_SIGN_MAX_WIDTH,
46051
+ Math.ceil(measureLinesWidth(lines, ctx) + FORM_SIGN_PADDING * 2)
46052
+ ),
46053
+ height
45804
46054
  };
45805
- const singleLineFit = tryFitLines([name], initialFontSize);
45806
- if (singleLineFit) {
45807
- return singleLineFit;
45808
- }
45809
- if (name.length >= 3 && name.length <= 6) {
45810
- const balancedFit = tryFitLines(splitBalancedNameLines(name, 2), initialFontSize);
45811
- if (balancedFit) {
45812
- return balancedFit;
45813
- }
45814
- }
45815
- let fontSize = minFontSize;
45816
- ctx.font = `bold ${fontSize}px Arial, sans-serif`;
45817
- let lines = wrapText(name, maxWidth, ctx);
45818
- let lineHeight = fontSize * 1.2;
45819
- while (lines.length * lineHeight > maxHeight && fontSize > 10) {
45820
- fontSize--;
45821
- lineHeight = fontSize * 1.2;
45822
- ctx.font = `bold ${fontSize}px Arial, sans-serif`;
45823
- lines = wrapText(name, maxWidth, ctx);
45824
- }
45825
- return { fontSize, lines, lineHeight };
45826
- }
45827
- function getSignCanvasHorizontalMargin(width) {
45828
- return (width - width * 0.9) / 2;
45829
- }
45830
- const SIGN_CANVAS_BASE_WIDTH = 240;
45831
- const FORM_SIGN_CANVAS_WIDTH = 360;
45832
- const FORM_SIGN_CANVAS_HEIGHT = 204;
45833
- const FORM_SIGN_VERTICAL_CANVAS_WIDTH = FORM_SIGN_CANVAS_HEIGHT;
45834
- const FORM_SIGN_VERTICAL_CANVAS_HEIGHT = FORM_SIGN_CANVAS_WIDTH;
45835
- function getFormSignSectionGap(width) {
45836
- return Math.round(8 * (width / SIGN_CANVAS_BASE_WIDTH));
45837
- }
45838
- function createSimpleNameImage(name, width, height) {
46055
+ }
46056
+ function createFormSignFallbackImage(name, height, time2) {
46057
+ const layout = measureFormSignFallback(name, time2, height);
46058
+ const { width } = layout;
45839
46059
  const canvas = document.createElement("canvas");
45840
- canvas.width = width;
45841
- canvas.height = height;
46060
+ canvas.width = Math.max(1, Math.round(width * FALLBACK_SIGN_DPR));
46061
+ canvas.height = Math.max(1, Math.round(height * FALLBACK_SIGN_DPR));
45842
46062
  const ctx = canvas.getContext("2d");
46063
+ ctx.scale(FALLBACK_SIGN_DPR, FALLBACK_SIGN_DPR);
45843
46064
  ctx.fillStyle = "#ffffff";
45844
46065
  ctx.fillRect(0, 0, width, height);
45845
- let fontSize = Math.floor(height / 3);
45846
- ctx.font = `${fontSize}px Arial`;
45847
- const maxTextWidth = width * 0.9;
45848
- let lines = wrapText(name, maxTextWidth, ctx);
45849
- let lineHeight = fontSize * 1.2;
45850
- while (lines.length * lineHeight > height && fontSize > 10) {
45851
- fontSize--;
45852
- lineHeight = fontSize * 1.2;
45853
- ctx.font = `${fontSize}px Arial`;
45854
- lines = wrapText(name, maxTextWidth, ctx);
45855
- }
46066
+ ctx.fillStyle = "#000000";
46067
+ ctx.textAlign = "left";
46068
+ ctx.textBaseline = "middle";
46069
+ const nameLineHeight = layout.nameFontSize * 1.2;
46070
+ const nameTotalHeight = layout.nameLines.length * nameLineHeight;
46071
+ const nameStartY = (height - nameTotalHeight) / 2 + nameLineHeight / 2;
46072
+ layout.nameLines.forEach((line, index2) => {
46073
+ ctx.font = getSignNameFont(name);
46074
+ ctx.fillText(line, FORM_SIGN_PADDING, nameStartY + index2 * nameLineHeight, layout.nameWidth);
46075
+ });
46076
+ const metaLineHeight = SIGN_META_FONT_SIZE * 1.35;
46077
+ const metaTotalHeight = layout.metaLines.length * metaLineHeight;
46078
+ const metaStartY = (height - metaTotalHeight) / 2 + metaLineHeight / 2;
46079
+ layout.metaLines.forEach((line, index2) => {
46080
+ ctx.font = `${SIGN_META_FONT_SIZE}px Arial, sans-serif`;
46081
+ ctx.fillText(
46082
+ line,
46083
+ FORM_SIGN_PADDING + layout.nameWidth + FORM_SIGN_SECTION_GAP,
46084
+ metaStartY + index2 * metaLineHeight,
46085
+ layout.metaWidth
46086
+ );
46087
+ });
46088
+ return canvas.toDataURL("image/png");
46089
+ }
46090
+ function createSimpleNameImage(name, height) {
46091
+ const { width } = getSimpleNameFallbackSize(name, height);
46092
+ const canvas = document.createElement("canvas");
46093
+ canvas.width = Math.max(1, Math.round(width * FALLBACK_SIGN_DPR));
46094
+ canvas.height = Math.max(1, Math.round(height * FALLBACK_SIGN_DPR));
46095
+ const ctx = canvas.getContext("2d");
46096
+ ctx.scale(FALLBACK_SIGN_DPR, FALLBACK_SIGN_DPR);
46097
+ ctx.fillStyle = "#ffffff";
46098
+ ctx.fillRect(0, 0, width, height);
46099
+ const maxTextWidth = width - FORM_SIGN_PADDING * 2;
46100
+ ctx.font = getSignNameFont(name);
46101
+ const lines = layoutSimpleNameLines(name, ctx);
46102
+ const lineHeight = getSignNameFontSize(name) * 1.2;
45856
46103
  const totalTextHeight = lines.length * lineHeight;
45857
46104
  const startY = (height - totalTextHeight) / 2 + lineHeight / 2;
45858
46105
  ctx.fillStyle = "#000000";
45859
- ctx.textAlign = "center";
46106
+ ctx.textAlign = "left";
45860
46107
  ctx.textBaseline = "middle";
45861
46108
  lines.forEach((line, index2) => {
45862
- ctx.fillText(line, width / 2, startY + index2 * lineHeight);
46109
+ ctx.fillText(line, FORM_SIGN_PADDING, startY + index2 * lineHeight, maxTextWidth);
45863
46110
  });
45864
46111
  return canvas.toDataURL("image/png");
45865
46112
  }
45866
46113
  function createVerticalNameImage(name, width, height) {
45867
46114
  const canvas = document.createElement("canvas");
45868
- canvas.width = width;
45869
- canvas.height = height;
46115
+ canvas.width = Math.max(1, Math.round(width * FALLBACK_SIGN_DPR));
46116
+ canvas.height = Math.max(1, Math.round(height * FALLBACK_SIGN_DPR));
45870
46117
  const ctx = canvas.getContext("2d");
46118
+ ctx.scale(FALLBACK_SIGN_DPR, FALLBACK_SIGN_DPR);
45871
46119
  ctx.fillStyle = "#ffffff";
45872
46120
  ctx.fillRect(0, 0, width, height);
45873
46121
  const characters = Array.from(name);
@@ -45875,20 +46123,13 @@ function createVerticalNameImage(name, width, height) {
45875
46123
  const verticalPadding = height * 0.08;
45876
46124
  const availableWidth = width - horizontalPadding * 2;
45877
46125
  const availableHeight = height - verticalPadding * 2;
45878
- let fontSize = Math.floor(width / 3);
45879
- let rowHeight = fontSize * 1.15;
45880
- let columnWidth = fontSize * 1.15;
45881
- let rowsPerColumn = Math.max(1, Math.floor(availableHeight / rowHeight));
45882
- let columnCount = Math.ceil(characters.length / rowsPerColumn);
45883
- while (columnCount * columnWidth > availableWidth && fontSize > 10) {
45884
- fontSize--;
45885
- rowHeight = fontSize * 1.15;
45886
- columnWidth = fontSize * 1.15;
45887
- rowsPerColumn = Math.max(1, Math.floor(availableHeight / rowHeight));
45888
- columnCount = Math.ceil(characters.length / rowsPerColumn);
45889
- }
46126
+ const fontSize = getSignNameFontSize(name);
46127
+ const rowHeight = fontSize * 1.15;
46128
+ const rowsPerColumn = Math.max(1, Math.floor(availableHeight / rowHeight));
46129
+ const columnCount = Math.ceil(characters.length / rowsPerColumn);
46130
+ const columnWidth = Math.min(fontSize * 1.15, availableWidth / columnCount);
45890
46131
  ctx.fillStyle = "#000000";
45891
- ctx.font = `bold ${fontSize}px Arial, sans-serif`;
46132
+ ctx.font = getSignNameFont(name);
45892
46133
  ctx.textAlign = "center";
45893
46134
  ctx.textBaseline = "middle";
45894
46135
  const totalWidth = columnCount * columnWidth;
@@ -45902,53 +46143,11 @@ function createVerticalNameImage(name, width, height) {
45902
46143
  const top = (height - columnHeight) / 2;
45903
46144
  const x = left + (columnCount - columnIndex - 0.5) * columnWidth;
45904
46145
  columnCharacters.forEach((character, rowIndex) => {
45905
- ctx.fillText(character, x, top + (rowIndex + 0.5) * rowHeight);
46146
+ ctx.fillText(character, x, top + (rowIndex + 0.5) * rowHeight, columnWidth);
45906
46147
  });
45907
46148
  }
45908
46149
  return canvas.toDataURL("image/png");
45909
46150
  }
45910
- function createFormSignFallbackImage(name, width, height, time2) {
45911
- const canvas = document.createElement("canvas");
45912
- canvas.width = width;
45913
- canvas.height = height;
45914
- const ctx = canvas.getContext("2d");
45915
- ctx.fillStyle = "#ffffff";
45916
- ctx.fillRect(0, 0, width, height);
45917
- const margin = getSignCanvasHorizontalMargin(width);
45918
- const sectionGap = getFormSignSectionGap(width);
45919
- const dateStr = time2 ? dayjs(time2).format("YYYY-MM-DD") : dayjs().format("YYYY-MM-DD");
45920
- const metaLines = [
45921
- `${$t("sys.onlineForm.electronicSignatureLabel")}:${name}`,
45922
- `${$t("sys.onlineForm.dateLabel")}:${dateStr}`
45923
- ];
45924
- const metaFontSize = Math.max(10, Math.floor(height * 0.1));
45925
- const metaLineHeight = metaFontSize * 1.45;
45926
- ctx.font = `${metaFontSize}px Arial, sans-serif`;
45927
- const metaWidth = Math.max(...metaLines.map((line) => ctx.measureText(line).width));
45928
- const metaTotalHeight = metaLines.length * metaLineHeight;
45929
- const rightSectionX = width - margin - metaWidth;
45930
- const leftSectionWidth = Math.max(40, rightSectionX - margin - sectionGap);
45931
- const {
45932
- fontSize: nameFontSize,
45933
- lines: nameLines,
45934
- lineHeight: nameLineHeight
45935
- } = fitNameInSection(name, leftSectionWidth, height, ctx, Math.floor(height / 3));
45936
- ctx.fillStyle = "#000000";
45937
- ctx.textAlign = "left";
45938
- ctx.textBaseline = "middle";
45939
- const nameTotalHeight = nameLines.length * nameLineHeight;
45940
- const nameStartY = (height - nameTotalHeight) / 2 + nameLineHeight / 2;
45941
- nameLines.forEach((line, index2) => {
45942
- ctx.font = `bold ${nameFontSize}px Arial, sans-serif`;
45943
- ctx.fillText(line, margin, nameStartY + index2 * nameLineHeight);
45944
- });
45945
- const metaStartY = (height - metaTotalHeight) / 2 + metaLineHeight / 2;
45946
- metaLines.forEach((line, index2) => {
45947
- ctx.font = `${metaFontSize}px Arial, sans-serif`;
45948
- ctx.fillText(line, rightSectionX, metaStartY + index2 * metaLineHeight);
45949
- });
45950
- return canvas.toDataURL("image/png");
45951
- }
45952
46151
  function resolveSignImageUrl(url, callback) {
45953
46152
  if (callback && typeof callback === "function") {
45954
46153
  return callback?.(url);
@@ -45961,6 +46160,12 @@ function resolveFallbackSignType(type) {
45961
46160
  function resolveSignatureImageDirection(direction) {
45962
46161
  return direction === SignatureImageDirectionEnum.VERTICAL ? SignatureImageDirectionEnum.VERTICAL : SignatureImageDirectionEnum.HORIZONTAL;
45963
46162
  }
46163
+ function getFormSignPreviewSize(name, time2, fallbackSignType, signatureImageDirection) {
46164
+ if (resolveSignatureImageDirection(signatureImageDirection) === SignatureImageDirectionEnum.VERTICAL) {
46165
+ return { width: FALLBACK_SIGN_DISPLAY_SIZE.height, height: FALLBACK_SIGN_DISPLAY_SIZE.width };
46166
+ }
46167
+ return resolveFallbackSignType(fallbackSignType) === FallbackSignTypeEnum.NAME_ONLY ? getSimpleNameFallbackSize(name, FALLBACK_SIGN_DISPLAY_SIZE.height) : getFormSignFallbackSize(name, time2);
46168
+ }
45964
46169
  function getFormSignPreviewUrl(url, name, callback, time2, fallbackSignType, signatureImageDirection) {
45965
46170
  if (url) {
45966
46171
  return resolveSignImageUrl(url, callback);
@@ -45968,14 +46173,14 @@ function getFormSignPreviewUrl(url, name, callback, time2, fallbackSignType, sig
45968
46173
  if (resolveSignatureImageDirection(signatureImageDirection) === SignatureImageDirectionEnum.VERTICAL) {
45969
46174
  return createVerticalNameImage(
45970
46175
  name,
45971
- FORM_SIGN_VERTICAL_CANVAS_WIDTH,
45972
- FORM_SIGN_VERTICAL_CANVAS_HEIGHT
46176
+ FALLBACK_SIGN_DISPLAY_SIZE.height,
46177
+ FALLBACK_SIGN_DISPLAY_SIZE.width
45973
46178
  );
45974
46179
  }
45975
46180
  if (resolveFallbackSignType(fallbackSignType) === FallbackSignTypeEnum.NAME_ONLY) {
45976
- return createSimpleNameImage(name, FORM_SIGN_CANVAS_WIDTH, FORM_SIGN_CANVAS_HEIGHT);
46181
+ return createSimpleNameImage(name, FALLBACK_SIGN_DISPLAY_SIZE.height);
45977
46182
  }
45978
- return createFormSignFallbackImage(name, FORM_SIGN_CANVAS_WIDTH, FORM_SIGN_CANVAS_HEIGHT, time2);
46183
+ return createFormSignFallbackImage(name, FALLBACK_SIGN_DISPLAY_SIZE.height, time2);
45979
46184
  }
45980
46185
  }
45981
46186
  const _hoisted_1$2i = { class: "text-[#384356] text-[14px] cursor-pointer primary-gct text-right" };
@@ -47018,10 +47223,14 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
47018
47223
  formState.value.signatureImageDirection = v;
47019
47224
  }
47020
47225
  });
47021
- const getFallbackPreviewSrc = (type) => {
47226
+ const getFallbackPreviewName = () => {
47022
47227
  const userInfo = window.NocodeAdapter.stores?.userInfo?.value;
47023
- const name = userInfo?.fullname || userInfo?.username || $t("sys.user");
47024
- return getFormSignPreviewUrl("", name, void 0, Date.now(), type);
47228
+ return userInfo?.fullname || userInfo?.username || $t("sys.user");
47229
+ };
47230
+ const getFallbackPreviewSrc = (type) => getFormSignPreviewUrl("", getFallbackPreviewName(), void 0, Date.now(), type);
47231
+ const getFallbackPreviewStyle = (type) => {
47232
+ const { width, height } = getFormSignPreviewSize(getFallbackPreviewName(), void 0, type);
47233
+ return { width: `${width}px`, height: `${height}px` };
47025
47234
  };
47026
47235
  const getPopupContainer = () => document.body;
47027
47236
  const signDisplayMode = computed({
@@ -47323,8 +47532,9 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
47323
47532
  content: withCtx(() => [
47324
47533
  createElementVNode("img", {
47325
47534
  src: getFallbackPreviewSrc(value),
47535
+ style: normalizeStyle(getFallbackPreviewStyle(value)),
47326
47536
  alt: ""
47327
- }, null, 8, _hoisted_7$n)
47537
+ }, null, 12, _hoisted_7$n)
47328
47538
  ]),
47329
47539
  default: withCtx(() => [
47330
47540
  createElementVNode("div", _hoisted_8$j, toDisplayString$1(label), 1)
@@ -47351,7 +47561,7 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
47351
47561
  };
47352
47562
  }
47353
47563
  });
47354
- const __vite_glob_0_13$1 = /* @__PURE__ */ _export_sfc(_sfc_main$41, [["__scopeId", "data-v-df811504"]]);
47564
+ const __vite_glob_0_13$1 = /* @__PURE__ */ _export_sfc(_sfc_main$41, [["__scopeId", "data-v-0a560a33"]]);
47355
47565
  const _hoisted_1$2c = { class: "number-range" };
47356
47566
  const _hoisted_2$1y = { class: "middle" };
47357
47567
  const _hoisted_3$1c = { class: "length-sep" };
@@ -51001,6 +51211,12 @@ const _sfc_main$3w = /* @__PURE__ */ defineComponent({
51001
51211
  disabled: { type: Boolean }
51002
51212
  },
51003
51213
  setup(__props) {
51214
+ const props2 = __props;
51215
+ const handleDiameterBlur = () => {
51216
+ if (props2.widget.diameterMm == null) {
51217
+ props2.widget.diameterMm = 42;
51218
+ }
51219
+ };
51004
51220
  return (_ctx, _cache) => {
51005
51221
  const _component_a_input_number = resolveComponent("a-input-number");
51006
51222
  return openBlock(), createBlock(FormItem, {
@@ -51017,7 +51233,8 @@ const _sfc_main$3w = /* @__PURE__ */ defineComponent({
51017
51233
  disabled: __props.disabled,
51018
51234
  "addon-after": "mm",
51019
51235
  size: "small",
51020
- style: { "width": "100%" }
51236
+ style: { "width": "100%" },
51237
+ onBlur: handleDiameterBlur
51021
51238
  }, null, 8, ["value", "disabled"])
51022
51239
  ]),
51023
51240
  _: 1
@@ -51998,11 +52215,29 @@ const CellWidgetEvent = /* @__PURE__ */ _export_sfc(_sfc_main$3j, [["__scopeId",
51998
52215
  function useFormulaEditor(props2) {
51999
52216
  const { masterModel: masterModel2, modelMetaMap: modelMetaMap2, subTableFieldModel: subTableFieldModel2 } = useModelFields();
52000
52217
  const buildChildrenFromModel = (model) => {
52001
- return model.fields.map(({ key, name, type }) => ({
52002
- id: key,
52003
- name,
52004
- valueType: type
52005
- }));
52218
+ const belongingObjectMap = /* @__PURE__ */ new Map();
52219
+ for (const { belongingObject } of model.fields) {
52220
+ if (belongingObject) {
52221
+ belongingObjectMap.set(belongingObject, void 0);
52222
+ }
52223
+ }
52224
+ for (const { key, name } of model.fields) {
52225
+ if (belongingObjectMap.has(key)) {
52226
+ belongingObjectMap.set(key, name);
52227
+ }
52228
+ }
52229
+ return model.fields.reduce((options, { key, name, type, belongingObject }) => {
52230
+ if (belongingObjectMap.has(key)) {
52231
+ return options;
52232
+ }
52233
+ const objectName = belongingObjectMap.get(belongingObject);
52234
+ options.push({
52235
+ id: key,
52236
+ name: objectName ? `${objectName}.${name}` : name,
52237
+ valueType: type
52238
+ });
52239
+ return options;
52240
+ }, []);
52006
52241
  };
52007
52242
  const buildIdentifierGroup = ({
52008
52243
  id,
@@ -53090,7 +53325,7 @@ const _sfc_main$3b = /* @__PURE__ */ defineComponent({
53090
53325
  }
53091
53326
  });
53092
53327
  function asyncImportWidgetProp() {
53093
- const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-XF3nCU9v.js"), "./widget-diagonal.vue": () => import("./widget-diagonal-DSym7fks.js"), "./widget-image.vue": () => import("./widget-image-CmjwkVs7.js"), "./widget-line.vue": () => import("./widget-line-BX64xVfU.js"), "./widget-pagination.vue": () => import("./widget-pagination-BV89Lvjt.js"), "./widget-power.vue": () => import("./widget-power-DoSfQv92.js"), "./widget-qrcode.vue": () => import("./widget-qrcode-UGcRLC56.js"), "./widget-rangelimit.vue": () => import("./widget-rangelimit-CUHD__1H.js"), "./widget-serialnumber.vue": () => import("./widget-serialnumber-CAkZR5Xl.js"), "./widget-text.vue": () => import("./widget-text-DtYVTThu.js"), "./widget-timediff.vue": () => import("./widget-timediff-DX_IoCMO.js") });
53328
+ const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-BMnwSzpx.js"), "./widget-diagonal.vue": () => import("./widget-diagonal-iuAFZn-R.js"), "./widget-image.vue": () => import("./widget-image-sZeIt4K6.js"), "./widget-line.vue": () => import("./widget-line-izrJUAAT.js"), "./widget-pagination.vue": () => import("./widget-pagination-CTANdU2l.js"), "./widget-power.vue": () => import("./widget-power-OZD7bTxW.js"), "./widget-qrcode.vue": () => import("./widget-qrcode-xvyklot3.js"), "./widget-rangelimit.vue": () => import("./widget-rangelimit-BZhTuRkT.js"), "./widget-serialnumber.vue": () => import("./widget-serialnumber-BwUHV475.js"), "./widget-text.vue": () => import("./widget-text-B8MzTxa3.js"), "./widget-timediff.vue": () => import("./widget-timediff-YAH8bbso.js") });
53094
53329
  const widgetPropMap = Object.keys(modules).reduce((map2, path) => {
53095
53330
  const mKey = path.match(/\/widget-([a-z]+)\.vue$/)?.[1];
53096
53331
  if (mKey) {
@@ -60426,7 +60661,7 @@ const _sfc_main$2s = /* @__PURE__ */ defineComponent({
60426
60661
  const emit2 = __emit;
60427
60662
  const currentValue = computed({
60428
60663
  get() {
60429
- return props2.value;
60664
+ return typeof props2.value === "string" ? props2.value : void 0;
60430
60665
  },
60431
60666
  set(val) {
60432
60667
  emit2("update:value", val);
@@ -60477,7 +60712,7 @@ const _sfc_main$2s = /* @__PURE__ */ defineComponent({
60477
60712
  };
60478
60713
  }
60479
60714
  });
60480
- const CellDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$2s, [["__scopeId", "data-v-57956802"]]);
60715
+ const CellDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$2s, [["__scopeId", "data-v-f0f61f80"]]);
60481
60716
  const _hoisted_1$1j = { class: "cell-media__placeholder" };
60482
60717
  const _hoisted_2$S = ["disabled"];
60483
60718
  const _sfc_main$2r = /* @__PURE__ */ defineComponent({
@@ -62727,6 +62962,30 @@ const _sfc_main$2f = /* @__PURE__ */ defineComponent({
62727
62962
  event2.stopPropagation();
62728
62963
  }
62729
62964
  }
62965
+ function getInvalidMaterialLotReason(record, keyword2) {
62966
+ const type = String(record.production_identification_type_ ?? "").toUpperCase();
62967
+ const batch = `批次「${keyword2}」`;
62968
+ switch (type) {
62969
+ case "":
62970
+ // 兼容历史物料批数据
62971
+ case ProductionIdentificationTypeEnum.MATERIAL:
62972
+ return null;
62973
+ case ProductionIdentificationTypeEnum.LOT:
62974
+ case ProductionIdentificationTypeEnum.SN:
62975
+ return record.product_type_ === ProductTypeEnum.FINISHED_PRODUCT ? `${batch}为成品批,不能用作物料批` : null;
62976
+ case ProductionIdentificationTypeEnum.STERILIZATION:
62977
+ return `${batch}为灭菌批,不能用作物料批`;
62978
+ case ProductionIdentificationTypeEnum.INSPECTION_CONTAINER:
62979
+ case ProductionIdentificationTypeEnum.LEGACY_INSPECTION.toUpperCase():
62980
+ return `${batch}为检验批,不能用作物料批`;
62981
+ case ProductionIdentificationTypeEnum.PACK_BOX:
62982
+ return `${batch}为包装箱,不能用作物料批`;
62983
+ case ProductionIdentificationTypeEnum.UDI:
62984
+ return `${batch}为UDI,不能用作物料批`;
62985
+ default:
62986
+ return `${batch}类型为「${record.production_identification_type_}」,不能用作物料批`;
62987
+ }
62988
+ }
62730
62989
  async function fetchIdByName(keyword2, source = "async") {
62731
62990
  if (!keyword2) return;
62732
62991
  const seq = ++fetchSeq;
@@ -62740,7 +62999,17 @@ const _sfc_main$2f = /* @__PURE__ */ defineComponent({
62740
62999
  { name_: keyword2, product_id_: props2.formData.product_id_ }
62741
63000
  );
62742
63001
  if (seq !== fetchSeq) return;
62743
- const id = res?.data?.[0]?.id_ ?? res?.data?.id_ ?? res?.id_ ?? null;
63002
+ const record = Array.isArray(res?.data) ? res.data[0] : res?.data ?? res;
63003
+ const reason = record && getInvalidMaterialLotReason(record, keyword2);
63004
+ if (reason) {
63005
+ setRowField(idFieldKey, null, source);
63006
+ emit2("update:value", null);
63007
+ state.data = [];
63008
+ lastSelectedValue = void 0;
63009
+ message.error(reason);
63010
+ return;
63011
+ }
63012
+ const id = record?.id_ ?? null;
62744
63013
  if (source === "async") markRowFieldUserModified(idFieldKey);
62745
63014
  setRowField(idFieldKey, id, source);
62746
63015
  } catch (e) {
@@ -62750,6 +63019,7 @@ const _sfc_main$2f = /* @__PURE__ */ defineComponent({
62750
63019
  function onAutoChange(val) {
62751
63020
  emit2("change");
62752
63021
  if (val !== lastSelectedValue) {
63022
+ fetchSeq += 1;
62753
63023
  isManualInput = true;
62754
63024
  setRowField(idFieldKey, null, "user");
62755
63025
  }
@@ -62768,6 +63038,7 @@ const _sfc_main$2f = /* @__PURE__ */ defineComponent({
62768
63038
  }
62769
63039
  function onChangeSelect(record, noEmit) {
62770
63040
  const { __VALUE__, __SHOW_LABEL__, id_ } = record || {};
63041
+ fetchSeq += 1;
62771
63042
  isManualInput = false;
62772
63043
  lastSelectedValue = __VALUE__;
62773
63044
  state.data = [
@@ -62849,7 +63120,7 @@ const _sfc_main$2f = /* @__PURE__ */ defineComponent({
62849
63120
  };
62850
63121
  }
62851
63122
  });
62852
- const TraceMaterialLotSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2f, [["__scopeId", "data-v-c018a964"]]);
63123
+ const TraceMaterialLotSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2f, [["__scopeId", "data-v-965a808f"]]);
62853
63124
  const _sfc_main$2e = /* @__PURE__ */ defineComponent({
62854
63125
  __name: "auto-complete-render",
62855
63126
  props: {
@@ -63566,7 +63837,7 @@ const _sfc_main$2a = /* @__PURE__ */ defineComponent({
63566
63837
  };
63567
63838
  }
63568
63839
  });
63569
- const CheckboxSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["__scopeId", "data-v-845c9dea"]]);
63840
+ const CheckboxSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["__scopeId", "data-v-ec8bfe18"]]);
63570
63841
  const _sfc_main$29 = /* @__PURE__ */ defineComponent({
63571
63842
  __name: "radio-enum",
63572
63843
  props: {
@@ -63628,7 +63899,7 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
63628
63899
  };
63629
63900
  }
63630
63901
  });
63631
- const RadioSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["__scopeId", "data-v-a26ab895"]]);
63902
+ const RadioSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["__scopeId", "data-v-ed6a3486"]]);
63632
63903
  const _hoisted_1$1e = { class: "search-wrapper" };
63633
63904
  const _hoisted_2$Q = { class: "inner-list search-visible" };
63634
63905
  const _hoisted_3$F = ["onContextmenu"];
@@ -63812,8 +64083,10 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
63812
64083
  const contentJustifyStyle = computed(() => {
63813
64084
  const textAlign = props2.widget.style?.textAlign;
63814
64085
  if (!textAlign) return void 0;
64086
+ const align = textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : "flex-start";
63815
64087
  return {
63816
- "--justifyContent": textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : "flex-start"
64088
+ "--justifyContent": align,
64089
+ "--enum-option-align": align
63817
64090
  };
63818
64091
  });
63819
64092
  const separatorAttr = computed(() => {
@@ -63980,7 +64253,7 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
63980
64253
  };
63981
64254
  }
63982
64255
  });
63983
- const enumSelectRender = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["__scopeId", "data-v-005bc4da"]]);
64256
+ const enumSelectRender = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["__scopeId", "data-v-40fbf186"]]);
63984
64257
  const __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
63985
64258
  __proto__: null,
63986
64259
  default: enumSelectRender
@@ -67056,7 +67329,7 @@ const VuePdf = /* @__PURE__ */ defineComponent({
67056
67329
  }
67057
67330
  });
67058
67331
  const VueVideoPlayer = defineAsyncComponent(
67059
- () => import("./VueVideoPlayer-CAWYWBHi.js")
67332
+ () => import("./VueVideoPlayer-abpwAqu3.js")
67060
67333
  );
67061
67334
  const _hoisted_1$1a = {
67062
67335
  key: 0,
@@ -67913,7 +68186,7 @@ const _sfc_main$1R = /* @__PURE__ */ defineComponent({
67913
68186
  };
67914
68187
  }
67915
68188
  });
67916
- const sealRender = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["__scopeId", "data-v-0e18a726"]]);
68189
+ const sealRender = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["__scopeId", "data-v-b0d382d2"]]);
67917
68190
  const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
67918
68191
  __proto__: null,
67919
68192
  default: sealRender
@@ -68623,7 +68896,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
68623
68896
  currentValue.value = option2.value;
68624
68897
  await handleChange(option2.value, option2);
68625
68898
  },
68626
- active: () => dropdownVisible.value && !showDisabled
68899
+ active: () => dropdownVisible.value && !showDisabled.value
68627
68900
  });
68628
68901
  return (_ctx, _cache) => {
68629
68902
  const _component_a_spin = resolveComponent("a-spin");
@@ -68762,7 +69035,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
68762
69035
  keyword: void 0
68763
69036
  });
68764
69037
  const columns = computed(() => {
68765
- return getColumns(["radio", "lot2sn", "productCode", "productName", "productSpec"]);
69038
+ return bizType === FIELD_TYPE.INSPECTION_CONTAINER ? getColumns(["radio", "lot2sn", "modifyUserName", "modifyTime"]) : getColumns(["radio", "lot2sn", "productCode", "productName", "productSpec"]);
68766
69039
  });
68767
69040
  const fetcher = async ({ keyword: keyword2 = "", pageNo, pageSize: pageSize2 }) => {
68768
69041
  const { queryData, exp } = bizType === FIELD_TYPE.INSPECTION_CONTAINER ? buildInspectionLotListQuery(keyword2, props2.extraQuery) : buildProductionLotListQuery(keyword2, props2.extraQuery);
@@ -68886,7 +69159,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
68886
69159
  };
68887
69160
  }
68888
69161
  });
68889
- const ProductionLotSelectTable = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["__scopeId", "data-v-16374060"]]);
69162
+ const ProductionLotSelectTable = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["__scopeId", "data-v-ac7544a5"]]);
68890
69163
  const _sfc_main$1N = /* @__PURE__ */ defineComponent({
68891
69164
  __name: "production-container-select",
68892
69165
  props: {
@@ -70444,7 +70717,7 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
70444
70717
  await handleChange(option2.value, option2);
70445
70718
  },
70446
70719
  scan: handleSearchScan,
70447
- active: () => dropdownVisible.value && !showDisabled
70720
+ active: () => dropdownVisible.value && !showDisabled.value
70448
70721
  });
70449
70722
  return (_ctx, _cache) => {
70450
70723
  const _component_a_spin = resolveComponent("a-spin");
@@ -71180,6 +71453,7 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
71180
71453
  updateDateFields(newSignature);
71181
71454
  applySignatureAutofill(newSignature);
71182
71455
  onChange();
71456
+ popoverVisible.value = false;
71183
71457
  };
71184
71458
  const formattedDate = (time2) => {
71185
71459
  let format2 = signatureType === SignatureTypeEnum.SIGNATURE_DATE ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm";
@@ -71196,6 +71470,17 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
71196
71470
  fallbackSignType,
71197
71471
  signatureImageDirection
71198
71472
  );
71473
+ const getFallbackSignImageStyle = (signature2) => {
71474
+ if (signature2.url || !signature2.username || isAdaptive.value || signatureImageDirection === SignatureImageDirectionEnum.VERTICAL)
71475
+ return void 0;
71476
+ const { width, height } = getFormSignPreviewSize(
71477
+ signature2.username,
71478
+ signature2.time,
71479
+ fallbackSignType,
71480
+ signatureImageDirection
71481
+ );
71482
+ return { width: `${width}px`, height: `${height}px` };
71483
+ };
71199
71484
  const removeSignature = (index2) => {
71200
71485
  signatures.value = signatures.value.filter((_, signatureIndex) => signatureIndex !== index2);
71201
71486
  onChange();
@@ -71234,6 +71519,9 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
71234
71519
  const signaturePreviewClasses = (signature2) => [
71235
71520
  "signature-preview",
71236
71521
  { adaptive: isAdaptive.value },
71522
+ {
71523
+ "is-fallback-signature": !signature2.url && Boolean(signature2.username) && !isAdaptive.value && signatureImageDirection === SignatureImageDirectionEnum.HORIZONTAL
71524
+ },
71237
71525
  { "is-vertical-signature": signatureImageDirection === SignatureImageDirectionEnum.VERTICAL },
71238
71526
  {
71239
71527
  "is-inline-date": signDisplayStyle === SignShowTypeEnum.HORIZONTAL && signature2.type !== SignatureTypeEnum.SIGNATURE_ONLY
@@ -71436,8 +71724,9 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
71436
71724
  }, [
71437
71725
  createVNode(_component_a_image, {
71438
71726
  preview: false,
71439
- src: getSignaturePreviewUrl(signature2)
71440
- }, null, 8, ["src"]),
71727
+ src: getSignaturePreviewUrl(signature2),
71728
+ style: normalizeStyle(getFallbackSignImageStyle(signature2))
71729
+ }, null, 8, ["src", "style"]),
71441
71730
  shouldFollowSignatureDate.value && signature2.time ? (openBlock(), createElementBlock("div", _hoisted_5$j, toDisplayString$1(formattedDate(signature2.time)), 1)) : createCommentVNode("", true)
71442
71731
  ], 2);
71443
71732
  }), 128))
@@ -71462,8 +71751,9 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
71462
71751
  }, [
71463
71752
  createVNode(_component_a_image, {
71464
71753
  preview: false,
71465
- src: getSignaturePreviewUrl(signature2)
71466
- }, null, 8, ["src"]),
71754
+ src: getSignaturePreviewUrl(signature2),
71755
+ style: normalizeStyle(getFallbackSignImageStyle(signature2))
71756
+ }, null, 8, ["src", "style"]),
71467
71757
  shouldFollowSignatureDate.value && signature2.time ? (openBlock(), createElementBlock("div", _hoisted_6$e, toDisplayString$1(formattedDate(signature2.time)), 1)) : createCommentVNode("", true)
71468
71758
  ], 2);
71469
71759
  }), 128))
@@ -71533,7 +71823,7 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
71533
71823
  };
71534
71824
  }
71535
71825
  });
71536
- const CheckboxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-b8f4d68c"]]);
71826
+ const CheckboxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-929e5a9f"]]);
71537
71827
  const _sfc_main$1E = /* @__PURE__ */ defineComponent({
71538
71828
  __name: "radio-switch",
71539
71829
  props: {
@@ -71588,7 +71878,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
71588
71878
  };
71589
71879
  }
71590
71880
  });
71591
- const RadioSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["__scopeId", "data-v-916d7da8"]]);
71881
+ const RadioSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["__scopeId", "data-v-d558bf8a"]]);
71592
71882
  const _hoisted_1$10 = { class: "inner-list" };
71593
71883
  const _hoisted_2$G = ["onContextmenu"];
71594
71884
  const _hoisted_3$x = { class: "inner-label-box" };
@@ -71743,6 +72033,12 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
71743
72033
  return optionsWithRefs.value;
71744
72034
  }
71745
72035
  });
72036
+ const contentAlignStyle = computed(() => {
72037
+ const textAlign = props2.widget.style?.textAlign;
72038
+ return {
72039
+ "--boolean-option-align": textAlign === "left" ? "flex-start" : textAlign === "right" ? "flex-end" : "center"
72040
+ };
72041
+ });
71746
72042
  const separatorAttr = computed(() => {
71747
72043
  const cmpStyle = {};
71748
72044
  const cmpClass = [
@@ -71812,7 +72108,8 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
71812
72108
  formData: __props.formData,
71813
72109
  callback: readonlyCallback,
71814
72110
  annotationInfo: unref(annotationInfo),
71815
- class: "switch-render"
72111
+ class: "switch-render",
72112
+ style: normalizeStyle(contentAlignStyle.value)
71816
72113
  }, {
71817
72114
  readonlyIntroduce: withCtx(() => [
71818
72115
  (openBlock(true), createElementBlock(Fragment, null, renderList(renderIntroduce.value, (fieldWidget) => {
@@ -71859,11 +72156,11 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
71859
72156
  }, 16, ["value", "checked", "isAutoLineBreak"]))
71860
72157
  ]),
71861
72158
  _: 1
71862
- }, 8, ["modelValue", "widget", "formData", "annotationInfo"]);
72159
+ }, 8, ["modelValue", "widget", "formData", "annotationInfo", "style"]);
71863
72160
  };
71864
72161
  }
71865
72162
  });
71866
- const switchRender = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["__scopeId", "data-v-03c4bffd"]]);
72163
+ const switchRender = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["__scopeId", "data-v-bf15424f"]]);
71867
72164
  const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
71868
72165
  __proto__: null,
71869
72166
  default: switchRender
@@ -85052,9 +85349,9 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
85052
85349
  "model-key": "em_product",
85053
85350
  placeholder: _ctx.$t("sys.chooseText"),
85054
85351
  parentToDefault: false,
85055
- "query-data": { "product_type_.ne": "finishedProduct" },
85352
+ "query-data": { "product_type_.ne": unref(ProductTypeEnum).FINISHED_PRODUCT },
85056
85353
  onChange: (productId, node) => onSubstituteProductChange(record, productId, node)
85057
- }, null, 8, ["model-value", "placeholder", "onChange"])
85354
+ }, null, 8, ["model-value", "placeholder", "query-data", "onChange"])
85058
85355
  ]),
85059
85356
  _: 2
85060
85357
  }, 1032, ["name", "rules", "validate-status", "help"])) : column.key === "action" ? (openBlock(), createBlock(_component_a_button, {
@@ -85076,7 +85373,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
85076
85373
  };
85077
85374
  }
85078
85375
  });
85079
- const SubstitutePolicyItem = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-33847404"]]);
85376
+ const SubstitutePolicyItem = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-d8f30f7a"]]);
85080
85377
  const _hoisted_1$i = { class: "bom-entry-modal__content" };
85081
85378
  const _hoisted_2$b = { class: "bom-entry-modal__section-title" };
85082
85379
  const _hoisted_3$9 = { class: "bom-entry-modal__section-title" };
@@ -85427,9 +85724,9 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
85427
85724
  "model-key": "em_product",
85428
85725
  placeholder: _ctx.$t("sys.chooseText"),
85429
85726
  parentToDefault: false,
85430
- "query-data": { "product_type_.ne": "finishedProduct" },
85727
+ "query-data": { "product_type_.ne": unref(ProductTypeEnum).FINISHED_PRODUCT },
85431
85728
  onChange: onMainProductChange
85432
- }, null, 8, ["model-value", "placeholder"])
85729
+ }, null, 8, ["model-value", "placeholder", "query-data"])
85433
85730
  ]),
85434
85731
  _: 1
85435
85732
  }, 8, ["label", "validate-status", "help"])
@@ -85621,7 +85918,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
85621
85918
  };
85622
85919
  }
85623
85920
  });
85624
- const bomModal = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-27684a85"]]);
85921
+ const bomModal = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-30b7ea32"]]);
85625
85922
  var ParameterTypeEnum = /* @__PURE__ */ ((ParameterTypeEnum2) => {
85626
85923
  ParameterTypeEnum2["String"] = "String";
85627
85924
  ParameterTypeEnum2["Number"] = "Number";
@@ -86722,6 +87019,7 @@ const sys$1 = {
86722
87019
  materialSubstitutionTableConfig: "Material Substitution Table Config",
86723
87020
  edhr: {
86724
87021
  mcTable: {
87022
+ lotOrUniqueCodeRequired: "Invalid barcode: at least one of lot or unique code is required",
86725
87023
  materialStrategyConfig: "Material strategy configuration",
86726
87024
  loadingType: "Loading method",
86727
87025
  loadingTypeTip: "Material view: display only; By quantity: validate and fill by quantity; By lot: validate and fill by lot",
@@ -87047,7 +87345,7 @@ const sys = {
87047
87345
  materialRequisitionTableConfig: "产线收料表配置",
87048
87346
  materialSubstitutionTableConfig: "物料替换表配置",
87049
87347
  pretreatmentTableConfig: "产前表配置",
87050
- sterilizeBatchConfig: "委托灭菌生产批次表配置",
87348
+ sterilizeBatchConfig: "生产批次灭菌表配置",
87051
87349
  printFillAreaBg: "是否打印填报内容区底色",
87052
87350
  printFillAreaBgYes: "是",
87053
87351
  printFillAreaBgNo: "否",
@@ -87117,6 +87415,7 @@ const sys = {
87117
87415
  },
87118
87416
  edhr: {
87119
87417
  mcTable: {
87418
+ lotOrUniqueCodeRequired: "无效条码,批次、唯一码至少要有一个",
87120
87419
  materialStrategyConfig: "用料策略配置",
87121
87420
  loadingType: "上料方式",
87122
87421
  loadingTypeTip: "物料查看:仅展示物料;按数量上料:按数量校验与填充;按批次上料:按批次校验与填充",
@@ -87280,6 +87579,10 @@ const sys = {
87280
87579
  },
87281
87580
  pageDesigner: {
87282
87581
  addFieldNotReady: "添加字段组件加载中,请稍后重试",
87582
+ builtInFillRules: "内置填充",
87583
+ builtInFillRulesTip: "业务表预置 · 只读",
87584
+ customFillRules: "自定义填充",
87585
+ noCustomFillRules: "暂无自定义规则",
87283
87586
  alwaysCover: "始终覆盖",
87284
87587
  notCovered: "不覆盖已修改(本次编辑有效)",
87285
87588
  notCoveredForever: "不覆盖已修改(永久有效)",
@@ -88620,8 +88923,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
88620
88923
  printTask = (async () => {
88621
88924
  if (document.activeElement instanceof HTMLElement) document.activeElement.blur();
88622
88925
  await nextTick();
88623
- const { printRuntimeInstance } = await import("./print-runtime-instance-DQysbz5n.js");
88624
- const { default: renderer } = await import("./print-snapshot-renderer-DWHjMsOC.js");
88926
+ const { printRuntimeInstance } = await import("./print-runtime-instance-Bq1p758u.js");
88927
+ const { default: renderer } = await import("./print-snapshot-renderer-BWVZ-Lql.js");
88625
88928
  if (abort.signal.aborted) throw new Error("打印已取消");
88626
88929
  printRenderer.value = markRaw(renderer);
88627
88930
  await printRuntimeInstance(
@@ -88838,6 +89141,73 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
88838
89141
  }
88839
89142
  });
88840
89143
  const previewContainer = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-f233c660"]]);
89144
+ function collectPlacedFieldsByType(sheets, fieldType) {
89145
+ const result = [];
89146
+ const addFieldMeta = (fieldMeta) => {
89147
+ if (!fieldMeta.field) return;
89148
+ const modelKey = fieldMeta.model || fieldMeta.modelLink?.split(".").pop();
89149
+ if (!modelKey) return;
89150
+ result.push({
89151
+ field: fieldMeta.field,
89152
+ fieldType: fieldMeta.bizType || fieldMeta.fieldType || fieldType,
89153
+ model: modelKey,
89154
+ ...fieldMeta.subFieldKey ? { subFieldKey: fieldMeta.subFieldKey } : {}
89155
+ });
89156
+ };
89157
+ for (const { paper: paper2 } of sheets) {
89158
+ const addField = (content) => {
89159
+ const fieldMeta = content.fieldMeta;
89160
+ if (!fieldMeta?.field || (fieldMeta.bizType || fieldMeta.fieldType) !== fieldType) return;
89161
+ addFieldMeta(fieldMeta);
89162
+ };
89163
+ for (const field of paper2.floatingFields ?? []) addField(field);
89164
+ for (const row of paper2.cells ?? []) {
89165
+ for (const cell of row) {
89166
+ if (cell.multiFieldsContent?.length) {
89167
+ for (const content of cell.multiFieldsContent) {
89168
+ if (!content.type || content.type === CellType.Field) addField(content);
89169
+ }
89170
+ } else if (!cell.type || cell.type === CellType.Field) {
89171
+ addField(cell);
89172
+ }
89173
+ }
89174
+ }
89175
+ if (fieldType === FIELD_TYPE.MASTERSLAVE) {
89176
+ for (const table of [...paper2.dynamicTables ?? [], ...paper2.fixedTables ?? []]) {
89177
+ if (!table.field) continue;
89178
+ addFieldMeta({
89179
+ field: table.field,
89180
+ model: table.mainModel,
89181
+ fieldType: FIELD_TYPE.MASTERSLAVE
89182
+ });
89183
+ }
89184
+ }
89185
+ }
89186
+ return result;
89187
+ }
89188
+ function collectPlacedFieldsFromDesignerJson(designerJson, fieldType) {
89189
+ if (!designerJson) return [];
89190
+ let designer = designerJson;
89191
+ if (typeof designer === "string") {
89192
+ try {
89193
+ designer = JSON.parse(designer);
89194
+ } catch {
89195
+ return [];
89196
+ }
89197
+ }
89198
+ if (!designer || typeof designer !== "object") return [];
89199
+ const saved = designer;
89200
+ const sheets = Array.isArray(saved.sheets) ? saved.sheets.filter((sheet) => !!sheet?.paper) : Array.isArray(saved.cells) ? [{ sheetId: saved.sheetId ?? "", title: "", paper: saved }] : [];
89201
+ return collectPlacedFieldsByType(sheets, fieldType);
89202
+ }
89203
+ async function getPlacedFieldsByType(fieldType, templateId) {
89204
+ if (!templateId) throw new Error("getPlacedFieldsByType requires a templateId");
89205
+ const template = await api.apaas.onlineFormTmpl.getGetVersionById({ id: templateId });
89206
+ return collectPlacedFieldsFromDesignerJson(template?.designerJson, fieldType);
89207
+ }
89208
+ function getPlacedSealFields(templateId) {
89209
+ return getPlacedFieldsByType(FIELD_TYPE.SEAL, templateId);
89210
+ }
88841
89211
  const UNIQUE_KEY = "online-form-web-render-form-version-diff-iframe-util";
88842
89212
  const _hoisted_1$9 = ["src"];
88843
89213
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
@@ -90434,14 +90804,16 @@ export {
90434
90804
  XlsxParser as aj,
90435
90805
  calcUsedFields as ak,
90436
90806
  createDefaultExcelStores as al,
90437
- installFormBaseModal as am,
90438
- isReverseModelingEnabled as an,
90439
- openVersionDiff as ao,
90440
- registerExcelHostComponents as ap,
90441
- registerExcelLocale as aq,
90442
- scanField as ar,
90443
- setupExcel as as,
90444
- useCheckItem as at,
90807
+ getPlacedFieldsByType as am,
90808
+ getPlacedSealFields as an,
90809
+ installFormBaseModal as ao,
90810
+ isReverseModelingEnabled as ap,
90811
+ openVersionDiff as aq,
90812
+ registerExcelHostComponents as ar,
90813
+ registerExcelLocale as as,
90814
+ scanField as at,
90815
+ setupExcel as au,
90816
+ useCheckItem as av,
90445
90817
  isInventoryProductField as b,
90446
90818
  commonjsRequire as c,
90447
90819
  captureRuntimePrintSnapshot as d,