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

export function settleExpenseGatherList(data) {
  return request({
    url: `/settle/expense/gather/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function settleExpenseGatherListExport(data, name) {
  return postBlob({
    url: '/settle/expense/gather/list/export',
    data,
    name
  })
}

export function settleExpenseImport(data) {
  return handleImport('/settle/expense/import', data.formdata, data.id || '')
}

export function settleExpenseBatchDel(data) {
  return request({
    url: '/settle/expense/batch/del',
    method: 'post',
    data
  })
}

export function settleExpenseGatherBatchDel(data) {
  return request({
    url: '/settle/expense/gather/batch/del',
    method: 'post',
    data
  })
}

export function settleExpenseMonthGather(data) {
  return request({
    url: '/settle/expense/month/gather',
    method: 'post',
    data
  })
}

export function settleExpenseList(data) {
  return request({
    url: `/settle/expense/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function settleExpenseListExport(data, name) {
  return postBlob({
    url: '/settle/expense/list/export',
    data,
    name
  })
}

export function settleExpenseSave(data) {
  return request({
    url: `/settle/expense/save`,
    method: 'post',
    data
  })
}

export function settleMonthWagesGatherList(data) {
  return request({
    url: `/settle/month/wages/gather/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function settleMonthWagesList(data) {
  return request({
    url: `/settle/month/wages/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function settleMonthWagesListExport(data, name) {
  return postBlob({
    url: '/settle/month/wages/list/export',
    data,
    name
  })
}

export function settleMonthWagesBatchReject(data) {
  return request({
    url: '/settle/month/wages/batch/reject',
    method: 'post',
    data
  })
}

export function settleMonthWagesBatchSend(data) {
  return request({
    url: '/settle/month/wages/batch/send',
    method: 'post',
    data
  })
}

export function settleMonthWagesWorkerBatchSend(data) {
  return request({
    url: '/settle/month/wages/worker/batch/send',
    method: 'post',
    data
  })
}

