import request from '@/utils/request'

// 查询营销方案列表
export function listPlan(query) {
  return request({
    url: '/market/plan/list',
    method: 'get',
    params: query
  })
}

// 查询营销方案详细
export function getPlan(id) {
  return request({
    url: '/market/plan/' + id,
    method: 'get'
  })
}

// 新增营销方案
export function addPlan(data) {
  return request({
    url: '/market/plan',
    method: 'post',
    data: data
  })
}

// 修改营销方案
export function updatePlan(data) {
  return request({
    url: '/market/plan',
    method: 'put',
    data: data
  })
}

// 删除营销方案
export function delPlan(id) {
  return request({
    url: '/market/plan/' + id,
    method: 'delete'
  })
}

// 导出营销方案
export function exportPlan(query) {
  return request({
    url: '/market/plan/export',
    method: 'get',
    params: query
  })
}

// 新增阶梯直降
export function addMarketPlanInfo(query) {
  return request({
    url: '/market/plan/addMarketPlanInfo',
    method: 'post',
    data: query
  })
}

// 新增
export function deleteMarketPlan(query) {
  return request({
    url: '/market/plan/deleteMarketPlan',
    method: 'post',
    data: query
  })
}

