import request from '@/utils/request'

// 查询拜访计划列表
export function listPlan(query) {
  return request({
    url: '/customer/crm/visit/plan/list',
    method: 'get',
    params: query
  })
}

// 查询拜访计划详细
export function getPlan(id) {
  return request({
    url: '/customer/crm/visit/plan/' + id,
    method: 'get'
  })
}

// 新增拜访计划
export function addPlan(data) {
  return request({
    url: '/customer/crm/visit/plan',
    method: 'post',
    data: data
  })
}

// 修改拜访计划
export function updatePlan(data) {
  return request({
    url: '/customer/crm/visit/plan',
    method: 'put',
    data: data
  })
}

// 删除拜访计划
export function delPlan(id) {
  return request({
    url: '/customer/crm/visit/plan/' + id,
    method: 'delete'
  })
}
