import request from '@/utils/request'

// 查询年度销售目标明细列表
export function listAnnualSaleGoalDetails(query) {
  return request({
    url: '/goal_management/annualSaleGoalDetails/list',
    method: 'get',
    params: query
  })
}

// 查询年度销售目标明细详细
export function getAnnualSaleGoalDetails(id) {
  return request({
    url: '/goal_management/annualSaleGoalDetails/parent/' + id,
    method: 'get'
  })
}

// 新增年度销售目标明细
export function addAnnualSaleGoalDetails(data) {
  return request({
    url: '/goal_management/annualSaleGoalDetails',
    method: 'post',
    data: data
  })
}

// 修改年度销售目标明细
export function updateAnnualSaleGoalDetails(data) {
  return request({
    url: '/goal_management/annualSaleGoalDetails',
    method: 'put',
    data: data
  })
}

// 删除年度销售目标明细
export function delAnnualSaleGoalDetails(id) {
  return request({
    url: '/goal_management/annualSaleGoalDetails/' + id,
    method: 'delete'
  })
}
