import request, { postBlob } from '@/utils/request'

// 供应产品

// 获取新供应商产品信息列表
export function getNewVenderGoodsList(data) {
  return request({
    url: `/vender/goods/rela/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}
// 导出
export function exportVenderGoods(data, name) {
  return postBlob({
    url: '/vender/goods/rela/list/export',
    data,
    name
  })
}

// -----------------------------------------

export function getNewVenderList(data) {
  return request({
    url: `/vender/goods/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

// 导出
export function exportNewVenderList(data, name) {
  return postBlob({
    url: '/vender/goods/list/export',
    data,
    name
  })
}

// 删除供应商产品关系维护单
export function delVenderGoodsSheet(data) {
  return request({
    url: '/vender/goods/del',
    method: 'post',
    data
  })
}

// 审核供应商产品关系维护单
export function confirmVenderGoodsSheet(data) {
  return request({
    url: '/vender/goods/confirm',
    method: 'post',
    data
  })
}

// 新增供应商产品关系维护单
export function addVenderGoodsSheet(data) {
  return request({
    url: '/vender/goods/add',
    method: 'post',
    data
  })
}

// 编辑供应商产品关系维护单
export function editVenderGoodsSheet(data) {
  return request({
    url: '/vender/goods/edit',
    method: 'post',
    data
  })
}

// 获取供应商产品关系维护单信息
export function getVenderGoodsSheet(params) {
  return request({
    url: '/vender/goods/detail',
    method: 'post',
    params
  })
}
