@gct-paas/word 0.1.74-beta.12 → 0.1.74-beta.14

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.
@@ -23,6 +23,7 @@ export declare const TABLE_BUSINESS_SVG: {
23
23
  readonly 'warehouse-allocate': string;
24
24
  readonly 'material-consume': string;
25
25
  readonly 'material-balance': string;
26
+ readonly 'material-requisition': string;
26
27
  readonly 'check-table': string;
27
28
  readonly 'pretreatment-list': string;
28
29
  readonly 'entrust-steril-batch-list': string;
@@ -34,6 +34,8 @@ export declare function computeContainLayout(natural: ImageSize, box: ImageSize)
34
34
  * 在目标框内等比缩放(contain),不压缩、不拉伸
35
35
  */
36
36
  export declare function computeContainDisplaySize(natural: ImageSize, box: ImageSize): ImageSize;
37
+ /** 同步取无图签名缓存(布局重建时可避免先闪占位再异步补图) */
38
+ export declare function getCachedSignatureImage(name: string, width?: number, height?: number, time?: number | string): HTMLImageElement | null;
37
39
  /**
38
40
  * 创建无图签名兜底图(用户名 + 电子签名 + 验证日期)
39
41
  * 按字段宽高绘制,显示框设多大,字就按多大排
@@ -25,7 +25,13 @@ export declare class WtblCalculation {
25
25
  */
26
26
  private static processBounded;
27
27
  /**
28
- * 处理 boundedItem 数据
28
+ * 按 itemRegion.id 查找嵌套的数据分组 / 动态关联区域
29
+ * (itemRegion 不在 table.regions 顶层,不能用 findRegionById)
30
+ */
31
+ private static findItemRegionById;
32
+ private static applyBoundsToItemRegion;
33
+ /**
34
+ * 处理 boundedItem 数据(更新父级 bounded 的 itemRegion 边界)
29
35
  */
30
36
  private static processBoundedItem;
31
37
  /**
@@ -33,7 +39,7 @@ export declare class WtblCalculation {
33
39
  */
34
40
  private static processCheckTable;
35
41
  /**
36
- * 处理 dataGroup2D 数据
42
+ * 处理 dataGroup2D 数据(更新检验表 / 二维表上的 itemRegion 边界)
37
43
  */
38
44
  private static processDataGroup2D;
39
45
  }
