import request, { postBlob, handleImport, getBlob } from '@/utils/request'
export function getProductPriceListV2(params) {
  return request({
    url: `/product-price/v2/list?moduleId=${params.moduleId}`,
    method: 'post',
    data: params
  })
}

export function exportProductPriceListV2(data, name) {
  return postBlob({
    url: '/product-price/v2/list/export',
    data,
    name
  })
}
export function addProductPrice(params) {
  return request({
    url: `/product-price/add`,
    method: 'post',
    data: params
  })
}

export function editProductPrice(params) {
  return request({
    url: `/product-price/edit`,
    method: 'post',
    data: params
  })
}
export function updateProductPriceStatus(params) {
  return request({
    url: `/product-price/status/update`,
    method: 'post',
    params
  })
}
export function getProductPriceDetail(params) {
  return request({
    url: `/product-price/detail`,
    method: 'get',
    params
  })
}
export function delProductPrice(params) {
  return request({
    url: `/product-price/del`,
    method: 'post',
    data: params
  })
}

export function getPriceSalesRelaListV2(params) {
  return request({
    url: `/price-sales-rela/v2/list?moduleId=${params.moduleId}`,
    method: 'post',
    data: params
  })
}

export function exportPriceSalesRelaListV2(data, name) {
  return postBlob({
    url: '/price-sales-rela/v2/list/export',
    data,
    name
  })
}

export function addPriceSalesRela(params) {
  return request({
    url: `/price-sales-rela/add`,
    method: 'post',
    data: params
  })
}

export function editPriceSalesRela(params) {
  return request({
    url: `/price-sales-rela/edit`,
    method: 'post',
    data: params
  })
}
export function updatePriceSalesRelaStatus(params) {
  return request({
    url: `/price-sales-rela/status/update`,
    method: 'post',
    params
  })
}

export function getPriceSalesRelaDetail(params) {
  return request({
    url: `/price-sales-rela/detail`,
    method: 'get',
    params
  })
}

export function delPriceSalesRela(params) {
  return request({
    url: `/price-sales-rela/del`,
    method: 'post',
    params
  })
}
