@gct-paas/word 0.1.74-beta.45 → 0.1.74-beta.46

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.
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @gct-paas/word v0.1.74-beta.45 */
1
+ /*! @gct-paas/word v0.1.74-beta.46 */
2
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";
@@ -99109,10 +99109,10 @@ var init_selectStrategy = __esmMin((() => {
99109
99109
  [FIELD_TYPE.ROUTING_OPERATION]: {
99110
99110
  columnsKey: "route-operation",
99111
99111
  fetcher: "ref",
99112
- buildQuery({ keyword, isMockReport }) {
99112
+ buildQuery({ keyword, isMockReport, routingOperationId }) {
99113
99113
  return buildLikeQuery(["name_", "code_"], keyword, {
99114
- type_: "NODE_SPEC",
99115
- ...isMockReport ? {} : { operating_state_: true }
99114
+ ref_master_id_: routingOperationId,
99115
+ type_: "NODE_SPEC"
99116
99116
  });
99117
99117
  },
99118
99118
  transform: transformLotData
@@ -126802,11 +126802,11 @@ var init_material_consume_table_controller = __esmMin((() => {
126802
126802
  * @param defaultData 子表行默认值(含工序等)
126803
126803
  */
126804
126804
  initTableData(dataManager, subFieldKey, defaultData) {
126805
- if (this.isDataProcessed) return;
126805
+ if (this.isDataProcessed) return [];
126806
126806
  const existingRows = dataManager.getRawData()[subFieldKey];
126807
- if (Array.isArray(existingRows) && existingRows.some((row) => row && !row.deleted_ && !row.__gw_default)) return;
126807
+ if (Array.isArray(existingRows) && existingRows.some((row) => row && !row.deleted_ && !row.__gw_default)) return [];
126808
126808
  const rows = this.calcFormState();
126809
- if (!(rows === null || rows === void 0 ? void 0 : rows.length)) return;
126809
+ if (!(rows === null || rows === void 0 ? void 0 : rows.length)) return [];
126810
126810
  const tableRows = transformUtils.transformSourceData2SubTable(rows, {}, defaultData);
126811
126811
  tableRows.forEach((row, i) => {
126812
126812
  ensureFrontRowKey(row);
@@ -126822,6 +126822,7 @@ var init_material_consume_table_controller = __esmMin((() => {
126822
126822
  });
126823
126823
  else this.syncEditingRowDisablement(dataManager, rowPath, row);
126824
126824
  });
126825
+ return tableRows.map((_, index) => index);
126825
126826
  }
126826
126827
  /**
126827
126828
  * 根据数据计算需要禁用的字段
@@ -127019,7 +127020,8 @@ var init_material_consume_table_controller = __esmMin((() => {
127019
127020
  (_this$setupScope = this.setupScope) === null || _this$setupScope === void 0 || _this$setupScope.stop();
127020
127021
  this.setupScope = effectScope(true);
127021
127022
  this.setupDoc = opts.doc;
127022
- this.initTableData(opts.doc.dataManager, opts.subTableInfo.subFieldKey, opts.defaultRowData);
127023
+ const initializedRowIndexes = this.initTableData(opts.doc.dataManager, opts.subTableInfo.subFieldKey, opts.defaultRowData);
127024
+ await hydrateSubtableRowLabels(opts.doc, opts.subTableInfo.subFieldKey, initializedRowIndexes);
127023
127025
  this.setupScope.run(() => {
127024
127026
  watch(() => this.materialNoNum, () => this.syncQtyRequiredFromBom(opts.doc), { immediate: true });
127025
127027
  watch(() => this.tableDataRef.value.map((row) => [
@@ -140550,7 +140552,7 @@ function useTableDropdown(props, searchFilters) {
140550
140552
  /** 非联动场景、可选过滤、或联动已选择关联值时,才展示搜索栏 */
140551
140553
  const showSearch = computed(() => !enableLinkage.value || !linkageRequiresUpstreamValue.value || !!linkDataValue.value);
140552
140554
  const fetcher = async ({ keyword = "", pageNo, pageSize, deviceTypeId }) => {
140553
- var _fieldMeta$value14, _fieldMeta$value15, _window$TMPL_BOM_CONT, _fieldMeta$value16, _fieldMeta$value17, _parsedValuePath$segm;
140555
+ var _fieldMeta$value14, _fieldMeta$value15, _window$TMPL_BOM_CONT, _fieldMeta$value16, _fieldMeta$value17, _parsedValuePath$segm, _docInst$value$params;
140554
140556
  if (!fieldInfo.value) return {
140555
140557
  data: [],
140556
140558
  totalPage: 0,
@@ -140607,7 +140609,8 @@ function useTableDropdown(props, searchFilters) {
140607
140609
  deviceGroupId: widgetProps.value.enableCascadeDataFilter ? widgetProps.value.deviceGroupId : void 0,
140608
140610
  extraParams,
140609
140611
  optionMapping,
140610
- isMockReport: !!docInst.value.isMockReport
140612
+ isMockReport: !!docInst.value.isMockReport,
140613
+ routingOperationId: (_docInst$value$params = docInst.value.paramsConfig) === null || _docInst$value$params === void 0 ? void 0 : _docInst$value$params.routingOperationId
140611
140614
  })) ?? {};
140612
140615
  const apiFetcher = apiFetchers[fetcher];
140613
140616
  if (!apiFetcher) return {
@@ -165,7 +165,7 @@ export declare class MaterialConsumeTableController {
165
165
  * 未填报时初始化消耗表行数据
166
166
  * @param defaultData 子表行默认值(含工序等)
167
167
  */
168
- initTableData(dataManager: DataManager, subFieldKey: string, defaultData?: Record<string, any>): void;
168
+ initTableData(dataManager: DataManager, subFieldKey: string, defaultData?: Record<string, any>): number[];
169
169
  /**
170
170
  * 根据数据计算需要禁用的字段
171
171
  * @param row
@@ -20,6 +20,8 @@ export interface SelectQueryContext {
20
20
  };
21
21
  /** 模拟填报:工序不传 operating_state_,避免模板数据被启用态滤空 */
22
22
  isMockReport?: boolean;
23
+ /** 当前工序 id,用于限定可选工序 */
24
+ routingOperationId?: string;
23
25
  }
24
26
  export interface SelectQueryResult {
25
27
  queryData?: Record<string, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.74-beta.45",
3
+ "version": "0.1.74-beta.46",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",