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

export function dailySummaryList(data) {
  return request({
    url: `/daily/summary/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function dailySummaryRepairDetailList(data) {
  return request({
    url: `/daily/summary/repair/detail/list?moduleId=${data.moduleId}22`,
    method: 'post',
    data
  })
}

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

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

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

export function dailySummaryRepairItemWait(params) {
  return request({
    url: `/daily/summary/repair/item/wait`,
    method: 'post',
    params
  })
}

export function dailySummaryRepairItemResummary(params) {
  return request({
    url: `/daily/summary/repair/item/resummary`,
    method: 'post',
    params
  })
}

export function dailySummaryRepairSummary(params) {
  return request({
    url: `/daily/summary/repair/summary`,
    method: 'post',
    params
  })
}

export function dailySummaryRepairDetailListExport(data, name) {
  return postBlob({
    url: '/daily/summary/repair/detail/list/export',
    data,
    name
  })
}
