import request from '@/utils/request'

// 新购入库报表查询
export function getPurChaseReportListApi(query) {
  return request({
    url: '/material/bm_report/getPurChaseReportList',
    method: 'get',
    params: query
  })
}
// 新购入库报表查询-无分页
export function getPurChaseReportListNoPageApi(query) {
  return request({
    url: '/material/bm_report/getPurChaseReportListNoPage',
    method: 'get',
    params: query
  })
}
// 新购入库报表-弹窗查询
export function getPurChaseReportDetailsListApi(query) {
    return request({
      url: '/material/bm_report/getPurChaseReportDetailsList',
      method: 'get',
      params: query
    })
}

// 新购入库验收合格报表-弹窗查询
export function getPurChaseReportSuccessListApi(query) {
  return request({
    url: '/material/bm_report/getPurChaseReportSuccessList',
    method: 'get',
    params: query
  })
}

// 新购入库数量报表-弹窗查询
export function getPurChaseReportInBoundListApi(query) {
  return request({
    url: '/material/bm_report/getPurChaseReportInBoundList',
    method: 'get',
    params: query
  })
}

// 新购入库数量报表-弹窗查询
export function getPurChaseReportNotInBoundListApi(query) {
  return request({
    url: '/material/bm_report/getPurChaseReportNotInBoundList',
    method: 'get',
    params: query
  })
}

// 领料出库报表查询
export function getLeaseOutListApi(query) {
  return request({
    url: '/material/bm_report/getLeaseOutList',
    method: 'get',
    params: query
  })
}
// 领料出库报表查询-无分页
export function getLeaseOutListNoPageApi(query) {
  return request({
    url: '/material/bm_report/getLeaseOutListNoPage',
    method: 'get',
    params: query
  })
}
// 领料出库报表-弹窗查询
export function getLeaseOutDetailsListApi(query) {
    return request({
      url: '/material/bm_report/getLeaseOutDetailsList',
      method: 'get',
      params: query
    })
}

// 退料报表查询
export function getBackInputListApi(query) {
  return request({
    url: '/material/bm_report/getBackInputList',
    method: 'get',
    params: query
  })
}
// 退料报表查询-无分页
export function getBackInputListNoPageApi(query) {
  return request({
    url: '/material/bm_report/getBackInputListNoPage',
    method: 'get',
    params: query
  })
}
// 退料报表-弹窗查询
export function getBackDetailsInputListApi(query) {
    return request({
      url: '/material/bm_report/getBackDetailsInputList',
      method: 'get',
      params: query
    })
}


// 维修报表查询
export function getRepairListApi(query) {
  return request({
    url: '/material/bm_report/getRepairList',
    method: 'get',
    params: query
  })
}
// 维修报表查询-无分页
export function getRepairListNoPageApi(query) {
  return request({
    url: '/material/bm_report/getRepairListNoPage',
    method: 'get',
    params: query
  })
}
// 维修报表-弹窗查询
export function getRepairDetailsListApi(query) {
    return request({
      url: '/material/bm_report/getRepairDetailsList',
      method: 'get',
      params: query
    })
}


// 修饰入库报表查询
export function getRepairInputListApi(query) {
  return request({
    url: '/material/bm_report/getRepairInputList',
    method: 'get',
    params: query
  })
}
// 修饰入库报表查询-无分页
export function getRepairInputListNoPageApi(query) {
  return request({
    url: '/material/bm_report/getRepairInputListNoPage',
    method: 'get',
    params: query
  })
}
// 修饰入库报表-弹窗查询
export function getRepairInputDetailsListApi(query) {
    return request({
      url: '/material/bm_report/getRepairInputDetailsList',
      method: 'get',
      params: query
    })
}

// 报废报表-列表
export function getScrapListApi(query) {
  return request({
    url: '/material/bm_report/getScrapList',
    method: 'get',
    params: query
  })
}

// 报废报表-总条数
export function getScrapListNoPageApi(query) {
  return request({
    url: '/material/bm_report/getScrapListNoPage',
    method: 'get',
    params: query
  })
}

// 报废报表-弹窗查询
export function getScrapDetailsListApi(query) {
  return request({
    url: '/material/bm_report/getScrapDetailsList',
    method: 'get',
    params: query
  })
}


//报表查询
export function getReportList(query) {
  return request({
    url: '/material/bm_report/reportList',
    method: 'get',
    params: query,
  })
}

export function downloadFileApi(data) {
  return request({
    url: '/material/bm_report/downloadSingle',
    method: 'post',
    data,
    responseType: 'arraybuffer'
  })
}

export function batchDownloadFileApi(data) {
  return request({
    url: '/material/bm_report/downloadBulk',
    method: 'post',
    data,
    responseType: 'arraybuffer'
  })
}
