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

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 (94) hide show
  1. package/dist/{BaseComponent-BlDgF4NL.js → BaseComponent-Dfx-Xuv4.js} +2 -2
  2. package/dist/{VueVideoPlayer-abpwAqu3.js → VueVideoPlayer-DHqhqgGs.js} +2 -2
  3. package/dist/{align-editor-BdF6r-Gs.js → align-editor-hvllGvX8.js} +1 -1
  4. package/dist/{barcode-design-Dqzu8TED.js → barcode-design-CzlfYJ3s.js} +2 -2
  5. package/dist/base/index.es.js +94 -8
  6. package/dist/{diagonal-design-OOLJ1YWE.js → diagonal-design-DCVidBZD.js} +2 -2
  7. package/dist/{dynamic-table-action-C__4AVW6.js → dynamic-table-action-Dn_iw4tV.js} +6 -6
  8. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js} +47 -31
  9. package/dist/{edit.utils-CXmmCnxE-CaVD32MC.js → edit.utils-CXmmCnxE-BUEfsAZ3.js} +1 -1
  10. package/dist/excel.css +350 -247
  11. package/dist/{exceljs.min-C3uJ_Ieg.js → exceljs.min-9FX7NALn.js} +2 -2
  12. package/dist/{font-editor-BZvGZaYO.js → font-editor-ClqMOFPr.js} +3 -3
  13. package/dist/{image-design-Dt_97Q--.js → image-design-Cx1YIea4.js} +2 -2
  14. package/dist/{index-DzAPpHun.js → index-B3KkYxiX.js} +2 -2
  15. package/dist/{index-Bn4BqmG_.js → index-B4c_0M_d.js} +2 -2
  16. package/dist/{index-DLx-4gQ_.js → index-B9xwdsWY.js} +4 -4
  17. package/dist/{index-DF5OI_Xj.js → index-BKnroXXX.js} +3 -3
  18. package/dist/{index-CKnArHCM.js → index-BLrixMsM.js} +2 -2
  19. package/dist/{index-DMVoiSyn.js → index-BM1sPB29.js} +1 -1
  20. package/dist/{index-D4lTMizD.js → index-BRc6frrP.js} +2 -2
  21. package/dist/{index-Cvj6_0dy.js → index-BWHnHAjs.js} +1 -1
  22. package/dist/{index-BcSq5laa.js → index-BdYI71iy.js} +2 -2
  23. package/dist/{index-Cy3658Zd.js → index-BgzCdSQH.js} +3 -3
  24. package/dist/{index-DhJQOZHh.js → index-BjSWHyj1.js} +1 -1
  25. package/dist/{index-B2xCe29Z.js → index-BkoKoZbl.js} +1 -1
  26. package/dist/{index-Bes3atoZ.js → index-CG5LAGQp.js} +2 -2
  27. package/dist/{index-CD04dkRd.js → index-COmm7d4j.js} +1 -1
  28. package/dist/{index-CwvVx_5V.js → index-CVG3Z6rp.js} +3 -3
  29. package/dist/{index-DJqTfkOe.js → index-CWjwF2wn.js} +2 -2
  30. package/dist/{index-D2bXGJMB.js → index-CcB9d0A-.js} +2 -2
  31. package/dist/{index-ZBaLDzvn.js → index-CjCFTTI3.js} +1 -1
  32. package/dist/{index-NiQurze3.js → index-Cj_t_73x.js} +1 -1
  33. package/dist/{index-BOehk-Mo.js → index-Cl_94fZQ.js} +2 -2
  34. package/dist/{index--9zZnmyE.js → index-CyPwg8fV.js} +1 -1
  35. package/dist/{index-DiZHDEas.js → index-D4zDlgqU.js} +1 -1
  36. package/dist/{index-C-wSYnoD.js → index-D7ZzvopL.js} +2 -2
  37. package/dist/{index-DbN8jrOK.js → index-DCv60fUG.js} +2 -2
  38. package/dist/{index-Cy17m87b.js → index-DYyVGkv3.js} +2 -2
  39. package/dist/{index-DgvOxMoA.js → index-DkXBzlUL.js} +2 -2
  40. package/dist/{index-DfAWRc7u.js → index-Dp2q7ZPo.js} +2 -2
  41. package/dist/{index-Bxdq78c9.js → index-Dru8lW-_.js} +1 -1
  42. package/dist/{index-CMzci3SX.js → index-NJZaG-sl.js} +2 -2
  43. package/dist/{index-Lrse9db3.js → index-NqYSNDX9.js} +2 -2
  44. package/dist/{index-BGHQz2Uj.js → index-a6chYhIK.js} +2 -2
  45. package/dist/{index-BDvLu-0F.js → index-lf11EIvP.js} +2 -2
  46. package/dist/{index-6_pgVPOb.js → index-mCrtpdq2.js} +491 -435
  47. package/dist/{index-DVFXRZRw.js → index-q_pMlfx9.js} +4 -4
  48. package/dist/{index-CVJadZzs.js → index-vEKEZcff.js} +2 -2
  49. package/dist/index.es.js +2 -2
  50. package/dist/{mb-render-CDFmykM_.js → mb-render-DjSdDuaL.js} +8 -2
  51. package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-Db5Hce6z.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-QrM7rL99.js} +1 -1
  52. package/dist/{pagination-design-Dz7y8YKu.js → pagination-design-DJEw5vlL.js} +2 -2
  53. package/dist/paper-widget-design-C3rm4SzP.js +4 -0
  54. package/dist/{print-runtime-instance-Bq1p758u.js → print-runtime-instance-BtxZfq51.js} +1 -1
  55. package/dist/{print-snapshot-renderer-BWVZ-Lql.js → print-snapshot-renderer-0D5MUsR6.js} +3 -3
  56. package/dist/{qrcode-design-Dq0tczvD.js → qrcode-design-9jPH-S8z.js} +1 -1
  57. package/dist/{revo-grid.entry-BKZT_dju.js → revo-grid.entry-BhCFcCVS.js} +1 -1
  58. package/dist/{revogr-attribution_7.entry-CXdkYl1q.js → revogr-attribution_7.entry-icpuI3V8.js} +3 -3
  59. package/dist/{revogr-clipboard_3.entry-Dq9k6E4q.js → revogr-clipboard_3.entry-Dm2_h2RL.js} +2 -2
  60. package/dist/{revogr-data_4.entry-CpBkj9S_.js → revogr-data_4.entry-DlVEyI7J.js} +2 -2
  61. package/dist/{revogr-filter-panel.entry-Bu5hYWK7.js → revogr-filter-panel.entry-MJr7PMnd.js} +1 -1
  62. package/dist/seal-design-CtzWGxnH.js +4 -0
  63. package/dist/{serialnumber-design-DUqW6M9C.js → serialnumber-design-BsfJH6Kp.js} +1 -1
  64. package/dist/shared/index.es.js +2 -2
  65. package/dist/{single-field-drop-MXmkrdjF.js → single-field-drop-DXjppxDh.js} +2 -2
  66. package/dist/{size-editor-DCVa84rA.js → size-editor-DzQdRb-7.js} +1 -1
  67. package/dist/src/nocode-base/src/hooks/form-model/form-model-controller.d.ts +2 -0
  68. package/dist/src/nocode-base/src/hooks/material-consume-object/initialize-autofill.d.ts +17 -0
  69. package/dist/src/nocode-base/src/interface/render.d.ts +3 -1
  70. package/dist/src/nocode-base/src/interface/transform.d.ts +9 -1
  71. package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-design.vue.d.ts +1 -0
  72. package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-option-select.vue.d.ts +1 -0
  73. package/dist/src/shared/enum/field-type.d.ts +2 -2
  74. package/dist/{sub-table-factory-BBiAj7oz.js → sub-table-factory-Ddx70uYs.js} +2 -2
  75. package/dist/{text-design-BfXr3TcH.js → text-design-DmLrMqdk.js} +2 -2
  76. package/dist/{throttle-Cpk1LoGk-BtY6yO1U.js → throttle-Cpk1LoGk-DLVGpnFw.js} +1 -1
  77. package/dist/{timediff-design-BF-mVD2d.js → timediff-design-CYqz1SKQ.js} +1 -1
  78. package/dist/{trace-like-wrapper-2AsEoSS7.js → trace-like-wrapper-CVl0Vm8r.js} +2 -2
  79. package/dist/{value-editor.vue_vue_type_style_index_0_lang-D8_zt9JM.js → value-editor.vue_vue_type_style_index_0_lang-B0aWEk5D.js} +2 -2
  80. package/dist/web-render/index.es.js +3 -3
  81. package/dist/{widget-barcode-BMnwSzpx.js → widget-barcode-DwYihxgd.js} +4 -4
  82. package/dist/{widget-diagonal-iuAFZn-R.js → widget-diagonal-DWdxDYVl.js} +3 -3
  83. package/dist/{widget-image-sZeIt4K6.js → widget-image-D1SXIbMU.js} +5 -5
  84. package/dist/{widget-line-izrJUAAT.js → widget-line-BNTbSFkx.js} +2 -2
  85. package/dist/{widget-pagination-CTANdU2l.js → widget-pagination-25CKNe-i.js} +5 -5
  86. package/dist/{widget-power-OZD7bTxW.js → widget-power-BSjWdgM3.js} +3 -3
  87. package/dist/{widget-qrcode-xvyklot3.js → widget-qrcode-Kbe9Skrd.js} +3 -3
  88. package/dist/{widget-rangelimit-BZhTuRkT.js → widget-rangelimit-TWPoG8DX.js} +3 -3
  89. package/dist/{widget-serialnumber-BwUHV475.js → widget-serialnumber-uNkQzBIT.js} +1 -1
  90. package/dist/{widget-text-B8MzTxa3.js → widget-text-DH4r60jo.js} +5 -5
  91. package/dist/{widget-timediff-YAH8bbso.js → widget-timediff-Bv8VCgrv.js} +2 -2
  92. package/package.json +2 -2
  93. package/dist/paper-widget-design-BlIbv2tj.js +0 -4
  94. package/dist/seal-design-LHZWDjEb.js +0 -4
