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

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

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

// 新增编辑
export function save(data) {
  return request({
    url: `/goods/library/save`,
    method: 'post',
    data
  })
}

// 删除
export function del(params) {
  return request({
    url: `/goods/library/del`,
    method: 'post',
    params
  })
}

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

// 批量改状态
export function batch(params) {
  return request({
    url: `/goods/library/status/batch`,
    method: 'post',
    params
  })
}

// 同步商品
export function sync(params) {
  return request({
    url: `/goods/library/sync`,
    method: 'post',
    params
  })
}