| | |
| | | /** 生产批次 */ |
| | | export interface Batch { |
| | | id?: number; // 编号 |
| | | code?: string; // 批次号(自动生成) |
| | | itemId?: number; // 品种(产品物料)编号 |
| | | itemCode?: string; // 品种编码(后端拼接) |
| | | itemName?: string; // 品种名称(后端拼接) |
| | | itemSpecification?: string; // 品种规格(后端拼接) |
| | | lineId?: number; // 产线编号 |
| | | lineCode?: string; // 产线编码(后端回填) |
| | | lineName?: string; // 产线名称(后端回填) |
| | | code?: string; // 批次号(补录正式信息后自动生成) |
| | | tempCode?: string; // 临时批次码(预生成二维码阶段使用,扫码追溯兼容) |
| | | lineId?: number; // 产线编号(页面展示为「加工单位」) |
| | | lineCode?: string; // 产线编码(后端回填,页面已隐藏) |
| | | lineName?: string; // 产线名称(后端回填,页面展示为「加工单位」) |
| | | processingTeam?: string; // 加工班组(手工填写) |
| | | produceDate?: string; // 生产日期 |
| | | planQuantity?: number; // 计划数量 |
| | | planQuantity?: number; // 加工数量(原计划数量,页面展示为「加工数量」) |
| | | ownerUserId?: number; // 责任人用户编号 |
| | | ownerUserName?: string; // 责任人昵称 |
| | | bagQuantity?: number; // 已生成袋码数量 |
| | |
| | | remark?: string; // 备注 |
| | | createTime?: string; // 创建时间 |
| | | workers?: BatchWorker[]; // 生产人员配置列表 |
| | | palletIds?: number[]; // 绑定托盘编号列表(仅新增/补录提交时传入,绑定时批次直接进入生产中) |
| | | } |
| | | |
| | | /** 生产批次扫码追溯 */ |
| | | 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; |
| | | itemId?: number; |
| | | tempCode?: string; |
| | | lineId?: number; |
| | | lineCode?: string; |
| | | lineName?: string; |
| | | processingTeam?: string; |
| | | ownerUserId?: number; |
| | | 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); |