import request from '@/utils/request'

// 查询客户科室列表
export function listCustomersDepartment(query) {
  return request({
    url: '/cm/customersDepartment/list',
    method: 'get',
    params: query
  })
}

// 查询客户科室详细
export function getCustomersDepartment(id) {
  return request({
    url: '/cm/customersDepartment/' + id,
    method: 'get'
  })
}

// 新增客户科室
export function addCustomersDepartment(data) {
  return request({
    url: '/cm/customersDepartment',
    method: 'post',
    data: data
  })
}

// 修改客户科室
export function updateCustomersDepartment(data) {
  return request({
    url: '/cm/customersDepartment',
    method: 'put',
    data: data
  })
}

// 删除客户科室
export function delCustomersDepartment(ids) {
  return request({
    url: '/cm/customersDepartment/delete',
    method: 'post',
    data: ids
  })
}

//导入
export function importDataDept(data) {
  return request({
    url: `/cm/customersDepartment/importData`,
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}