import request from '@/utils/request'

// 查询营销目标列表
export function listTarget(query) {
  return request({
    url: '/mk/target/list',
    method: 'get',
    params: query
  })
}

// 查询营销目标详细
export function getTarget(id) {
  return request({
    url: '/mk/target/' + id,
    method: 'get'
  })
}

// 查询营销目标明细
export function getTargetItem(id) {
  return request({
    url: '/mk/target/item/' + id,
    method: 'get'
  })
}

// 新增营销目标
export function addTarget(data) {
  return request({
    url: '/mk/target',
    method: 'post',
    data: data
  })
}

// 修改营销目标
export function updateTarget(data) {
  return request({
    url: '/mk/target',
    method: 'put',
    data: data
  })
}

// 删除营销目标
export function delTarget(id) {
  return request({
    url: '/mk/target/' + id,
    method: 'delete'
  })
}

// 提交营销目标
export function submitTarget(id) {
  return request({
    url: '/mk/target/submit/' + id,
    method: 'get',
  })
}