
import { MesDisassembleOutboundDetailPageModel, MesDisassembleOutboundDetailPageParams, MesDisassembleOutboundDetailPageResult } from './model/CcckmxModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';

enum Api {
  Page = '/chaiche/ccckmx/page',
  List = '/chaiche/ccckmx/list',
  Info = '/chaiche/ccckmx/info',
  MesDisassembleOutboundDetail = '/chaiche/ccckmx',
  
  
  
}

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

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

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

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

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




