import request from '@/utils/request'

// 查询月回款目标填报明细列表
export function listMonthReturnMergeDetails(query) {
  return request({
    url: '/mk/monthReturnMergeDetails/list',
    method: 'get',
    params: query
  })
}

// 查询月回款目标填报明细详细
export function getMonthReturnMergeDetails(id) {
  return request({
    url: '/mk/monthReturnMergeDetails/parent/' + id,
    method: 'get'
  })
}

// 新增月回款目标填报明细
export function addMonthReturnMergeDetails(data) {
  return request({
    url: '/mk/monthReturnMergeDetails',
    method: 'post',
    data: data
  })
}

// 修改月回款目标填报明细
export function updateMonthReturnMergeDetails(data) {
  return request({
    url: '/mk/monthReturnMergeDetails',
    method: 'put',
    data: data
  })
}

// 删除月回款目标填报并明细
export function delMonthReturnMergeDetails(id) {
  return request({
    url: '/mk/monthReturnMergeDetails/' + id,
    method: 'delete'
  })
}

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