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

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

//导出
export function pageExport(data, name) {
  return postBlob({
    url: '/websit/goods/price/upd/list/export',
    data,
    name
  })
}

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

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

// 详情
export function getDetail(params) {
  return request({
    url: `/websit/goods/price/detail`,
    method: 'post',
    params
  })
}

// 审核
export function confirm(params) {
  return request({
    url: `/websit/goods/price/confirm`,
    method: 'post',
    params
  })
}

export function getWorker(data) {
  return request({
    url: `/member/list/page2`,
    method: 'post',
    data
  })
}

export function getCategory(params) {
  return request({
    url: `/websit/sales/exist/stock/category`,
    method: 'post',
    params
  })
}

export function getGoods(params) {
  return request({
    url: `/websit/sales/exist/stock/goods`,
    method: 'post',
    params
  })
}