import { get, uget, post, upost } from '@/http/index'

export const addAvmatConsumeRuleVo = async (data) => {
  return await post('/carryingtask/avmatConsumeRule/addAvmatConsumeRuleVo', data)
}

export const getAvmatConsumeRule = async (data) => {
  return await post('/carryingtask/avmatConsumeRule/getAvmatConsumeRule', data)
}

export const updateAvmatConsumeRule = async (data) => {
  return await post('/carryingtask/avmatConsumeRule/updateAvmatConsumeRule', data)
}

export const removeAvmatConsumeRule = async (data) => {
  return await post('/carryingtask/avmatConsumeRule/removeAvmatConsumeRule', data)
}

//下载模板
export const downLoadFile = async (data) => {
  window.open(process.env.VUE_APP_BASE_API + '/carryingtask/avmatConsumeRule/downLoadFile')
}
//导出
export const exportExcel = async (data) => {
  window.open(process.env.VUE_APP_BASE_API + `/carryingtask/avmatConsumeRule/exportExcel?avmatCategoriesId=${data.avmatCategoriesId}&avmatCategoriesName=${data.avmatCategoriesName}&avmatCategoriesCode=${data.avmatCategoriesCode}`)
}
