import request from '@/utils/request'

// 查询客户详情列表
export function listCorps(query) {
  return request({
    url: '/basicdata/corps/list',
    method: 'get',
    params: query
  })
}

// 查询客户详情详细
export function getCorps(fId) {
  return request({
    url: '/basicdata/corps/' + fId,
    method: 'get'
  })
}

// 新增客户详情
export function addCorps(data) {
  return request({
    url: '/basicdata/corps',
    method: 'post',
    data: data
  })
}

// 修改客户详情
export function updateCorps(data) {
  return request({
    url: '/basicdata/corps',
    method: 'put',
    data: data
  })
}
// 状态修改
export function changeCorpsStatus(fId, fStatus) {
  const data = {
    fId,
    fStatus
  }
  return request({
    url: '/basicdata/corps',
    method: 'put',
    data: data
  })
}

// 删除客户详情
export function delCorps(fId) {
  return request({
    url: '/basicdata/corps/' + fId,
    method: 'delete'
  })
}

// 导出客户详情
export function exportCorps(query) {
  return request({
    url: '/basicdata/corps/export',
    method: 'get',
    params: query
  })
}
