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

// 列表
export function dailySummaryReduceTotal(data) {
  return request({
    url: `/daily/summary/reduce/total?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

// 执行
export function dailySummaryReduceDo(params) {
  return request({
    url: `/daily/summary/reduce/do`,
    method: 'post',
    params
  })
}

// 删除
export function dailySummaryReduceDelete(params) {
  return request({
    url: `/daily/summary/reduce/delete`,
    method: 'post',
    params
  })
}

// export function dailySummaryIncrDecrCostImport(data) {
//   return handleImport('/daily/summary/incrDecrCost/import', data.formdata, data.id || '')
// }

// 明细列表
export function dailySummaryReduceList(data) {
  return request({
    url: `/daily/summary/reduce/list?moduleId=${data.moduleId}22`,
    method: 'post',
    data
  })
}

// 明细导出
export function dailySummaryReduceListExport(data, name) {
  return postBlob({
    url: '/daily/summary/reduce/list/export',
    data,
    name
  })
}

export function dailySummaryReduceItemDo(params) {
  return request({
    url: `/daily/summary/reduce/item/do`,
    method: 'post',
    params
  })
}

export function dailySummaryReduceItemDelete(params) {
  return request({
    url: `/daily/summary/reduce/item/delete`,
    method: 'post',
    params
  })
}
