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

// 获取列表
export function listPageV2(data) {
  return request({
    url: `/websitSalesRet/list/pageV2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//导出
export function pageExport(data, name) {
  return postBlob({
    url: '/websitSalesRet/pageExport',
    data,
    name
  })
}

// 新增
export function add(data) {
  return request({
    url: `/websitSalesRet/add`,
    method: 'post',
    data
  })
}

// 编辑
export function edit(data) {
  return request({
    url: `/websitSalesRet/update`,
    method: 'post',
    data
  })
}

// 详情
export function getReturnDetail(params) {
  return request({
    url: `/websitSalesRet/detail`,
    method: 'post',
    params
  })
}

// 字典数据
export function getTypeList(data) {
  return request({
    url: `/dictCompany/page`,
    method: 'post',
    data
  })
}

// 库存数据
export function getGoodsList(params) {
  return request({
    url: `/websit/sales/exist/stock/goodsList`,
    method: 'post',
    params
  })
}