import request from '@/utils/request'

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

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

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

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

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

//导入明细
export function importData(data) {
  return request({
    url: `/mk/monthReturnGoalDetails/importData`,
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}