@gct-paas/word 0.2.36-beta.0 → 0.2.36-beta.1
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/domain/table/business/material/material-consume/profile/product-fields.d.ts +6 -0
- package/dist/domain/table/design/hooks/on-field-attach.d.ts +3 -0
- package/dist/index.es.js +2072 -1991
- package/dist/runtime/canvas/table/render/material-consume/initial-product-autofill.d.ts +6 -0
- package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts +11 -7
- package/dist/runtime/canvas/table/render/material-consume/product-autofill.d.ts +7 -0
- package/dist/runtime/canvas/table/render/material-consume/product-source.d.ts +4 -0
- package/dist/runtime/canvas/table/render/material-consume/scan-fill.d.ts +7 -2
- package/dist/runtime/factories/createDesignWidgetFactory.d.ts +2 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/autofill-runtime.d.ts +2 -0
- package/dist/word.css +12 -12
- package/package.json +2 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Doc } from '../../../../../core';
|
|
2
|
+
import { IMaterialConsumeData } from '../../../../../domain/table/business/material/types';
|
|
3
|
+
type Updates = Record<string, unknown>;
|
|
4
|
+
/** 初值仅填 undefined,详情或规则错误均不阻断基础行初始化。 */
|
|
5
|
+
export declare function prepareConsumeInitialWrite(doc: Doc, subFieldKey: string, rows: readonly IMaterialConsumeData[]): Promise<Updates>;
|
|
6
|
+
export {};
|
package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts
CHANGED
|
@@ -169,7 +169,7 @@ export declare class MaterialConsumeTableController {
|
|
|
169
169
|
* 未填报时初始化消耗表行数据
|
|
170
170
|
* @param defaultData 子表行默认值(含工序等)
|
|
171
171
|
*/
|
|
172
|
-
initTableData(
|
|
172
|
+
initTableData(doc: Doc, subFieldKey: string, defaultData?: Record<string, any>): Promise<number[]>;
|
|
173
173
|
/**
|
|
174
174
|
* 根据数据计算需要禁用的字段
|
|
175
175
|
* @param row
|
|
@@ -338,14 +338,18 @@ export declare class MaterialConsumeTableController {
|
|
|
338
338
|
*/
|
|
339
339
|
setDefaultValue(row: IMaterialConsumeData, doc: Doc): void;
|
|
340
340
|
getDefaultValue(row: IMaterialConsumeData): any;
|
|
341
|
-
/**
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
handleSelectChange({ changedData, selectedOption, doc, parsed, dataIndex, }: {
|
|
345
|
-
changedData: any;
|
|
341
|
+
/** 下拉写入前校验,只生成更新,不修改当前行。 */
|
|
342
|
+
prepareSelectChange({ pending, selectedOption, doc, parsed, dataIndex, }: {
|
|
343
|
+
pending: Record<string, unknown>;
|
|
346
344
|
selectedOption: any;
|
|
347
345
|
doc: Doc;
|
|
348
346
|
parsed: ParsedValuePath;
|
|
349
347
|
dataIndex: number;
|
|
350
|
-
}): Promise<
|
|
348
|
+
}): Promise<Record<string, unknown>>;
|
|
349
|
+
/** 提交成功后刷新查询条件、禁用状态及派生数量。 */
|
|
350
|
+
afterSelectChange({ doc, parsed, dataIndex, }: {
|
|
351
|
+
doc: Doc;
|
|
352
|
+
parsed: ParsedValuePath;
|
|
353
|
+
dataIndex: number;
|
|
354
|
+
}): void;
|
|
351
355
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Doc } from '../../../../../core';
|
|
2
|
+
type Updates = Record<string, unknown>;
|
|
3
|
+
/** 批次选择只填充实际变化的来源;扫码仍按本次命中行执行。 */
|
|
4
|
+
export declare function getChangedConsumeSourcePaths(doc: Doc, pending: Updates, sourcePaths: readonly string[]): string[];
|
|
5
|
+
/** 仅对指定来源生成填充更新;详情查询失败时保留业务更新。 */
|
|
6
|
+
export declare function prepareConsumeWrite(doc: Doc, pending: Updates, sourcePaths: readonly string[]): Promise<Updates>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type ProductRecord = Record<string, unknown>;
|
|
2
|
+
export declare function productVersionId(value: unknown): string;
|
|
3
|
+
/** 初始化专用:单次批量查询,失败不抛错、不逐条补查。 */
|
|
4
|
+
export declare function loadConsumeInitialProducts(productRefs: readonly unknown[]): Promise<Map<string, ProductRecord>>;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { BomEntryValidator, ScanFillPlan } from './bom-validator';
|
|
2
2
|
import { IMaterialConsumeData } from '../../../../../domain/table/business/material/types';
|
|
3
3
|
export type ValidateCurrentGroupForSwitch = (table: IMaterialConsumeData[], current: BomEntryValidator) => void | Promise<void>;
|
|
4
|
+
export interface ScanFillResult {
|
|
5
|
+
rows: IMaterialConsumeData[];
|
|
6
|
+
/** 本次扫码实际写入行的稳定身份 */
|
|
7
|
+
filledRowKey: string;
|
|
8
|
+
}
|
|
4
9
|
/**
|
|
5
|
-
* 按 ScanFillPlan 切组 / 建组 /
|
|
10
|
+
* 按 ScanFillPlan 切组 / 建组 / 填充,返回新表及本次写入行的身份(不改入参 arr)。
|
|
6
11
|
* needSwitch 时通过 options.validateCurrentGroupForSwitch 先校验当前组。
|
|
7
12
|
*/
|
|
8
13
|
export declare function applyScanFillPlan(arr: IMaterialConsumeData[], scanRow: IMaterialConsumeData, plan?: ScanFillPlan, options?: {
|
|
9
14
|
validateCurrentGroupForSwitch?: ValidateCurrentGroupForSwitch;
|
|
10
|
-
}): Promise<
|
|
15
|
+
}): Promise<ScanFillResult>;
|
|
@@ -14,6 +14,8 @@ export interface CreateWidgetFromPaletteOptions {
|
|
|
14
14
|
overrideProps?: Record<string, any>;
|
|
15
15
|
/** 用于解析子表业务 Profile */
|
|
16
16
|
refModelType?: string;
|
|
17
|
+
/** 当前模型的完整字段列表,包含对象及对象子字段。 */
|
|
18
|
+
modelFields?: readonly FieldMeta[];
|
|
17
19
|
}
|
|
18
20
|
export declare function createDesignFieldToWidgetFactory(getFieldManifestForField: (f: FieldTypeSource) => FieldManifest | undefined): (field: FieldMeta, opts?: CreateWidgetFromPaletteOptions) => WidgetMeta;
|
|
19
21
|
export declare function createDesignPaperWidgetToWidgetFactory(getManifest: (type: PAPER_WIDGET_TYPE) => PaperWidgetManifest | undefined): (widget: PaperWidgetMeta, opts?: CreateWidgetFromPaletteOptions) => WidgetMeta;
|
|
@@ -9,6 +9,8 @@ type AutofillApplyOptions = {
|
|
|
9
9
|
/** 仅写入指定子表行(插行场景) */
|
|
10
10
|
rowIndexes?: number[];
|
|
11
11
|
};
|
|
12
|
+
/** 只解析目标路径,不执行来源取值或填充。 */
|
|
13
|
+
export declare function getAutofillTargetPaths(autofillRules: AutofillRule[], opts?: AutofillApplyOptions): string[];
|
|
12
14
|
export declare function applyAutofillRules(record: Record<string, unknown>, autofillRules: AutofillRule[], opts?: AutofillApplyOptions): Record<string, unknown>;
|
|
13
15
|
/**
|
|
14
16
|
* 子表插行 / 行初始化:从主表规则补默认值
|