import request from '@/utils/request'
import { download } from '@/utils/request'

// 查询收票反馈列表
export function listReceiveTicketFeedback(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/receiveTicketFeedback/list',
    method: 'get',
    params: query
  })
}

// 查询收票反馈详细
export function getReceiveTicketFeedback(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/receiveTicketFeedback/' + id,
    method: 'get'
  })
}

// 新增收票反馈
export function addReceiveTicketFeedback(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/receiveTicketFeedback',
    method: 'post',
    data: data
  })
}

// 修改收票反馈
export function updateReceiveTicketFeedback(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/receiveTicketFeedback',
    method: 'put',
    data: data
  })
}

// 删除收票反馈
export function delReceiveTicketFeedback(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  return request({
    url: '/business/receiveTicketFeedback/' + id,
    method: 'delete'
  })
}

export function exportReceiveTicketFeedback(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-production'
  download(
    "business/receiveTicketFeedback/export",
    {
      ...query,
    },
    `收票反馈记录导出_${new Date().getTime()}.xlsx`
  )
}