@gct-paas/word 0.2.7 → 0.2.9-beta.0

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.
Files changed (161) hide show
  1. package/dist/assets/svgs/table/index.d.ts +1 -0
  2. package/dist/base/calendar/src/calendar.vue.d.ts +1 -1
  3. package/dist/base/dropdown/src/dropdown-basic-select.vue.d.ts +6 -0
  4. package/dist/base/input/src/input-number.vue.d.ts +1 -0
  5. package/dist/base/message/src/Message.vue.d.ts +2 -0
  6. package/dist/base/message/src/message.d.ts +2 -0
  7. package/dist/base/modal/src/modal.type.d.ts +3 -1
  8. package/dist/base/rdo-tree-select/src/rdo-tree-select.vue.d.ts +1 -1
  9. package/dist/base/scrollbar/src/scrollbar.vue.d.ts +1 -1
  10. package/dist/base/select/src/basic-select.vue.d.ts +16 -4
  11. package/dist/base/utils/image-size-util.d.ts +11 -7
  12. package/dist/capabilities/model-field-runtime/types/field.d.ts +4 -0
  13. package/dist/core/command/base/FloatingFieldCommand.d.ts +9 -0
  14. package/dist/core/command/commands/DeleteCol.d.ts +1 -1
  15. package/dist/core/command/commands/DeleteRow.d.ts +1 -1
  16. package/dist/core/command/commands/InsertFloatingField.d.ts +9 -0
  17. package/dist/core/command/commands/InsertTable.d.ts +0 -1
  18. package/dist/core/command/commands/MoveFloatingField.d.ts +10 -0
  19. package/dist/core/command/commands/RemoveFloatingField.d.ts +12 -0
  20. package/dist/core/command/commands/SetTableBorder.d.ts +14 -0
  21. package/dist/core/command/types.d.ts +21 -0
  22. package/dist/core/data/DataManager.d.ts +6 -1
  23. package/dist/core/data/enrichers/companion-enricher.d.ts +2 -0
  24. package/dist/core/data/enrichers/inspection-module-qty-enricher.d.ts +19 -0
  25. package/dist/core/data/enrichers/udi-enricher.d.ts +23 -0
  26. package/dist/core/data/formula/business-functions.d.ts +10 -0
  27. package/dist/core/data/formula/formula-params-cache.d.ts +15 -0
  28. package/dist/core/data/types/runtime-config.d.ts +13 -0
  29. package/dist/core/event/handlers/IMEHandler.d.ts +1 -0
  30. package/dist/core/index.d.ts +2 -0
  31. package/dist/core/model/document/WtblPr.d.ts +2 -0
  32. package/dist/core/model/document/Wtc.d.ts +2 -0
  33. package/dist/core/model/document/wtcRegionRef.d.ts +1 -1
  34. package/dist/core/model/logic/subtable/repeating/RepeatingRegion.d.ts +4 -1
  35. package/dist/core/model/logic/subtable/shared/dataGroupSlotCount.d.ts +37 -1
  36. package/dist/core/model/overlays/Wlayout.d.ts +4 -0
  37. package/dist/core/model/types/table-border.d.ts +18 -0
  38. package/dist/core/runtime/DocumentRuntimeManager.d.ts +34 -0
  39. package/dist/core/table/border-selection.d.ts +9 -0
  40. package/dist/core/table/borders.d.ts +42 -0
  41. package/dist/core/view/Doc.d.ts +5 -0
  42. package/dist/core/view/TableCell.d.ts +3 -0
  43. package/dist/core/widget/types.d.ts +2 -2
  44. package/dist/domain/active/active-types.d.ts +3 -1
  45. package/dist/domain/constants/enum/index.d.ts +2 -0
  46. package/dist/domain/constants/enum/product.d.ts +9 -0
  47. package/dist/domain/constants/enum/production-identification.d.ts +19 -0
  48. package/dist/domain/document-rule/index.d.ts +3 -0
  49. package/dist/domain/document-rule/runtime/decision-rule-evaluator.d.ts +13 -0
  50. package/dist/domain/document-rule/runtime/document-rule-runtime.d.ts +19 -0
  51. package/dist/domain/document-rule/types.d.ts +50 -0
  52. package/dist/domain/field/field-props-schema-type.d.ts +1 -1
  53. package/dist/domain/field/field-type.d.ts +58 -0
  54. package/dist/domain/field/form-value.d.ts +6 -0
  55. package/dist/domain/field/material-lot-validation.d.ts +2 -0
  56. package/dist/domain/field/seal/seal-binding.d.ts +19 -0
  57. package/dist/domain/field/seal/seal-display.d.ts +32 -0
  58. package/dist/domain/field/seal/seal-value.d.ts +39 -0
  59. package/dist/domain/table/business/device/maintenance/index.d.ts +1 -0
  60. package/dist/domain/table/business/device/maintenance/profile/field-keys.d.ts +9 -0
  61. package/dist/domain/table/business/device/maintenance/profile/fields.d.ts +2 -0
  62. package/dist/domain/table/business/device/maintenance/profile/index.d.ts +3 -0
  63. package/dist/domain/table/business/device/point-inspection/index.d.ts +1 -0
  64. package/dist/domain/table/business/device/point-inspection/profile/field-keys.d.ts +9 -0
  65. package/dist/domain/table/business/device/point-inspection/profile/fields.d.ts +2 -0
  66. package/dist/domain/table/business/device/point-inspection/profile/index.d.ts +3 -0
  67. package/dist/domain/table/business/device/runtime/device-signature-lock-engine.d.ts +13 -0
  68. package/dist/domain/table/business/device/signature-lock.d.ts +26 -0
  69. package/dist/domain/table/business/material/material-consume/profile/fields.d.ts +2 -0
  70. package/dist/domain/table/business/material/material-requisition/profile/field-keys.d.ts +1 -1
  71. package/dist/domain/table/business/material/material-substitution/actions/scan.d.ts +3 -0
  72. package/dist/domain/table/business/material/material-substitution/index.d.ts +3 -0
  73. package/dist/domain/table/business/material/material-substitution/profile/field-keys.d.ts +41 -0
  74. package/dist/domain/table/business/material/material-substitution/profile/fields.d.ts +2 -0
  75. package/dist/domain/table/business/material/material-substitution/profile/index.d.ts +4 -0
  76. package/dist/domain/table/business/material/material-substitution/runtime/register-handlers.d.ts +1 -0
  77. package/dist/domain/table/business/material/material-substitution/runtime/row-change-handlers.d.ts +4 -0
  78. package/dist/domain/table/business/material/types.d.ts +2 -1
  79. package/dist/domain/table/design/hooks/on-bounded-default-props.d.ts +3 -0
  80. package/dist/domain/table/design/ribbon-options.d.ts +2 -0
  81. package/dist/domain/table/design/sub-model-matcher.d.ts +2 -0
  82. package/dist/domain/table/design/validate-nested-table-insert.d.ts +3 -0
  83. package/dist/domain/table/index.d.ts +3 -0
  84. package/dist/domain/table/registry.d.ts +5 -2
  85. package/dist/domain/table/runtime/option-fill-updates.d.ts +6 -0
  86. package/dist/domain/table/runtime/table-runtime.d.ts +3 -0
  87. package/dist/domain/table/types.d.ts +13 -3
  88. package/dist/index.es.js +32517 -10493
  89. package/dist/runtime/canvas/__common__/context-menu/resolve-table-context.d.ts +10 -0
  90. package/dist/runtime/canvas/doc-layout.vue.d.ts +1 -2
  91. package/dist/runtime/canvas/node/seal-overlay.vue.d.ts +6 -0
  92. package/dist/runtime/canvas/print-capture.d.ts +12 -0
  93. package/dist/runtime/canvas/table/render/material-consume/bom-validator.d.ts +10 -2
  94. package/dist/runtime/canvas/table/render/material-consume/material-consume-group-merge.d.ts +1 -0
  95. package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts +6 -0
  96. package/dist/runtime/canvas/table/shared/table-lines.vue.d.ts +1 -0
  97. package/dist/runtime/canvas/table/table-presentation.d.ts +16 -0
  98. package/dist/runtime/canvas/table/utils/paint-table-borders.d.ts +4 -0
  99. package/dist/runtime/designer/ribbon/hooks/useDhrEdition.d.ts +7 -0
  100. package/dist/runtime/designer/ribbon/svg/table-border-icon.vue.d.ts +6 -0
  101. package/dist/runtime/interface/computed.d.ts +1 -1
  102. package/dist/runtime/interface/sterilization-date.d.ts +9 -0
  103. package/dist/runtime/renderer/dialogs/device-scan/submit-device-scan.d.ts +3 -0
  104. package/dist/runtime/renderer/dialogs/document-rule-prompt/document-rule-prompt.vue.d.ts +5 -0
  105. package/dist/runtime/renderer/dialogs/document-rule-prompt/open-document-rule-prompt.d.ts +2 -0
  106. package/dist/runtime/renderer/dialogs/seal/open-seal-flow.d.ts +3 -0
  107. package/dist/runtime/renderer/dialogs/seal/seal-api.d.ts +17 -0
  108. package/dist/runtime/renderer/dialogs/seal/seal-auth-dialog.vue.d.ts +60 -0
  109. package/dist/runtime/renderer/dialogs/seal/seal-confirm-dialog.vue.d.ts +9 -0
  110. package/dist/runtime/renderer/dialogs/seal/seal-runtime.d.ts +30 -0
  111. package/dist/runtime/renderer/dialogs/seal/types.d.ts +24 -0
  112. package/dist/runtime/renderer/dialogs/seal/use-seal-confirm.d.ts +27 -0
  113. package/dist/runtime/renderer/dialogs/signature/authentication/signature-authentication.vue.d.ts +27 -0
  114. package/dist/runtime/renderer/dialogs/signature/authentication/types.d.ts +30 -0
  115. package/dist/runtime/renderer/dialogs/signature/authentication/useSignatureAuthentication.d.ts +29 -0
  116. package/dist/runtime/renderer/dialogs/signature/signature-dialog.vue.d.ts +54 -1
  117. package/dist/runtime/renderer/dialogs/upload-image/base-upload-image.vue.d.ts +1 -0
  118. package/dist/runtime/renderer/dialogs/upload-image/upload-image-dialog.vue.d.ts +1 -0
  119. package/dist/runtime/renderer/dropdowns/components/tables/columns/business/material-consume-history.d.ts +17 -0
  120. package/dist/runtime/renderer/dropdowns/components/tables/composables/useSearchEnter.d.ts +18 -0
  121. package/dist/runtime/renderer/dropdowns/components/tables/composables/useSelectTable.d.ts +2 -0
  122. package/dist/runtime/renderer/dropdowns/components/tables/composables/useTableDropdown.d.ts +2 -1
  123. package/dist/runtime/renderer/dropdowns/components/tables/table-option-dropdown.vue.d.ts +4 -4
  124. package/dist/runtime/renderer/dropdowns/factories/dropdown-factory.d.ts +1 -5
  125. package/dist/runtime/validation/layout.d.ts +20 -0
  126. package/dist/runtime/validation/useFormValidator.d.ts +4 -0
  127. package/dist/sdk/doc-runtime/composables/useDocumentRulePrompt.d.ts +3 -0
  128. package/dist/sdk/doc-runtime/factories/document-initializer.d.ts +1 -0
  129. package/dist/sdk/doc-runtime/factories/useDocumentFactory.d.ts +5 -0
  130. package/dist/sdk/doc-runtime/queries/template-placed-fields.d.ts +7 -0
  131. package/dist/sdk/engine/index.d.ts +3 -1
  132. package/dist/sdk/setup.d.ts +6 -0
  133. package/dist/sdk/types/index.d.ts +8 -0
  134. package/dist/sdk/types/placed-form-field.d.ts +6 -0
  135. package/dist/sdk/vue/index.d.ts +6 -0
  136. package/dist/suites/edhr/component/gct-seal-render.vue.d.ts +7 -0
  137. package/dist/suites/edhr/manifest/field/_common_/basic.d.ts +3 -3
  138. package/dist/suites/edhr/manifest/field/business/inspection-module-qty-manifest.d.ts +2 -0
  139. package/dist/suites/edhr/manifest/field/business/udi-manifest.d.ts +2 -0
  140. package/dist/suites/edhr/manifest/field/logic/seal-manifest.d.ts +2 -0
  141. package/dist/suites/edhr/manifest/field/object-type/device-parameter-object-manifest.d.ts +2 -0
  142. package/dist/suites/edhr/manifest/field/object-type/inspection-parameter-object-manifest.d.ts +2 -0
  143. package/dist/suites/edhr/manifest/field/object-type/process-parameter-object-manifest.d.ts +2 -0
  144. package/dist/suites/edhr/manifest/field/trace/inspection-container-manifest.d.ts +2 -0
  145. package/dist/suites/edhr/manifest/field/trace/sterilization-date-manifest.d.ts +2 -0
  146. package/dist/suites/edhr/panel-schema/index.d.ts +1 -0
  147. package/dist/suites/edhr/panel-schema/material-substitution-table/material-substitution-table.basic.d.ts +1 -0
  148. package/dist/suites/edhr/panel-schema/rule/components/add-rule-button.vue.d.ts +8 -3
  149. package/dist/suites/edhr/panel-schema/rule/components/decision-rule-condition.vue.d.ts +19 -0
  150. package/dist/suites/edhr/panel-schema/rule/components/decision-rule-group.vue.d.ts +16 -0
  151. package/dist/suites/edhr/panel-schema/rule/modals/inspection-decision-modal.vue.d.ts +11 -0
  152. package/dist/suites/edhr/panel-schema/rule/modals/open-inspection-decision-modal.d.ts +8 -0
  153. package/dist/suites/edhr/panel-schema/rule/types.d.ts +3 -0
  154. package/dist/suites/edhr/panel-schema/rule/use-rules-config.d.ts +12 -0
  155. package/dist/suites/edhr/panel-schema/rule/utils/decision-rule.d.ts +34 -0
  156. package/dist/suites/shared/panel/modules/field-formula-module/field-formula-module.vue.d.ts +1 -0
  157. package/dist/suites/shared/panel/utils/default-value-visibility.d.ts +3 -0
  158. package/dist/utils/adapters/ServiceUtil.d.ts +9 -0
  159. package/dist/utils/pdf/collect-seal-draw-ops.d.ts +4 -0
  160. package/dist/word.css +1702 -1315
  161. package/package.json +4 -4
