import request from '@/utils/request'

// 创建供应商
export function createVendorInfo(data) {
  return request({
    url: '/basic/vendor-info/create',
    method: 'post',
    data: data
  })
}

// 更新供应商
export function updateVendorInfo(data) {
  return request({
    url: '/basic/vendor-info/update',
    method: 'put',
    data: data
  })
}

// 删除供应商
export function deleteVendorInfo(id) {
  return request({
    url: '/basic/vendor-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得供应商
export function getVendorInfo(id) {
  return request({
    url: '/basic/vendor-info/get?id=' + id,
    method: 'get'
  })
}

// 获得供应商分页
export function getVendorInfoPage(query) {
  return request({
    url: '/basic/vendor-info/page',
    method: 'get',
    params: query
  })
}

// 获得供应商下拉列表
export function getVendorInfoOptionsList() {
  return request({
    url: '/basic/vendor-info/getVendorInfoOptionsList',
    method: 'get'
  })
}

