@gct-paas/word 0.2.5-beta.0 → 0.2.5-beta.3
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/assets/svgs/table/index.d.ts +1 -0
- package/dist/base/modal/src/modal.type.d.ts +3 -1
- package/dist/base/utils/image-size-util.d.ts +5 -5
- package/dist/core/data/DataManager.d.ts +6 -1
- package/dist/core/data/enrichers/udi-enricher.d.ts +23 -0
- package/dist/core/data/types/runtime-config.d.ts +11 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/model/document/wtcRegionRef.d.ts +1 -1
- package/dist/core/model/logic/subtable/repeating/RepeatingRegion.d.ts +4 -1
- package/dist/core/runtime/DocumentRuntimeManager.d.ts +34 -0
- package/dist/core/view/Doc.d.ts +3 -0
- package/dist/domain/active/active-types.d.ts +3 -1
- package/dist/domain/constants/enum/signature.d.ts +14 -0
- package/dist/domain/document-rule/index.d.ts +3 -0
- package/dist/domain/document-rule/runtime/decision-rule-evaluator.d.ts +13 -0
- package/dist/domain/document-rule/runtime/document-rule-runtime.d.ts +19 -0
- package/dist/domain/document-rule/types.d.ts +50 -0
- package/dist/domain/field/field-type.d.ts +8 -0
- package/dist/domain/table/business/device/maintenance/index.d.ts +1 -0
- package/dist/domain/table/business/device/maintenance/profile/field-keys.d.ts +9 -0
- package/dist/domain/table/business/device/maintenance/profile/fields.d.ts +2 -0
- package/dist/domain/table/business/device/maintenance/profile/index.d.ts +3 -0
- package/dist/domain/table/business/device/point-inspection/index.d.ts +1 -0
- package/dist/domain/table/business/device/point-inspection/profile/field-keys.d.ts +9 -0
- package/dist/domain/table/business/device/point-inspection/profile/fields.d.ts +2 -0
- package/dist/domain/table/business/device/point-inspection/profile/index.d.ts +3 -0
- package/dist/domain/table/business/device/runtime/device-signature-lock-engine.d.ts +13 -0
- package/dist/domain/table/business/device/signature-lock.d.ts +26 -0
- package/dist/domain/table/business/material/material-requisition/profile/field-keys.d.ts +1 -1
- package/dist/domain/table/business/material/material-substitution/actions/scan.d.ts +3 -0
- package/dist/domain/table/business/material/material-substitution/index.d.ts +3 -0
- package/dist/domain/table/business/material/material-substitution/profile/field-keys.d.ts +39 -0
- package/dist/domain/table/business/material/material-substitution/profile/fields.d.ts +2 -0
- package/dist/domain/table/business/material/material-substitution/profile/index.d.ts +4 -0
- package/dist/domain/table/business/material/material-substitution/runtime/register-handlers.d.ts +1 -0
- package/dist/domain/table/business/material/material-substitution/runtime/row-change-handlers.d.ts +3 -0
- package/dist/domain/table/design/hooks/on-bounded-default-props.d.ts +3 -0
- package/dist/domain/table/design/ribbon-options.d.ts +2 -0
- package/dist/domain/table/design/sub-model-matcher.d.ts +2 -0
- package/dist/domain/table/index.d.ts +2 -0
- package/dist/domain/table/registry.d.ts +1 -1
- package/dist/domain/table/runtime/table-runtime.d.ts +1 -0
- package/dist/domain/table/types.d.ts +11 -3
- package/dist/index.es.js +4393 -2064
- package/dist/runtime/designer/ribbon/hooks/useDhrEdition.d.ts +7 -0
- package/dist/runtime/interface/computed.d.ts +1 -1
- package/dist/runtime/renderer/dialogs/document-rule-prompt/document-rule-prompt.vue.d.ts +5 -0
- package/dist/runtime/renderer/dialogs/document-rule-prompt/open-document-rule-prompt.d.ts +2 -0
- package/dist/runtime/renderer/dialogs/signature/logic.d.ts +3 -1
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/material-consume-history.d.ts +17 -0
- package/dist/runtime/validation/useFormValidator.d.ts +4 -0
- package/dist/sdk/doc-runtime/composables/useDocumentRulePrompt.d.ts +3 -0
- package/dist/sdk/types/index.d.ts +2 -0
- package/dist/suites/edhr/manifest/field/_common_/basic.d.ts +2 -0
- package/dist/suites/edhr/manifest/field/business/udi-manifest.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/index.d.ts +1 -0
- package/dist/suites/edhr/panel-schema/material-substitution-table/material-substitution-table.basic.d.ts +1 -0
- package/dist/suites/edhr/panel-schema/rule/components/add-rule-button.vue.d.ts +8 -3
- package/dist/suites/edhr/panel-schema/rule/components/decision-rule-condition.vue.d.ts +19 -0
- package/dist/suites/edhr/panel-schema/rule/components/decision-rule-group.vue.d.ts +16 -0
- package/dist/suites/edhr/panel-schema/rule/modals/inspection-decision-modal.vue.d.ts +11 -0
- package/dist/suites/edhr/panel-schema/rule/modals/open-inspection-decision-modal.d.ts +8 -0
- package/dist/suites/edhr/panel-schema/rule/types.d.ts +3 -0
- package/dist/suites/edhr/panel-schema/rule/use-rules-config.d.ts +12 -0
- package/dist/suites/edhr/panel-schema/rule/utils/decision-rule.d.ts +34 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-node.vue.d.ts +2 -0
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-select.vue.d.ts +4 -0
- package/dist/word.css +433 -111
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ export declare const TABLE_BUSINESS_SVG: {
|
|
|
24
24
|
readonly 'material-consume': string;
|
|
25
25
|
readonly 'material-balance': string;
|
|
26
26
|
readonly 'material-requisition': string;
|
|
27
|
+
readonly 'material-substitution': string;
|
|
27
28
|
readonly 'check-table': string;
|
|
28
29
|
readonly 'pretreatment-list': string;
|
|
29
30
|
readonly 'entrust-steril-batch-list': string;
|
|
@@ -5,7 +5,7 @@ export interface IModalInstance {
|
|
|
5
5
|
setLoading: (v: boolean) => void;
|
|
6
6
|
}
|
|
7
7
|
export interface IModalContext extends IModalInstance {
|
|
8
|
-
setOnConfirm: (fn:
|
|
8
|
+
setOnConfirm: (fn: (ins: IModalInstance) => Promise<void> | void) => void;
|
|
9
9
|
}
|
|
10
10
|
export interface IModalOptions {
|
|
11
11
|
title?: string;
|
|
@@ -13,6 +13,8 @@ export interface IModalOptions {
|
|
|
13
13
|
bodyProps?: any;
|
|
14
14
|
width?: number;
|
|
15
15
|
height?: number;
|
|
16
|
+
/** 弹框最大高度,数字按 px,字符串可传 90vh 等 CSS 值。 */
|
|
17
|
+
maxHeight?: number | string;
|
|
16
18
|
zIndex?: number;
|
|
17
19
|
className?: string;
|
|
18
20
|
closable?: boolean;
|
|
@@ -35,10 +35,10 @@ export declare function computeContainLayout(natural: ImageSize, box: ImageSize)
|
|
|
35
35
|
*/
|
|
36
36
|
export declare function computeContainDisplaySize(natural: ImageSize, box: ImageSize): ImageSize;
|
|
37
37
|
/** 同步取无图签名缓存(布局重建时可避免先闪占位再异步补图) */
|
|
38
|
-
export declare function getCachedSignatureImage(name: string, width?: number, height?: number, time?: number | string): HTMLImageElement | null;
|
|
38
|
+
export declare function getCachedSignatureImage(name: string, width?: number, height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): HTMLImageElement | null;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
40
|
+
* 创建无图签名兜底图
|
|
41
|
+
* 默认用户名 + 电子签名 + 验证日期;仅用户名时只绘制姓名
|
|
42
42
|
*/
|
|
43
|
-
export declare function createSignatureImageDataUrl(name: string, width?: number, height?: number, time?: number | string): string;
|
|
44
|
-
export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string): Promise<HTMLImageElement>;
|
|
43
|
+
export declare function createSignatureImageDataUrl(name: string, width?: number, height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): string;
|
|
44
|
+
export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string, fallbackSignType?: string, signatureImageDirection?: string): Promise<HTMLImageElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Doc } from '../view/Doc';
|
|
2
|
-
import { EmitSource, Data, PartialData, FieldRuntimeSpecificConfig, PostChangePipelineContext } from './types';
|
|
2
|
+
import { EmitSource, Data, PartialData, FieldRuntimeConstraint, FieldRuntimeSpecificConfig, PostChangePipelineContext } from './types';
|
|
3
3
|
type JsonPath = string;
|
|
4
4
|
type SubscriptionCallback = (newValue: any, oldValue: any) => void;
|
|
5
5
|
/**
|
|
@@ -72,6 +72,11 @@ export declare class DataManager {
|
|
|
72
72
|
setRuntimeSpecificConfig(entries: any): void;
|
|
73
73
|
getFieldRuntimeSpecificConfig(path: JsonPath): FieldRuntimeSpecificConfig | undefined;
|
|
74
74
|
setFieldRuntimeSpecificConfig(path: JsonPath, partial: FieldRuntimeSpecificConfig): void;
|
|
75
|
+
/**
|
|
76
|
+
* 原子替换某一功能来源施加的全部字段约束。
|
|
77
|
+
* 未出现在 constraintsByPath 中的旧约束会被清理,其他来源和普通运行时配置不受影响。
|
|
78
|
+
*/
|
|
79
|
+
replaceFieldRuntimeConstraints(source: string, constraintsByPath: ReadonlyMap<JsonPath, FieldRuntimeConstraint>): void;
|
|
75
80
|
/** 子表插行后:index 及之后的行配置下标 +1 */
|
|
76
81
|
private shiftFieldRuntimeConfigAfterRowInsert;
|
|
77
82
|
/** 子表删行后:移除该行配置,其后行配置下标 -1 */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Doc } from '../../view/Doc';
|
|
2
|
+
import { DataEnricherRegistration } from '../types';
|
|
3
|
+
import { FIELD_TYPE } from '../../../domain/field/field-type';
|
|
4
|
+
export interface UdiWidgetTarget {
|
|
5
|
+
valuePath: string;
|
|
6
|
+
}
|
|
7
|
+
type UdiWidgetInstance = {
|
|
8
|
+
widgetMeta?: {
|
|
9
|
+
field?: {
|
|
10
|
+
fieldType?: FIELD_TYPE;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
valuePath?: string;
|
|
14
|
+
};
|
|
15
|
+
/** paramsConfig 中 containerId 优先;没有时使用 snId。 */
|
|
16
|
+
export declare function resolveUdiQuery(doc: Doc): Record<string, string> | undefined;
|
|
17
|
+
/** listAll 返回第一条 UDI;兼容接口返回 udi / name_ 的历史形态。 */
|
|
18
|
+
export declare function parseUdi(res: unknown): string | undefined;
|
|
19
|
+
/** 从单个 widget 实例解析 UDI enrich 目标。 */
|
|
20
|
+
export declare function tryCollectUdiTarget(instance: UdiWidgetInstance): UdiWidgetTarget | null;
|
|
21
|
+
/** UDI:按 paramsConfig.containerId / snId 查询并回填尚未赋值的字段。 */
|
|
22
|
+
export declare function createUdiEnricher(doc: Doc, targets: UdiWidgetTarget[]): DataEnricherRegistration;
|
|
23
|
+
export {};
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 独立运行时功能施加的字段约束。
|
|
3
|
+
*
|
|
4
|
+
* 多个来源互不覆盖,最终状态按“任一来源为 true”聚合。
|
|
5
|
+
*/
|
|
6
|
+
export type FieldRuntimeConstraint = {
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
1
10
|
/** 组件依赖按 runtime valuePath 写入的运行时配置(子表各行独立) */
|
|
2
11
|
export type FieldRuntimeSpecificConfig = {
|
|
3
12
|
newReadonly?: boolean;
|
|
4
13
|
newRequired?: boolean;
|
|
5
14
|
newDisabled?: boolean;
|
|
15
|
+
/** 按功能来源隔离的强制约束,避免解除某项约束时覆盖其他运行时规则 */
|
|
16
|
+
runtimeConstraints?: Record<string, FieldRuntimeConstraint>;
|
|
6
17
|
/** assignment 策略「始终覆盖」时按行不可输入 */
|
|
7
18
|
cannotInput?: boolean;
|
|
8
19
|
/** 实例数字段:用户手填后不再被 API 回填覆盖 */
|
package/dist/core/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ 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 { DocumentRuntimeManager } from './runtime/DocumentRuntimeManager';
|
|
13
|
+
export type { DocumentRuntimeExtension, DocumentValidationContext, DocumentValidationDecision, } from './runtime/DocumentRuntimeManager';
|
|
12
14
|
export { DocModeTypeConst, PaperSizeConst, BuiltinComponentTypeConst } from './constants';
|
|
13
15
|
export { default as CursorOverlay } from './cursor/render/cursor-overlay.vue';
|
|
14
16
|
export { default as HiddenInput } from './cursor/render/hidden-input.vue';
|
|
@@ -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' | 'material-balance-table' | 'material-requisition-table' | 'warehouse-in-table' | 'warehouse-inbound-table' | 'warehouse-out-table' | 'warehouse-outbound-table' | 'warehouse-in-out-table' | 'warehouse-inventory-table' | 'part-stocktake-table' | 'device-part-consume-table' | 'warehouse-allocate-table' | 'pretreatment-list-table' | 'entrust-steril-batch-list-table';
|
|
32
|
+
export type SubTableLayoutType = 'dynamic-table' | 'fixed-table' | '2d-table' | 'check-table' | 'material-consume-table' | 'material-balance-table' | 'material-requisition-table' | 'material-substitution-table' | 'warehouse-in-table' | 'warehouse-inbound-table' | 'warehouse-out-table' | 'warehouse-outbound-table' | 'warehouse-in-out-table' | 'warehouse-inventory-table' | 'part-stocktake-table' | 'device-part-consume-table' | 'warehouse-allocate-table' | 'pretreatment-list-table' | 'entrust-steril-batch-list-table';
|
|
33
33
|
/** 表头 layout 类型 */
|
|
34
34
|
export type TableHeaderLayoutType = 'table-header';
|
|
35
35
|
/** 所有子表表格 layout 类型 */
|
|
@@ -63,11 +63,14 @@ export type MaterialBalanceTableProps = RepeatingWidgetPropsBase & {
|
|
|
63
63
|
export type MaterialRequisitionTableProps = RepeatingWidgetPropsBase & {
|
|
64
64
|
layoutType: 'material-requisition-table';
|
|
65
65
|
};
|
|
66
|
+
export type MaterialSubstitutionTableProps = RepeatingWidgetPropsBase & {
|
|
67
|
+
layoutType: 'material-substitution-table';
|
|
68
|
+
};
|
|
66
69
|
export type WarehouseAllocateTableProps = RepeatingWidgetPropsBase & {
|
|
67
70
|
layoutType: 'warehouse-allocate-table';
|
|
68
71
|
barcode_parsing_rules_id_?: string;
|
|
69
72
|
};
|
|
70
|
-
export type RepeatingWidgetPropsMeta = DynamicTableProps | WarehouseInTableProps | WarehouseInboundTableProps | WarehouseOutTableProps | WarehouseOutboundTableProps | WarehouseInOutTableProps | WarehouseInventoryTableProps | PartStocktakeTableProps | DevicePartConsumeTableProps | WarehouseAllocateTableProps | MaterialBalanceTableProps | MaterialRequisitionTableProps | EntrustSterilBatchListTableProps | PretreatmentListTableProps;
|
|
73
|
+
export type RepeatingWidgetPropsMeta = DynamicTableProps | WarehouseInTableProps | WarehouseInboundTableProps | WarehouseOutTableProps | WarehouseOutboundTableProps | WarehouseInOutTableProps | WarehouseInventoryTableProps | PartStocktakeTableProps | DevicePartConsumeTableProps | WarehouseAllocateTableProps | MaterialBalanceTableProps | MaterialRequisitionTableProps | MaterialSubstitutionTableProps | EntrustSterilBatchListTableProps | PretreatmentListTableProps;
|
|
71
74
|
export type RepeatingWidgetMeta = {
|
|
72
75
|
props: RepeatingWidgetPropsMeta;
|
|
73
76
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FieldChangeMap, EmitSource } from '../data';
|
|
2
|
+
export interface DocumentValidationContext {
|
|
3
|
+
scene: 'submit';
|
|
4
|
+
}
|
|
5
|
+
export interface DocumentValidationDecision {
|
|
6
|
+
skipValidation: boolean;
|
|
7
|
+
reason?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 文档级运行时扩展。
|
|
11
|
+
*
|
|
12
|
+
* 表格、对象及文档规则都通过同一生命周期接入,避免业务能力分别挂在
|
|
13
|
+
* composable / DataManager / 校验入口中。
|
|
14
|
+
*/
|
|
15
|
+
export interface DocumentRuntimeExtension {
|
|
16
|
+
onInit?(): void | Promise<void>;
|
|
17
|
+
onHydrate?(): void | Promise<void>;
|
|
18
|
+
onFieldChanges?(changedMap: FieldChangeMap, options: {
|
|
19
|
+
batchSource: EmitSource;
|
|
20
|
+
}): void | Promise<void>;
|
|
21
|
+
beforeValidate?(context: DocumentValidationContext): DocumentValidationDecision | void | Promise<DocumentValidationDecision | void>;
|
|
22
|
+
destroy?(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class DocumentRuntimeManager {
|
|
25
|
+
private readonly extensions;
|
|
26
|
+
register(extension: DocumentRuntimeExtension): void;
|
|
27
|
+
onInit(): Promise<void>;
|
|
28
|
+
onHydrate(): Promise<void>;
|
|
29
|
+
onFieldChanges(changedMap: FieldChangeMap, options: {
|
|
30
|
+
batchSource: EmitSource;
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
beforeValidate(context: DocumentValidationContext): Promise<DocumentValidationDecision>;
|
|
33
|
+
destroy(): void;
|
|
34
|
+
}
|
package/dist/core/view/Doc.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { DocModeType } from '../constants';
|
|
|
11
11
|
import { CommandPayloadMap, RequiredPayloadCommands, OptionalPayloadCommands } from '../command/types';
|
|
12
12
|
import { DocModel } from '../model';
|
|
13
13
|
import { DocRuntimeMeta, FieldModelQuery, IDeviceConfig } from '../../sdk/types';
|
|
14
|
+
import { DocumentRuntimeManager } from '../runtime/DocumentRuntimeManager';
|
|
14
15
|
export interface DocInitOptions {
|
|
15
16
|
mode?: DocModeType;
|
|
16
17
|
model?: DocModel;
|
|
@@ -67,6 +68,8 @@ export declare class Doc {
|
|
|
67
68
|
eventManager: EventManager;
|
|
68
69
|
dataManager: DataManager;
|
|
69
70
|
interactionManager: InteractionManager;
|
|
71
|
+
/** 文档级业务运行时统一生命周期。 */
|
|
72
|
+
runtimeManager: DocumentRuntimeManager;
|
|
70
73
|
pageSize: {
|
|
71
74
|
width: number;
|
|
72
75
|
height: number;
|
|
@@ -32,8 +32,10 @@ export type PanelType =
|
|
|
32
32
|
| 'panel:device-part-consume-table'
|
|
33
33
|
/** 物料平衡表 */
|
|
34
34
|
| 'panel:material-balance-table'
|
|
35
|
-
/**
|
|
35
|
+
/** 产线收料表 */
|
|
36
36
|
| 'panel:material-requisition-table'
|
|
37
|
+
/** 物料替换表 */
|
|
38
|
+
| 'panel:material-substitution-table'
|
|
37
39
|
/** 库存调拨表 */
|
|
38
40
|
| 'panel:warehouse-allocate-table'
|
|
39
41
|
/** 二维表 */
|
|
@@ -28,3 +28,17 @@ export declare const SignDisplayTypeConst: {
|
|
|
28
28
|
/** 水平显示 */
|
|
29
29
|
HORIZONTAL: string;
|
|
30
30
|
};
|
|
31
|
+
/** 兜底签名配置:个人无上传/手写签名素材时,密码校验通过后展示的样式 */
|
|
32
|
+
export declare const FallbackSignTypeConst: {
|
|
33
|
+
/** 仅用户名 */
|
|
34
|
+
NAME_ONLY: string;
|
|
35
|
+
/** 用户名 + 签署日期 */
|
|
36
|
+
NAME_AND_DATE: string;
|
|
37
|
+
};
|
|
38
|
+
/** 签名图片方向 */
|
|
39
|
+
export declare const SignatureImageDirectionConst: {
|
|
40
|
+
/** 横向签名 */
|
|
41
|
+
HORIZONTAL: string;
|
|
42
|
+
/** 竖向签名 */
|
|
43
|
+
VERTICAL: string;
|
|
44
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DecisionRuleGroup, InspectionDecisionRule } from '../types';
|
|
2
|
+
type DataRow = Record<string, unknown>;
|
|
3
|
+
/** 安全解析设计端保存的规则树;无效或空配置不命中。 */
|
|
4
|
+
export declare function parseInspectionDecisionRuleTree(dataRuleConfig?: string): DecisionRuleGroup | null;
|
|
5
|
+
/**
|
|
6
|
+
* 计算规则树。
|
|
7
|
+
*
|
|
8
|
+
* 同一子表的多个条件绑定到同一条有效行;多个子表则按行组合判断。
|
|
9
|
+
* 子表为空时使用 undefined 占位,使 OR 中的主表条件仍可独立命中。
|
|
10
|
+
*/
|
|
11
|
+
export declare function evaluateDecisionRuleTree(root: DecisionRuleGroup, rawData: DataRow): boolean;
|
|
12
|
+
export declare function evaluateInspectionDecisionRule(rule: InspectionDecisionRule | null | undefined, rawData: DataRow): boolean;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Doc } from '../../../core/view/Doc';
|
|
2
|
+
import { DocumentRuntimeExtension, DocumentValidationContext, DocumentValidationDecision } from '../../../core/runtime/DocumentRuntimeManager';
|
|
3
|
+
import { FieldChangeMap } from '../../../core/data';
|
|
4
|
+
export declare const DOCUMENT_RULE_PROMPT_EVENT = "document-rule:prompt";
|
|
5
|
+
export interface DocumentRulePromptPayload {
|
|
6
|
+
rule: 'inspection-decision';
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
/** 文档级规则运行时:统一处理状态迁移、提示事件及提交前裁决。 */
|
|
10
|
+
export declare class DocumentRuleRuntime implements DocumentRuntimeExtension {
|
|
11
|
+
private readonly doc;
|
|
12
|
+
private inspectionDecisionMatched;
|
|
13
|
+
constructor(doc: Doc);
|
|
14
|
+
/** 装载和整表换数只建立状态基线,不弹提示。 */
|
|
15
|
+
onHydrate(): void;
|
|
16
|
+
onFieldChanges(changedMap: FieldChangeMap): void;
|
|
17
|
+
beforeValidate(context: DocumentValidationContext): DocumentValidationDecision;
|
|
18
|
+
private evaluateInspectionDecision;
|
|
19
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type DecisionRuleRelation = 'AND' | 'OR';
|
|
2
|
+
export type DecisionRuleValueType = 'FIXED' | 'FIELD';
|
|
3
|
+
/** 判定规则字段。保留所属模型/容器信息,供运行时准确取值。 */
|
|
4
|
+
export interface DecisionRuleField {
|
|
5
|
+
id: string;
|
|
6
|
+
key: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
modelKey: string;
|
|
10
|
+
modelName?: string;
|
|
11
|
+
/** 主表 / 子表 / 对象字段 */
|
|
12
|
+
scope: 'main' | 'sub' | 'object';
|
|
13
|
+
subFieldKey?: string;
|
|
14
|
+
objectFieldKey?: string;
|
|
15
|
+
options?: Array<{
|
|
16
|
+
label: string;
|
|
17
|
+
value: string | number | boolean;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export interface DecisionRuleRightValue {
|
|
21
|
+
valueType: DecisionRuleValueType;
|
|
22
|
+
result?: string | number | boolean;
|
|
23
|
+
/** FIELD 类型右值的完整字段信息。 */
|
|
24
|
+
field?: DecisionRuleField;
|
|
25
|
+
}
|
|
26
|
+
export interface DecisionRuleCondition {
|
|
27
|
+
key: string;
|
|
28
|
+
pid: string;
|
|
29
|
+
level: number;
|
|
30
|
+
firstRow?: boolean;
|
|
31
|
+
class?: string;
|
|
32
|
+
leftValue?: DecisionRuleField;
|
|
33
|
+
operatorValue?: string;
|
|
34
|
+
rightValue?: DecisionRuleRightValue[];
|
|
35
|
+
}
|
|
36
|
+
export interface DecisionRuleGroup {
|
|
37
|
+
key: string;
|
|
38
|
+
pid: string;
|
|
39
|
+
level: number;
|
|
40
|
+
class?: string;
|
|
41
|
+
type: 'group';
|
|
42
|
+
operatorType: DecisionRuleRelation;
|
|
43
|
+
children: Array<DecisionRuleGroup | DecisionRuleCondition>;
|
|
44
|
+
}
|
|
45
|
+
export interface InspectionDecisionRule {
|
|
46
|
+
dataRuleEnabled: boolean;
|
|
47
|
+
dataRule: string;
|
|
48
|
+
dataRuleConfig: string;
|
|
49
|
+
prompt: string;
|
|
50
|
+
}
|
|
@@ -418,6 +418,10 @@ export declare const BUSINESS_FIELD_TYPE: {
|
|
|
418
418
|
* 表单实例数
|
|
419
419
|
*/
|
|
420
420
|
readonly OF_INST_NUM: "of_inst_num";
|
|
421
|
+
/**
|
|
422
|
+
* 医疗器械唯一标识
|
|
423
|
+
*/
|
|
424
|
+
readonly UDI: "udi";
|
|
421
425
|
/**
|
|
422
426
|
* 生产数量
|
|
423
427
|
*/
|
|
@@ -638,6 +642,10 @@ export declare const FIELD_TYPE: {
|
|
|
638
642
|
* 表单实例数
|
|
639
643
|
*/
|
|
640
644
|
readonly OF_INST_NUM: "of_inst_num";
|
|
645
|
+
/**
|
|
646
|
+
* 医疗器械唯一标识
|
|
647
|
+
*/
|
|
648
|
+
readonly UDI: "udi";
|
|
641
649
|
/**
|
|
642
650
|
* 生产数量
|
|
643
651
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { profile as maintenanceProfile } from './profile';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { profile as pointInspectionProfile } from './profile';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Doc } from '../../../../../core';
|
|
2
|
+
/**
|
|
3
|
+
* 设备点检/保养签字锁定引擎。
|
|
4
|
+
*
|
|
5
|
+
* 由 TableRuntime 生命周期驱动,只在初始化、行初始化或用户数据变更后重算;
|
|
6
|
+
* 不依赖组件是否已挂载,也不在渲染过程中反向写状态。
|
|
7
|
+
*/
|
|
8
|
+
export declare class DeviceSignatureLockEngine {
|
|
9
|
+
private readonly doc;
|
|
10
|
+
constructor(doc: Doc);
|
|
11
|
+
apply(): void;
|
|
12
|
+
private collectConstraint;
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Doc } from '../../../../core';
|
|
2
|
+
export type DeviceOperationControlField = 'inspector_' | 'reviewer_';
|
|
3
|
+
export interface FixedDeviceOperationConfig {
|
|
4
|
+
/** 签名后一并锁定的主表字段 */
|
|
5
|
+
mainFieldBindings?: string[];
|
|
6
|
+
/** 触发当前行数据锁定的签名字段 */
|
|
7
|
+
dataLockControlField?: DeviceOperationControlField;
|
|
8
|
+
}
|
|
9
|
+
export interface FixedDeviceOperationFieldState {
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface FixedDeviceOperationTable {
|
|
14
|
+
subFieldKey: string;
|
|
15
|
+
config: FixedDeviceOperationConfig;
|
|
16
|
+
}
|
|
17
|
+
/** 签名字段有有效数据时,认为该行已进入锁定状态。 */
|
|
18
|
+
export declare function hasSignatureValue(value: unknown): boolean;
|
|
19
|
+
export declare function isSignatureLockActive(config: FixedDeviceOperationConfig | undefined, rowData: Record<string, any> | undefined): boolean;
|
|
20
|
+
/** 已保存的固定表行,其控制签名不可再删除。 */
|
|
21
|
+
export declare function isPersistedSignatureLockActive(config: FixedDeviceOperationConfig | undefined, rowData: Record<string, any> | undefined): boolean;
|
|
22
|
+
export declare function getFixedDeviceOperationTables(doc: Doc): FixedDeviceOperationTable[];
|
|
23
|
+
/** 根据字段实际运行时路径解析设备点检/保养表的动态禁用、只读状态。 */
|
|
24
|
+
export declare function resolveFixedDeviceOperationFieldState(doc: Doc, runtimeValuePath: string): FixedDeviceOperationFieldState;
|
|
25
|
+
/** 组装设备点检/保养控制签名前需校验的主表与当前行字段路径。 */
|
|
26
|
+
export declare function resolveDeviceSignatureValidationPaths(doc: Doc, runtimeValuePath: string, candidatePaths: Iterable<string>): string[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 物料替换表(MATERIAL_SUBSTITUTION)字段 key
|
|
3
|
+
*/
|
|
4
|
+
export declare const F: {
|
|
5
|
+
/** 工序节点 */
|
|
6
|
+
readonly routingOperation: "routing_operation_id_";
|
|
7
|
+
/** SN */
|
|
8
|
+
readonly productionContainer: "production_container_id_";
|
|
9
|
+
/** 被替换物料批号 */
|
|
10
|
+
readonly sourceMaterialNo: "source_material_no_";
|
|
11
|
+
/** 被替换物料 */
|
|
12
|
+
readonly sourceProduct: "source_product_id_";
|
|
13
|
+
/** 被替换物料名称 */
|
|
14
|
+
readonly sourceProductName: "source_product_id_name_";
|
|
15
|
+
/** 被替换物料编码 */
|
|
16
|
+
readonly sourceProductCode: "source_product_id_code_";
|
|
17
|
+
/** 被替换物料规格 */
|
|
18
|
+
readonly sourceProductSpec: "source_product_id_spec_";
|
|
19
|
+
/** 原上料数量 */
|
|
20
|
+
readonly sourceQtyConsumed: "source_qty_consumed_";
|
|
21
|
+
/** 替换物料批号 */
|
|
22
|
+
readonly targetMaterialNo: "target_material_no_";
|
|
23
|
+
/** 替换物料 */
|
|
24
|
+
readonly targetProduct: "target_product_id_";
|
|
25
|
+
/** 替换物料名称 */
|
|
26
|
+
readonly targetProductName: "target_product_id_name_";
|
|
27
|
+
/** 替换物料编码 */
|
|
28
|
+
readonly targetProductCode: "target_product_id_code_";
|
|
29
|
+
/** 替换物料规格 */
|
|
30
|
+
readonly targetProductSpec: "target_product_id_spec_";
|
|
31
|
+
/** 替换数量 */
|
|
32
|
+
readonly targetQtyConsumed: "target_qty_consumed_";
|
|
33
|
+
};
|
|
34
|
+
export type MaterialSubstitutionFieldKey = (typeof F)[keyof typeof F];
|
|
35
|
+
/** 设计态固定禁用、运行态只读的物料信息字段 */
|
|
36
|
+
export declare const DISABLED_INPUT_FIELDS: readonly ["source_material_no_", "source_product_id_name_", "source_product_id_code_", "source_product_id_spec_", "source_qty_consumed_", "target_product_id_name_", "target_product_id_code_", "target_product_id_spec_"];
|
|
37
|
+
export declare const CLEAR_ON_SOURCE_PRODUCT_EMPTY: readonly ["source_material_no_", "source_product_id_name_", "source_product_id_code_", "source_product_id_spec_", "source_qty_consumed_"];
|
|
38
|
+
/** 替换物料批号清空 / 手输时需清空的物料字段 */
|
|
39
|
+
export declare const CLEAR_ON_TARGET_MATERIAL_NO_EMPTY: readonly ["target_product_id_name_", "target_product_id_code_", "target_product_id_spec_"];
|
package/dist/domain/table/business/material/material-substitution/runtime/register-handlers.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,8 @@ export interface RibbonTableOptionsParams {
|
|
|
7
7
|
suiteKey?: string;
|
|
8
8
|
/** 套件级需从 Ribbon 隐藏的业务表类型 */
|
|
9
9
|
hiddenBusinessTableTypes?: BusinessSubTableType[];
|
|
10
|
+
/** 是否可使用仅向 eDHR Max / Ultra 开放的业务表 */
|
|
11
|
+
canUseMaxEditionTables?: boolean;
|
|
10
12
|
}
|
|
11
13
|
/** 生成 Ribbon「数据表」「业务表」下拉选项 */
|
|
12
14
|
export declare function getRibbonTableOptions(params?: RibbonTableOptionsParams): {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { FieldMeta } from '../../../capabilities/model-field-runtime';
|
|
2
2
|
import { DropdownOption } from '../../../base';
|
|
3
|
+
/** 是否为仅能通过固定表入口选择的业务子模型。 */
|
|
4
|
+
export declare function isFixedOnlyBusinessRefModelType(refModelType: string | undefined | null): boolean;
|
|
3
5
|
/**
|
|
4
6
|
* 生成「选择子模型」下拉选项
|
|
5
7
|
* @param tableTypeOrRibbonAction 表类型或 Ribbon action
|
|
@@ -13,5 +13,7 @@ export * from './runtime/table-runtime';
|
|
|
13
13
|
export * from './design/hooks/on-subtable-create';
|
|
14
14
|
export * from './design/hooks/on-field-attach';
|
|
15
15
|
export * from './design/hooks/on-repeating-default-props';
|
|
16
|
+
export * from './design/hooks/on-bounded-default-props';
|
|
16
17
|
export * from './design/validate-table-selection';
|
|
17
18
|
export * from './design/validate-nested-table-region';
|
|
19
|
+
export * from './business/device/signature-lock';
|
|
@@ -15,5 +15,5 @@ export declare function getProfileByLayoutType(layoutType: string): TableProfile
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function getAllBusinessRefModelTypes(): string[];
|
|
17
17
|
/** 按 refModelType 获取业务表 Profile */
|
|
18
|
-
export declare function getBusinessProfileByRefModelType(refModelType: string): BusinessSubTableProfile | undefined;
|
|
18
|
+
export declare function getBusinessProfileByRefModelType(refModelType: string | undefined | null): BusinessSubTableProfile | undefined;
|
|
19
19
|
export { ALL_TABLE_PROFILES };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FIELD_TYPE } from '../field/field-type';
|
|
2
2
|
import { SubTableLayoutType } from '../../core/model/document/wtcRegionRef';
|
|
3
|
+
import { RequiredQtyCalcRule } from './business/material/types';
|
|
3
4
|
/**
|
|
4
5
|
* 数据表类型
|
|
5
6
|
* @property dynamic-table - 动态表
|
|
@@ -20,12 +21,15 @@ export type DataTableType = 'dynamic-table' | 'fixed-table' | 'two-d-table';
|
|
|
20
21
|
* @property warehouse-allocate - 库存调拨表
|
|
21
22
|
* @property material-consume - 物料消耗表
|
|
22
23
|
* @property material-balance - 物料平衡表
|
|
23
|
-
* @property material-requisition -
|
|
24
|
+
* @property material-requisition - 产线收料表
|
|
25
|
+
* @property material-substitution - 物料替换表
|
|
26
|
+
* @property point-inspection - 设备点检表(固定表业务模型)
|
|
27
|
+
* @property maintenance - 设备保养表(固定表业务模型)
|
|
24
28
|
* @property check-table - 检验表
|
|
25
29
|
* @property pretreatment-list - 预处理表
|
|
26
30
|
* @property entrust-steril-batch-list - 委托灭菌生产批次表
|
|
27
31
|
*/
|
|
28
|
-
export type BusinessSubTableType = 'warehouse-in' | 'warehouse-inbound' | 'warehouse-out' | 'warehouse-outbound' | 'warehouse-in-out' | 'warehouse-inventory' | 'part-stocktake' | 'device-part-consume' | 'warehouse-allocate' | 'material-consume' | 'material-balance' | 'material-requisition' | 'check-table' | 'pretreatment-list' | 'entrust-steril-batch-list';
|
|
32
|
+
export type BusinessSubTableType = 'warehouse-in' | 'warehouse-inbound' | 'warehouse-out' | 'warehouse-outbound' | 'warehouse-in-out' | 'warehouse-inventory' | 'part-stocktake' | 'device-part-consume' | 'warehouse-allocate' | 'material-consume' | 'material-balance' | 'material-requisition' | 'material-substitution' | 'point-inspection' | 'maintenance' | 'check-table' | 'pretreatment-list' | 'entrust-steril-batch-list';
|
|
29
33
|
/** 所有子表类型(数据表 + 业务表) */
|
|
30
34
|
export type TableType = DataTableType | BusinessSubTableType;
|
|
31
35
|
/**
|
|
@@ -105,8 +109,10 @@ export interface BusinessSubTableProfile extends TableProfileBase {
|
|
|
105
109
|
category: 'business';
|
|
106
110
|
type: BusinessSubTableType;
|
|
107
111
|
match: BusinessTableMatchRule;
|
|
112
|
+
/** fixed-table-model 不注册独立 Ribbon 入口,仅借用固定表选择业务子模型。 */
|
|
113
|
+
entry?: 'ribbon' | 'fixed-table-model';
|
|
108
114
|
/** Ribbon 业务表分组名 */
|
|
109
|
-
ribbonGroup
|
|
115
|
+
ribbonGroup?: string;
|
|
110
116
|
ribbonGroupDivider?: boolean;
|
|
111
117
|
/** 仅在这些套件的 Ribbon 中展示;省略则所有套件可见(仍受 suite hidden 列表约束) */
|
|
112
118
|
ribbonSuites?: SuiteKey[];
|
|
@@ -471,6 +477,8 @@ export type RuleTrigger = 'always' | 'onRowInit' | 'onFieldChange' | 'onRowConfi
|
|
|
471
477
|
export interface RuleContext {
|
|
472
478
|
/** 当前文档是否为模拟填报 */
|
|
473
479
|
isMockReport: boolean;
|
|
480
|
+
/** 物料消耗表的需求数量计算规则 */
|
|
481
|
+
requiredQtyCalcRule?: RequiredQtyCalcRule;
|
|
474
482
|
/** 子表在 rawData 中的 fieldKey */
|
|
475
483
|
subFieldKey: string;
|
|
476
484
|
/** 业务子模型 refModelType */
|