import request from '@/utils/request'

// 查询经销商列表
export function listChains(data) {
  return request({
    url: '/sfa/chains/list',
    method: 'post',
    data: data
  })
}
export function companyList(query) {
  return request({
    url: '/sfa/orderProduct/companyList',
    method: 'get',
    params: query
  })
}
// 查询经销商详细
export function getChains(chainId) {
  return request({
    url: '/sfa/chains/' + chainId,
    method: 'get'
  })
}

// 新增经销商
export function addChains(data) {
  return request({
    url: '/sfa/chains',
    method: 'post',
    data: data
  })
}

// 修改经销商
export function updateChains(data) {
  return request({
    url: '/sfa/chains',
    method: 'put',
    data: data
  })
}

// 删除经销商
export function delChains(chainId) {
  return request({
    url: '/sfa/chains/' + chainId,
    method: 'delete'
  })
}
