
import { MesQclbgRecordOutputPageModel, MesQclbgRecordOutputPageParams, MesQclbgRecordOutputPageResult } from './model/QclywccmxModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';

enum Api {
  Page = '/scgl/qclywccmx/page',
  List = '/scgl/qclywccmx/list',
  Info = '/scgl/qclywccmx/info',
  MesQclbgRecordOutput = '/scgl/qclywccmx',
  Rksq = '/scgl/qclywccmx/commitRk',
  Zjsq = '/scgl/qclywccmx/commitZj',
  
  
  
}

/**
 * @description: 查询MesQclbgRecordOutput分页列表
 */
export async function getMesQclbgRecordOutputPage(params: MesQclbgRecordOutputPageParams, mode: ErrorMessageMode = 'modal') {
  return defHttp.get<MesQclbgRecordOutputPageResult>(
    {
      url: Api.Page,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

/**
 * @description: 获取MesQclbgRecordOutput信息
 */
export async function getMesQclbgRecordOutput(id: String, mode: ErrorMessageMode = 'modal') {
  return defHttp.get<MesQclbgRecordOutputPageModel>(
    {
      url: Api.Info,
      params: { id },
    },
    {
      errorMessageMode: mode,
    },
  );
}

/**
 * @description: 新增MesQclbgRecordOutput
 */
export async function addMesQclbgRecordOutput(mesQclbgRecordOutput: Recordable, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<boolean>(
    {
      url: Api.MesQclbgRecordOutput,
      params: mesQclbgRecordOutput,
    },
    {
      errorMessageMode: mode,
    },
  );
}

/**
 * @description: 更新MesQclbgRecordOutput
 */
export async function updateMesQclbgRecordOutput(mesQclbgRecordOutput: Recordable, mode: ErrorMessageMode = 'modal') {
  return defHttp.put<boolean>(
    {
      url: Api.MesQclbgRecordOutput,
      params: mesQclbgRecordOutput,
    },
    {
      errorMessageMode: mode,
    },
  );
}

/**
 * @description: 删除MesQclbgRecordOutput（批量删除）
 */
export async function deleteMesQclbgRecordOutput(ids: string[], mode: ErrorMessageMode = 'modal') {
  return defHttp.delete<boolean>(
    {
      url: Api.MesQclbgRecordOutput,
      data: ids,
    },
    {
      errorMessageMode: mode,
    },
  );
}

/**
 * @description: 入库
 */
export async function rksqMesProductOutput(params: Recordable, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<boolean>(
    {
      url: Api.Rksq,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

/**
 * @description: 质检
 */
export async function zjsqMesProductOutput(params: Recordable, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<boolean>(
    {
      url: Api.Zjsq,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}


