cm-reporting 0.7.9 → 0.8.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.
package/dist/index.d.ts CHANGED
@@ -1533,7 +1533,11 @@ 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
+ "smelterNumberLookupMultipleTitle": "Multiple smelters matched",
1540
+ "smelterNumberLookupMultipleContent": "The system returned multiple smelters and the library cannot choose one automatically. Narrow the lookup result in the host system."
1537
1541
  },
1538
1542
  "tips": {
1539
1543
  "reportPurpose": {
@@ -1836,7 +1840,8 @@ declare interface SmelterExternalContextBase {
1836
1840
  /**
1837
1841
  * 冶炼厂行内外部选择回写项:
1838
1842
  * - id:宿主数据主键(用于覆盖行 id,external/hybrid 模式下必填)
1839
- * - smelterNumber:冶炼厂识别号码(仅用于展示列)
1843
+ * - smelterNumber:冶炼厂 CID 展示号,“冶炼厂识别”列也使用该 CID
1844
+ * - sourceId:来源识别号,例如 RMI
1840
1845
  * - smelterId:兼容字段,不建议继续使用
1841
1846
  */
1842
1847
  export declare type SmelterExternalPickItem = Omit<Partial<SmelterRow>, 'id'> & {
@@ -1873,12 +1878,25 @@ export declare interface SmelterListIntegration {
1873
1878
  * - 返回 items[0] 将用于更新该行
1874
1879
  */
1875
1880
  onPickSmelterForRow?: (ctx: SmelterRowPickContext) => Promise<ExternalPickResult<SmelterExternalPickItem>>;
1881
+ /**
1882
+ * 根据冶炼厂 CID 编号查询并回写当前行。
1883
+ * - 返回 0 条时库会提示未找到
1884
+ * - 返回 1 条时库会自动回填
1885
+ * - 返回多条时库会提示宿主收窄结果,不自动猜测
1886
+ */
1887
+ onLookupSmelterByNumber?: (ctx: SmelterNumberLookupContext) => Promise<ExternalPickResult<SmelterExternalPickItem>>;
1876
1888
  /** 冶炼厂名称/选择入口交互模式:默认 'internal'(用户手填)。 */
1877
1889
  lookupMode?: SmelterLookupMode;
1878
1890
  }
1879
1891
 
1880
1892
  export declare type SmelterLookupMode = 'internal' | 'external' | 'hybrid';
1881
1893
 
1894
+ export declare interface SmelterNumberLookupContext extends SmelterExternalContextBase {
1895
+ rowId: string;
1896
+ row: Readonly<SmelterRow>;
1897
+ smelterNumber: string;
1898
+ }
1899
+
1882
1900
  /**
1883
1901
  * @file core/types/tableRows.ts
1884
1902
  * @description 模块实现。