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

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 (112) hide show
  1. package/dist/{BaseComponent-BlDgF4NL.js → BaseComponent-ByKSQlX5.js} +2 -2
  2. package/dist/{VueVideoPlayer-abpwAqu3.js → VueVideoPlayer-D9kpfmiz.js} +2 -2
  3. package/dist/{align-editor-BdF6r-Gs.js → align-editor-lWVPNKlR.js} +1 -1
  4. package/dist/{barcode-design-Dqzu8TED.js → barcode-design-zpWBlelw.js} +2 -2
  5. package/dist/base/index.es.js +352 -110
  6. package/dist/{diagonal-design-OOLJ1YWE.js → diagonal-design-CzRKVjcY.js} +2 -2
  7. package/dist/{dynamic-table-action-C__4AVW6.js → dynamic-table-action-DkHb1ST4.js} +150 -150
  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-CAg9oyuD.js} +578 -521
  9. package/dist/{edit.utils-CXmmCnxE-CaVD32MC.js → edit.utils-CXmmCnxE-DIhkrimt.js} +1 -1
  10. package/dist/excel.css +359 -256
  11. package/dist/{exceljs.min-C3uJ_Ieg.js → exceljs.min-DoNsTxQp.js} +2 -2
  12. package/dist/{font-editor-BZvGZaYO.js → font-editor-N7060zuX.js} +3 -3
  13. package/dist/{image-design-Dt_97Q--.js → image-design-fXKNGIm3.js} +2 -2
  14. package/dist/{index-BOehk-Mo.js → index-7J6OP2x9.js} +2 -2
  15. package/dist/{index-Bn4BqmG_.js → index-8A45IOjw.js} +2 -2
  16. package/dist/{index-DMVoiSyn.js → index-8BLKPnwH.js} +1 -1
  17. package/dist/{index-DzAPpHun.js → index-B5FuofNW.js} +2 -2
  18. package/dist/{index-DfAWRc7u.js → index-B6fCHnZl.js} +2 -2
  19. package/dist/{index-CKnArHCM.js → index-BA4zmgdk.js} +2 -2
  20. package/dist/{index-6_pgVPOb.js → index-BDRyjPGr.js} +651 -450
  21. package/dist/{index-D2bXGJMB.js → index-BEX6lJX9.js} +2 -2
  22. package/dist/{index-CwvVx_5V.js → index-BJA3YJns.js} +3 -3
  23. package/dist/{index-CD04dkRd.js → index-BXxzWXS4.js} +1 -1
  24. package/dist/{index-Lrse9db3.js → index-Bgh8yfAl.js} +2 -2
  25. package/dist/{index-C-wSYnoD.js → index-Bh-tmh-F.js} +2 -2
  26. package/dist/{index-Bxdq78c9.js → index-C4Mlck0_.js} +1 -1
  27. package/dist/{index-DLx-4gQ_.js → index-C5IwDker.js} +4 -4
  28. package/dist/{index-Cvj6_0dy.js → index-C6STl6m-.js} +1 -1
  29. package/dist/{index-DiZHDEas.js → index-CCw8gM1y.js} +1 -1
  30. package/dist/{index-DJqTfkOe.js → index-CZIuP6b-.js} +2 -2
  31. package/dist/{index-ZBaLDzvn.js → index-CaojJi0S.js} +1 -1
  32. package/dist/{index-BcSq5laa.js → index-CbeaPNDv.js} +2 -2
  33. package/dist/{index-DbN8jrOK.js → index-CfY2WTcN.js} +2 -2
  34. package/dist/{index-Cy3658Zd.js → index-CtHy6vBq.js} +3 -3
  35. package/dist/{index-CMzci3SX.js → index-CuHKZOUw.js} +2 -2
  36. package/dist/{index-Bes3atoZ.js → index-Cza077GN.js} +2 -2
  37. package/dist/{index-DgvOxMoA.js → index-DGyygsxH.js} +2 -2
  38. package/dist/{index-DhJQOZHh.js → index-DSUDSbPf.js} +1 -1
  39. package/dist/{index-Cy17m87b.js → index-DeEz6LI3.js} +2 -2
  40. package/dist/{index-B2xCe29Z.js → index-DgbgqO-w.js} +1 -1
  41. package/dist/{index-BGHQz2Uj.js → index-DnHsEIgl.js} +2 -2
  42. package/dist/{index-D4lTMizD.js → index-Xx36PP2U.js} +2 -2
  43. package/dist/{index-CVJadZzs.js → index-a0vY4sVG.js} +2 -2
  44. package/dist/{index--9zZnmyE.js → index-bRZUDA7R.js} +1 -1
  45. package/dist/{index-NiQurze3.js → index-gEI8m-b5.js} +1 -1
  46. package/dist/{index-DVFXRZRw.js → index-pSRRsoDQ.js} +4 -4
  47. package/dist/{index-BDvLu-0F.js → index-tjo9dn4X.js} +2 -2
  48. package/dist/{index-DF5OI_Xj.js → index-yf50oYV1.js} +3 -3
  49. package/dist/index.es.js +2 -2
  50. package/dist/{mb-render-CDFmykM_.js → mb-render-BCtvoXM-.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-DbNfQIzD.js} +1 -1
  52. package/dist/{pagination-design-Dz7y8YKu.js → pagination-design-BLhJhoHb.js} +2 -2
  53. package/dist/paper-widget-design-B8gKgZep.js +4 -0
  54. package/dist/{print-runtime-instance-Bq1p758u.js → print-runtime-instance-v1jzD3oO.js} +1 -1
  55. package/dist/{print-snapshot-renderer-BWVZ-Lql.js → print-snapshot-renderer-BSf76qD7.js} +3 -3
  56. package/dist/{qrcode-design-Dq0tczvD.js → qrcode-design-D9f0hRKd.js} +1 -1
  57. package/dist/{revo-grid.entry-BKZT_dju.js → revo-grid.entry-NMojEZjd.js} +1 -1
  58. package/dist/{revogr-attribution_7.entry-CXdkYl1q.js → revogr-attribution_7.entry-jR0LwEie.js} +3 -3
  59. package/dist/{revogr-clipboard_3.entry-Dq9k6E4q.js → revogr-clipboard_3.entry-DMQ65QLh.js} +2 -2
  60. package/dist/{revogr-data_4.entry-CpBkj9S_.js → revogr-data_4.entry-Buvf7dRf.js} +2 -2
  61. package/dist/{revogr-filter-panel.entry-Bu5hYWK7.js → revogr-filter-panel.entry-TLjszdsH.js} +1 -1
  62. package/dist/seal-design-B80mv8SJ.js +4 -0
  63. package/dist/{serialnumber-design-DUqW6M9C.js → serialnumber-design-DsSZwN3t.js} +1 -1
  64. package/dist/shared/index.es.js +9 -9
  65. package/dist/{single-field-drop-MXmkrdjF.js → single-field-drop-DRMCsh_s.js} +2 -2
  66. package/dist/{size-editor-DCVa84rA.js → size-editor-m8uyQ1bU.js} +1 -1
  67. package/dist/src/domain/document-business/business/product-release/profile.d.ts +2 -0
  68. package/dist/src/domain/document-business/business/product-release/service.d.ts +2 -0
  69. package/dist/src/domain/document-business/index.d.ts +2 -0
  70. package/dist/src/domain/document-business/registry.d.ts +2 -0
  71. package/dist/src/domain/document-business/runtime/field-query-runtime.d.ts +4 -0
  72. package/dist/src/domain/document-business/types.d.ts +24 -0
  73. package/dist/src/domain/field/number/product-release-qty-manifest.d.ts +2 -0
  74. package/dist/src/domain/field/query-filter.d.ts +15 -0
  75. package/dist/src/domain/table/business/material/material-substitution/profile/field-keys.d.ts +13 -11
  76. package/dist/src/domain/table/business/material/material-substitution/runtime/select-loaders.d.ts +8 -0
  77. package/dist/src/nocode-base/src/core/sub-table/profile-driven-sub-table-core.d.ts +3 -3
  78. package/dist/src/nocode-base/src/hooks/form-model/form-model-controller.d.ts +2 -0
  79. package/dist/src/nocode-base/src/hooks/material-consume-object/initialize-autofill.d.ts +17 -0
  80. package/dist/src/nocode-base/src/hooks/material-consume-object/object-validation-controller.d.ts +24 -0
  81. package/dist/src/nocode-base/src/hooks/render-page/initialize-runtime.d.ts +1 -0
  82. package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +3 -0
  83. package/dist/src/nocode-base/src/interface/ref-loader.d.ts +12 -1
  84. package/dist/src/nocode-base/src/interface/render.d.ts +3 -1
  85. package/dist/src/nocode-base/src/interface/transform.d.ts +9 -1
  86. package/dist/src/nocode-base/src/types/common/base.d.ts +2 -0
  87. package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-design.vue.d.ts +1 -0
  88. package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-option-select.vue.d.ts +1 -0
  89. package/dist/src/online-form/src/views/designer/constants/index.d.ts +1 -0
  90. package/dist/src/shared/enum/field-type.d.ts +7 -2
  91. package/dist/src/shared/utils/withRequestCache.d.ts +27 -0
  92. package/dist/{sub-table-factory-BBiAj7oz.js → sub-table-factory-BxxIXXCZ.js} +194 -85
  93. package/dist/{text-design-BfXr3TcH.js → text-design-DgOV0ZhV.js} +2 -2
  94. package/dist/{throttle-Cpk1LoGk-BtY6yO1U.js → throttle-Cpk1LoGk-Dj14U5ox.js} +1 -1
  95. package/dist/{timediff-design-BF-mVD2d.js → timediff-design-C0zYdIQI.js} +1 -1
  96. package/dist/{trace-like-wrapper-2AsEoSS7.js → trace-like-wrapper-XB73ltP9.js} +2 -2
  97. package/dist/{value-editor.vue_vue_type_style_index_0_lang-D8_zt9JM.js → value-editor.vue_vue_type_style_index_0_lang-CRFXw695.js} +2 -2
  98. package/dist/web-render/index.es.js +3 -3
  99. package/dist/{widget-barcode-BMnwSzpx.js → widget-barcode-BLKBY_Dh.js} +4 -4
  100. package/dist/{widget-diagonal-iuAFZn-R.js → widget-diagonal-LVxcpB3b.js} +3 -3
  101. package/dist/{widget-image-sZeIt4K6.js → widget-image-Cch0ImSI.js} +5 -5
  102. package/dist/{widget-line-izrJUAAT.js → widget-line-CUSNrxgG.js} +2 -2
  103. package/dist/{widget-pagination-CTANdU2l.js → widget-pagination-CM1S6Ytp.js} +5 -5
  104. package/dist/{widget-power-OZD7bTxW.js → widget-power-DQJ8F2R7.js} +3 -3
  105. package/dist/{widget-qrcode-xvyklot3.js → widget-qrcode-BmnaFfc4.js} +3 -3
  106. package/dist/{widget-rangelimit-BZhTuRkT.js → widget-rangelimit-Db0ZX6Fb.js} +3 -3
  107. package/dist/{widget-serialnumber-BwUHV475.js → widget-serialnumber-BEOWsFs1.js} +1 -1
  108. package/dist/{widget-text-B8MzTxa3.js → widget-text-DZFAhPxy.js} +5 -5
  109. package/dist/{widget-timediff-YAH8bbso.js → widget-timediff-C_Nh7uw-.js} +2 -2
  110. package/package.json +2 -2
  111. package/dist/paper-widget-design-BlIbv2tj.js +0 -4
  112. package/dist/seal-design-LHZWDjEb.js +0 -4
