cm-reporting 0.7.9 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1533,12 +1533,19 @@ declare const _default: {
1533
1533
  "externalPickFailedContent": "The external picker did not return data successfully. Please try again.",
1534
1534
  "externalPickMissingIdContent": "The external picker result is missing required id and cannot be applied.",
1535
1535
  "duplicateSmelterSelectionTitle": "Duplicate smelter selection",
1536
- "duplicateSmelterSelectionContent": "The same smelter cannot be selected twice under the same metal. Please choose another one."
1536
+ "duplicateSmelterSelectionContent": "The same smelter cannot be selected twice under the same metal. Please choose another one.",
1537
+ "smelterNumberLookupNotFoundTitle": "Smelter number not found",
1538
+ "smelterNumberLookupNotFoundContent": "The system did not return data for this smelter number. Check the number and try again.",
1539
+ "smelterNumberLookupOutOfScopeTitle": "Smelter metal is outside the declaration scope",
1540
+ "smelterNumberLookupOutOfScopeContent": "This smelter belongs to a metal whose declaration Q1 and Q2 are not both Yes, so it was not filled automatically.",
1541
+ "smelterNumberLookupMultipleTitle": "Multiple smelters matched",
1542
+ "smelterNumberLookupMultipleContent": "The system returned multiple smelters and the library cannot choose one automatically. Narrow the lookup result in the host system."
1537
1543
  },
1538
1544
  "tips": {
1539
1545
  "reportPurpose": {
1540
1546
  "cmrt": "The purpose of this report is to collect sourcing information for tin, tantalum, tungsten, gold, and other metals used in products.",
1541
- "emrt": "The purpose of this report is to collect sourcing information for specific raw materials used in products, especially cobalt or natural mica."
1547
+ "emrt": "The purpose of this report is to collect sourcing information for specific raw materials used in products, especially cobalt or natural mica.",
1548
+ "amrt": "The purpose of this document is to collect sourcing information on minerals/metals used in products."
1542
1549
  }
1543
1550
  }
1544
1551
  };
@@ -1836,7 +1843,8 @@ declare interface SmelterExternalContextBase {
1836
1843
  /**
1837
1844
  * 冶炼厂行内外部选择回写项:
1838
1845
  * - id:宿主数据主键(用于覆盖行 id,external/hybrid 模式下必填)
1839
- * - smelterNumber:冶炼厂识别号码(仅用于展示列)
1846
+ * - smelterNumber:冶炼厂 CID 展示号,“冶炼厂识别”列也使用该 CID
1847
+ * - sourceId:来源识别号,例如 RMI
1840
1848
  * - smelterId:兼容字段,不建议继续使用
1841
1849
  */
1842
1850
  export declare type SmelterExternalPickItem = Omit<Partial<SmelterRow>, 'id'> & {
@@ -1873,12 +1881,36 @@ export declare interface SmelterListIntegration {
1873
1881
  * - 返回 items[0] 将用于更新该行
1874
1882
  */
1875
1883
  onPickSmelterForRow?: (ctx: SmelterRowPickContext) => Promise<ExternalPickResult<SmelterExternalPickItem>>;
1884
+ /**
1885
+ * 根据冶炼厂 CID 编号查询并回写当前行。
1886
+ * - 返回 0 条时库会提示未找到
1887
+ * - 返回 1 条时库会自动回填
1888
+ * - 返回多条时库会提示宿主收窄结果,不自动猜测
1889
+ */
1890
+ onLookupSmelterByNumber?: (ctx: SmelterNumberLookupContext) => Promise<ExternalPickResult<SmelterExternalPickItem>>;
1891
+ /**
1892
+ * CID 查询返回多条时,由宿主打开选择器让用户确认其中一条。
1893
+ * searchField 固定为 smelterNumber,searchValue 是用户输入的 CID。
1894
+ */
1895
+ onPickSmelterForNumberLookup?: (ctx: SmelterNumberLookupPickContext) => Promise<ExternalPickResult<SmelterExternalPickItem>>;
1876
1896
  /** 冶炼厂名称/选择入口交互模式:默认 'internal'(用户手填)。 */
1877
1897
  lookupMode?: SmelterLookupMode;
1878
1898
  }
1879
1899
 
1880
1900
  export declare type SmelterLookupMode = 'internal' | 'external' | 'hybrid';
1881
1901
 
1902
+ export declare interface SmelterNumberLookupContext extends SmelterExternalContextBase {
1903
+ rowId: string;
1904
+ row: Readonly<SmelterRow>;
1905
+ smelterNumber: string;
1906
+ }
1907
+
1908
+ export declare interface SmelterNumberLookupPickContext extends SmelterNumberLookupContext {
1909
+ searchField: 'smelterNumber';
1910
+ searchValue: string;
1911
+ candidates: ReadonlyArray<SmelterExternalPickItem>;
1912
+ }
1913
+
1882
1914
  /**
1883
1915
  * @file core/types/tableRows.ts
1884
1916
  * @description 模块实现。