| | |
| | | palletCode?: string; // 托盘码 |
| | | status?: number; // 状态(字典 mes_pro_bag_code_status) |
| | | printTime?: string; // 导出(交付印刷)时间 |
| | | cancelTime?: string; // 作废时间 |
| | | cancelReason?: string; // 作废原因 |
| | | remark?: string; // 备注 |
| | | createTime?: string; // 创建时间 |
| | | } |
| | |
| | | |
| | | /** 生成数据包请求 */ |
| | | export interface GenerateParams { |
| | | batchId: number; // 生产批次编号 |
| | | count: number; // 生成袋数 |
| | | remark?: string; // 备注 |
| | | } |
| | | |
| | | export interface GenerateResult { |
| | | uuid?: string; |
| | | } |
| | | |
| | | export interface BindBatchParams { |
| | | batchId: number; |
| | | ids: number[]; |
| | | } |
| | | |
| | | /** 绑定/解绑托盘请求 */ |
| | | export interface BindParams { |
| | | palletId: number; // 托盘编号 |
| | | ids: number[]; // 袋码编号列表 |
| | | } |
| | | |
| | | /** 破损袋码替换请求 */ |
| | | export interface ReplaceParams { |
| | | batchId: number; // 生产批次编号 |
| | | oldIds: number[]; // 待替换旧袋码编号列表 |
| | | reason: string; // 替换原因 |
| | | } |
| | | |
| | | /** 破损袋码替换明细 */ |
| | | export interface ReplaceItem { |
| | | oldBagCodeId?: number; |
| | | oldCode?: string; |
| | | oldBagNo?: number; |
| | | oldStatus?: number; |
| | | oldPalletId?: number; |
| | | oldPalletCode?: string; |
| | | newBagCodeId?: number; |
| | | newCode?: string; |
| | | newBagNo?: number; |
| | | newPalletId?: number; |
| | | newPalletCode?: string; |
| | | reason?: string; |
| | | replaceTime?: string; |
| | | } |
| | | |
| | | /** 破损袋码替换结果 */ |
| | | export interface ReplaceResult { |
| | | replaceUuid?: string; |
| | | batchId?: number; |
| | | batchCode?: string; |
| | | count?: number; |
| | | items?: ReplaceItem[]; |
| | | } |
| | | |
| | | /** 扫码追溯信息 */ |
| | |
| | | bagNo?: number; // 袋序号 |
| | | status?: number; // 袋码状态 |
| | | printTime?: string; // 导出印刷时间 |
| | | cancelTime?: string; // 作废时间 |
| | | cancelReason?: string; // 作废原因 |
| | | replacementUuid?: string; // 替换组 UUID |
| | | replacedByCode?: string; // 替换后的新袋码 |
| | | replacementOfCode?: string; // 被替换的旧袋码 |
| | | batchId?: number; // 批次编号 |
| | | batchCode?: string; // 批次号 |
| | | batchStatus?: number; // 批次状态 |
| | |
| | | |
| | | /** 生成袋码数据包(返回生成组 UUID) */ |
| | | export function generateBagCodes(data: MesProBagCodeApi.GenerateParams) { |
| | | return requestClient.post<string>('/mes/pro/bag-code/generate', data); |
| | | return requestClient.post<MesProBagCodeApi.GenerateResult>( |
| | | '/mes/pro/bag-code/generate', |
| | | data, |
| | | ); |
| | | } |
| | | |
| | | /** 录入生产批次 */ |
| | | export function bindBagCodeBatch(data: MesProBagCodeApi.BindBatchParams) { |
| | | return requestClient.put('/mes/pro/bag-code/bind-batch', data); |
| | | } |
| | | |
| | | /** 删除袋码生成组 */ |
| | |
| | | return requestClient.put('/mes/pro/bag-code/unbind-pallet', data); |
| | | } |
| | | |
| | | /** 作废破损袋码并生成等量替换袋码 */ |
| | | export function replaceBagCodes(data: MesProBagCodeApi.ReplaceParams) { |
| | | return requestClient.post<MesProBagCodeApi.ReplaceResult>( |
| | | '/mes/pro/bag-code/replace', |
| | | data, |
| | | ); |
| | | } |
| | | |
| | | /** 查询袋码详情 */ |
| | | export function getBagCode(id: number) { |
| | | return requestClient.get<MesProBagCodeApi.BagCode>( |