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

enum Api {
  // 获取分页列表
  GetListDataInfo = '/api/TaxZongdi/LoadZongdiPageList',
  //  根据id获取单个企业信息
  GetConpanyInfoById = '/api/TaxZongdi/GetZongdiInfoById',
  // 新增
  AddCompany = '/api/TaxZongdi/AddZongdi',
  // 编辑
  UpdateCompany = '/api/TaxZongdi/UpdateZongdi',
  // 删除
  DeleteCompany = '/api/TaxZongdi/DeleteZongdi',
  // 查询乡镇
  GetStreetInfo = '/api/TaxZongdi/GetStreetInfo',
  //导入
  ImportCompanyInfo = '/api/TaxZongdi/ImportZongdiInfo',
  //根据社会信用代码查询企业
  GetConpanyInfoByshxydm = '/api/TaxCompany/GetConpanyInfoByshxydm',
   //导出
  ExportZongdi = '/api/TaxZongdi/ExportZongdi',
}


/**
 * @description: getCaseFlowLog
 */
export function GetListDataInfo(params?: AccountParams) {
  return defHttp.get<countModel>({ url: Api.GetListDataInfo, params });
}
export function GetConpanyInfoByshxydm(params?: companyItem) {
  return defHttp.get<countModel>({ url: Api.GetConpanyInfoByshxydm, 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 ExportZongdi(params?: countDetItem) {
  return defHttp.post<countModel[]>({
    url: Api.ExportZongdi,
    responseType: 'blob',
  })
}