import request from '@/utils/request'

// 查询供应商商品列表
export function listSupplierProduct(query) {
  return request({
    url: '/oms/supplierProduct/list',
    method: 'get',
    params: query
  })
}

// 查询供应商商品详细
export function getSupplierProduct(id) {
  return request({
    url: '/oms/supplierProduct/' + id,
    method: 'get'
  })
}

// 新增供应商商品
export function addSupplierProduct(data) {
  return request({
    url: '/oms/supplierProduct',
    method: 'post',
    data: data
  })
}

// 修改供应商商品
export function updateSupplierProduct(data) {
  return request({
    url: '/oms/supplierProduct',
    method: 'put',
    data: data
  })
}

// 删除供应商商品
export function delSupplierProduct(id) {
  return request({
    url: '/oms/supplierProduct/' + id,
    method: 'delete'
  })
}

// 导出供应商商品
export function exportSupplierProduct(query) {
  return request({
    url: '/oms/supplierProduct/export',
    method: 'get',
    params: query
  })
}

export function listProduct(query) {
  return request({
    url: '/oms/supplierProduct/productList',
    method: 'get',
    params: query
  })
}