
import { MesQualityUnqualifiedWorkflowPageModel, MesQualityUnqualifiedWorkflowPageParams, MesQualityUnqualifiedWorkflowPageResult } from './model/CpbhgcllcdModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';

enum Api {
  Page = '/zlgl/cpbhgcllcd/page',
  List = '/zlgl/cpbhgcllcd/list',
  Info = '/zlgl/cpbhgcllcd/info',
  MesQualityUnqualifiedWorkflow = '/zlgl/cpbhgcllcd',
  
  
  
}

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

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

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

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

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




