import service from '@/utils/request'

export const queryConstructor = () => {
  return service({
    url: '/constructor/queryConstructor',
    method: 'get',
  })
}

export const queryConstructorList = (data) => {
  return service({
    url: '/constructor/queryConstructorList',
    method: 'post',
    data
  })
}

export const queryWorkingHoursList = (data) => {
  return service({
    url: '/project/queryWorkingHoursList',
    method: 'post',
    data
  })
}

export const queryWorkingHoursSum = (data) => {
  return service({
    url: '/project/queryWorkingHoursSum',
    method: 'post',
    data
  })
}
// 查询费用类型
export const queryExpensesGenre = () => {
  return service({
    url: '/finance/queryExpensesGenre',
    method: 'get'
  })
}

export const queryDailyExpensesList = (data) => {
  return service({
    url: '/finance/queryDailyExpensesList',
    method: 'post',
    data
  })
}

export const queryBorrowingList = (data) => {
  return service({
    url: '/finance/queryBorrowingList',
    method: 'post',
    data
  })
}

export const createConstructor = (data) => {
  return service({
    url: '/constructor/createConstructor',
    method: 'post',
    data
  })
}

export const createDailyExpenses = (data) => {
  return service({
    url: '/finance/createDailyExpenses',
    method: 'post',
    data
  })
}

export const createBorrowing = (data) => {
  return service({
    url: '/finance/createBorrowing',
    method: 'post',
    data
  })
}

export const createFeeGenre = (data) => {
  return service({
    url: '/finance/createExpensesGenre',
    method: 'post',
    data
  })
}

export const updateConstructor = (data) => {
  return service({
    url: '/constructor/updateConstructor',
    method: 'put',
    data
  })
}

export const updateDailyExpenses = (data) => {
  return service({
    url: '/finance/updateDailyExpenses',
    method: 'put',
    data
  })
}

export const updateBorrowing = (data) => {
  return service({
    url: '/finance/updateBorrowing',
    method: 'put',
    data
  })
}

export const updateFeeGenre = (data) => {
  return service({
    url: '/finance/updateExpensesGenre',
    method: 'put',
    data
  })
}

export const updateWorkingHours = (data) => {
  return service({
    url: '/project/updateWorkingHours',
    method: 'put',
    data
  })
}

export const deleteConstructor = (data) => {
  return service({
    url: '/constructor/deleteConstructor',
    method: 'delete',
    data
  })
}

export const deleteDailyExpenses = (data) => {
  return service({
    url: '/finance/deleteDailyExpenses',
    method: 'delete',
    data
  })
}

export const deleteBorrowing = (data) => {
  return service({
    url: '/finance/deleteBorrowing',
    method: 'delete',
    data
  })
}

export const deleteFeeGenre = (data) => {
  return service({
    url: '/finance/deleteExpensesGenre',
    method: 'delete',
    data
  })
}

export const deleteWorkingHours = (data) => {
  return service({
    url: '/project/deleteWorkingHours',
    method: 'delete',
    data
  })
}

export const createWorkingHours = (data) => {
  return service({
    url: '/project/createWorkingHours',
    method: 'post',
    data
  })
}
