| | |
| | | /** 生产批次 */ |
| | | export interface Batch { |
| | | id?: number; // 编号 |
| | | code?: string; // 批次号(自动生成) |
| | | code?: string; // 批次号(补录正式信息后自动生成) |
| | | tempCode?: string; // 临时批次码(预生成二维码阶段使用,扫码追溯兼容) |
| | | itemId?: number; // 品种(产品物料)编号 |
| | | itemCode?: string; // 品种编码(后端拼接) |
| | | itemName?: string; // 品种名称(后端拼接) |
| | |
| | | /** 生产批次扫码追溯 */ |
| | | export interface BatchTrace { |
| | | id?: number; // 生产批次编号 |
| | | code?: string; // 批次号(二维码内容) |
| | | code?: string; // 批次号(补录后的正式批次号) |
| | | tempCode?: string; // 临时批次码(二维码内容;未补录信息时展示) |
| | | status?: number; // 批次状态(字典 mes_pro_batch_status) |
| | | produceDate?: string; // 生产日期 |
| | | lineCode?: string; // 产线编码 |
| | |
| | | /** 生产批次分页查询参数 */ |
| | | export interface PageParams extends PageParam { |
| | | code?: string; |
| | | tempCode?: string; |
| | | itemId?: number; |
| | | lineId?: number; |
| | | lineCode?: string; |
| | |
| | | status?: number; |
| | | produceDate?: string[]; |
| | | createTime?: string[]; |
| | | } |
| | | |
| | | /** 预生成批次二维码返回项 */ |
| | | export interface PreGenerateResult { |
| | | id: number; // 生产批次编号 |
| | | tempCode: string; // 临时批次码(二维码内容) |
| | | } |
| | | } |
| | | |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 预生成批次临时二维码(仅生成临时批次码,不录入业务信息) */ |
| | | export function preGenerateBatch(data: { |
| | | count: number; |
| | | remark?: string; |
| | | }) { |
| | | return requestClient.post<MesProBatchApi.PreGenerateResult[]>( |
| | | '/mes/pro/batch/pre-generate', |
| | | data, |
| | | ); |
| | | } |
| | | |
| | | /** 补录批次正式信息(生成正式批次号) */ |
| | | export function fillBatchInfo(data: MesProBatchApi.Batch) { |
| | | return requestClient.put('/mes/pro/batch/fill-info', data); |
| | | } |
| | | |
| | | /** 新增生产批次(自动生成批次号) */ |
| | | export function createBatch(data: MesProBatchApi.Batch) { |
| | | return requestClient.post<number>('/mes/pro/batch/create', data); |