| | |
| | | import { requestClient } from '#/api/request'; |
| | | |
| | | export namespace MesQcIndicatorResultApi { |
| | | /** MES 检验结果明细 */ |
| | | /** 平行测量单批次值 */ |
| | | export interface IndicatorResultMeasure { |
| | | detailId?: number; // 明细编号 |
| | | resultId?: number; // 关联检验结果 ID |
| | | measureNo?: number; // 测量批次号 |
| | | value?: string; // 检测值 |
| | | remark?: string; // 备注 |
| | | } |
| | | |
| | | /** MES 检验结果明细(接口返回为分组树,children 挂子项) */ |
| | | export interface IndicatorResultDetail { |
| | | id?: number; // 编号 |
| | | resultId?: number; // 关联检验结果 ID |
| | | indicatorId?: number; // 检测指标 ID |
| | | value?: string; // 检测值(统一存为字符串) |
| | | value?: string; // 检测值(统一存为字符串,兼容第一批测量值) |
| | | valueNumber?: number; // UI 数值绑定(提交前转字符串) |
| | | remark?: string; // 备注 |
| | | measures?: IndicatorResultMeasure[]; // 平行测量多批次值 |
| | | // 关联查询字段(来自 indicator) |
| | | indicatorName?: string; // 检测指标名称 |
| | | parentId?: number; // 父分组指标 ID |
| | | itemType?: number; // 指标项类型(1 录入项 / 2 分组) |
| | | formulaText?: string; // 公式文本 |
| | | unitText?: string; // 单位文本 |
| | | sortOrder?: number; // 排序号 |
| | | valueType?: number; // 质检值类型 |
| | | valueSpecification?: string; // 值属性 |
| | | children?: IndicatorResultDetail[]; // 分组子项 |
| | | } |
| | | |
| | | /** MES 检验结果 */ |
| | |
| | | export function deleteIndicatorResult(id: number) { |
| | | return requestClient.delete(`/mes/qc/indicator-result/delete?id=${id}`); |
| | | } |
| | | |
| | | /** 导出产品检验单 Word(qcType:1=IQC、2=IPQC、3=OQC、4=RQC;resultId 可选,默认取最早样品) */ |
| | | export function exportProductWord(params: { |
| | | qcId: number; |
| | | qcType: number; |
| | | resultId?: number; |
| | | }) { |
| | | return requestClient.download( |
| | | '/mes/qc/indicator-result/export-product-word', |
| | | { params }, |
| | | ); |
| | | } |