@gct-paas/word 0.1.74-beta.34 → 0.1.74-beta.36

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.
@@ -0,0 +1,19 @@
1
+ import { Doc } from '../..';
2
+ import { DataEnricherRegistration } from '..';
3
+ import { FIELD_TYPE } from '../../../domain/field/field-type';
4
+ export interface OperationReceiveQtyWidgetTarget {
5
+ valuePath: string;
6
+ }
7
+ type OperationReceiveQtyWidgetInstance = {
8
+ widgetMeta?: {
9
+ field?: {
10
+ fieldType?: FIELD_TYPE;
11
+ };
12
+ };
13
+ valuePath?: string;
14
+ };
15
+ /** 从单个 widget 实例解析工序接收数量 enrich 目标 */
16
+ export declare function tryCollectOperationReceiveQtyTarget(instance: OperationReceiveQtyWidgetInstance): OperationReceiveQtyWidgetTarget | null;
17
+ /** 工序接收数量:params 取 containerId / routingOperationId,空值时拉取 qty_current_ */
18
+ export declare function createOperationReceiveQtyEnricher(doc: Doc, targets: OperationReceiveQtyWidgetTarget[]): DataEnricherRegistration;
19
+ export {};
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- /*! @gct-paas/word v0.1.74-beta.34 */
2
- import { Fragment, Suspense, Teleport, Transition, TransitionGroup, cloneVNode, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, h, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, render, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toHandlers, toRaw, toRef, toValue, unref, useAttrs, useCssVars, useModel, useSlots, vModelRadio, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
1
+ /*! @gct-paas/word v0.1.74-beta.36 */
2
+ import { Fragment, Suspense, Teleport, Transition, TransitionGroup, cloneVNode, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, effectScope, getCurrentInstance, getCurrentScope, guardReactiveProps, h, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, render, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toHandlers, toRaw, toRef, toValue, unref, useAttrs, useCssVars, useModel, useSlots, vModelRadio, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import St, { PopperWrapper } from "floating-vue";
4
4
  import VueKonva from "vue-konva";
5
5
  import { HttpUtil, api } from "@gct-paas/api";
@@ -17556,7 +17556,10 @@ var init_field_type = __esmMin((() => {
17556
17556
  ...BASE_FIELD_TYPE,
17557
17557
  ...BUSINESS_FIELD_TYPE
17558
17558
  };
17559
- FIELD_TYPE_ALIASES = { production_identifier: FIELD_TYPE.PRODUCTION_CONTAINER };
17559
+ FIELD_TYPE_ALIASES = {
17560
+ production_identifier: FIELD_TYPE.PRODUCTION_CONTAINER,
17561
+ operation: FIELD_TYPE.ROUTING_OPERATION
17562
+ };
17560
17563
  }));
17561
17564
  //#endregion
17562
17565
  //#region src/domain/table/design/autofill-expander.ts
@@ -99961,6 +99964,47 @@ var init_lot_parent_label_enricher = __esmMin((() => {
99961
99964
  init_enrich_utils();
99962
99965
  }));
99963
99966
  //#endregion
99967
+ //#region src/suites/shared/suite-features.ts
99968
+ /** 按套件 key 取可见性配置,未知套件回落默认 */
99969
+ function getSuiteFeatures(suiteKey) {
99970
+ if (!suiteKey) return DEFAULT_SUITE_FEATURES;
99971
+ return SUITE_FEATURES_MAP[suiteKey] ?? DEFAULT_SUITE_FEATURES;
99972
+ }
99973
+ var DEFAULT_SUITE_FEATURES, SUITE_FEATURES_MAP;
99974
+ var init_suite_features = __esmMin((() => {
99975
+ DEFAULT_SUITE_FEATURES = {
99976
+ hiddenBusinessTableTypes: [],
99977
+ showRulePanel: true,
99978
+ showObjectInit: true,
99979
+ showDataLoad: true,
99980
+ hydrateOperationReceiveQty: false
99981
+ };
99982
+ SUITE_FEATURES_MAP = {
99983
+ edhr: {
99984
+ ...DEFAULT_SUITE_FEATURES,
99985
+ hydrateOperationReceiveQty: true
99986
+ },
99987
+ eqm: {
99988
+ hiddenBusinessTableTypes: [
99989
+ "warehouse-in",
99990
+ "warehouse-out",
99991
+ "warehouse-inventory",
99992
+ "warehouse-allocate",
99993
+ "material-consume",
99994
+ "material-balance",
99995
+ "material-requisition",
99996
+ "entrust-steril-batch-list",
99997
+ "pretreatment-list",
99998
+ "check-table"
99999
+ ],
100000
+ showRulePanel: false,
100001
+ showObjectInit: false,
100002
+ showDataLoad: false,
100003
+ hydrateOperationReceiveQty: false
100004
+ }
100005
+ };
100006
+ }));
100007
+ //#endregion
99964
100008
  //#region src/sdk/doc-runtime/utils/sub-field-config.ts
99965
100009
  var SUB_FIELD_CONFIG_KEY, getSubFieldConfig;
99966
100010
  var init_sub_field_config = __esmMin((() => {
@@ -100163,6 +100207,98 @@ var init_of_inst_num_enricher = __esmMin((() => {
100163
100207
  inflightCountMapByDoc = /* @__PURE__ */ new WeakMap();
100164
100208
  }));
100165
100209
  //#endregion
100210
+ //#region src/core/data/enrichers/operation-receive-qty-enricher.ts
100211
+ function resolveQueryParams(doc) {
100212
+ const containerId = readContextParam(doc, "containerId");
100213
+ const routingOperationId = readContextParam(doc, "routingOperationId");
100214
+ return {
100215
+ containerId: isBlank$1(containerId) ? void 0 : String(containerId),
100216
+ routingOperationId: isBlank$1(routingOperationId) ? void 0 : String(routingOperationId)
100217
+ };
100218
+ }
100219
+ function parseQtyCurrent(res) {
100220
+ const payload = unwrapBizServiceData(res) ?? res;
100221
+ if (!payload || typeof payload !== "object") return void 0;
100222
+ const raw = (payload.data && typeof payload.data === "object" ? payload.data : payload).qty_current_;
100223
+ if (raw === void 0 || raw === null || raw === "") return void 0;
100224
+ const num = Number(raw);
100225
+ return Number.isNaN(num) ? void 0 : num;
100226
+ }
100227
+ function collectEmptyPaths(doc, targets) {
100228
+ const rawData = doc.dataManager.getRawData();
100229
+ const emptyPaths = [];
100230
+ for (const { valuePath } of targets) for (const path of expandSubTableWidgetPaths(doc, valuePath, rawData)) {
100231
+ if (isPresent(doc.dataManager.get(path))) continue;
100232
+ emptyPaths.push(path);
100233
+ }
100234
+ return emptyPaths;
100235
+ }
100236
+ async function fetchQtyCurrent(doc) {
100237
+ const existing = inflightQtyByDoc.get(doc);
100238
+ if (existing) return existing;
100239
+ const task = (async () => {
100240
+ const { containerId, routingOperationId } = resolveQueryParams(doc);
100241
+ if (!containerId || !routingOperationId) return void 0;
100242
+ return parseQtyCurrent(await callBizService(OPERATION_RECEIVE_QTY_API, {
100243
+ containerId,
100244
+ routingOperationId
100245
+ }));
100246
+ })();
100247
+ inflightQtyByDoc.set(doc, task);
100248
+ try {
100249
+ return await task;
100250
+ } finally {
100251
+ inflightQtyByDoc.delete(doc);
100252
+ }
100253
+ }
100254
+ function buildQtyUpdates(emptyPaths, qty) {
100255
+ const updates = {};
100256
+ for (const path of emptyPaths) updates[path] = qty;
100257
+ return updates;
100258
+ }
100259
+ /** 从单个 widget 实例解析工序接收数量 enrich 目标 */
100260
+ function tryCollectOperationReceiveQtyTarget(instance) {
100261
+ var _instance$widgetMeta;
100262
+ const field = (_instance$widgetMeta = instance.widgetMeta) === null || _instance$widgetMeta === void 0 ? void 0 : _instance$widgetMeta.field;
100263
+ if (!field || field.fieldType !== FIELD_TYPE.OPERATION_RECEIVE_QTY || !instance.valuePath) return null;
100264
+ return { valuePath: String(instance.valuePath) };
100265
+ }
100266
+ /** 工序接收数量:params 取 containerId / routingOperationId,空值时拉取 qty_current_ */
100267
+ function createOperationReceiveQtyEnricher(doc, targets) {
100268
+ const pathMatchers = targets.map((item) => createValuePathMatcher(item.valuePath));
100269
+ return {
100270
+ id: "operation-receive-qty:hydrate",
100271
+ valuePathTemplate: "*",
100272
+ match: (path) => pathMatchers.some((matcher) => matcher(path)),
100273
+ enrich: async () => {
100274
+ var _doc$isInEditMode;
100275
+ if ((_doc$isInEditMode = doc.isInEditMode) === null || _doc$isInEditMode === void 0 ? void 0 : _doc$isInEditMode.call(doc)) return;
100276
+ const emptyPaths = collectEmptyPaths(doc, targets);
100277
+ if (!emptyPaths.length) return;
100278
+ const qty = await fetchQtyCurrent(doc);
100279
+ if (qty === void 0) return;
100280
+ const updates = buildQtyUpdates(emptyPaths, qty);
100281
+ if (!Object.keys(updates).length) return;
100282
+ return updates;
100283
+ }
100284
+ };
100285
+ }
100286
+ var OPERATION_RECEIVE_QTY_API, inflightQtyByDoc;
100287
+ var init_operation_receive_qty_enricher = __esmMin((() => {
100288
+ init_data();
100289
+ init_field_type();
100290
+ init_biz_service_api();
100291
+ init_table_runtime_utils();
100292
+ init_core$1();
100293
+ OPERATION_RECEIVE_QTY_API = {
100294
+ modelCategory: "entity",
100295
+ modelKey: "em_routing_operation_number",
100296
+ bsKey: "getOne",
100297
+ method: "post"
100298
+ };
100299
+ inflightQtyByDoc = /* @__PURE__ */ new WeakMap();
100300
+ }));
100301
+ //#endregion
100166
100302
  //#region src/core/data/enrichers/build-field-enrichers.ts
100167
100303
  /**
100168
100304
  * 解析 enricher 用的 widget props
@@ -100181,8 +100317,10 @@ function resolveEnricherWidgetProps(instance, manifest) {
100181
100317
  }
100182
100318
  /** 根据文档 widget 列表构建全部 enricher 注册项 */
100183
100319
  function buildFieldEnricherRegistrations(instances, ctx, doc) {
100320
+ var _doc$fieldModelQuery;
100184
100321
  const regs = [];
100185
100322
  const ofInstNumTargets = [];
100323
+ const operationReceiveQtyTargets = [];
100186
100324
  for (const instance of instances) {
100187
100325
  var _instance$widgetMeta2, _manifest$computed2;
100188
100326
  const fieldMeta = (_instance$widgetMeta2 = instance.widgetMeta) === null || _instance$widgetMeta2 === void 0 ? void 0 : _instance$widgetMeta2.field;
@@ -100190,6 +100328,8 @@ function buildFieldEnricherRegistrations(instances, ctx, doc) {
100190
100328
  if (!fieldMeta || !valuePath) continue;
100191
100329
  const ofInstNumTarget = tryCollectOfInstNumTarget(instance);
100192
100330
  if (ofInstNumTarget) ofInstNumTargets.push(ofInstNumTarget);
100331
+ const operationReceiveQtyTarget = tryCollectOperationReceiveQtyTarget(instance);
100332
+ if (operationReceiveQtyTarget) operationReceiveQtyTargets.push(operationReceiveQtyTarget);
100193
100333
  const manifest = ctx.getFieldManifest(fieldMeta.fieldType);
100194
100334
  const valueChangeRules = normalizeValueChangeRules(manifest === null || manifest === void 0 || (_manifest$computed2 = manifest.computed) === null || _manifest$computed2 === void 0 ? void 0 : _manifest$computed2.onValueChangeRule);
100195
100335
  if (!valueChangeRules.length) continue;
@@ -100239,6 +100379,7 @@ function buildFieldEnricherRegistrations(instances, ctx, doc) {
100239
100379
  }
100240
100380
  }
100241
100381
  if (ofInstNumTargets.length) regs.push(createOfInstNumEnricher(doc, ofInstNumTargets));
100382
+ if (operationReceiveQtyTargets.length && getSuiteFeatures((_doc$fieldModelQuery = doc.fieldModelQuery) === null || _doc$fieldModelQuery === void 0 ? void 0 : _doc$fieldModelQuery.suiteKey).hydrateOperationReceiveQty) regs.push(createOperationReceiveQtyEnricher(doc, operationReceiveQtyTargets));
100242
100383
  regs.push(...buildStaticLabelEnrichers(doc));
100243
100384
  return regs;
100244
100385
  }
@@ -100250,8 +100391,10 @@ var init_build_field_enrichers = __esmMin((() => {
100250
100391
  init_lot_parent_label_enricher();
100251
100392
  init_static_label_enrichers();
100252
100393
  init_computed();
100394
+ init_suite_features();
100253
100395
  init_field_props_schema_type();
100254
100396
  init_of_inst_num_enricher();
100397
+ init_operation_receive_qty_enricher();
100255
100398
  }));
100256
100399
  //#endregion
100257
100400
  //#region src/core/data/post-change-pipeline.ts
@@ -126233,6 +126376,18 @@ var init_material_consume_table_controller = __esmMin((() => {
126233
126376
  "dataStatus",
126234
126377
  void 0
126235
126378
  );
126379
+ _defineProperty(
126380
+ this,
126381
+ /** 当前控制器已绑定的文档。一个文档可能拆成多个画布表格组件。 */
126382
+ "setupDoc",
126383
+ void 0
126384
+ );
126385
+ _defineProperty(
126386
+ this,
126387
+ /** 脱离分页表格组件生命周期,同一文档只保留一组监听。 */
126388
+ "setupScope",
126389
+ void 0
126390
+ );
126236
126391
  _defineProperty(
126237
126392
  this,
126238
126393
  /**
@@ -126312,20 +126467,23 @@ var init_material_consume_table_controller = __esmMin((() => {
126312
126467
  */
126313
126468
  initTableData(dataManager, subFieldKey, defaultData) {
126314
126469
  if (this.isDataProcessed) return;
126470
+ const existingRows = dataManager.getRawData()[subFieldKey];
126471
+ if (Array.isArray(existingRows) && existingRows.some((row) => row && !row.deleted_ && !row.__gw_default)) return;
126315
126472
  const rows = this.calcFormState();
126316
126473
  if (!(rows === null || rows === void 0 ? void 0 : rows.length)) return;
126317
126474
  const tableRows = transformUtils.transformSourceData2SubTable(rows, {}, defaultData);
126318
126475
  tableRows.forEach((row, i) => {
126319
126476
  ensureFrontRowKey(row);
126320
- const option = {
126321
- dataManager,
126322
- subFieldKey,
126323
- rowIndex: i
126324
- };
126325
- if (i === 0) MCDataUtil.updateRow(option, false);
126326
- else MCDataUtil.updateRow(option, this.enableSequenceLoading);
126477
+ row.is_confirmed_ = i > 0 && this.enableSequenceLoading;
126327
126478
  });
126328
126479
  this.actualTableData = tableRows;
126480
+ tableRows.forEach((row, i) => {
126481
+ MCDataUtil.updateConfirmableFieldsDisablement({
126482
+ dataManager,
126483
+ rowPath: `$.${subFieldKey}[${i}]`,
126484
+ disabled: !!row.is_confirmed_
126485
+ });
126486
+ });
126329
126487
  }
126330
126488
  /**
126331
126489
  * 根据数据计算需要禁用的字段
@@ -126495,18 +126653,26 @@ var init_material_consume_table_controller = __esmMin((() => {
126495
126653
  * @param opts
126496
126654
  */
126497
126655
  async setup(opts) {
126656
+ var _this$setupScope;
126657
+ const sameDoc = this.setupDoc === opts.doc;
126498
126658
  this.tableDataRef = opts.tableDataRef;
126499
126659
  this.mainFormState = opts.mainFormState ?? ref({});
126500
126660
  this.subTableInfo = opts.subTableInfo;
126501
126661
  this.dataStatus = opts.dataStatus;
126662
+ if (sameDoc) return;
126663
+ (_this$setupScope = this.setupScope) === null || _this$setupScope === void 0 || _this$setupScope.stop();
126664
+ this.setupScope = effectScope(true);
126665
+ this.setupDoc = opts.doc;
126502
126666
  this.initTableData(opts.doc.dataManager, opts.subTableInfo.subFieldKey, opts.defaultRowData);
126503
- watch(() => this.materialNoNum, () => this.syncQtyRequiredFromBom(opts.doc), { immediate: true });
126504
- watch(() => this.tableDataRef.value.map((row) => [
126505
- row.qty_,
126506
- row.product_id_,
126507
- row.bom_entry_id_,
126508
- row.deleted_
126509
- ]), () => this.updateDerivedQtyFields(opts.doc), { deep: true });
126667
+ this.setupScope.run(() => {
126668
+ watch(() => this.materialNoNum, () => this.syncQtyRequiredFromBom(opts.doc), { immediate: true });
126669
+ watch(() => this.tableDataRef.value.map((row) => [
126670
+ row.qty_,
126671
+ row.product_id_,
126672
+ row.bom_entry_id_,
126673
+ row.deleted_
126674
+ ]), () => this.updateDerivedQtyFields(opts.doc), { deep: true });
126675
+ });
126510
126676
  }
126511
126677
  /**
126512
126678
  * 按当前 materialNoNum 回写各行 qty_required_(校验侧 total 已通过 getter 实时读取)
@@ -137615,17 +137781,17 @@ var init_tree_node_vue_vue_type_script_setup_true_lang = __esmMin((() => {
137615
137781
  });
137616
137782
  }));
137617
137783
  //#endregion
137618
- //#region src/runtime/renderer/dropdowns/components/tree/tree-node.vue?vue&type=style&index=0&scoped=6969370b&lang.less
137619
- var init_tree_node_vue_vue_type_style_index_0_scoped_6969370b_lang = __esmMin((() => {}));
137784
+ //#region src/runtime/renderer/dropdowns/components/tree/tree-node.vue?vue&type=style&index=0&scoped=6d1436ce&lang.less
137785
+ var init_tree_node_vue_vue_type_style_index_0_scoped_6d1436ce_lang = __esmMin((() => {}));
137620
137786
  //#endregion
137621
137787
  //#region src/runtime/renderer/dropdowns/components/tree/tree-node.vue
137622
137788
  var tree_node_default;
137623
137789
  var init_tree_node = __esmMin((() => {
137624
137790
  init_tree_node_vue_vue_type_script_setup_true_lang();
137625
137791
  init_tree_node_vue_vue_type_script_setup_true_lang();
137626
- init_tree_node_vue_vue_type_style_index_0_scoped_6969370b_lang();
137792
+ init_tree_node_vue_vue_type_style_index_0_scoped_6d1436ce_lang();
137627
137793
  init__plugin_vue_export_helper();
137628
- tree_node_default = /*#__PURE__*/ _plugin_vue_export_helper_default(tree_node_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6969370b"]]);
137794
+ tree_node_default = /*#__PURE__*/ _plugin_vue_export_helper_default(tree_node_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6d1436ce"]]);
137629
137795
  }));
137630
137796
  //#endregion
137631
137797
  //#region src/runtime/renderer/dropdowns/components/tree/tree-dropdown.vue?vue&type=script&setup=true&lang.ts
@@ -139416,8 +139582,9 @@ var init_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() => {
139416
139582
  const onChangeSelect = async (row) => {
139417
139583
  var _row$_item;
139418
139584
  const { belongingObject, fieldType } = props.widget.widgetMeta.field;
139419
- if (belongingObject && fieldType === FIELD_TYPE.MATERIAL_NO && row.is_locked_) {
139420
- GctMessage.error(await getLotLockedReason(row.id_));
139585
+ const selectedOption = (row === null || row === void 0 ? void 0 : row._item) ?? row;
139586
+ if (belongingObject && fieldType === FIELD_TYPE.MATERIAL_NO && (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.is_locked_)) {
139587
+ GctMessage.error(await getLotLockedReason(selectedOption.id_));
139421
139588
  return;
139422
139589
  }
139423
139590
  const { __VALUE__ } = row || {};
@@ -149308,36 +149475,6 @@ var set_table_header_form_modal_vue_vue_type_script_setup_true_lang_default = /*
149308
149475
  init__plugin_vue_export_helper();
149309
149476
  var set_table_header_form_modal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(set_table_header_form_modal_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-63b235d6"]]);
149310
149477
  //#endregion
149311
- //#region src/suites/shared/suite-features.ts
149312
- var DEFAULT_SUITE_FEATURES = {
149313
- hiddenBusinessTableTypes: [],
149314
- showRulePanel: true,
149315
- showObjectInit: true,
149316
- showDataLoad: true
149317
- };
149318
- var SUITE_FEATURES_MAP = { eqm: {
149319
- hiddenBusinessTableTypes: [
149320
- "warehouse-in",
149321
- "warehouse-out",
149322
- "warehouse-inventory",
149323
- "warehouse-allocate",
149324
- "material-consume",
149325
- "material-balance",
149326
- "material-requisition",
149327
- "entrust-steril-batch-list",
149328
- "pretreatment-list",
149329
- "check-table"
149330
- ],
149331
- showRulePanel: false,
149332
- showObjectInit: false,
149333
- showDataLoad: false
149334
- } };
149335
- /** 按套件 key 取可见性配置,未知套件回落默认 */
149336
- function getSuiteFeatures(suiteKey) {
149337
- if (!suiteKey) return DEFAULT_SUITE_FEATURES;
149338
- return SUITE_FEATURES_MAP[suiteKey] ?? DEFAULT_SUITE_FEATURES;
149339
- }
149340
- //#endregion
149341
149478
  //#region src/assets/svgs/table/category/data-table.svg
149342
149479
  var data_table_default = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1781603088074'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='73543'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M667.9552%20867.84h185.1392V421.9904h-185.1392v445.8496z%20m-255.5904%200h199.3216V421.9904H412.3648v445.8496z%20m-241.4592%200h185.088V421.9904H170.9056v445.8496z%20m0-502.1184h682.1376V156.16H170.9056v209.5616zM909.3632%20885.76a38.4%2038.4%200%200%201-38.4%2038.4H153.088a38.4%2038.4%200%200%201-38.4-38.4V153.6c0-29.696%2024.064-53.76%2053.76-53.76H855.552c29.696%200%2053.76%2024.064%2053.76%2053.76v732.16z'%20fill='%23434855'%20p-id='73544'%3e%3c/path%3e%3cpath%20d='M854.1696%20616.96v56.32H170.8032v-56.32h683.3664z'%20fill='%23026AC8'%20p-id='73545'%3e%3c/path%3e%3c/svg%3e";
149343
149480
  //#endregion
@@ -149497,6 +149634,7 @@ init_base$2();
149497
149634
  init_core();
149498
149635
  init__register_();
149499
149636
  init_table$1();
149637
+ init_suite_features();
149500
149638
  init_useTableSelection();
149501
149639
  init_logic$1();
149502
149640
  var _hoisted_1$120 = { class: "ribbon-tab-item" };
@@ -150821,6 +150959,7 @@ var toolkit_content_widgets_default = /*#__PURE__*/ _plugin_vue_export_helper_de
150821
150959
  //#region src/runtime/designer/toolkit/toolkit.vue?vue&type=script&setup=true&lang.ts
150822
150960
  init_core();
150823
150961
  init__register_();
150962
+ init_suite_features();
150824
150963
  var _hoisted_1$112 = { class: "designer_toolkit-wrapper" };
150825
150964
  var toolkit_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
150826
150965
  __name: "toolkit",
@@ -164120,6 +164259,7 @@ init_api$1();
164120
164259
  init_base$2();
164121
164260
  init_core();
164122
164261
  init__register_();
164262
+ init_suite_features();
164123
164263
  var _hoisted_1$70 = { class: "panel-data-init" };
164124
164264
  var _hoisted_2$36 = { class: "collapse-inner param-area" };
164125
164265
  var _hoisted_3$23 = { class: "collapse-inner data-source-area" };
@@ -93,6 +93,10 @@ export declare class MaterialConsumeTableController {
93
93
  dataStatus?: string;
94
94
  /** 表单是否已暂存或提交(已处理过则不再跑初始化) */
95
95
  get isDataProcessed(): boolean;
96
+ /** 当前控制器已绑定的文档。一个文档可能拆成多个画布表格组件。 */
97
+ private setupDoc?;
98
+ /** 脱离分页表格组件生命周期,同一文档只保留一组监听。 */
99
+ private setupScope?;
96
100
  /** 批次数量或生产数量 */
97
101
  get materialNoNum(): any;
98
102
  /** 物料消耗模式(自身没有配置的话取环境的默认值) */
@@ -6,6 +6,8 @@ import { FIELD_TYPE } from '../../domain/field/field-type';
6
6
  * 由 {@link SuiteRuntime} 实现。
7
7
  */
8
8
  export interface FieldModelQuery {
9
+ /** 当前套件 key */
10
+ readonly suiteKey?: SuiteKey;
9
11
  readonly fieldScope: FieldScope;
10
12
  loadFieldList(modelKey: ModelKey, params?: any): Promise<FieldListResult>;
11
13
  loadFieldByKey(modelKey: ModelKey, key: string): Promise<FieldMeta | undefined>;
@@ -1,7 +1,7 @@
1
1
  import { BusinessSubTableType } from '../../domain/table/types';
2
2
  /**
3
3
  * 套件级 UI / 能力可见性
4
- * 默认全开;各套件按需覆盖。
4
+ * UI 默认全开,各套件按需覆盖;依赖特定后端接口的能力默认关闭,由套件打开。
5
5
  */
6
6
  export interface SuiteFeatures {
7
7
  /** Ribbon「业务表」中隐藏的表类型 */
@@ -12,6 +12,8 @@ export interface SuiteFeatures {
12
12
  showObjectInit: boolean;
13
13
  /** 数据面板「数据加载」区块 */
14
14
  showDataLoad: boolean;
15
+ /** 工序接收数量:打开时用 em_routing_operation_number/getOne 现查(仅 EDHR 有此接口) */
16
+ hydrateOperationReceiveQty: boolean;
15
17
  }
16
18
  /** 按套件 key 取可见性配置,未知套件回落默认 */
17
19
  export declare function getSuiteFeatures(suiteKey?: string): SuiteFeatures;
package/dist/word.css CHANGED
@@ -8752,31 +8752,32 @@ textarea[data-v-a7d89044]::placeholder {
8752
8752
  word-break: break-all;
8753
8753
  pointer-events: none;
8754
8754
  }
8755
- .tree-node[data-v-6969370b] {
8755
+ .tree-node[data-v-6d1436ce] {
8756
8756
  display: flex;
8757
8757
  align-items: center;
8758
8758
  height: 30px;
8759
+ padding-right: 4px;
8759
8760
  cursor: pointer;
8760
8761
  transition: all 0.2s ease;
8761
8762
  }
8762
- .tree-node[data-v-6969370b]:hover:not(.disabled) {
8763
+ .tree-node[data-v-6d1436ce]:hover:not(.disabled) {
8763
8764
  background: #f2f5f8;
8764
8765
  }
8765
- .tree-node.selected[data-v-6969370b] {
8766
+ .tree-node.selected[data-v-6d1436ce] {
8766
8767
  background: #e6f7ff;
8767
8768
  }
8768
- .tree-node.disabled[data-v-6969370b] {
8769
+ .tree-node.disabled[data-v-6d1436ce] {
8769
8770
  opacity: 0.3;
8770
8771
  pointer-events: none;
8771
8772
  }
8772
- .tree-node .expand-icon[data-v-6969370b] {
8773
+ .tree-node .expand-icon[data-v-6d1436ce] {
8773
8774
  width: 16px;
8774
8775
  display: inline-flex;
8775
8776
  align-items: center;
8776
8777
  justify-content: center;
8777
8778
  margin-right: 4px;
8778
8779
  }
8779
- .tree-node .node-label[data-v-6969370b] {
8780
+ .tree-node .node-label[data-v-6d1436ce] {
8780
8781
  flex: 1;
8781
8782
  font-size: 13px;
8782
8783
  color: #212528;
@@ -8784,9 +8785,10 @@ textarea[data-v-a7d89044]::placeholder {
8784
8785
  overflow: hidden;
8785
8786
  text-overflow: ellipsis;
8786
8787
  }
8787
- .tree-node .node-right[data-v-6969370b] {
8788
+ .tree-node .node-right[data-v-6d1436ce] {
8788
8789
  margin-left: 8px;
8789
8790
  display: inline-flex;
8791
+ flex-shrink: 0;
8790
8792
  align-items: center;
8791
8793
  }
8792
8794
  .tree-dropdown[data-v-c2f538d9] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.74-beta.34",
3
+ "version": "0.1.74-beta.36",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",