| | |
| | | import type { PageParam, PageResult } from '..\..\..\..\..\packages\effects\request\src'; |
| | | import type { PageParam, PageResult } from '@vben/request'; |
| | | |
| | | import { requestClient } from '#/api/request'; |
| | | |
| | |
| | | itemName?: string; // 物料名称(JOIN) |
| | | specification?: string; // 规格型号(JOIN) |
| | | unitMeasureName?: string; // 计量单位名称(JOIN) |
| | | } |
| | | } |
| | | |
| | | /** 质检方案选项(方案-产品关联) */ |
| | | export namespace MesQcTemplateItemOptionApi { |
| | | export interface Option { |
| | | id?: number; // 产品关联编号 |
| | | templateId?: number; // 质检方案 ID |
| | | templateCode?: string; // 质检方案编号 |
| | | templateName?: string; // 质检方案名称 |
| | | quantityCheck?: number; // 最低检测数 |
| | | quantityUnqualified?: number; // 最大不合格数 |
| | | criticalRate?: number; // 最大致命缺陷率(%) |
| | | majorRate?: number; // 最大严重缺陷率(%) |
| | | minorRate?: number; // 最大轻微缺陷率(%) |
| | | } |
| | | } |
| | | |
| | |
| | | export function deleteTemplateItem(id: number) { |
| | | return requestClient.delete(`/mes/qc/template/item/delete?id=${id}`); |
| | | } |
| | | |
| | | /** 根据物料或工单/任务和检测种类获取可用质检方案列表 */ |
| | | export function getTemplateItemOptionList(params: { |
| | | itemId?: number; |
| | | qcType: number; |
| | | taskId?: number; |
| | | workOrderId?: number; |
| | | }) { |
| | | return requestClient.get<MesQcTemplateItemOptionApi.Option[]>( |
| | | '/mes/qc/template/item/list-by-item-and-type', |
| | | { params }, |
| | | ); |
| | | } |