import request from '@/utils/request'

export function createSupplier(data) {
  return request({
    url: '/supplier-info/add',
    method: 'post',
    data
  })
}

export function updateSupplier(query) {
  return request({
    url: '/supplier-info/edit',
    method: 'post',
    data: query
  })
}

export function listSupplier(query) {
  return request({
    url: '/supplier-info/page',
    method: 'get',
    params: query
  })
}

export function supplierList(query) {
  return request({
    url: '/supplier-info/list',
    method: 'get',
    params: query
  })
}

export function deleteSupplier(query) {
  return request({
    url: '/supplier-info/remove',
    method: 'post',
    params: query
  })
}

export function typeListSupplier(query) {
  return request({
    url: '/supplier-info/list/type',
    method: 'get',
    params: query
  })
}

export function setStateSupplier(query) {
  return request({
    url: '/supplier-info/updateStatus',
    method: 'post',
    params: query
  })
}
