// WFProcess 流程模版基本信息
import { defHttp } from '@/utils/http/axios';
import {
  countItem,
  countModel,
  AccountParams,
  AddParams,
  countDetItem
} from './model/index';

enum Api {
  // 获取分页列表
  GetListDataInfo = '/api/TaxCompany/LoadCompanyPageList',
  //  根据id获取单个企业信息
  GetConpanyInfoById = '/api/TaxCompany/GetConpanyInfoById',
  // 新增
  AddCompany = '/api/TaxCompany/AddCompany',
  // 编辑
  UpdateCompany = '/api/TaxCompany/UpdateCompany',
  // 删除
  DeleteCompany = '/api/TaxCompany/DeleteCompany',
  // 查询乡镇
  GetStreetInfo = '/api/TaxCompany/GetStreetInfo',
  //导入
  ImportCompanyInfo = '/api/TaxCompany/ImportCompanyInfo',
  //导出
  ExportCompany = '/api/TaxCompany/ExportCompany',
}


/**
 * @description: getCaseFlowLog
 */
export function GetListDataInfo(params?: AccountParams) {
  return defHttp.get<countModel>({ url: Api.GetListDataInfo, params });
}
export function GetConpanyInfoById(params?: countItem) {
  return defHttp.get<countModel>({ url: Api.GetConpanyInfoById, params });
}
export function AddCompany(params?: AddParams) {
  return defHttp.post<countModel>({ url: Api.AddCompany, params });
}
export function UpdateCompany(params?: AddParams) {
  return defHttp.post<countModel>({ url: Api.UpdateCompany, params });
}
export function DeleteCompany(params?: countDetItem) {
  return defHttp.post<countModel>({ url: Api.DeleteCompany, params });
}
export function GetStreetInfo(params?: countItem) {
  return defHttp.get<countModel>({ url: Api.GetStreetInfo, params });
}
export function ImportCompanyInfo(params?: countItem) {
  return defHttp.post<countItem[]>({
    url: Api.ImportCompanyInfo,
    params,
    headers: {
      'Content-type': 'multipart/form-data',
    },
  })
}
export function ExportCompany(params?: countDetItem) {
  return defHttp.post<countModel[]>({
    url: Api.ExportCompany,
    responseType: 'blob',
  })
}