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


export function websitGoodsmImport(data) {
  return handleImport('/websit/goods/m/import', data.formdata, data.id || '')
}

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

export function materialNormListExport(data, name) {
  return postBlob({
    url: '/websit/goods/m/list/export',
    data,
    name
  })
}

export function materialNormAdd(data) {
  return request({
    url: '/websit/goods/add',
    method: 'post',
    data: data
  })
}

export function materialNormEdit(data) {
  return request({
    url: '/websit/goods/edit',
    method: 'post',
    data: data
  })
}

export function materialNormDetail(params) {
  return request({
    url: '/websit/goods/detail',
    method: 'post',
    params
  })
}

export function materialNormBatchUpdateStatus(params) {
  return request({
    url: '/websit/goods/batch/update/status',
    method: 'post',
    params
  })
}