import request from '@/utils/request'

// 查询拜访日程列表
export function listRoutine(query) {
  return request({
    url: '/customer/crm/visit/routine/list',
    method: 'get',
    params: query
  })
}

// 查询拜访日程详细
export function getRoutine(id) {
  return request({
    url: '/customer/crm/visit/routine/' + id,
    method: 'get'
  })
}

// 新增拜访日程
export function addRoutine(data) {
  return request({
    url: '/customer/crm/visit/routine',
    method: 'post',
    data: data
  })
}

// 修改拜访日程
export function updateRoutine(data) {
  return request({
    url: '/customer/crm/visit/routine',
    method: 'put',
    data: data
  })
}

// 删除拜访日程
export function delRoutine(id) {
  return request({
    url: '/customer/crm/visit/routine/' + id,
    method: 'delete'
  })
}
