import request from "@/util/oaRequest"

// 查询CRM 客户列表
export function listCustomer(query) {
  return request({
    url: '/oa/customer/list',
    method: 'get',
    params: query
  })
}
// 查询CRM 客户列表
export function listSeaCustomer(query) {
  return request({
    url: '/oa/customer/list-sea',
    method: 'get',
    params: query
  })
}

// 查询CRM 客户详细
export function getCustomer(customerId) {
  return request({
    url: '/oa/customer/' + customerId,
    method: 'get'
  })
}

// 新增CRM 客户
export function addCustomer(data) {
  return request({
    url: '/oa/customer',
    method: 'post',
    data: data
  })
}

// 修改CRM 客户
export function updateCustomer(data) {
  return request({
    url: '/oa/customer',
    method: 'put',
    data: data
  })
}

// 删除CRM 客户
export function delCustomer(customerId) {
  return request({
    url: '/oa/customer/' + customerId,
    method: 'delete'
  })
}
