import request from '@/utils/request'

// 查询代办事项列表
export function listEvent(query) {
  return request({
    url: '/crm/event/list',
    method: 'get',
    params: query
  })
}

// 查询代办事项详细
export function getEvent(eventId) {
  return request({
    url: '/crm/event/' + eventId,
    method: 'get'
  })
}

// 新增代办事项
export function addEvent(data) {
  return request({
    url: '/crm/event',
    method: 'post',
    data: data
  })
}

// 修改代办事项
export function updateEvent(data) {
  return request({
    url: '/crm/event',
    method: 'put',
    data: data
  })
}

// 删除代办事项
export function delEvent(eventId) {
  return request({
    url: '/crm/event/' + eventId,
    method: 'delete'
  })
}

// 导出代办事项
export function exportEvent(query) {
  return request({
    url: '/crm/event/export',
    method: 'get',
    params: query
  })
}