2 天以前 46624ce480a3c14da21f39cc4ad5f7eecea2bb1e
src/api/mes/pro/bagCode/index.ts
@@ -15,6 +15,9 @@
    lineName?: string; // 产线名称
    palletId?: number; // 绑定托盘编号
    palletCode?: string; // 托盘码
    itemId?: number; // 品种(物料)编号
    itemCode?: string; // 品种编码
    itemName?: string; // 品种名称
    status?: number; // 状态(字典 mes_pro_bag_code_status)
    printTime?: string; // 导出(交付印刷)时间
    cancelTime?: string; // 作废时间
@@ -30,18 +33,32 @@
    batchCode?: string;
    uuid?: string;
    palletId?: number;
    itemId?: number;
    status?: number;
    createTime?: string[];
  }
  /** 生成数据包请求 */
  /** 生成数据包请求(品种主计量单位类型为 N千克 时按托盘数换算袋数;为 吨 时无托盘、直接输入袋码数) */
  export interface GenerateParams {
    count: number; // 生成袋数
    itemId: number; // 品种(物料)编号
    palletCount?: number; // 托盘数(48千克/100千克 品种必填)
    bagCount?: number; // 袋码数(吨品种必填)
    remark?: string; // 备注
  }
  export interface GenerateResult {
    uuid?: string;
    uuid?: string; // 生成组 UUID
    type?: string; // 品种主计量单位类型(48千克/100千克/吨)
    perPallet?: number; // 每托袋数(吨品种为 0)
    totalCount?: number; // 生成袋码总数
    palletIds?: number[]; // 自动生成的托盘编号列表(吨品种为空)
  }
  /** 生成原始袋码请求(仅品种+袋码数量,不关联计量单位类型、不生成托盘) */
  export interface RawGenerateParams {
    itemId: number; // 品种(物料)编号
    count: number; // 袋码数量
    remark?: string; // 备注
  }
  export interface BindBatchParams {
@@ -125,6 +142,14 @@
  );
}
/** 生成原始袋码(仅选品种与袋码数量,不生成托盘;返回生成组 UUID) */
export function generateRawBagCodes(data: MesProBagCodeApi.RawGenerateParams) {
  return requestClient.post<MesProBagCodeApi.GenerateResult>(
    '/mes/pro/bag-code/raw-generate',
    data,
  );
}
/** 录入生产批次 */
export function bindBagCodeBatch(data: MesProBagCodeApi.BindBatchParams) {
  return requestClient.put('/mes/pro/bag-code/bind-batch', data);