src/api/mes/qc/iqc/index.ts
@@ -32,6 +32,7 @@
    majorQuantity?: number; // 严重缺陷数量
    minorQuantity?: number; // 轻微缺陷数量
    checkResult?: number; // 检测结果
    indicatorResultSummary?: string; // 检测结果(检验项实测值汇总,如「温度:15,电阻:1」)
    receiveDate?: number; // 来料日期
    inspectDate?: number; // 检测日期
    inspector?: string; // 检测人员(昵称)
@@ -39,6 +40,12 @@
    inspectorNickname?: string; // 检测人员昵称(关联查询)
    status?: number; // 状态
    remark?: string; // 备注
  }
  /** 来料检验单导入结果 */
  export interface ImportResult {
    createList?: string[]; // 新增成功的检验单编号
    failureList?: Record<string, string>; // 导入失败明细:key 为「检验单编号 X」或「第 N 行」
  }
}
@@ -78,3 +85,15 @@
export function exportIqc(params: any) {
  return requestClient.download('/mes/qc/iqc/export-excel', { params });
}
/** 下载来料检验单导入模板 */
export function importIqcTemplate() {
  return requestClient.download('/mes/qc/iqc/get-import-template');
}
/** 导入来料检验单 */
export function importIqc(file: File) {
  return requestClient.upload<MesQcIqcApi.ImportResult>('/mes/qc/iqc/import', {
    file,
  });
}