import request from '@/utils/request'

// request.defaults.baseURL = '/ezhizao-yzbh-production'
// const headUrl = '/ezhizao-yzbh-crm'
// 查询company列表
export function listProductionCompany(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/ProductionCompany/list',
    method: 'get',
    params: query
  })
}

// 查询company详细
export function getCompany(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/ProductionCompany/' + id,
    method: 'get'
  })
}

// 新增company
export function addCompany(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/Production',
    method: 'post',
    data: data
  })
}

// 修改company
export function updateCompany(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/Production',
    method: 'put',
    data: data
  })
}

// 删除company
export function delCompany(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/Production/' + id,
    method: 'delete'
  })
}

export function setCompanyLeader(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/Production/setCompanyLeader',
    method: 'post',
    data: data
  })
}

export function setCompanyAdviser(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/Production/setCompanyAdviser',
    method: 'post',
    data: data
  })
}

export function initArea() {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/Production/initArea',
    method: 'get'
  })
}


export function demo() {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/ProductionCompany/demo',
    method: 'get'
  })
}