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

export function enginMaterialListAll(data) {
  return request({
    url: `/engin/material/listAll?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function enginMaterialListAllExport(data, name) {
  return postBlob({
    url: '/engin/material/listAll/export',
    data,
    name
  })
}

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

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

export function enginMaterialDetail(params) {
  return request({
    url: `/engin/material/detail`,
    method: 'post',
    params
  })
}

export function enginMaterialExamine(params) {
  return request({
    url: `/engin/material/examine`,
    method: 'post',
    params
  })
}

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

export function enginMaterialPageSettlementExport(data, name) {
  return postBlob({
    url: '/engin/material/pageSettlementExport',
    data,
    name
  })
}

export function enginMaterialListLine(data) {
  return request({
    url: `/engin/material/listLine?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function enginMaterialListLineExport(data, name) {
  return postBlob({
    url: '/engin/material/listLine/export',
    data,
    name
  })
}

export function enginMaterialLineSettlement(params) {
  return request({
    url: `/engin/material/lineSettlement`,
    method: 'post',
    params
  })
}


export function enginMaterialListWechat(data) {
  return request({
    url: `/engin/material/listWechat?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function enginMaterialListWechatExport(data, name) {
  return postBlob({
    url: '/engin/material/listWechat/export',
    data,
    name
  })
}

export function enginMaterialLineSettlementHui(params) {
  return request({
    url: `/engin/material/lineSettlementHui`,
    method: 'post',
    params
  })
}