@@ -9,11 +9,23 @@ export declare class WtblRowColumnOps {
9
9
  /** 仅外表需要做「删除行/列/表时联动删除嵌套表」 */
10
10
  private static detachNestedTablesFromOuterTable;
11
11
  /**
12
- * 新单元格同步引用信息
13
- * refCell: 参考单元格 (above | left)
14
- * nextRefCell: 后参考单元格 (below | right ),如果传入,需要跟 refCell 比对一致后同步
12
+ * 新单元格同步引用信息(mergeId / subTable / subTableItem / header)
13
+ *
14
+ * 必须两侧参考单元格都存在,且对应字段一致,才写入新格。
15
+ * 单侧缺失(表边界、子表外侧空行)不同步,避免检验表等 region
16
+ * 在「上一行/下一行插入」时被错误扩大,进而触发重叠校验误报。
15
17
  */
16
18
  private static syncRefInfo;
19
+ /**
20
+ * 在 insertIndex 处插入一行后,将落在该行及以下的 region / itemRegion 行号整体 +1。
21
+ * 否则仅靠单元格标记回写时,动态关联 itemRegion 若未能匹配 id,边界会留在原行,
22
+ * 设计端字段与背景框就不会随检验表下移。
23
+ */
24
+ private static shiftRegionsForRowInsert;
25
+ /**
26
+ * 在 insertIndex 处插入一列后,将落在该列及右侧的 region / itemRegion 列号整体 +1。
27
+ */
28
+ private static shiftRegionsForColInsert;
17
29
  /**
18
30
  * 在指定行位置插入新行
19
31
  */
@@ -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' | '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' | '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 类型 */
@@ -56,11 +56,14 @@ export type DevicePartConsumeTableProps = RepeatingWidgetPropsBase & {
56
56
  export type MaterialBalanceTableProps = RepeatingWidgetPropsBase & {
57
57
  layoutType: 'material-balance-table';
58
58
  };
59
+ export type MaterialRequisitionTableProps = RepeatingWidgetPropsBase & {
60
+ layoutType: 'material-requisition-table';
61
+ };
59
62
  export type WarehouseAllocateTableProps = RepeatingWidgetPropsBase & {
60
63
  layoutType: 'warehouse-allocate-table';
61
64
  barcode_parsing_rules_id_?: string;
62
65
  };
63
- export type RepeatingWidgetPropsMeta = DynamicTableProps | WarehouseInTableProps | WarehouseInboundTableProps | WarehouseOutTableProps | WarehouseOutboundTableProps | WarehouseInOutTableProps | WarehouseInventoryTableProps | PartStocktakeTableProps | DevicePartConsumeTableProps | WarehouseAllocateTableProps | EntrustSterilBatchListTableProps | PretreatmentListTableProps;
66
+ export type RepeatingWidgetPropsMeta = DynamicTableProps | WarehouseInTableProps | WarehouseInboundTableProps | WarehouseOutTableProps | WarehouseOutboundTableProps | WarehouseInOutTableProps | WarehouseInventoryTableProps | PartStocktakeTableProps | DevicePartConsumeTableProps | WarehouseAllocateTableProps | MaterialBalanceTableProps | MaterialRequisitionTableProps | EntrustSterilBatchListTableProps | PretreatmentListTableProps;
64
67
  export type RepeatingWidgetMeta = {
65
68
  props: RepeatingWidgetPropsMeta;
66
69
  };
@@ -32,6 +32,8 @@ export type PanelType =
32
32
  | 'panel:device-part-consume-table'
33
33
  /** 物料平衡表 */
34
34
  | 'panel:material-balance-table'
35
+ /** 生产收料表 */
36
+ | 'panel:material-requisition-table'
35
37
  /** 库存调拨表 */
36
38
  | 'panel:warehouse-allocate-table'
37
39
  /** 二维表 */
@@ -2,6 +2,7 @@ import { CheckTableItemInfosPayload, CheckTableRegionRef } from '../types';
2
2
  import { ICheckTableConfig } from '../front-config';
3
3
  /**
4
4
  * 按已扫描的检验表 region 并行解析检验项(有快照用快照,否则请求)。
5
+ * @param instanceId 真实填报实例 id;设计态 / 模拟填报应传空字符串(默认数据源将跳过请求)
5
6
  * @returns infosMap / countMap(count 至少为 1,用于占位行)/ 待落库 byTable 快照
6
7
  */
7
8
  export declare function fetchCheckItemsForRegions(instanceId: string, regions: CheckTableRegionRef[], checkTableConfig?: ICheckTableConfig): Promise<{
@@ -0,0 +1,2 @@
1
+ export { profile as materialRequisitionProfile, TABLE_TYPE } from './profile';
2
+ export * from './profile';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * 生产收料表(MATERIAL_REQUISITION)字段 key
3
+ */
4
+ export declare const F: {
5
+ /** 物料 */
6
+ readonly product: "product_id_";
7
+ /** 物料名称 */
8
+ readonly productName: "product_id_name_";
9
+ /** 物料编码 */
10
+ readonly productCode: "product_id_code_";
11
+ /** 物料规格 */
12
+ readonly productSpec: "product_id_spec_";
13
+ /** 物料批号 */
14
+ readonly materialNo: "material_no_";
15
+ /** 物料批号 ID */
16
+ readonly materialNoId: "material_no__id_";
17
+ /** 工单 */
18
+ readonly mfgOrder: "mfg_order_id_";
19
+ /** 批次/SN */
20
+ readonly lotSn: "lot_sn_id_";
21
+ /** 唯一码 */
22
+ readonly uniqueCode: "unique_code_";
23
+ /** 收料数量 */
24
+ readonly qtyRequisition: "qty_requisition_";
25
+ /** 数量单位 */
26
+ readonly qtyUom: "qty_uom_id_";
27
+ /** 有效期 */
28
+ readonly validity: "validity_";
29
+ };
30
+ export type MaterialRequisitionFieldKey = (typeof F)[keyof typeof F];
31
+ /** 设计态固定禁用、运行态只读的信息字段 */
32
+ export declare const DISABLED_INPUT_FIELDS: readonly ["product_id_name_", "product_id_code_", "product_id_spec_"];
33
+ /** 物料清空时需一并清空的字段 */
34
+ export declare const CLEAR_ON_PRODUCT_EMPTY: readonly ["product_id_name_", "product_id_code_", "product_id_spec_"];
@@ -0,0 +1,2 @@
1
+ import { BusinessFieldProfile } from '../../../../types';
2
+ export declare const fields: BusinessFieldProfile[];
@@ -0,0 +1,4 @@
1
+ import { BusinessSubTableProfile } from '../../../../types';
2
+ export declare const TABLE_TYPE: "material-requisition";
3
+ export declare const profile: BusinessSubTableProfile;
4
+ export { profile as materialRequisitionProfile };
@@ -0,0 +1,5 @@
1
+ import { Doc } from '../../../../../../core';
2
+ /**
3
+ * 物料清空时,同步清空名称 / 编码 / 规格
4
+ */
5
+ export declare function handleProductIdChange(doc: Doc, subFieldKey: string, rowIndex: number): void;
@@ -20,11 +20,12 @@ export type DataTableType = 'dynamic-table' | 'fixed-table' | 'two-d-table';
20
20
  * @property warehouse-allocate - 库存调拨表
21
21
  * @property material-consume - 物料消耗表
22
22
  * @property material-balance - 物料平衡表
23
+ * @property material-requisition - 生产收料表
23
24
  * @property check-table - 检验表
24
25
  * @property pretreatment-list - 预处理表
25
26
  * @property entrust-steril-batch-list - 委托灭菌生产批次表
26
27
  */
27
- 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' | 'check-table' | 'pretreatment-list' | 'entrust-steril-batch-list';
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';
28
29
  /** 所有子表类型(数据表 + 业务表) */
29
30
  export type TableType = DataTableType | BusinessSubTableType;
30
31
  /**