@@ -9,6 +9,7 @@ export type WlayoutXmlJson = RawElement & {
9
9
  width?: number;
10
10
  height?: number;
11
11
  zIndex?: number;
12
+ pageIndex?: number;
12
13
  };
13
14
  };
14
15
  export interface WlayoutOptions extends ModelGroupOptions<ModelNode> {
@@ -18,6 +19,7 @@ export interface WlayoutOptions extends ModelGroupOptions<ModelNode> {
18
19
  width?: number;
19
20
  height?: number;
20
21
  zIndex?: number;
22
+ pageIndex?: number;
21
23
  }
22
24
  /**
23
25
  * 布局容器
@@ -34,6 +36,7 @@ export declare class Wlayout extends ModelGroup<ModelNode> {
34
36
  width?: number;
35
37
  height?: number;
36
38
  zIndex: number;
39
+ pageIndex?: number;
37
40
  parent?: ModelNode;
38
41
  constructor(options: WlayoutOptions);
39
42
  /**
@@ -66,5 +69,6 @@ export declare class Wlayout extends ModelGroup<ModelNode> {
66
69
  width: number;
67
70
  height: number;
68
71
  zIndex: number;
72
+ pageIndex?: number;
69
73
  }): Wlayout;
70
74
  }
@@ -0,0 +1,18 @@
1
+ import { RawElement } from './raw';
2
+ export declare const TABLE_BORDER_COLOR = "#808080";
3
+ /** undefined inherits; 0 explicitly hides the edge. */
4
+ export type TableBorderWidth = 0 | 1 | 2;
5
+ export declare const CELL_BORDER_SIDES: readonly ["top", "bottom", "left", "right"];
6
+ export type CellBorderSide = (typeof CELL_BORDER_SIDES)[number];
7
+ export type CellBorders = Partial<Record<CellBorderSide, TableBorderWidth>>;
8
+ export type TableBorders = CellBorders & Partial<Record<'insideH' | 'insideV', TableBorderWidth>>;
9
+ export type TableBorderPreset = 'none' | 'all' | 'outer' | 'thickOuter' | 'top' | 'bottom' | 'left' | 'right' | 'inside';
10
+ export interface ResolvedBorder {
11
+ width: TableBorderWidth;
12
+ priority: number;
13
+ }
14
+ export type ResolvedCellBorders = Partial<Record<CellBorderSide, ResolvedBorder>>;
15
+ export declare function readTableBorders(node?: RawElement): TableBorders;
16
+ export declare function writeTableBorders(name: 'w:tcBorders' | 'w:tblBorders', borders: TableBorders): RawElement | undefined;
17
+ /** Never let an inherited visible edge override an explicit clear. */
18
+ export declare function chooseBorder(a?: ResolvedBorder, b?: ResolvedBorder): ResolvedBorder | undefined;
@@ -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
+ }
@@ -0,0 +1,9 @@
1
+ import { Doc } from '../view/Doc';
2
+ import { Wtc } from '../model/document/Wtc';
3
+ import { TableBorderBounds } from './borders';
4
+ import { ICursorPosition } from '../cursor/types/cursor';
5
+ export declare function modelCellAt(doc: Doc, cursor?: ICursorPosition | null): Wtc | undefined;
6
+ export declare function resolveTableBorderSelection(doc: Doc): {
7
+ table: import('..').Wtbl;
8
+ bounds: TableBorderBounds;
9
+ } | undefined;
@@ -0,0 +1,42 @@
1
+ import { Wtbl } from '../model/document/Wtbl';
2
+ import { Wtc } from '../model/document/Wtc';
3
+ import { TableBorderPreset, ResolvedCellBorders } from '../model/types/table-border';
4
+ export interface TableBorderBounds {
5
+ top: number;
6
+ bottom: number;
7
+ left: number;
8
+ right: number;
9
+ }
10
+ /** Expand until every intersecting merge is fully included. */
11
+ export declare function expandBorderBounds(table: Wtbl, bounds: TableBorderBounds): TableBorderBounds;
12
+ export declare function resolveCellBorders(cell: Wtc): ResolvedCellBorders;
13
+ export declare function applyTableBorderPreset(table: Wtbl, input: TableBorderBounds, preset: TableBorderPreset): boolean;
14
+ export interface BorderGridRow {
15
+ y: number;
16
+ height: number;
17
+ cells: readonly {
18
+ borderEdges?: ResolvedCellBorders;
19
+ }[];
20
+ }
21
+ export interface BorderMergeRect {
22
+ x: number;
23
+ y: number;
24
+ width: number;
25
+ height: number;
26
+ }
27
+ export interface TableBorderSegment {
28
+ x1: number;
29
+ y1: number;
30
+ x2: number;
31
+ y2: number;
32
+ width: 1 | 2;
33
+ color: string;
34
+ }
35
+ /** Use one document pixel grid for bitmap and vector output, including fractional column widths. */
36
+ export declare function getTableBorderDrawSegment(line: TableBorderSegment): TableBorderSegment;
37
+ /** Canvas and PDF share the same physical grid, conflict resolution and merge clipping. */
38
+ export declare function collectTableBorderSegments(rows: readonly BorderGridRow[], colWidths: readonly number[], merges?: readonly BorderMergeRect[]): TableBorderSegment[];
39
+ /** Design-only hints for explicitly hidden edges. Never serialize or export these lines. */
40
+ export declare function collectTableBorderGuideSegments(rows: readonly BorderGridRow[], colWidths: readonly number[], merges?: readonly BorderMergeRect[]): TableBorderSegment[];
41
+ /** Join only touching collinear strokes of the same style; never bridge hidden edges. */
42
+ export declare function joinTableBorderSegments(lines: readonly TableBorderSegment[]): TableBorderSegment[];
@@ -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;
@@ -56,6 +57,8 @@ export declare class Doc {
56
57
  refer: boolean;
57
58
  /** 是否是模拟填报 */
58
59
  isMockReport: boolean;
60
+ /** 已进入表单变更编辑;由 enterBaseline 设置,随文档实例销毁。 */
61
+ isFormChangeEditing: boolean;
59
62
  /** 填报内容区底色开关配置 */
60
63
  showPrintFieldBg: boolean;
61
64
  model?: DocModel;
@@ -67,6 +70,8 @@ export declare class Doc {
67
70
  eventManager: EventManager;
68
71
  dataManager: DataManager;
69
72
  interactionManager: InteractionManager;
73
+ /** 文档级业务运行时统一生命周期。 */
74
+ runtimeManager: DocumentRuntimeManager;
70
75
  pageSize: {
71
76
  width: number;
72
77
  height: number;
@@ -1,4 +1,5 @@
1
1
  import { Paragraph } from './Paragraph';
2
+ import { ResolvedCellBorders } from '../model/types/table-border';
2
3
  import { LayoutGroup, LayoutGroupOptions } from './base';
3
4
  import { IContainerMetrics, Border } from './types';
4
5
  import { Table } from './Table';
@@ -13,6 +14,7 @@ export interface TableCellOptions extends LayoutGroupOptions {
13
14
  mergeRefRowOffset?: number;
14
15
  mergeRefColOffset?: number;
15
16
  backgroundColor?: string;
17
+ borderEdges?: ResolvedCellBorders;
16
18
  subRenderer?: SubRenderer;
17
19
  }
18
20
  export type SubRenderer = {
@@ -36,6 +38,7 @@ export declare class TableCell extends LayoutGroup<TableCellContent> implements
36
38
  mergeRefRowOffset?: number;
37
39
  mergeRefColOffset?: number;
38
40
  backgroundColor?: string;
41
+ borderEdges?: ResolvedCellBorders;
39
42
  border?: Border;
40
43
  /** 设计渲染时 */
41
44
  subRenderer?: SubRenderer;
@@ -1,7 +1,7 @@
1
1
  import { FIELD_TYPE } from '../../domain/field/field-type';
2
- export type ExternalComponentType = 'cascade' | 'fw:input' | 'fw:number' | 'fw:double' | 'fw:enum' | 'fw:enum-multiple' | 'fw:date-time' | 'fw:date' | 'fw:time' | 'fw:select' | 'fw:select-multiple' | 'fw:tree-select' | 'fw:tree-select-multiple' | 'fw:table-select' | 'fw:rdo-table-select' | 'fw:signature' | 'fw:image' | 'fw:file' | 'pw:image' | 'pw:barcode' | 'pw:qrcode' | 'pw:diagonal' | 'pw:serialnumber' | 'pw:pagination' | 'pw:line' | 'pw:timediff';
2
+ export type ExternalComponentType = 'cascade' | 'fw:input' | 'fw:number' | 'fw:double' | 'fw:enum' | 'fw:enum-multiple' | 'fw:date-time' | 'fw:date' | 'fw:time' | 'fw:select' | 'fw:select-multiple' | 'fw:tree-select' | 'fw:tree-select-multiple' | 'fw:table-select' | 'fw:rdo-table-select' | 'fw:signature' | 'fw:seal' | 'fw:image' | 'fw:file' | 'pw:image' | 'pw:barcode' | 'pw:qrcode' | 'pw:diagonal' | 'pw:serialnumber' | 'pw:pagination' | 'pw:line' | 'pw:timediff';
3
3
  /** 渲染组件标识 后续支持自定义组件 */
4
- export type ExternalNodeType = 'render:gct-placeholder' | 'render:gct-control' | 'render:gct-space' | 'render:gct-text' | 'render:gct-image' | 'render:gct-signature' | 'render:gct-leftMarker' | 'render:gct-rightMarker' | 'render:pw-barcode' | 'render:pw-qrcode' | 'render:pw-image' | 'render:pw-diagonal' | 'render:pw-pagination' | 'render:pw-line';
4
+ export type ExternalNodeType = 'render:gct-placeholder' | 'render:gct-control' | 'render:gct-space' | 'render:gct-text' | 'render:gct-image' | 'render:gct-signature' | 'render:gct-seal' | 'render:gct-leftMarker' | 'render:gct-rightMarker' | 'render:pw-barcode' | 'render:pw-qrcode' | 'render:pw-image' | 'render:pw-diagonal' | 'render:pw-pagination' | 'render:pw-line';
5
5
  /** 渲染节点集合 */
6
6
  export interface FieldNodeRenderers {
7
7
  /** 暗提示节点 */
@@ -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
  /** 二维表 */
@@ -5,3 +5,5 @@ export * from './image';
5
5
  export * from './widget';
6
6
  export * from './device';
7
7
  export * from './lot';
8
+ export * from './product';
9
+ export * from './production-identification';
@@ -0,0 +1,9 @@
1
+ /** 产品类型(product_type_) */
2
+ export declare enum ProductTypeEnum {
3
+ /** 原材料 */
4
+ RAW_MATERIAL = "rawMaterial",
5
+ /** 半成品 */
6
+ SEMI_FINISHED_PRODUCT = "semiFinishedProduct",
7
+ /** 产成品 */
8
+ FINISHED_PRODUCT = "finishedProduct"
9
+ }
@@ -0,0 +1,19 @@
1
+ /** 生产标识类型(production_identification_type_) */
2
+ export declare enum ProductionIdentificationTypeEnum {
3
+ /** 物料批 */
4
+ MATERIAL = "MATERIAL",
5
+ /** 生产批次 */
6
+ LOT = "LOT",
7
+ /** 生产序列号 */
8
+ SN = "SN",
9
+ /** 灭菌批 */
10
+ STERILIZATION = "STERILIZATION",
11
+ /** 检验批 */
12
+ INSPECTION_CONTAINER = "INSPECTION_CONTAINER",
13
+ /** 旧检验批取值 */
14
+ LEGACY_INSPECTION = "inspection",
15
+ /** 包装箱 */
16
+ PACK_BOX = "PACK_BOX",
17
+ /** 医疗器械唯一标识 */
18
+ UDI = "UDI"
19
+ }
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './runtime/decision-rule-evaluator';
3
+ export * from './runtime/document-rule-runtime';
@@ -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
+ }
@@ -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' | 'schema:field-rdo-ref' | 'schema:field-e-sop-version';
2
+ export type FieldPropsSchemaKey = 'schema:field-seal' | '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';
@@ -218,6 +218,7 @@ export declare const BASE_FIELD_TYPE: {
218
218
  export type BaseFieldType = (typeof BASE_FIELD_TYPE)[keyof typeof BASE_FIELD_TYPE];
219
219
  /** 业务字段(基础类型上的业务身份)。后续重构前仍并入 FIELD_TYPE,当作一个字段用。 */
220
220
  export declare const BUSINESS_FIELD_TYPE: {
221
+ readonly SEAL: "seal";
221
222
  /**
222
223
  * 关联批次
223
224
  */
@@ -334,6 +335,10 @@ export declare const BUSINESS_FIELD_TYPE: {
334
335
  * 检验数量
335
336
  */
336
337
  readonly INSPECTION_QTY: "inspection_qty";
338
+ /**
339
+ * 受检数量
340
+ */
341
+ readonly INSPECTION_MODULE_QTY: "inspection_module_qty";
337
342
  /**
338
343
  * 工序接收数量
339
344
  */
@@ -386,6 +391,18 @@ export declare const BUSINESS_FIELD_TYPE: {
386
391
  * 物料日期对象
387
392
  */
388
393
  readonly DATE_OBJECT: "date_object";
394
+ /**
395
+ * 检验参数对象
396
+ */
397
+ readonly INSPECTION_PARAMETER_OBJECT: "inspection_parameter_object";
398
+ /**
399
+ * 工艺参数对象
400
+ */
401
+ readonly PROCESS_PARAMETER_OBJECT: "process_parameter_object";
402
+ /**
403
+ * 设备参数对象
404
+ */
405
+ readonly DEVICE_PARAMETER_OBJECT: "device_parameter_object";
389
406
  /**
390
407
  * 有效期
391
408
  */
@@ -418,6 +435,10 @@ export declare const BUSINESS_FIELD_TYPE: {
418
435
  * 表单实例数
419
436
  */
420
437
  readonly OF_INST_NUM: "of_inst_num";
438
+ /**
439
+ * 医疗器械唯一标识
440
+ */
441
+ readonly UDI: "udi";
421
442
  /**
422
443
  * 生产数量
423
444
  */
@@ -434,10 +455,19 @@ export declare const BUSINESS_FIELD_TYPE: {
434
455
  * 灭菌批(追溯)
435
456
  */
436
457
  readonly STERILIZATION_CONTAINER: "sterilization_container";
458
+ /**
459
+ * 检验批
460
+ */
461
+ readonly INSPECTION_CONTAINER: "inspection_container";
462
+ /**
463
+ * 灭菌日期
464
+ */
465
+ readonly STERILIZATION_DATE: "sterilization_date";
437
466
  };
438
467
  export type BusinessFieldType = (typeof BUSINESS_FIELD_TYPE)[keyof typeof BUSINESS_FIELD_TYPE];
439
468
  /** 字段类型 = 基础 + 业务 */
440
469
  export declare const FIELD_TYPE: {
470
+ readonly SEAL: "seal";
441
471
  /**
442
472
  * 关联批次
443
473
  */
@@ -554,6 +584,10 @@ export declare const FIELD_TYPE: {
554
584
  * 检验数量
555
585
  */
556
586
  readonly INSPECTION_QTY: "inspection_qty";
587
+ /**
588
+ * 受检数量
589
+ */
590
+ readonly INSPECTION_MODULE_QTY: "inspection_module_qty";
557
591
  /**
558
592
  * 工序接收数量
559
593
  */
@@ -606,6 +640,18 @@ export declare const FIELD_TYPE: {
606
640
  * 物料日期对象
607
641
  */
608
642
  readonly DATE_OBJECT: "date_object";
643
+ /**
644
+ * 检验参数对象
645
+ */
646
+ readonly INSPECTION_PARAMETER_OBJECT: "inspection_parameter_object";
647
+ /**
648
+ * 工艺参数对象
649
+ */
650
+ readonly PROCESS_PARAMETER_OBJECT: "process_parameter_object";
651
+ /**
652
+ * 设备参数对象
653
+ */
654
+ readonly DEVICE_PARAMETER_OBJECT: "device_parameter_object";
609
655
  /**
610
656
  * 有效期
611
657
  */
@@ -638,6 +684,10 @@ export declare const FIELD_TYPE: {
638
684
  * 表单实例数
639
685
  */
640
686
  readonly OF_INST_NUM: "of_inst_num";
687
+ /**
688
+ * 医疗器械唯一标识
689
+ */
690
+ readonly UDI: "udi";
641
691
  /**
642
692
  * 生产数量
643
693
  */
@@ -654,6 +704,14 @@ export declare const FIELD_TYPE: {
654
704
  * 灭菌批(追溯)
655
705
  */
656
706
  readonly STERILIZATION_CONTAINER: "sterilization_container";
707
+ /**
708
+ * 检验批
709
+ */
710
+ readonly INSPECTION_CONTAINER: "inspection_container";
711
+ /**
712
+ * 灭菌日期
713
+ */
714
+ readonly STERILIZATION_DATE: "sterilization_date";
657
715
  /**
658
716
  * 文本
659
717
  */
@@ -80,6 +80,12 @@ type NormalizeNumberTextResult = {
80
80
  * - fw:number 根据 digits 执行整数化或小数截断
81
81
  */
82
82
  export declare function normalizeNumberTextOnCommit(rawText: string, options: NormalizeNumberTextOptions): NormalizeNumberTextResult;
83
+ /** 配置检查:返回错误说明,不抛异常。 */
84
+ export declare function getNumberInputConfigError(fieldType: FIELD_TYPE | undefined, digits: unknown): string | null;
85
+ /** 填报失焦时处理数字长度和整数上限。 */
86
+ export declare function normalizeNumberInputOnBlur(rawText: string, options: NormalizeNumberTextOptions, fieldType?: FIELD_TYPE): NormalizeNumberTextResult & {
87
+ configError?: string;
88
+ };
83
89
  export declare function buildNumberFormats(props: any, type: NumberFieldType): {
84
90
  type: NumberFieldType;
85
91
  digits: number | undefined;
@@ -0,0 +1,2 @@
1
+ /** 查询到的生产标识能否作为物料批使用;返回非空文案表示不能使用。 */
2
+ export declare function getInvalidMaterialLotReason(record: Record<string, unknown>, keyword: string): string | null;
@@ -0,0 +1,19 @@
1
+ import { DocModel } from '../../../core/model/DocModel';
2
+ import { Doc } from '../../../core/view/Doc';
3
+ import { Page } from '../../../core/view/Page';
4
+ import { WrField } from '../../../core/model/document';
5
+ import { Wlayout } from '../../../core/model/overlays/Wlayout';
6
+ import { WidgetMeta } from '../../../core/widget/types';
7
+ import { SealPosition } from './seal-value';
8
+ export declare function isMainSealBinding(meta: WidgetMeta, mainModelKey: string): boolean;
9
+ export declare function listSealFields(model?: DocModel): {
10
+ overlay: import('../../../core/model/overlays/Woverlay').Woverlay;
11
+ layout: Wlayout;
12
+ field: WrField;
13
+ }[];
14
+ export type SealFieldEntry = ReturnType<typeof listSealFields>[number];
15
+ export declare function getSealTemplatePosition({ overlay, layout }: SealFieldEntry): SealPosition;
16
+ export declare function getSealInstancePosition(doc: Doc, entry: SealFieldEntry): SealPosition;
17
+ export declare function findSealPage(pages: Page[], position: SealPosition): Page | undefined;
18
+ export declare function getSealPagePosition(doc: Doc, page: Page, x: number, y: number): SealPosition;
19
+ export declare function initializeDocumentSeals(doc: Doc): void;
@@ -0,0 +1,32 @@
1
+ import { Doc } from '../../../core/view/Doc';
2
+ import { ImageWidget } from '../../../core/view/runs/ImageWidget';
3
+ export declare function resolveSealDisplay(doc: Doc, widget: ImageWidget): {
4
+ stamped: boolean;
5
+ visible: boolean;
6
+ hasError: boolean;
7
+ emptySymbol: string;
8
+ showEmptySymbol: boolean;
9
+ placeholder: string;
10
+ requiredBorder: boolean | undefined;
11
+ state: undefined;
12
+ disabled: boolean;
13
+ isReadonly: boolean;
14
+ blocked: boolean;
15
+ } | {
16
+ stamped: boolean;
17
+ visible: boolean;
18
+ hasError: boolean;
19
+ emptySymbol: string;
20
+ showEmptySymbol: boolean;
21
+ placeholder: string;
22
+ requiredBorder: boolean | undefined;
23
+ state: {
24
+ required: boolean;
25
+ readonly: boolean;
26
+ disabled: boolean;
27
+ displayStatus: import('../../../core/widget/state').WidgetDisplayStatus;
28
+ };
29
+ disabled: boolean;
30
+ isReadonly: boolean;
31
+ blocked: boolean;
32
+ };
@@ -0,0 +1,39 @@
1
+ export interface SealPosition {
2
+ sheetId: string;
3
+ pageIndex: number;
4
+ leftMm: number;
5
+ topMm: number;
6
+ }
7
+ export interface SealStamp {
8
+ sealId: string;
9
+ sealName: string;
10
+ sealType: string;
11
+ sealImage: string;
12
+ sealUserId: string;
13
+ sealUserName: string;
14
+ sealUserTime: string;
15
+ }
16
+ export interface SealFieldValue extends SealStamp {
17
+ sealPosition: SealPosition;
18
+ }
19
+ export declare function parseSealValue(raw: unknown): Record<string, unknown> | undefined;
20
+ export declare function isSealPosition(value: unknown): value is SealPosition;
21
+ /** Position is instance metadata, not evidence that the field has been filled. */
22
+ export declare function classifySealValue(raw: unknown): 'empty' | 'stamped' | 'invalid';
23
+ export declare const isSealStamped: (raw: unknown) => boolean;
24
+ export declare function readSealValue(raw: unknown, fallback: SealPosition): SealFieldValue;
25
+ export declare function stampSealValue(raw: unknown, fallback: SealPosition, stamp: SealStamp): string;
26
+ export declare function clearSealValue(raw: unknown, fallback: SealPosition): string;
27
+ export declare function moveSealValue(raw: unknown, fallback: SealPosition, position: SealPosition): string;
28
+ /** Only missing positions are repaired; malformed historical values remain available to validation. */
29
+ export declare function initializeSealValue(raw: unknown, fallback: SealPosition): unknown;
30
+ export declare function normalizeSealDiameter(value: unknown): number;
31
+ export declare const mmToPx: (mm: number) => number;
32
+ export declare const pxToMm: (px: number) => number;
33
+ export declare function clampSealPosition(p: SealPosition, widthPx: number, heightPx: number, diameterMm: number): SealPosition;
34
+ export declare function containSealImage(width: number, height: number, size: number): {
35
+ x: number;
36
+ y: number;
37
+ width: number;
38
+ height: number;
39
+ };
@@ -0,0 +1 @@
1
+ export { profile as maintenanceProfile } from './profile';
@@ -0,0 +1,9 @@
1
+ /** 设备保养表内置字段 key */
2
+ export declare const F: {
3
+ /** 保养日期 */
4
+ readonly inspectionDate: "inspection_date_";
5
+ /** 保养人 */
6
+ readonly inspector: "inspector_";
7
+ /** 复核人 */
8
+ readonly reviewer: "reviewer_";
9
+ };
@@ -0,0 +1,2 @@
1
+ import { BusinessFieldProfile } from '../../../../types';
2
+ export declare const fields: BusinessFieldProfile[];
@@ -0,0 +1,3 @@
1
+ import { BusinessSubTableProfile } from '../../../../types';
2
+ export declare const TABLE_TYPE: "maintenance";
3
+ export declare const profile: BusinessSubTableProfile;
@@ -0,0 +1 @@
1
+ export { profile as pointInspectionProfile } from './profile';
@@ -0,0 +1,9 @@
1
+ /** 设备点检表内置字段 key */
2
+ export declare const F: {
3
+ /** 点检日期 */
4
+ readonly inspectionDate: "inspection_date_";
5
+ /** 点检人 */
6
+ readonly inspector: "inspector_";
7
+ /** 复核人 */
8
+ readonly reviewer: "reviewer_";
9
+ };
@@ -0,0 +1,2 @@
1
+ import { BusinessFieldProfile } from '../../../../types';
2
+ export declare const fields: BusinessFieldProfile[];
@@ -0,0 +1,3 @@
1
+ import { BusinessSubTableProfile } from '../../../../types';
2
+ export declare const TABLE_TYPE: "point-inspection";
3
+ export declare const profile: BusinessSubTableProfile;
@@ -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
+ }