@@ -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-BDRyjPGr.js";
3
+ import { ap as resolveDiagonalVertex, a9 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CAg9oyuD.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, ba as RenderModeEnum, Z as FormTypeEnum, bG as BpmnNodeTypeEnum, cz as getFieldPlaceholder, bY as MobileFillTypeEnum, C as ComponentTypeEnum, a0 as PlatformEnum, cA as isReferenceOptionActive, p as api, bw as uuid2, c6 as calcUtils, bl as findRuntimeTableRow, ca as ensureTableRowKeys, c3 as bindRuntimeTableColumns, bk as getRowId, cB as FRONT_ROW_KEY, cp as isTableRowKeyMatch, by as isAttachFieldActive, cC as filterRulesByTrigger, cD as isEmptyValue$1, c7 as decodeTableCellRowKey, c9 as ensureFrontRowKey, b2 as getParseRuleInfo, aH as transformUtils, aZ as materialCheck, a_ as getLotLockedReason, a$ as validateReinspectionDate, bp as FormulaRuleFieldKeyEnum, h as SubTableType, b3 as getParseRuleValue, cE as buildError, I as CreateType, bn as findRuntimeParentRow, aK as Dependency_ENUM, aJ as ASSIGNMENTSTRATEGY_ENUM, bL as commonUtils, aO as DeviceLink, a9 as _export_sfc, cj as getRenderedRuntimeTableCell, A as CellType, ct as relocateDeletedRowsToEnd, cF as resetTableRowIdentity, K as useModal, cG as q, cH as QUICK_FILL_ALLOWED_FIELDS, cI as groupFixedTableRows, cJ as processQuickFillRows, cK as getIsGroupEmpty } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CAg9oyuD.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-BCtvoXM-.js";
9
9
  var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
