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

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

export function goodsMaterialListExport(data, name) {
  return postBlob({
    url: '/goods/material/list/export',
    data,
    name
  })
}

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

export function goodsMaterialUpdate(data) {
  return request({
    url: '/goods/material/update',
    method: 'post',
    data: data
  })
}

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

export function goodsMaterialItemCount(params) {
  return request({
    url: '/goods/material/item/count',
    method: 'post',
    params
  })
}

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