@@ -1,6 +1,6 @@
1
- import { n as normalizeFieldWidth } from "./dynamic-table-action-C__4AVW6.js";
1
+ import { n as normalizeFieldWidth } from "./dynamic-table-action-Dn_iw4tV.js";
2
2
  import { get, pick } from "lodash-es";
3
- import { F as FIELD_TYPE } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
3
+ import { F as FIELD_TYPE } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
4
4
  import { f as fontStyleAttrs } from "./config.enum-B8UZQTON.js";
5
5
  const DESIGNER_DEFAULT_TYPES = /* @__PURE__ */ new Set([
6
6
  FIELD_TYPE.DEVICE,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, toRaw, shallowRef, computed, ref, readonly, onMounted, watch, normalizeClass, onBeforeUnmount, h as h$1, watchEffect, unref, createVNode, reactive } from "vue";
2
- import { N as commonjsGlobal, Q as getDefaultExportFromCjs } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
3
- import { r as require$$0 } from "./index-BGHQz2Uj.js";
2
+ import { N as commonjsGlobal, Q as getDefaultExportFromCjs } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
3
+ import { r as require$$0 } from "./index-a6chYhIK.js";
4
4
  var window_1;
5
5
  var hasRequiredWindow;
6
6
  function requireWindow() {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString } from "vue";
2
- import { a9 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
2
+ import { a9 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
3
3
  const _hoisted_1 = { class: "align-group-box" };
4
4
  const _hoisted_2 = ["onClick"];
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, createElementVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { pick } from "lodash-es";
3
- import { u as useSpreadSheet, h as useModelFields, l as loadBwip } from "./index-6_pgVPOb.js";
4
- import { R as PaperWidgeValueType, a9 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
3
+ import { u as useSpreadSheet, h as useModelFields, l as loadBwip } from "./index-mCrtpdq2.js";
4
+ import { R as PaperWidgeValueType, a9 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
5
5
  import "dayjs";
6
6
  import "@gct-paas/form-base";
7
7
  import "ant-design-vue";
@@ -1,14 +1,14 @@
1
- import { p as api, a0 as PlatformEnum, F as FIELD_TYPE, bj as getRowId, bk as findRuntimeTableRow, b9 as RenderModeEnum, C as ComponentTypeEnum, aB as findFieldMain, c as getProfileByTableType, d as getBusinessProfileByRefModelType, b as isBusinessSubTableProfile, ax as RangeValidateMode, bw as assembleRules, bx as isAttachFieldActive, aK as Dependency_ENUM, bl as calculateFormula, aJ as ASSIGNMENTSTRATEGY_ENUM, U as getParseFormulaVarInfos, by as fetchHistoryConsume, bz as isBomGranted, aW as renderUtils, bv as uuid2, bA as parseFrontConfig, aN as CheckDsTypeEnum, aH as transformUtils, bB as baseDataUtils, bC as initializeSealFields, Z as FormTypeEnum, bD as normalizeToArray, bE as safeParseArray, bF as BpmnNodeTypeEnum, bG as mergeByMultiKey, a9 as _export_sfc, bH as evaluateInspectionDecisionRule, bI as areValidationCommentsEqual, bJ as useNocodeEmitter, bK as commonUtils, aL as EntityModelCategoryEnum } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
2
- import { aQ, aS, b0, a2, bL, bM, B, bN, A, aj, bO, bP, bQ, bi, bR, aT, aC, aR, aO, aP, bS, ak, ao, bT, bU, aI, a4, ai, aD, bV, a1, am, L, bW, bX, bY, O, s, P, ab, q, R, G, bZ, b_, ay, a7, a3, a5, a6, a8, h, b$, an, ar, al, c0, c1, c2, c3, bh, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, bm, ce, cf, aZ, cg, b1, b2, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, aY, cr, b3, bf, cs, ct, cu, ap, v, cv, cw, cx, bn, a_ } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
3
- import { T as getRuntimeDataFieldId, F as parseRuntimeFieldPath, U as buildRuntimeFieldPath, f as findFieldProfile, V as resolveRuntimeFieldProps, W as resolveRuntimeFieldState, X as getRuntimeDependencyOutputKey, Y as isRowAddedInCurrentFormChange, t as MaterialConsumptionPatternEnum, Z as MaterialConsumeTableController, $ as setFormulaParamsConfig, a0 as normalizeRuntime, K as createRuntimeInstanceContext, R as RuntimeFormStateStore, a1 as RuntimeSheetService, g as getBusinessFieldKey, a2 as validateObjectBomQtyOnSubmit, a3 as closeValidatorPopovers, a4 as enrichFormChangeRowDetails, N as NCB_PROVIDE, L as RuntimeInstanceRegistry, a5 as useMaterialBalance, a6 as collectFormChangeFieldLocations, a7 as nextFormChangeRowViewHistoryId } from "../dynamic-table-action-C__4AVW6.js";
4
- import { B as B2, a8 as a82, i, _, a9, P as P2, aa, Q, E, ab as ab2, ac, ad, ae, af, M, a, ag, d, ah, ai as ai2, aj as aj2, ak as ak2, al as al2, am as am2, an as an2, ao as ao2, z, ap as ap2, q as q2, aq, e, ar as ar2, as, at, au, p, A as A2, av, aw, ax, ay as ay2, j, C, h as h2, az, aA, aB, aC as aC2, aD as aD2, aE, w, r, aF, x, m, aG, s as s2, aH, H, I, u, y, J, l, o, G as G2, k, v as v2 } from "../dynamic-table-action-C__4AVW6.js";
1
+ import { p as api, a0 as PlatformEnum, F as FIELD_TYPE, bj as getRowId, bk as findRuntimeTableRow, b9 as RenderModeEnum, C as ComponentTypeEnum, aB as findFieldMain, c as getProfileByTableType, d as getBusinessProfileByRefModelType, b as isBusinessSubTableProfile, ax as RangeValidateMode, bw as assembleRules, bx as isAttachFieldActive, aK as Dependency_ENUM, bl as calculateFormula, aJ as ASSIGNMENTSTRATEGY_ENUM, U as getParseFormulaVarInfos, by as fetchHistoryConsume, bz as isBomGranted, aW as renderUtils, bv as uuid2, bA as parseFrontConfig, aN as CheckDsTypeEnum, aH as transformUtils, bB as baseDataUtils, bC as initializeSealFields, Z as FormTypeEnum, bD as normalizeToArray, bE as safeParseArray, bF as BpmnNodeTypeEnum, bG as mergeByMultiKey, a9 as _export_sfc, bH as evaluateInspectionDecisionRule, bI as areValidationCommentsEqual, bJ as useNocodeEmitter, bK as commonUtils, aL as EntityModelCategoryEnum } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
2
+ import { aQ, aS, b0, a2, bL, bM, B, bN, A, aj, bO, bP, bQ, bi, bR, aT, aC, aR, aO, aP, bS, ak, ao, bT, bU, aI, a4, ai, aD, bV, a1, am, L, bW, bX, bY, O, s, P, ab, q, R, G, bZ, b_, ay, a7, a3, a5, a6, a8, h, b$, an, ar, al, c0, c1, c2, c3, bh, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, bm, ce, cf, aZ, cg, b1, b2, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, aY, cr, b3, bf, cs, ct, cu, ap, v, cv, cw, cx, bn, a_ } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
3
+ import { T as getRuntimeDataFieldId, F as parseRuntimeFieldPath, U as buildRuntimeFieldPath, f as findFieldProfile, V as resolveRuntimeFieldProps, W as resolveRuntimeFieldState, X as getRuntimeDependencyOutputKey, Y as isRowAddedInCurrentFormChange, t as MaterialConsumptionPatternEnum, Z as MaterialConsumeTableController, $ as setFormulaParamsConfig, a0 as normalizeRuntime, K as createRuntimeInstanceContext, R as RuntimeFormStateStore, a1 as RuntimeSheetService, g as getBusinessFieldKey, a2 as validateObjectBomQtyOnSubmit, a3 as closeValidatorPopovers, a4 as enrichFormChangeRowDetails, N as NCB_PROVIDE, L as RuntimeInstanceRegistry, a5 as useMaterialBalance, a6 as collectFormChangeFieldLocations, a7 as nextFormChangeRowViewHistoryId } from "../dynamic-table-action-Dn_iw4tV.js";
4
+ import { B as B2, a8 as a82, i, _, a9, P as P2, aa, Q, E, ab as ab2, ac, ad, ae, af, M, a, ag, d, ah, ai as ai2, aj as aj2, ak as ak2, al as al2, am as am2, an as an2, ao as ao2, z, ap as ap2, q as q2, aq, e, ar as ar2, as, at, au, p, A as A2, av, aw, ax, ay as ay2, j, C, h as h2, az, aA, aB, aC as aC2, aD as aD2, aE, w, r, aF, x, m, aG, s as s2, aH, H, I, u, y, J, l, o, G as G2, k, v as v2 } from "../dynamic-table-action-Dn_iw4tV.js";
5
5
  import { toRaw, watch, toRef, computed, defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, shallowRef, markRaw, ref, provide, onUnmounted, reactive, onBeforeUnmount } from "vue";
6
6
  import { cloneDeep, defaults, isEmpty, merge, get } from "lodash-es";
7
7
  import "dayjs";
8
- import { S as SubTableCoreFactory, R as RuntimeInstanceController } from "../sub-table-factory-BBiAj7oz.js";
9
- import { A as A3, D, M as M2, a as a10, P as P3, b, c, d as d2, e as e2, W, f, g, h as h3 } from "../sub-table-factory-BBiAj7oz.js";
8
+ import { S as SubTableCoreFactory, R as RuntimeInstanceController } from "../sub-table-factory-Ddx70uYs.js";
9
+ import { A as A3, D, M as M2, a as a10, P as P3, b, c, d as d2, e as e2, W, f, g, h as h3 } from "../sub-table-factory-Ddx70uYs.js";
10
10
  import { createDataSourceManager, getLegacyFieldFillTargets, createFieldFillRuntime, buildFieldFillRows, isFieldFillTargetProtected, getFieldFillColumn, buildDataSourceContext } from "@gct-paas/form-base";
11
- import { B as B3, F, M as M3, a as a11, u as u2 } from "../mb-render-CDFmykM_.js";
11
+ import { B as B3, F, M as M3, a as a11, u as u2 } from "../mb-render-DjSdDuaL.js";
12
12
  const InstanceStatusValues = {
13
13
  /** 作废状态 */
14
14
  ABANDON: "ABANDON",
@@ -1059,6 +1059,71 @@ class FormTmplBomController {
1059
1059
  };
1060
1060
  }
1061
1061
  }
1062
+ async function prepareObjectProductDefaults({
1063
+ enabled,
1064
+ fields,
1065
+ objectInitialValues = []
1066
+ }) {
1067
+ const defaults2 = /* @__PURE__ */ new WeakMap();
1068
+ if (!enabled) return defaults2;
1069
+ const requests = /* @__PURE__ */ new Map();
1070
+ const tasks = [];
1071
+ function fetchProduct(productId) {
1072
+ const existing = requests.get(productId);
1073
+ if (existing) return existing;
1074
+ const request = (async () => {
1075
+ const result = await api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey(
1076
+ {
1077
+ modelCategory: "entity",
1078
+ modelKey: "em_product",
1079
+ bsKey: "rdoGetVersionById"
1080
+ },
1081
+ // 沿用现有接口约定,传完整默认值,不拆分版本 ID。
1082
+ { id: productId }
1083
+ );
1084
+ const product = result?.data;
1085
+ if (!product || typeof product !== "object" || Array.isArray(product) || Object.keys(product).length === 0) {
1086
+ throw new Error(`未找到默认物料详情:${productId}`);
1087
+ }
1088
+ return { ...product, _DICT: result?.dict ?? product._DICT };
1089
+ })();
1090
+ requests.set(productId, request);
1091
+ return request;
1092
+ }
1093
+ for (const entry of fields) {
1094
+ if (!entry || typeof entry !== "object") continue;
1095
+ const field = entry;
1096
+ if (typeof field.fieldId !== "string" || !field.belongingObject || field.fieldType !== FIELD_TYPE.PRODUCT || field.isFieldModel || field.subFieldKey || field.subModelKey) {
1097
+ continue;
1098
+ }
1099
+ const configured = objectInitialValues.find(
1100
+ (item) => item.objectField === field.belongingObject
1101
+ );
1102
+ if (!configured?.values || !Object.prototype.hasOwnProperty.call(configured.values, field.fieldId)) {
1103
+ continue;
1104
+ }
1105
+ const productDefault = {
1106
+ value: configured.values[field.fieldId]
1107
+ };
1108
+ defaults2.set(entry, productDefault);
1109
+ const productId = productDefault.value;
1110
+ const needsAutofill = field.enableAutofill !== false && field.autofillRules?.some((rule) => !!rule.toField);
1111
+ if (!needsAutofill || typeof productId !== "string" || productId === "") continue;
1112
+ tasks.push(
1113
+ fetchProduct(productId).then(
1114
+ (sourceData) => {
1115
+ productDefault.sourceData = sourceData;
1116
+ },
1117
+ (error) => {
1118
+ const reason = error instanceof Error ? error.message : String(error);
1119
+ throw new Error(`对象初始化数据填充失败,字段 ${field.fieldId}:${reason}`);
1120
+ }
1121
+ )
1122
+ );
1123
+ }
1124
+ await Promise.all(tasks);
1125
+ return defaults2;
1126
+ }
1062
1127
  async function getModelQueries(opts) {
1063
1128
  const isEdhr = await isEdhrSuite();
1064
1129
  if (!isEdhr || !opts.mainMaterialNo) {
@@ -1456,7 +1521,13 @@ function createRuntimeInstanceInitializer(props, payload, getConsumeData) {
1456
1521
  params: { id: paramsConfig?.warehouseId }
1457
1522
  }
1458
1523
  ]);
1524
+ const objectProductDefaults = await prepareObjectProductDefaults({
1525
+ enabled: fillModeType === RenderModeEnum.FormMode && selfInfo.dataStatus !== "STASH" && selfInfo.dataStatus !== "SUBMIT",
1526
+ fields: fieldInfoMap.useDefaultValueFields,
1527
+ objectInitialValues: runtimeContext.formConfig.objectInitialValues
1528
+ });
1459
1529
  const defaultDataMap = renderUtils.getDefaultValueMapByField({
1530
+ objectProductDefaults,
1460
1531
  defaultValueFields: fieldInfoMap.useDefaultValueFields,
1461
1532
  mainMaterialNo: paramsConfig?.materialNo || selfInfo.materialNo,
1462
1533
  mainRelatedLotNo: paramsConfig?.relatedLotNo,
@@ -1549,6 +1620,15 @@ function createRuntimeInstanceInitializer(props, payload, getConsumeData) {
1549
1620
  });
1550
1621
  initializeSealFields(floatingFields, formState);
1551
1622
  }
1623
+ await transformUtils.getEventInitDataLoaded({
1624
+ formConfig: runtimeContext.formConfig,
1625
+ formState,
1626
+ viewMode: fillModeType,
1627
+ dataStatus: selfInfo.dataStatus,
1628
+ ofCtx: { formPrint: payload.formPrint, id: result.id }
1629
+ }).catch((error) => {
1630
+ console.error("Error in getEventInitDataLoaded:", error);
1631
+ });
1552
1632
  runtimeFormStateStore = new RuntimeFormStateStore(
1553
1633
  formState,
1554
1634
  // 子表信息覆盖普通/固定/检验表、二维关联列以及各类业务表;不能只依赖已放置字段。
@@ -1975,7 +2055,13 @@ function createRuntimePersistenceAccess(runtimeRegistry, props, payload) {
1975
2055
  const signatureKeys = (runtimeRecord.context.businessIndex.useSignatureFields || []).map(
1976
2056
  (item) => item.fieldId
1977
2057
  );
1978
- const idsFormState = transformUtils.getFormDataIdsMap(newFormState, signatureKeys);
2058
+ const idsFormState = transformUtils.getFormDataIdsMap(
2059
+ newFormState,
2060
+ signatureKeys,
2061
+ (path) => runtimeRecord.fields.findByPath(path).some(
2062
+ ({ widget, subFieldKey }) => subFieldKey !== path && [FIELD_TYPE.DATE, FIELD_TYPE.DATE_TIME].includes(widget?.props.fieldType)
2063
+ )
2064
+ );
1979
2065
  if (saveToken ? !runtimeRecord.persistence.completeSave(saveToken) : requestedRevision !== runtimeRecord.formState.revision) {
1980
2066
  return false;
1981
2067
  }
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createBlock } from "vue";
2
- import { h as useModelFields, D as Diagonal } from "./index-6_pgVPOb.js";
3
- import { ap as resolveDiagonalVertex, a9 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
2
+ import { h as useModelFields, D as Diagonal } from "./index-mCrtpdq2.js";
3
+ import { ap as resolveDiagonalVertex, a9 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
4
4
  import "lodash-es";
5
5
  import "dayjs";
6
6
  import "@gct-paas/form-base";
@@ -1,11 +1,11 @@
1
1
  import { reactive, toRaw, computed, watch, onScopeDispose, inject, h, shallowReactive, markRaw, ref, nextTick, toRef, provide, defineComponent, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, Fragment, renderList, onUnmounted, isVNode, onMounted, onBeforeMount, resolveComponent, createBlock, withCtx, createTextVNode } from "vue";
2
- import { aj as CellWidgetViewState, F as FIELD_TYPE, b9 as RenderModeEnum, Z as FormTypeEnum, bF as BpmnNodeTypeEnum, cy as getFieldPlaceholder, bX as MobileFillTypeEnum, C as ComponentTypeEnum, a0 as PlatformEnum, cz as isReferenceOptionActive, p as api, bv as uuid2, c5 as calcUtils, bk as findRuntimeTableRow, c9 as ensureTableRowKeys, c2 as bindRuntimeTableColumns, bj as getRowId, cA as FRONT_ROW_KEY, co as isTableRowKeyMatch, bx as isAttachFieldActive, cB as filterRulesByTrigger, cC as isEmptyValue$1, c6 as decodeTableCellRowKey, c8 as ensureFrontRowKey, b1 as getParseRuleInfo, aH as transformUtils, aY as materialCheck, aZ as getLotLockedReason, a_ as validateReinspectionDate, bo as FormulaRuleFieldKeyEnum, h as SubTableType, b2 as getParseRuleValue, cD as buildError, I as CreateType, bm as findRuntimeParentRow, aK as Dependency_ENUM, aJ as ASSIGNMENTSTRATEGY_ENUM, bK as commonUtils, aO as DeviceLink, a9 as _export_sfc, ci as getRenderedRuntimeTableCell, A as CellType, cs as relocateDeletedRowsToEnd, cE as resetTableRowIdentity, K as useModal, cF as q, cG as QUICK_FILL_ALLOWED_FIELDS, cH as groupFixedTableRows, cI as processQuickFillRows, cJ as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
2
+ import { aj as CellWidgetViewState, F as FIELD_TYPE, b9 as RenderModeEnum, Z as FormTypeEnum, bF as BpmnNodeTypeEnum, cy as getFieldPlaceholder, bX as MobileFillTypeEnum, C as ComponentTypeEnum, a0 as PlatformEnum, cz as isReferenceOptionActive, p as api, bv as uuid2, c5 as calcUtils, bk as findRuntimeTableRow, c9 as ensureTableRowKeys, c2 as bindRuntimeTableColumns, bj as getRowId, cA as FRONT_ROW_KEY, co as isTableRowKeyMatch, bx as isAttachFieldActive, cB as filterRulesByTrigger, cC as isEmptyValue$1, c6 as decodeTableCellRowKey, c8 as ensureFrontRowKey, b1 as getParseRuleInfo, aH as transformUtils, aY as materialCheck, aZ as getLotLockedReason, a_ as validateReinspectionDate, bo as FormulaRuleFieldKeyEnum, h as SubTableType, b2 as getParseRuleValue, cD as buildError, I as CreateType, bm as findRuntimeParentRow, aK as Dependency_ENUM, aJ as ASSIGNMENTSTRATEGY_ENUM, bK as commonUtils, aO as DeviceLink, a9 as _export_sfc, ci as getRenderedRuntimeTableCell, A as CellType, cs as relocateDeletedRowsToEnd, cE as resetTableRowIdentity, K as useModal, cF as q, cG as QUICK_FILL_ALLOWED_FIELDS, cH as groupFixedTableRows, cI as processQuickFillRows, cJ as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
3
3
  import { cloneDeep, isEmpty, has, pickBy, isNil, mergeWith, omit, last, pick, merge } from "lodash-es";
4
4
  import dayjs from "dayjs";
5
5
  import { a as useNamespace, I as Icon } from "./AntdIcon-DCIaV352.js";
6
6
  import "@gct-paas/form-base";
7
7
  import { Modal, message } from "ant-design-vue";
8
- import { u as useFormModel } from "./mb-render-CDFmykM_.js";
8
+ import { u as useFormModel } from "./mb-render-DjSdDuaL.js";
9
9
  var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
10
10
  MaterialConsumptionPatternEnum2["RECORD"] = "record";
11
11
  MaterialConsumptionPatternEnum2["BOM"] = "bom";
@@ -9524,7 +9524,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9524
9524
  createElementVNode("i", { class: "iconfont icon-zhuyi" }),
9525
9525
  createElementVNode("ul", { class: "tips-list" }, [
9526
9526
  createElementVNode("li", null, "可将Excel内容粘贴到表格中,支持使用复制、粘贴、删除快捷键"),
9527
- createElementVNode("li", null, " 表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、LOT/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割) ")
9527
+ createElementVNode("li", null, " 表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、批次/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割) ")
9528
9528
  ])
9529
9529
  ], -1)),
9530
9530
  createElementVNode("div", {
@@ -9549,7 +9549,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9549
9549
  };
9550
9550
  }
9551
9551
  });
9552
- const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b589958f"]]);
9552
+ const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-58540cb3"]]);
9553
9553
  const _hoisted_1$1 = {
9554
9554
  key: 1,
9555
9555
  class: "sub-table-action__subtitle"
@@ -10322,7 +10322,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10322
10322
  createElementVNode("i", { class: "iconfont icon-zhuyi" }),
10323
10323
  createElementVNode("ul", { class: "tips-list" }, [
10324
10324
  createElementVNode("li", null, "可将Excel内容粘贴到表格中,支持使用复制、粘贴、删除快捷键"),
10325
- createElementVNode("li", null, "表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、LOT/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割)"),
10325
+ createElementVNode("li", null, "表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、批次/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割)"),
10326
10326
  createElementVNode("li", null, "当前快速填报最多支持200行")
10327
10327
  ])
10328
10328
  ], -1)),
@@ -10342,7 +10342,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10342
10342
  };
10343
10343
  }
