
import { MesWarehouseDisassemblePageModel, MesWarehouseDisassemblePageParams, MesWarehouseDisassemblePageResult } from './model/CcrkModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';

enum Api {
  Page = '/ckgl/ccrk/page',
  List = '/ckgl/ccrk/list',
  Info = '/ckgl/ccrk/info',
  MesWarehouseDisassemble = '/ckgl/ccrk',
  
  
  
}

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

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

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

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

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




