import request from '@/utils/request'

// 查询月销售目标合并明细列表
export function listMonthGoalMergeDetails(query) {
  return request({
    url: '/goal_management/monthGoalMergeDetails/list',
    method: 'get',
    params: query
  })
}

// 查询月销售目标合并明细详细
export function getMonthGoalMergeDetails(id) {
  return request({
    url: '/goal_management/monthGoalMergeDetails/parent/' + id,
    method: 'get'
  })
}

// 新增月销售目标合并明细
export function addMonthGoalMergeDetails(data) {
  return request({
    url: '/goal_management/monthGoalMergeDetails',
    method: 'post',
    data: data
  })
}

// 修改月销售目标合并明细
export function updateMonthGoalMergeDetails(data) {
  return request({
    url: '/goal_management/monthGoalMergeDetails',
    method: 'put',
    data: data
  })
}

// 删除月销售目标合并明细
export function delMonthGoalMergeDetails(id) {
  return request({
    url: '/goal_management/monthGoalMergeDetails/' + id,
    method: 'delete'
  })
}

// 合并月销售目标明细
export function mergeMonthSaleMergeDetails(data) {
  return request({
    url: '/goal_management/monthGoalMergeDetails/merge',
    method: 'post',
    data: data
  })
}