10
10
  MaterialConsumptionPatternEnum2["RECORD"] = "record";
11
11
  MaterialConsumptionPatternEnum2["BOM"] = "bom";
@@ -7126,150 +7126,6 @@ async function validateObjectBomQtyOnSubmit(opts) {
7126
7126
  }
7127
7127
  return errors;
7128
7128
  }
7129
- function isBlank(value) {
7130
- return value == null || value === "";
7131
- }
7132
- function pickPresent(preferred, fallback) {
7133
- return isBlank(preferred) ? fallback : preferred;
7134
- }
7135
- function resolveObjectFieldKeys(opts) {
7136
- const obj = opts.objectFieldList?.find((item) => item.objectField === opts.belongingObject);
7137
- const fromList = obj?.subFields ? pickObjectFieldKeys(obj.subFields, opts.belongingObject) : {};
7138
- const fromFallback = pickObjectFieldKeys(opts.fallbackFields, opts.belongingObject, {
7139
- requireUsed: false
7140
- });
7141
- return {
7142
- productKey: pickPresent(fromList.productKey, fromFallback.productKey),
7143
- productFieldName: fromList.productFieldName ?? fromFallback.productFieldName,
7144
- materialNoKey: pickPresent(fromList.materialNoKey, fromFallback.materialNoKey),
7145
- materialNoFieldName: fromList.materialNoFieldName ?? fromFallback.materialNoFieldName,
7146
- qtyKey: pickPresent(fromList.qtyKey, fromFallback.qtyKey),
7147
- qtyRequiredKey: pickPresent(fromList.qtyRequiredKey, fromFallback.qtyRequiredKey),
7148
- qtyFieldName: fromList.qtyFieldName ?? fromFallback.qtyFieldName,
7149
- bomEntryIdKey: pickPresent(fromList.bomEntryIdKey, fromFallback.bomEntryIdKey)
7150
- };
7151
- }
7152
- function buildObjectLotExtraQuery(productId) {
7153
- if (isBlank(productId)) return {};
7154
- const versionId = String(productId).split(":").pop();
7155
- if (!versionId) return {};
7156
- return { "product_id_.versionEq": versionId };
7157
- }
7158
- function clearedLotFields(materialNoKey) {
7159
- if (!materialNoKey) return {};
7160
- return {
7161
- [materialNoKey]: void 0,
7162
- [`${materialNoKey}_id_`]: void 0,
7163
- [`${materialNoKey}_lb_`]: void 0
7164
- };
7165
- }
7166
- function shouldClearLotOnProductChange(opts) {
7167
- const { prevProduct, nextProduct, lotValue } = opts;
7168
- if (isBlank(prevProduct) && isBlank(nextProduct)) return false;
7169
- if (prevProduct === nextProduct) return false;
7170
- if (isBlank(prevProduct) && !isBlank(nextProduct) && !isBlank(lotValue)) {
7171
- return false;
7172
- }
7173
- return true;
7174
- }
7175
- let fillingProduct = false;
7176
- function runWithFillProduct(fn) {
7177
- fillingProduct = true;
7178
- try {
7179
- fn();
7180
- } finally {
7181
- nextTick(() => {
7182
- fillingProduct = false;
7183
- });
7184
- }
7185
- }
7186
- function resolveLotValidateParams(keys, formData, option) {
7187
- return {
7188
- product_id_: option?.product_id_ ?? option?._item?.product_id_ ?? (keys.productKey ? formData[keys.productKey] : void 0),
7189
- material_no_: option?.name_ ?? option?.__VALUE__ ?? (keys.materialNoKey ? formData[keys.materialNoKey] : void 0),
7190
- material_no_id_: option?.id_ ?? (keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0)
7191
- };
7192
- }
7193
- async function applyConsumeObjectTraceChange(opts) {
7194
- const { belongingObject, role, formData } = opts;
7195
- if (!belongingObject || !formData) return {};
7196
- const keys = resolveObjectFieldKeys({
7197
- belongingObject,
7198
- objectFieldList: opts.objectFieldList,
7199
- fallbackFields: opts.fallbackFields
7200
- });
7201
- if (role === FIELD_TYPE.PRODUCT) {
7202
- if (!("prevProduct" in opts) || fillingProduct) return {};
7203
- const values = {};
7204
- if (shouldClearLotOnProductChange({
7205
- prevProduct: opts.prevProduct,
7206
- nextProduct: opts.nextValue,
7207
- lotValue: keys.materialNoKey ? formData[keys.materialNoKey] : void 0
7208
- })) {
7209
- Object.assign(values, clearedLotFields(keys.materialNoKey));
7210
- }
7211
- if (keys.bomEntryIdKey) {
7212
- values[keys.bomEntryIdKey] = null;
7213
- if (!isBlank(opts.nextValue) && opts.formInstBom) {
7214
- const entry = resolveObjectBomEntry({
7215
- formInstBom: opts.formInstBom,
7216
- belongingObject,
7217
- productId: String(opts.nextValue)
7218
- });
7219
- if (entry) values[keys.bomEntryIdKey] = entry.id_;
7220
- }
7221
- }
7222
- opts.rowWriter.patchRow(values, "autofill");
7223
- const lotValue = keys.materialNoKey ? formData[keys.materialNoKey] : void 0;
7224
- if (!isBlank(opts.nextValue) && !isBlank(lotValue)) {
7225
- try {
7226
- await validateReinspectionDate({
7227
- product_id_: String(opts.nextValue),
7228
- material_no_: lotValue,
7229
- material_no_id_: keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0
7230
- });
7231
- } catch (e) {
7232
- return { abortReinspection: e?.message || String(e) };
7233
- }
7234
- }
7235
- return {};
7236
- }
7237
- if (role === FIELD_TYPE.MATERIAL_NO) {
7238
- if (opts.option?.is_locked_) {
7239
- opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "autofill");
7240
- return { abortLocked: opts.option.id_ };
7241
- }
7242
- const params = resolveLotValidateParams(keys, formData, opts.option);
7243
- if (isBlank(params.material_no_) && isBlank(params.material_no_id_)) return {};
7244
- try {
7245
- await validateReinspectionDate(params);
7246
- } catch (e) {
7247
- opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "async");
7248
- return { abortReinspection: e?.message || String(e) };
7249
- }
7250
- const values = {};
7251
- const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
7252
- if (keys.productKey && !isBlank(productId)) values[keys.productKey] = productId;
7253
- if (keys.bomEntryIdKey && opts.formInstBom) {
7254
- if (!isBlank(productId)) {
7255
- const entry = resolveObjectBomEntry({
7256
- formInstBom: opts.formInstBom,
7257
- belongingObject,
7258
- productId: String(productId)
7259
- });
7260
- if (entry) values[keys.bomEntryIdKey] = entry.id_;
7261
- }
7262
- }
7263
- const patchRelatedFields = () => opts.rowWriter.patchRow(values, "autofill");
7264
- if (keys.productKey && !isBlank(productId)) {
7265
- runWithFillProduct(patchRelatedFields);
7266
- } else {
7267
- patchRelatedFields();
7268
- }
7269
- return {};
7270
- }
7271
- return {};
7272
- }
7273
7129
  function useRuntimeRowState(rowSource) {
7274
7130
  const { formStateStore } = useRuntimeInstanceServices();
7275
7131
  function requireStore() {
@@ -8022,6 +7878,150 @@ function useFormTmplConfig() {
8022
7878
  injectController
8023
7879
  };
8024
7880
  }
7881
+ function isBlank(value) {
7882
+ return value == null || value === "";
7883
+ }
7884
+ function pickPresent(preferred, fallback) {
7885
+ return isBlank(preferred) ? fallback : preferred;
7886
+ }
7887
+ function resolveObjectFieldKeys(opts) {
7888
+ const obj = opts.objectFieldList?.find((item) => item.objectField === opts.belongingObject);
7889
+ const fromList = obj?.subFields ? pickObjectFieldKeys(obj.subFields, opts.belongingObject) : {};
7890
+ const fromFallback = pickObjectFieldKeys(opts.fallbackFields, opts.belongingObject, {
7891
+ requireUsed: false
7892
+ });
7893
+ return {
7894
+ productKey: pickPresent(fromList.productKey, fromFallback.productKey),
7895
+ productFieldName: fromList.productFieldName ?? fromFallback.productFieldName,
7896
+ materialNoKey: pickPresent(fromList.materialNoKey, fromFallback.materialNoKey),
7897
+ materialNoFieldName: fromList.materialNoFieldName ?? fromFallback.materialNoFieldName,
7898
+ qtyKey: pickPresent(fromList.qtyKey, fromFallback.qtyKey),
7899
+ qtyRequiredKey: pickPresent(fromList.qtyRequiredKey, fromFallback.qtyRequiredKey),
7900
+ qtyFieldName: fromList.qtyFieldName ?? fromFallback.qtyFieldName,
7901
+ bomEntryIdKey: pickPresent(fromList.bomEntryIdKey, fromFallback.bomEntryIdKey)
7902
+ };
7903
+ }
7904
+ function buildObjectLotExtraQuery(productId) {
7905
+ if (isBlank(productId)) return {};
7906
+ const versionId = String(productId).split(":").pop();
7907
+ if (!versionId) return {};
7908
+ return { "product_id_.versionEq": versionId };
7909
+ }
7910
+ function clearedLotFields(materialNoKey) {
7911
+ if (!materialNoKey) return {};
7912
+ return {
7913
+ [materialNoKey]: void 0,
7914
+ [`${materialNoKey}_id_`]: void 0,
7915
+ [`${materialNoKey}_lb_`]: void 0
7916
+ };
7917
+ }
7918
+ function shouldClearLotOnProductChange(opts) {
7919
+ const { prevProduct, nextProduct, lotValue } = opts;
7920
+ if (isBlank(prevProduct) && isBlank(nextProduct)) return false;
7921
+ if (prevProduct === nextProduct) return false;
7922
+ if (isBlank(prevProduct) && !isBlank(nextProduct) && !isBlank(lotValue)) {
7923
+ return false;
7924
+ }
7925
+ return true;
7926
+ }
7927
+ let fillingProduct = false;
7928
+ function runWithFillProduct(fn) {
7929
+ fillingProduct = true;
7930
+ try {
7931
+ fn();
7932
+ } finally {
7933
+ nextTick(() => {
7934
+ fillingProduct = false;
7935
+ });
7936
+ }
7937
+ }
7938
+ function resolveLotValidateParams(keys, formData, option) {
7939
+ return {
7940
+ product_id_: option?.product_id_ ?? option?._item?.product_id_ ?? (keys.productKey ? formData[keys.productKey] : void 0),
7941
+ material_no_: option?.name_ ?? option?.__VALUE__ ?? (keys.materialNoKey ? formData[keys.materialNoKey] : void 0),
7942
+ material_no_id_: option?.id_ ?? (keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0)
7943
+ };
7944
+ }
7945
+ async function applyConsumeObjectTraceChange(opts) {
7946
+ const { belongingObject, role, formData } = opts;
7947
+ if (!belongingObject || !formData) return {};
7948
+ const keys = resolveObjectFieldKeys({
7949
+ belongingObject,
7950
+ objectFieldList: opts.objectFieldList,
7951
+ fallbackFields: opts.fallbackFields
7952
+ });
7953
+ if (role === FIELD_TYPE.PRODUCT) {
7954
+ if (!("prevProduct" in opts) || fillingProduct) return {};
7955
+ const values = {};
7956
+ if (shouldClearLotOnProductChange({
7957
+ prevProduct: opts.prevProduct,
7958
+ nextProduct: opts.nextValue,
7959
+ lotValue: keys.materialNoKey ? formData[keys.materialNoKey] : void 0
7960
+ })) {
7961
+ Object.assign(values, clearedLotFields(keys.materialNoKey));
7962
+ }
7963
+ if (keys.bomEntryIdKey) {
7964
+ values[keys.bomEntryIdKey] = null;
7965
+ if (!isBlank(opts.nextValue) && opts.formInstBom) {
7966
+ const entry = resolveObjectBomEntry({
7967
+ formInstBom: opts.formInstBom,
7968
+ belongingObject,
7969
+ productId: String(opts.nextValue)
7970
+ });
7971
+ if (entry) values[keys.bomEntryIdKey] = entry.id_;
7972
+ }
7973
+ }
7974
+ opts.rowWriter.patchRow(values, "autofill");
7975
+ const lotValue = keys.materialNoKey ? formData[keys.materialNoKey] : void 0;
7976
+ if (!isBlank(opts.nextValue) && !isBlank(lotValue)) {
7977
+ try {
7978
+ await validateReinspectionDate({
7979
+ product_id_: String(opts.nextValue),
7980
+ material_no_: lotValue,
7981
+ material_no_id_: keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0
7982
+ });
7983
+ } catch (e) {
7984
+ return { abortReinspection: e?.message || String(e) };
7985
+ }
7986
+ }
7987
+ return {};
7988
+ }
7989
+ if (role === FIELD_TYPE.MATERIAL_NO) {
7990
+ if (opts.option?.is_locked_) {
7991
+ opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "autofill");
7992
+ return { abortLocked: opts.option.id_ };
7993
+ }
7994
+ const params = resolveLotValidateParams(keys, formData, opts.option);
7995
+ if (isBlank(params.material_no_) && isBlank(params.material_no_id_)) return {};
7996
+ try {
7997
+ await validateReinspectionDate(params);
7998
+ } catch (e) {
7999
+ opts.rowWriter.patchRow(clearedLotFields(keys.materialNoKey), "async");
8000
+ return { abortReinspection: e?.message || String(e) };
8001
+ }
8002
+ const values = {};
8003
+ const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
8004
+ if (keys.productKey && !isBlank(productId)) values[keys.productKey] = productId;
8005
+ if (keys.bomEntryIdKey && opts.formInstBom) {
8006
+ if (!isBlank(productId)) {
8007
+ const entry = resolveObjectBomEntry({
8008
+ formInstBom: opts.formInstBom,
8009
+ belongingObject,
8010
+ productId: String(productId)
8011
+ });
8012
+ if (entry) values[keys.bomEntryIdKey] = entry.id_;
8013
+ }
8014
+ }
8015
+ const patchRelatedFields = () => opts.rowWriter.patchRow(values, "autofill");
8016
+ if (keys.productKey && !isBlank(productId)) {
8017
+ runWithFillProduct(patchRelatedFields);
8018
+ } else {
8019
+ patchRelatedFields();
8020
+ }
8021
+ return {};
8022
+ }
8023
+ return {};
8024
+ }
8025
8025
  const _hoisted_1$5 = ["data-merge", "data-fill-direction"];
8026
8026
  const _hoisted_2$1 = {
8027
8027
  key: 0,
@@ -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: {