10344
10344
  });
10345
- const DynamicQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ae9acd3f"]]);
10345
+ const DynamicQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-840aca0a"]]);
10346
10346
  const _sfc_main = /* @__PURE__ */ defineComponent({
10347
10347
  __name: "dynamic-table-action",
10348
10348
  props: {
@@ -3677,7 +3677,7 @@ const TABLE_TYPE$2 = "entrust-steril-batch-list";
3677
3677
  const profile$3 = {
3678
3678
  type: TABLE_TYPE$2,
3679
3679
  label: "生产批次灭菌表",
3680
- labelKey: "sys.onlineForm.subTableType.STERILIZE_BATCH",
3680
+ labelKey: "dhr.pageDesigner.fieldCmp.sterilize_batch",
3681
3681
  category: "business",
3682
3682
  ribbonAction: "entrust-steril-batch-list",
3683
3683
  ribbonGroup: "灭菌",
@@ -3869,7 +3869,7 @@ const TABLE_TYPE$1 = "pretreatment-list";
3869
3869
  const profile$2 = {
3870
3870
  type: TABLE_TYPE$1,
3871
3871
  label: "产前表",
3872
- labelKey: "sys.onlineForm.subTableType.PRETREATMENT_LIST",
3872
+ labelKey: "dhr.pageDesigner.fieldCmp.pretreatment_list",
3873
3873
  category: "business",
3874
3874
  ribbonAction: "pretreatment-list",
3875
3875
  ribbonGroup: "产前",
@@ -60556,6 +60556,21 @@ const transformUtils = {
60556
60556
  }
60557
60557
  return {};
60558
60558
  },
60559
+ /** 数据加载完成事件;全部 Sheet 的数据合并后、创建 Store 和分页前只执行一次。 */
60560
+ getEventInitDataLoaded: async (payload) => {
60561
+ const { formConfig, formState, viewMode, dataStatus, ofCtx } = payload;
60562
+ if (viewMode !== RenderModeEnum.FormMode || !formConfig?.javascript) return;
60563
+ const codeInstance = setCodeRunner(formConfig.javascript, formState, ofCtx);
60564
+ try {
60565
+ if (typeof codeInstance.exports?.GCT_BUILT_IN_DATA_LOADED !== "function") return;
60566
+ await codeInstance.invoke("GCT_BUILT_IN_DATA_LOADED", {
60567
+ isDataProcessed: dataStatus === "STASH" || dataStatus === "SUBMIT",
60568
+ formState
60569
+ });
60570
+ } finally {
60571
+ codeInstance.dispose();
60572
+ }
60573
+ },
60559
60574
  /** 创建字段事件执行器;注册后由 RuntimeInstanceRecord 持有,全部 Sheet 共用。 */
60560
60575
  createScriptRunner: (payload) => {
60561
60576
  const { formConfig, viewMode, ofCtx } = payload || {};
@@ -60798,12 +60813,11 @@ const transformUtils = {
60798
60813
  console.log("0506 数据转成真实提交数据(二维表要平铺)", realFormData);
60799
60814
  return omit(realFormData, filterKeys);
60800
60815
  },
60801
- getFormDataIdsMap: (formData, preserveKeys = []) => {
60816
+ getFormDataIdsMap: (formData, preserveKeys = [], shouldPreserveField) => {
60802
60817
  const preserveKeySet = /* @__PURE__ */ new Set([FRONT_ROW_KEY, "group_", ...preserveKeys.filter(Boolean)]);
60803
- const shouldKeepAsIs = (key, isFirstLevel) => key === "id_" || isFirstLevel && key.startsWith("record_no_") || preserveKeySet.has(key);
60804
- const processEntry = (entry, isFirstLevel = false) => {
60818
+ const processEntry = (entry, isFirstLevel = false, path = "") => {
60805
60819
  if (Array.isArray(entry)) {
60806
- const processed = entry.map((item) => processEntry(item, false)).filter(Boolean);
60820
+ const processed = entry.map((item, index2) => processEntry(item, false, `${path}.${index2}`)).filter(Boolean);
60807
60821
  return processed.length ? processed : void 0;
60808
60822
  }
60809
60823
  if (entry && typeof entry === "object") {
@@ -60811,23 +60825,15 @@ const transformUtils = {
60811
60825
  if ("id_" in entry) {
60812
60826
  result.id_ = entry.id_;
60813
60827
  }
60814
- if (isFirstLevel) {
60815
- for (const [key, value] of Object.entries(entry)) {
60816
- if (key.startsWith("record_no_")) {
60817
- result[key] = value;
60818
- }
60819
- }
60820
- }
60821
60828
  for (const [key, value] of Object.entries(entry)) {
60822
- if (preserveKeySet.has(key) && !(key in result)) {
60829
+ const fieldPath = path ? `${path}.${key}` : key;
60830
+ if (key === "id_" || isFirstLevel && key.startsWith("record_no_") || preserveKeySet.has(key) || shouldPreserveField?.(fieldPath)) {
60823
60831
  result[key] = value;
60824
- }
60825
- }
60826
- for (const [key, value] of Object.entries(entry)) {
60827
- if (shouldKeepAsIs(key, isFirstLevel)) continue;
60828
- const processed = processEntry(value, false);
60829
- if (processed !== void 0) {
60830
- result[key] = processed;
60832
+ } else {
60833
+ const processed = processEntry(value, false, fieldPath);
60834
+ if (processed !== void 0) {
60835
+ result[key] = processed;
60836
+ }
60831
60837
  }
60832
60838
  }
60833
60839
  return Object.keys(result).length ? result : void 0;
@@ -62891,6 +62897,7 @@ const renderUtils = {
62891
62897
  /** 获取默认值集合 */
62892
62898
  getDefaultValueMapByField: ({
62893
62899
  defaultValueFields,
62900
+ objectProductDefaults = /* @__PURE__ */ new WeakMap(),
62894
62901
  mainMaterialNo = void 0,
62895
62902
  mainRelatedLotNo = void 0,
62896
62903
  mainProductName = void 0,
@@ -62926,7 +62933,10 @@ const renderUtils = {
62926
62933
  };
62927
62934
  const getDefaultValue = (field) => {
62928
62935
  const { fieldType, timeType, dateType, defaultValue, belongingObject, bizType } = field;
62929
- if (belongingObject && (fieldType === FIELD_TYPE.PRODUCT || fieldType === FIELD_TYPE.MATERIAL_NO)) {
62936
+ if (belongingObject && fieldType === FIELD_TYPE.PRODUCT) {
62937
+ return objectProductDefaults.get(field)?.value;
62938
+ }
62939
+ if (belongingObject && fieldType === FIELD_TYPE.MATERIAL_NO) {
62930
62940
  return void 0;
62931
62941
  }
62932
62942
  if (bizType === FIELD_TYPE.WAREHOUSE || fieldType === FIELD_TYPE.WAREHOUSE) {
@@ -62994,6 +63004,7 @@ const renderUtils = {
62994
63004
  assignValue(key, `${fieldId}_id_`, mainSterilizationLotId);
62995
63005
  }
62996
63006
  if (!configuredDefaultFields.has(field) && enableAutofill !== false && Array.isArray(autofillRules) && autofillRules.length > 0) {
63007
+ const isObjectProduct = !!field.belongingObject && fieldType === FIELD_TYPE.PRODUCT;
62997
63008
  let sourceData = fieldType === FIELD_TYPE.PRODUCT ? productData : fieldType === FIELD_TYPE.ROUTING_OPERATION ? operationData : null;
62998
63009
  if (fieldType === FIELD_TYPE.MFG_ORDER) {
62999
63010
  sourceData = mfgOrderData;
@@ -63013,14 +63024,19 @@ const renderUtils = {
63013
63024
  if (bizType === FIELD_TYPE.WAREHOUSE) {
63014
63025
  sourceData = warehouseData;
63015
63026
  }
63027
+ if (isObjectProduct) {
63028
+ sourceData = objectProductDefaults.get(field)?.sourceData;
63029
+ }
63016
63030
  if (sourceData) {
63017
- autofillRules.forEach(({ fromField, toField, toFieldType }) => {
63031
+ autofillRules.forEach(({ fromField, toField, toFieldType, fromSubTableField }) => {
63032
+ if (!toField) return;
63033
+ const targetKey = isObjectProduct ? fromSubTableField || key : key;
63018
63034
  if (fromField === "uom_id_" && sourceData?.[fromField] && toFieldType !== FIELD_TYPE.REF) {
63019
- const dictVal = sourceData?._DICT?.[fromField][sourceData?.[fromField]];
63035
+ const dictVal = sourceData?._DICT?.[fromField]?.[sourceData?.[fromField]];
63020
63036
  const val = Array.isArray(dictVal) ? dictVal[0] : dictVal || sourceData?.[fromField];
63021
- assignValue(key, toField, val);
63037
+ assignValue(targetKey, toField, val);
63022
63038
  } else {
63023
- assignValue(key, toField, sourceData?.[fromField]);
63039
+ assignValue(targetKey, toField, sourceData?.[fromField]);
63024
63040
  }
63025
63041
  });
63026
63042
  }
@@ -67467,27 +67483,27 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
67467
67483
  case "revo-grid":
67468
67484
  return import(
67469
67485
  /* webpackMode: "lazy" */
67470
- "./revo-grid.entry-BKZT_dju.js"
67486
+ "./revo-grid.entry-BhCFcCVS.js"
67471
67487
  ).then(processMod, consoleError);
67472
67488
  case "revogr-filter-panel":
67473
67489
  return import(
67474
67490
  /* webpackMode: "lazy" */
67475
- "./revogr-filter-panel.entry-Bu5hYWK7.js"
67491
+ "./revogr-filter-panel.entry-MJr7PMnd.js"
67476
67492
  ).then(processMod, consoleError);
67477
67493
  case "revogr-attribution_7":
67478
67494
  return import(
67479
67495
  /* webpackMode: "lazy" */
67480
- "./revogr-attribution_7.entry-CXdkYl1q.js"
67496
+ "./revogr-attribution_7.entry-icpuI3V8.js"
67481
67497
  ).then(processMod, consoleError);
67482
67498
  case "revogr-clipboard_3":
67483
67499
  return import(
67484
67500
  /* webpackMode: "lazy" */
67485
- "./revogr-clipboard_3.entry-Dq9k6E4q.js"
67501
+ "./revogr-clipboard_3.entry-Dm2_h2RL.js"
67486
67502
  ).then(processMod, consoleError);
67487
67503
  case "revogr-data_4":
67488
67504
  return import(
67489
67505
  /* webpackMode: "lazy" */
67490
- "./revogr-data_4.entry-CpBkj9S_.js"
67506
+ "./revogr-data_4.entry-DlVEyI7J.js"
67491
67507
  ).then(processMod, consoleError);
67492
67508
  }
67493
67509
  }
@@ -1,4 +1,4 @@
1
- import { ek as EDIT_INPUT_WR, el as keyValues, ec as codesLetter } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BAl7OidW.js";
1
+ import { ek as EDIT_INPUT_WR, el as keyValues, ec as codesLetter } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Cz-fpECL.js";
2
2
  function isClear(code) {
3
3
  return codesLetter.BACKSPACE === code || codesLetter.DELETE === code;
4
4
  }