@gct-paas/word 0.1.56 → 0.1.57-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/README.md +1 -1
- package/dist/assets/svgs/toolkit/index.d.ts +10 -0
- package/dist/base/form-item/src/form-item.vue.d.ts +5 -2
- package/dist/base/modal/src/ModalRoot.vue.d.ts +2 -0
- package/dist/base/modal/src/modal.type.d.ts +4 -0
- package/dist/base/select/src/basic-select.vue.d.ts +5 -0
- package/dist/core/command/commands/SetWsecSize.d.ts +10 -0
- package/dist/core/command/types.d.ts +10 -2
- package/dist/core/constants/index.d.ts +10 -7
- package/dist/core/data/DataManager.d.ts +2 -0
- package/dist/core/data/enrichers/build-field-enrichers.d.ts +0 -4
- package/dist/core/data/enrichers/path-templates.d.ts +2 -0
- package/dist/core/data/enrichers/subtable-path.d.ts +15 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/model/document/WsecPr.d.ts +14 -1
- package/dist/core/model/document/wtcRegionRef.d.ts +1 -1
- package/dist/core/model/logic/subtable/repeating/MaterialConsumeTableRegion.d.ts +3 -0
- package/dist/core/model/logic/subtable/repeating/RepeatingRegion.d.ts +3 -0
- package/dist/core/utils/unit-converter-util.d.ts +2 -0
- package/dist/core/view/Doc.d.ts +5 -1
- package/dist/core/view/Section.d.ts +16 -7
- package/dist/core/widget/e-sop-view.d.ts +4 -0
- package/dist/domain/active/active-types.d.ts +8 -2
- package/dist/domain/constants/field-state.d.ts +9 -0
- package/dist/domain/field/field-props-schema-type.d.ts +1 -1
- package/dist/domain/field/field-type.d.ts +17 -1
- package/dist/domain/field/index.d.ts +1 -0
- package/dist/domain/field/of-inst-num/index.d.ts +1 -0
- package/dist/domain/field/of-inst-num/of-inst-num-enricher.d.ts +23 -0
- package/dist/domain/table/business/material/material-balance/actions/fetch-material-consume-data.d.ts +7 -0
- package/dist/domain/table/business/material/material-balance/actions/index.d.ts +3 -0
- package/dist/domain/table/business/material/material-balance/actions/open-consume-modal.d.ts +7 -0
- package/dist/domain/table/business/material/material-balance/components/material-consume-modal.vue.d.ts +6 -0
- package/dist/domain/table/business/material/material-balance/index.d.ts +1 -0
- package/dist/domain/table/business/material/material-balance/profile/field-keys.d.ts +25 -0
- package/dist/domain/table/business/material/material-balance/profile/fields.d.ts +2 -0
- package/dist/domain/table/business/material/material-balance/runtime/register-handlers.d.ts +1 -0
- package/dist/domain/table/business/material/material-balance/runtime/use-consume-modal-cleanup.d.ts +3 -0
- package/dist/domain/table/business/material/material-consume/runtime/register-handlers.d.ts +1 -0
- package/dist/domain/table/business/material/material-consume/runtime/row-change-handlers.d.ts +2 -0
- package/dist/domain/table/business/warehouse/warehouse-in-out/profile/field-keys.d.ts +8 -0
- package/dist/domain/table/design/autofill-expander.d.ts +3 -1
- package/dist/domain/table/runtime/api/biz-service-api.d.ts +2 -0
- package/dist/domain/table/runtime/engines/init-load-engine.d.ts +1 -0
- package/dist/domain/table/runtime/runtime-handlers.d.ts +2 -0
- package/dist/domain/table/runtime/table-runtime-context.d.ts +3 -3
- package/dist/domain/table/runtime/table-runtime.d.ts +1 -1
- package/dist/domain/table/types.d.ts +5 -1
- package/dist/index.es.js +5438 -2968
- package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts +5 -0
- package/dist/runtime/canvas/table/render/material-consume/tmpl-bom-controller.d.ts +1 -1
- package/dist/runtime/designer/toolkit/svg/toolkit-svg-icon.vue.d.ts +9 -0
- package/dist/runtime/designer/toolkit/toolkit-item.vue.d.ts +5 -3
- package/dist/runtime/designer/toolkit/toolkit.vue.d.ts +18 -18
- package/dist/runtime/factories/createValidateFactory.d.ts +2 -0
- package/dist/runtime/factories/useFormValidator.d.ts +4 -0
- package/dist/runtime/interface/computed.d.ts +9 -2
- package/dist/runtime/interface/context-defaults.d.ts +9 -0
- package/dist/runtime/interface/fetchers.d.ts +8 -0
- package/dist/runtime/interface/render.d.ts +0 -24
- package/dist/runtime/renderer/dialogs/signature/logic.d.ts +2 -0
- package/dist/runtime/renderer/dialogs/signature/signature-dialog.vue.d.ts +2 -0
- package/dist/runtime/renderer/dialogs/signature/validate-signature-config.d.ts +5 -0
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/rdo-ref.d.ts +17 -0
- package/dist/sdk/doc-runtime/composables/useDocOperations.d.ts +3 -0
- package/dist/sdk/doc-runtime/factories/runtime-json-builder.d.ts +2 -2
- package/dist/sdk/doc-runtime/factories/useDocumentFactory.d.ts +1 -12
- package/dist/sdk/engine/index.d.ts +2 -2
- package/dist/sdk/types/index.d.ts +16 -1
- package/dist/suites/edhr/manifest/field/_common_/basic.d.ts +7 -0
- package/dist/suites/edhr/manifest/field/business/of-inst-num-manifest.d.ts +2 -0
- package/dist/suites/edhr/manifest/field/logic/e-sop-manifest.d.ts +2 -0
- package/dist/suites/edhr/manifest/field/logic/e-sop-version-manifest.d.ts +2 -0
- package/dist/suites/edhr/manifest/field/trace/shopfloor-manifest.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/index.d.ts +1 -0
- package/dist/suites/edhr/panel-schema/material-balance-table/MaterialBalanceTablePanel.vue.d.ts +8 -0
- package/dist/suites/edhr/panel-schema/material-balance-table/material-balance-table.basic.d.ts +1 -0
- package/dist/suites/edhr/panel-schema/paper/modules/page-size-config.vue.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/paper/modules/signature-config.vue.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/paper/modules/table-setting-config.vue.d.ts +2 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/autofill-runtime.d.ts +15 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-utils.d.ts +22 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/from-field-tree-utils.d.ts +5 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/to-field-tree-utils.d.ts +19 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/types.d.ts +11 -0
- package/dist/suites/shared/panel/modules/online-form-tmpl-module/online-form-tmpl-utils.d.ts +3 -0
- package/dist/utils/TriggerUtil.d.ts +1 -1
- package/dist/utils/composables/usePagesToPdf.d.ts +2 -2
- package/dist/utils/func/core.d.ts +4 -0
- package/dist/utils/func/form.d.ts +8 -0
- package/dist/word.css +810 -368
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -221,7 +221,7 @@ if (!errors) {
|
|
|
221
221
|
当前包主入口为 `@gct-paas/word`,可直接使用以下能力:
|
|
222
222
|
|
|
223
223
|
- 初始化 API:`setupPlatformAdapters`、`setupVueRuntime`
|
|
224
|
-
- 引擎/类型:`useWord`、`DocModeTypeConst`、`
|
|
224
|
+
- 引擎/类型:`useWord`、`DocModeTypeConst`、`PaperSizeConst`、`BuiltinComponentTypeConst`、`WordRuntime`、`DocController` 等
|
|
225
225
|
- Vue 组件:`DocDesignLayout`、`DocRenderLayout`、`GctLayout`
|
|
226
226
|
- 插件能力:`registerSuite`、`WordSuitePlugin`、`edhrSuitePlugin`、`registerPanelSchemas`
|
|
227
227
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Toolkit 项图标 */
|
|
2
|
+
export declare const TOOLKIT_SVG: {
|
|
3
|
+
readonly config: string;
|
|
4
|
+
readonly script: string;
|
|
5
|
+
readonly field: string;
|
|
6
|
+
readonly data: string;
|
|
7
|
+
readonly component: string;
|
|
8
|
+
readonly rule: string;
|
|
9
|
+
};
|
|
10
|
+
export type ToolkitSvgKey = keyof typeof TOOLKIT_SVG;
|
|
@@ -2,7 +2,9 @@ type __VLS_Props = {
|
|
|
2
2
|
label?: string;
|
|
3
3
|
inline?: boolean;
|
|
4
4
|
required?: boolean;
|
|
5
|
-
size?:
|
|
5
|
+
size?: 'small' | 'default' | 'large';
|
|
6
|
+
/** 是否取消与上一项之间的间距 */
|
|
7
|
+
disableSpacing?: boolean;
|
|
6
8
|
};
|
|
7
9
|
declare function __VLS_template(): {
|
|
8
10
|
attrs: Partial<{}>;
|
|
@@ -17,8 +19,9 @@ declare function __VLS_template(): {
|
|
|
17
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
20
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
21
|
required: boolean;
|
|
20
|
-
size:
|
|
22
|
+
size: "small" | "default" | "large";
|
|
21
23
|
inline: boolean;
|
|
24
|
+
disableSpacing: boolean;
|
|
22
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
27
|
export default _default;
|
|
@@ -14,6 +14,8 @@ declare const _default: import('vue').DefineComponent<IModalProps, {}, {}, {}, {
|
|
|
14
14
|
confirmText: string;
|
|
15
15
|
confirmContinueText: string;
|
|
16
16
|
cancelText: string;
|
|
17
|
+
draggable: boolean;
|
|
18
|
+
showMask: boolean;
|
|
17
19
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
18
20
|
bodyRef: unknown;
|
|
19
21
|
}, any>;
|
|
@@ -24,6 +24,10 @@ export interface IModalOptions {
|
|
|
24
24
|
confirmText?: string;
|
|
25
25
|
confirmContinueText?: string;
|
|
26
26
|
cancelText?: string;
|
|
27
|
+
/** 是否可拖拽移动 */
|
|
28
|
+
draggable?: boolean;
|
|
29
|
+
/** 是否显示遮罩,draggable 时默认 false */
|
|
30
|
+
showMask?: boolean;
|
|
27
31
|
onConfirm?: (ins: IModalInstance) => Promise<void> | void;
|
|
28
32
|
onConfirmContinue?: (ins: IModalInstance) => Promise<void> | void;
|
|
29
33
|
onCancel?: (ins: IModalInstance) => Promise<void> | void;
|
|
@@ -22,6 +22,10 @@ type __VLS_Props = {
|
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
/** 不显示右侧箭头 */
|
|
24
24
|
noArrow?: boolean;
|
|
25
|
+
/** 是否允许清除 */
|
|
26
|
+
allowClear?: boolean;
|
|
27
|
+
/** 弹窗选择模式:编辑态外观,点击不展开下拉 */
|
|
28
|
+
picker?: boolean;
|
|
25
29
|
/** 是否需要分组展示 */
|
|
26
30
|
grouped?: boolean;
|
|
27
31
|
};
|
|
@@ -69,6 +73,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
69
73
|
disabled: boolean;
|
|
70
74
|
options: DropdownOption[];
|
|
71
75
|
placeholder: string;
|
|
76
|
+
allowClear: boolean;
|
|
72
77
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
73
78
|
dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
74
79
|
P: {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Doc } from '../../view/Doc';
|
|
2
|
+
import { CommandPayloadMap } from '../types';
|
|
3
|
+
import { CommandBase, PostCommandContext } from '../base/CommandBase';
|
|
4
|
+
/**
|
|
5
|
+
* 设置 Wsec 大小
|
|
6
|
+
*/
|
|
7
|
+
export declare class SetWsecSize extends CommandBase {
|
|
8
|
+
constructor(doc: Doc, payload: CommandPayloadMap['setWsecSize']);
|
|
9
|
+
protected execute(): Promise<PostCommandContext>;
|
|
10
|
+
}
|
|
@@ -4,6 +4,7 @@ import { WidgetMeta } from '../widget/widget-meta';
|
|
|
4
4
|
import { WordHighlight } from '../model/types';
|
|
5
5
|
import { PointerHitResult } from '../cursor/hit/types';
|
|
6
6
|
import { SubTableLayoutType, SubTableRegionType } from '../model/document/wtcRegionRef';
|
|
7
|
+
import { PaperSize } from '../constants';
|
|
7
8
|
export interface CursorMeta {
|
|
8
9
|
nodeId: string;
|
|
9
10
|
offset: number;
|
|
@@ -27,6 +28,7 @@ export interface ICommand<T extends CommandType = CommandType> {
|
|
|
27
28
|
}
|
|
28
29
|
export type CommandConstructor = new (doc: Doc, payload?: any) => ICommand<any>;
|
|
29
30
|
export declare const CommandType: {
|
|
31
|
+
readonly setWsecSize: "setWsecSize";
|
|
30
32
|
readonly setOrient: "setOrient";
|
|
31
33
|
readonly setPadding: "setPadding";
|
|
32
34
|
readonly setHeaderFooterConfig: "setHeaderFooterConfig";
|
|
@@ -112,13 +114,19 @@ export type CommandPayloadMap = {
|
|
|
112
114
|
delete: CommandPayload & Record<string, never>;
|
|
113
115
|
backspace: CommandPayload & Record<string, never>;
|
|
114
116
|
enter: CommandPayload & Record<string, never>;
|
|
117
|
+
setWsecSize: CommandPayload & {
|
|
118
|
+
paperSize: PaperSize;
|
|
119
|
+
twipWidth: number;
|
|
120
|
+
twipHeight: number;
|
|
121
|
+
secRefId: string;
|
|
122
|
+
};
|
|
115
123
|
setOrient: CommandPayload & {
|
|
116
124
|
orient: VOrientationType;
|
|
117
|
-
|
|
125
|
+
secRefId: string;
|
|
118
126
|
};
|
|
119
127
|
setPadding: CommandPayload & {
|
|
120
128
|
padding: [number, number, number, number];
|
|
121
|
-
|
|
129
|
+
secRefId: string;
|
|
122
130
|
};
|
|
123
131
|
setHeaderFooterConfig: CommandPayload & {
|
|
124
132
|
headerMargin?: number;
|
|
@@ -36,7 +36,7 @@ export declare const DocModeTypeConst: {
|
|
|
36
36
|
};
|
|
37
37
|
export type DocModeType = ValueOf<typeof DocModeTypeConst>;
|
|
38
38
|
/** 纸张大小 */
|
|
39
|
-
export declare const
|
|
39
|
+
export declare const PaperSizeConst: {
|
|
40
40
|
/** A3 */
|
|
41
41
|
readonly A3: "A3";
|
|
42
42
|
/** A4 */
|
|
@@ -46,13 +46,16 @@ export declare const PageSizeEnumConst: {
|
|
|
46
46
|
/** 自定义 */
|
|
47
47
|
readonly CUSTOM: "CUSTOM";
|
|
48
48
|
};
|
|
49
|
+
export type PaperSize = ValueOf<typeof PaperSizeConst>;
|
|
50
|
+
export type StandardPaperSize = Exclude<PaperSize, 'CUSTOM'>;
|
|
51
|
+
export interface IPaperInfo {
|
|
52
|
+
paperSize: PaperSize;
|
|
53
|
+
mmWidth: number;
|
|
54
|
+
mmHeight: number;
|
|
55
|
+
}
|
|
49
56
|
/** 纸张大小 单位: mm */
|
|
50
|
-
export declare const
|
|
51
|
-
|
|
52
|
-
A4: number[];
|
|
53
|
-
A5: number[];
|
|
54
|
-
};
|
|
55
|
-
export type PageSizeEnum = ValueOf<typeof PageSizeEnumConst>;
|
|
57
|
+
export declare const PaperSizeMmMap: Record<StandardPaperSize, [number, number]>;
|
|
58
|
+
/** 默认纸张大小 单位: mm */
|
|
56
59
|
export declare const DEFAULT_PAGE_SIZE: {
|
|
57
60
|
width: number;
|
|
58
61
|
height: number;
|
|
@@ -16,10 +16,6 @@ export declare function resolveEnricherWidgetProps(instance: {
|
|
|
16
16
|
}): Record<string, unknown>;
|
|
17
17
|
/** 根据文档 widget 列表构建全部 enricher 注册项 */
|
|
18
18
|
export declare function buildFieldEnricherRegistrations(instances: any[], ctx: PostChangePipelineContext, doc: Doc): DataEnricherRegistration[];
|
|
19
|
-
/**
|
|
20
|
-
* 将设计/初始化路径模板展开为运行时具体路径(含 [n] / [n_y][n_x])
|
|
21
|
-
*/
|
|
22
|
-
export declare function expandInitPathTemplates(templatePath: string, rawData: Record<string, any>): string[];
|
|
23
19
|
/**
|
|
24
20
|
* 收集 init / 换数后需要跑 hydrate 的运行时路径(仅 rawData 中已有值的字段)
|
|
25
21
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Doc } from '../../view/Doc';
|
|
2
|
+
/** 子表在 rawData 中的行数(含接口 { data: [] } 形态,未转数组时返回 0) */
|
|
3
|
+
export declare function countSubTableDataRows(rawData: Record<string, unknown>, subFieldKey: string): number;
|
|
4
|
+
/** 子表应展开的行数:已有数据行与版面槽位取较大值(动态表无数据时至少 1 行) */
|
|
5
|
+
export declare function resolveSubTableRowCount(doc: Doc | undefined, subFieldKey: string, rawData: Record<string, unknown>): number;
|
|
6
|
+
export declare function resolveSubTableRowIndexes(doc: Doc | undefined, subFieldKey: string, rawData: Record<string, unknown>, rowIndexes?: number[]): number[];
|
|
7
|
+
export declare function mapTemplateToRowPaths(templatePath: string, rowIndexes: number[]): string[];
|
|
8
|
+
export interface ExpandSubTableWidgetPathsOptions {
|
|
9
|
+
rowIndexes?: number[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 子表 widget 路径展开:优先按版面/数据行数展开 [n];
|
|
13
|
+
* rawData 尚无行时回退到版面槽位(动态表初始 {} / [])。
|
|
14
|
+
*/
|
|
15
|
+
export declare function expandSubTableWidgetPaths(doc: Doc | undefined, templatePath: string, rawData: Record<string, unknown>, options?: ExpandSubTableWidgetPathsOptions): string[];
|
package/dist/core/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { validateTextWidgetMarker } from './layout/logic/LayoutBuilder';
|
|
|
9
9
|
export { CommandType } from './command/types';
|
|
10
10
|
export { ModelConverter } from './model';
|
|
11
11
|
export { DocumentEventBridge } from './event/DocumentEventBridge';
|
|
12
|
-
export { DocModeTypeConst,
|
|
12
|
+
export { DocModeTypeConst, PaperSizeConst, BuiltinComponentTypeConst } from './constants';
|
|
13
13
|
export { default as CursorOverlay } from './cursor/render/cursor-overlay.vue';
|
|
14
14
|
export { default as HiddenInput } from './cursor/render/hidden-input.vue';
|
|
15
15
|
export type { DocInitOptions } from './view/Doc';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { RawElement } from '../types/raw';
|
|
2
2
|
import { ModelNode, RefManager, ModelNodeOptions, SimpleRef, SlotRef } from '../base';
|
|
3
|
+
import { PaperSize } from '../../constants';
|
|
3
4
|
export type HeaderFooterKind = 'header' | 'footer';
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* 页面大小配置,单位: twip
|
|
6
7
|
*/
|
|
7
8
|
export interface PageSize {
|
|
8
9
|
width?: number;
|
|
@@ -45,6 +46,7 @@ export declare class WsecPr extends ModelNode {
|
|
|
45
46
|
/** 节点类型 */
|
|
46
47
|
type: "element";
|
|
47
48
|
raw: RawElement;
|
|
49
|
+
paperSize?: PaperSize;
|
|
48
50
|
pageSize?: PageSize;
|
|
49
51
|
margins?: PageMargins;
|
|
50
52
|
columns?: Columns;
|
|
@@ -60,6 +62,7 @@ export declare class WsecPr extends ModelNode {
|
|
|
60
62
|
fromParagraph: boolean;
|
|
61
63
|
constructor(options: ModelNodeOptions & {
|
|
62
64
|
raw: RawElement;
|
|
65
|
+
paperSize?: PaperSize;
|
|
63
66
|
pageSize?: PageSize;
|
|
64
67
|
margins?: PageMargins;
|
|
65
68
|
columns?: Columns;
|
|
@@ -119,6 +122,16 @@ export declare class WsecPr extends ModelNode {
|
|
|
119
122
|
* 重新计算浮层引用,并写回 raw
|
|
120
123
|
*/
|
|
121
124
|
normalizeOverlayRefs(refs: string[], secIds: string[]): void;
|
|
125
|
+
getWsecSize(): {
|
|
126
|
+
paperSize: PaperSize | undefined;
|
|
127
|
+
twipWidth: number | undefined;
|
|
128
|
+
twipHeight: number | undefined;
|
|
129
|
+
};
|
|
130
|
+
setWsecSize(option: {
|
|
131
|
+
paperSize: PaperSize;
|
|
132
|
+
twipWidth: number;
|
|
133
|
+
twipHeight: number;
|
|
134
|
+
}): void;
|
|
122
135
|
/**
|
|
123
136
|
* 获取当前页面方向
|
|
124
137
|
* @returns 'portrait' | 'landscape' | null
|
|
@@ -29,7 +29,7 @@ export declare const SUB_TABLE_REGION_TYPES: readonly ["repeating", "bounded", "
|
|
|
29
29
|
* 子表 layout 类型
|
|
30
30
|
* Ribbon 面板、子表主题色均使用此类型;主题配置见 @/domain/table 各 Profile.theme
|
|
31
31
|
*/
|
|
32
|
-
export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table' | 'warehouse-in-out-table' | 'warehouse-inventory-table' | 'warehouse-allocate-table';
|
|
32
|
+
export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table' | 'material-balance-table' | 'warehouse-in-out-table' | 'warehouse-inventory-table' | 'warehouse-allocate-table';
|
|
33
33
|
/** 表头 layout 类型 */
|
|
34
34
|
export type TableHeaderLayoutType = 'table-header';
|
|
35
35
|
/** 所有子表表格 layout 类型 */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Wtbl } from '../../../document';
|
|
2
2
|
import { Region, RegionOptions } from '../../base/Region';
|
|
3
3
|
import { RegionJson } from '../../../types';
|
|
4
|
+
import { SubTableLayoutType } from '../../../document/wtcRegionRef';
|
|
4
5
|
export type MaterialConsumeTableWidgetPropsMeta = {
|
|
5
6
|
table_key_: string;
|
|
6
7
|
barcode_parsing_rules_id_?: string;
|
|
@@ -32,6 +33,8 @@ export declare class MaterialConsumeTableRegion extends Region {
|
|
|
32
33
|
get linkFieldKey(): string;
|
|
33
34
|
get subValuePath(): string;
|
|
34
35
|
get linkValuePath(): string;
|
|
36
|
+
/** 设计/渲染层子表类型 */
|
|
37
|
+
get layoutType(): SubTableLayoutType;
|
|
35
38
|
toJSON(): MaterialConsumeTableRegionJson;
|
|
36
39
|
static fromJSON(json: MaterialConsumeTableRegionJson, table: Wtbl): MaterialConsumeTableRegion;
|
|
37
40
|
}
|
|
@@ -19,6 +19,9 @@ export type WarehouseInventoryTableProps = RepeatingWidgetPropsBase & {
|
|
|
19
19
|
/** 条码解析规则 */
|
|
20
20
|
barcode_parsing_rules_id_?: string;
|
|
21
21
|
};
|
|
22
|
+
export type MaterialBalanceTableProps = RepeatingWidgetPropsBase & {
|
|
23
|
+
layoutType: 'material-balance-table';
|
|
24
|
+
};
|
|
22
25
|
export type WarehouseAllocateTableProps = RepeatingWidgetPropsBase & {
|
|
23
26
|
layoutType: 'warehouse-allocate-table';
|
|
24
27
|
barcode_parsing_rules_id_?: string;
|
|
@@ -30,12 +30,14 @@ export declare class UnitConverter {
|
|
|
30
30
|
* @returns cm
|
|
31
31
|
*/
|
|
32
32
|
static twipToCm(twip: number): number;
|
|
33
|
+
static twipToMm(twip: number): number;
|
|
33
34
|
/**
|
|
34
35
|
* 将 cm 转换为twips
|
|
35
36
|
* @param cm cm 值
|
|
36
37
|
* @returns Twips 值
|
|
37
38
|
*/
|
|
38
39
|
static cmToTwip(cm: number): number;
|
|
40
|
+
static mmToTwip(mm: number): number;
|
|
39
41
|
/**
|
|
40
42
|
* 将像素转换为 twips
|
|
41
43
|
* @param pixel 像素值
|
package/dist/core/view/Doc.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { InteractionManager } from '../interaction/InteractionManager';
|
|
|
10
10
|
import { DocModeType } from '../constants';
|
|
11
11
|
import { CommandPayloadMap, RequiredPayloadCommands, OptionalPayloadCommands } from '../command/types';
|
|
12
12
|
import { DocModel } from '../model';
|
|
13
|
-
import { DocRuntimeMeta, FieldModelQuery } from '../../sdk/types';
|
|
13
|
+
import { DocRuntimeMeta, FieldModelQuery, IDeviceConfig } from '../../sdk/types';
|
|
14
14
|
export interface DocInitOptions {
|
|
15
15
|
mode?: DocModeType;
|
|
16
16
|
model?: DocModel;
|
|
@@ -22,6 +22,8 @@ export interface DocInitOptions {
|
|
|
22
22
|
btnRenderModeType: DocModeType;
|
|
23
23
|
formType: string;
|
|
24
24
|
paramsConfig: Record<string, any>;
|
|
25
|
+
/** 设备配置信息 */
|
|
26
|
+
deviceConfig?: IDeviceConfig;
|
|
25
27
|
pageSize?: {
|
|
26
28
|
width: number;
|
|
27
29
|
height: number;
|
|
@@ -65,6 +67,8 @@ export declare class Doc {
|
|
|
65
67
|
docRuntimeMeta: DocRuntimeMeta;
|
|
66
68
|
/** 外部的参数配置 */
|
|
67
69
|
paramsConfig: Record<string, any>;
|
|
70
|
+
/** 设备配置信息 */
|
|
71
|
+
deviceConfig?: IDeviceConfig;
|
|
68
72
|
/** 字段/模型查询(由上层注入 `SuiteRuntime` 等实现) */
|
|
69
73
|
fieldModelQuery: FieldModelQuery;
|
|
70
74
|
/** 安全距离-上下 */
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { PageMargins, WsecPr } from '../model/document';
|
|
2
|
-
import {
|
|
2
|
+
import { PaperSize } from '../constants';
|
|
3
|
+
/**
|
|
4
|
+
* 单位: px
|
|
5
|
+
*/
|
|
6
|
+
export interface SectionPageSize {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
3
10
|
export type SectionOption = {
|
|
4
|
-
pageSize?:
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
|
11
|
+
pageSize?: SectionPageSize;
|
|
8
12
|
pagePadding?: [number, number, number, number];
|
|
9
13
|
bgColor?: string;
|
|
10
14
|
refId: string;
|
|
@@ -55,8 +59,13 @@ export declare class Section {
|
|
|
55
59
|
getContentHeight(): number;
|
|
56
60
|
/** 获取当前页面方向 */
|
|
57
61
|
getOrient(): 'portrait' | 'landscape';
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
/** 获取页面大小 枚举 */
|
|
63
|
+
getWsecSize(): {
|
|
64
|
+
paperSize: PaperSize;
|
|
65
|
+
twipWidth?: number | undefined;
|
|
66
|
+
twipHeight?: number | undefined;
|
|
67
|
+
};
|
|
68
|
+
getPaperSize(): PaperSize;
|
|
60
69
|
/**
|
|
61
70
|
* 获取页面尺寸信息(用于调试)
|
|
62
71
|
* @returns 格式化的页面信息
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Doc } from '../view/Doc';
|
|
2
|
+
import { WidgetMeta } from './widget-meta';
|
|
3
|
+
export declare function isESopField(widgetMeta?: WidgetMeta | null): boolean;
|
|
4
|
+
export declare function openESopViewModal(doc: Doc, widgetMeta: WidgetMeta, runtimeValuePath: string): Promise<void>;
|
|
@@ -4,16 +4,22 @@ export type PanelType =
|
|
|
4
4
|
'panel:paper'
|
|
5
5
|
/** 页眉页脚 */
|
|
6
6
|
| 'panel:paper-header-footer'
|
|
7
|
+
/** 配置 */
|
|
8
|
+
| 'panel:config'
|
|
9
|
+
/** 脚本 */
|
|
10
|
+
| 'panel:script'
|
|
7
11
|
/** 数据初始化 */
|
|
8
12
|
| 'panel:data-init'
|
|
9
|
-
/**
|
|
10
|
-
| 'panel:
|
|
13
|
+
/** 规则 */
|
|
14
|
+
| 'panel:rule'
|
|
11
15
|
/** 动态表 */
|
|
12
16
|
| 'panel:dynamic-table'
|
|
13
17
|
/** 出入库明细表 */
|
|
14
18
|
| 'panel:warehouse-in-out-table'
|
|
15
19
|
/** 库存盘点表 */
|
|
16
20
|
| 'panel:warehouse-inventory-table'
|
|
21
|
+
/** 物料平衡表 */
|
|
22
|
+
| 'panel:material-balance-table'
|
|
17
23
|
/** 库存调拨表 */
|
|
18
24
|
| 'panel:warehouse-allocate-table'
|
|
19
25
|
/** 二维表 */
|
|
@@ -42,4 +42,13 @@ export declare const FieldStateColors: {
|
|
|
42
42
|
readonly disabledText: "#c9c9c9";
|
|
43
43
|
readonly disabledLine: "#c9c9c9";
|
|
44
44
|
readonly disabledFill: "rgba(0, 0, 0, 0.04)";
|
|
45
|
+
/** 校验失败(超上下限等) */
|
|
46
|
+
readonly validationErrorText: "#ff4d4f";
|
|
47
|
+
readonly validationErrorLine: "#ff4d4f";
|
|
48
|
+
readonly validationErrorBg: "#fff2f2";
|
|
49
|
+
/** 禁用态校验失败 */
|
|
50
|
+
readonly validationErrorDisabledText: "#ff7072";
|
|
51
|
+
readonly validationErrorDisabledLine: "#ff8a8c";
|
|
52
|
+
readonly validationErrorDisabledBg: "#f5f5f5";
|
|
53
|
+
readonly validationErrorDisabledBgActive: "#f0f0f0";
|
|
45
54
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** 字段配置-渲染组件标识 */
|
|
2
|
-
export type FieldPropsSchemaKey = 'schema:field-text' | 'schema:field-boolean' | 'schema:field-number' | 'schema:field-datetime' | 'schema:field-user' | 'schema:field-org' | 'schema:field-sign' | 'schema:field-enum' | 'schema:field-file' | 'schema:field-image' | 'schema:field-trace' | 'schema:field-business' | 'schema:field-ref';
|
|
2
|
+
export type FieldPropsSchemaKey = 'schema:field-text' | 'schema:field-boolean' | 'schema:field-number' | 'schema:field-datetime' | 'schema:field-user' | 'schema:field-org' | 'schema:field-sign' | 'schema:field-enum' | 'schema:field-file' | 'schema:field-image' | 'schema:field-trace' | 'schema:field-business' | 'schema:field-ref' | 'schema:field-rdo-ref' | 'schema:field-e-sop-version';
|
|
3
3
|
/** 优先级规则 */
|
|
4
4
|
export interface PriorityRule {
|
|
5
5
|
type: 'priority';
|
|
@@ -212,6 +212,10 @@ export declare enum FIELD_TYPE {
|
|
|
212
212
|
* 工单号
|
|
213
213
|
*/
|
|
214
214
|
MFG_ORDER = "mfg_order",
|
|
215
|
+
/**
|
|
216
|
+
* 车间
|
|
217
|
+
*/
|
|
218
|
+
SHOPFLOOR = "shopfloor",
|
|
215
219
|
/**
|
|
216
220
|
* 记录单号
|
|
217
221
|
*/
|
|
@@ -355,5 +359,17 @@ export declare enum FIELD_TYPE {
|
|
|
355
359
|
/**
|
|
356
360
|
* 需求数量
|
|
357
361
|
*/
|
|
358
|
-
QTY_REQUIRED = "qty_required"
|
|
362
|
+
QTY_REQUIRED = "qty_required",
|
|
363
|
+
/**
|
|
364
|
+
* E-SOP
|
|
365
|
+
*/
|
|
366
|
+
E_SOP = "e_sop",
|
|
367
|
+
/**
|
|
368
|
+
* E-SOP版本
|
|
369
|
+
*/
|
|
370
|
+
E_SOP_VERSION = "e_sop_version",
|
|
371
|
+
/**
|
|
372
|
+
* 实例数
|
|
373
|
+
*/
|
|
374
|
+
OF_INST_NUM = "of_inst_num"
|
|
359
375
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './of-inst-num';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createOfInstNumEnricher, tryCollectOfInstNumTarget, type OfInstNumWidgetTarget, } from './of-inst-num-enricher';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Doc } from '../../../core';
|
|
2
|
+
import { DataEnricherRegistration } from '../../../core/data/enricher-types';
|
|
3
|
+
import { FIELD_TYPE } from '../field-type';
|
|
4
|
+
export interface OfInstNumWidgetTarget {
|
|
5
|
+
valuePath: string;
|
|
6
|
+
bindFormTmplRefId?: string | null;
|
|
7
|
+
}
|
|
8
|
+
type OfInstNumWidgetInstance = {
|
|
9
|
+
widgetMeta?: {
|
|
10
|
+
field?: {
|
|
11
|
+
fieldType?: FIELD_TYPE;
|
|
12
|
+
type?: FIELD_TYPE;
|
|
13
|
+
bizType?: FIELD_TYPE;
|
|
14
|
+
};
|
|
15
|
+
props?: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
valuePath?: string;
|
|
18
|
+
};
|
|
19
|
+
/** 从单个 widget 实例解析实例数 enrich 目标 */
|
|
20
|
+
export declare function tryCollectOfInstNumTarget(instance: OfInstNumWidgetInstance): OfInstNumWidgetTarget | null;
|
|
21
|
+
/** 实例数:从 paramsConfig 取批次号/工单号,按绑定模板拉取并写回主值 */
|
|
22
|
+
export declare function createOfInstNumEnricher(doc: Doc, targets: OfInstNumWidgetTarget[]): DataEnricherRegistration;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Doc } from '../../../../../../core';
|
|
2
|
+
export type MaterialConsumeModalRow = {
|
|
3
|
+
materialLabel: string;
|
|
4
|
+
consumeQty: unknown;
|
|
5
|
+
};
|
|
6
|
+
/** 拉取物料消耗分组数据(弹框专用,与页面子表编辑态隔离) */
|
|
7
|
+
export declare function fetchMaterialConsumeGroupProduct(doc: Doc): Promise<MaterialConsumeModalRow[]>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Doc } from '../../../../../../core';
|
|
2
|
+
/** 打开物料平衡表消耗明细弹框(数据来自 get_material_consume_group_product 接口) */
|
|
3
|
+
export declare function openMaterialBalanceConsumeModal(options: {
|
|
4
|
+
doc: Doc;
|
|
5
|
+
}): Promise<void>;
|
|
6
|
+
/** 关闭物料平衡表消耗明细弹框 */
|
|
7
|
+
export declare function closeMaterialBalanceConsumeModal(): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MaterialConsumeModalRow } from '../actions/fetch-material-consume-data';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
rows: MaterialConsumeModalRow[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 平衡表字段 key 统一定义
|
|
3
|
+
*/
|
|
4
|
+
/** 单字段 key */
|
|
5
|
+
export declare const F: {
|
|
6
|
+
/** 物料 */
|
|
7
|
+
readonly material: "material_id_";
|
|
8
|
+
readonly materialLb: "material_id__lb_";
|
|
9
|
+
/** 剩余量 */
|
|
10
|
+
readonly remainingQty: "remaining_amount_qty_";
|
|
11
|
+
/** 物料平衡 */
|
|
12
|
+
readonly materialBalancePercent: "material_balance_percent_";
|
|
13
|
+
/** 领用量 */
|
|
14
|
+
readonly amountReceivedQty: "amount_received_qty_";
|
|
15
|
+
/** 实际产量 */
|
|
16
|
+
readonly actualOutputQty: "actual_output_qty_";
|
|
17
|
+
/** 损耗量 */
|
|
18
|
+
readonly lossAmountQty: "loss_amount_qty_";
|
|
19
|
+
/** 消耗量 */
|
|
20
|
+
readonly consumeQty: "consume_qty_";
|
|
21
|
+
/** 物料批次号 */
|
|
22
|
+
readonly materialNo: "material_no_";
|
|
23
|
+
/** 工序 */
|
|
24
|
+
readonly routingOperation: "routing_operation_id_";
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,8 +10,10 @@ interface ExpandAutofillContext {
|
|
|
10
10
|
sourceFieldKey: string;
|
|
11
11
|
/** 目标字段所在模型 key(子表字段为子模型 modelKey) */
|
|
12
12
|
toModelKey?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** 是否为子表字段:0 / undefined = 主表,1 = 子表 */
|
|
14
14
|
toSubModel?: number;
|
|
15
|
+
/** 子表时:主表 master_slave 字段 key */
|
|
16
|
+
toSubFieldKey?: string;
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
17
19
|
* 将字段 Profile 中的 autofillTemplates 展开为 widget.props.autofillRules
|
|
@@ -6,3 +6,5 @@ export declare function isBizServiceFailure(res: unknown): boolean;
|
|
|
6
6
|
export declare function unwrapBizServiceData<T extends Record<string, unknown>>(res: unknown): T | null;
|
|
7
7
|
/** listAll 类接口取数组 */
|
|
8
8
|
export declare function unwrapBizServiceList(res: unknown): Record<string, unknown>[];
|
|
9
|
+
/** 解析 biz-service 返回的 dict */
|
|
10
|
+
export declare function unwrapBizServiceDict(res: unknown): Record<string, Record<string, unknown>> | undefined;
|