import request from '@/utils/request'

// 查询预约作业票台账列表
export function listBookingworkticket(query) {
  return request({
    url: '/invoice/bookingworkticket/list',
    method: 'get',
    params: query
  })
}

// 查询预约作业票台账详细
export function getBookingworkticket(id) {
  return request({
    url: '/invoice/bookingworkticket/' + id,
    method: 'get'
  })
}export function getInfoById(id) {
  return request({
    url: '/invoice/bookingworkticket/infoById/' + id,
    method: 'get'
  })
}

// 新增预约作业票台账
export function addBookingworkticket(data) {
  return request({
    url: '/invoice/bookingworkticket',
    method: 'post',
    data: data
  })
}

// 修改预约作业票台账
export function updateBookingworkticket(data) {
  return request({
    url: '/invoice/bookingworkticket',
    method: 'put',
    data: data
  })
}

// 删除预约作业票台账
export function delBookingworkticket(id) {
  return request({
    url: '/invoice/bookingworkticket/' + id,
    method: 'delete'
  })
}

// 作废预约作业票台账
export function cancelBookingworkticket(id) {
  return request({
    url: '/invoice/bookingworkticket/cancel/' + id,
    method: 'delete'
  })
}

// 导出预约作业票台账
export function exportBookingworkticket(query) {
  return request({
    url: '/invoice/bookingworkticket/exportBook',
    method: 'get',
    params: query
  })
}

// 导出预约作业票台账值班
export function exportBookingworkticketZb(query) {
  return request({
    url: '/invoice/bookingworkticket/exportBookZb',
    method: 'get',
    params: query
  })
}
// 导出预约作业票台账值班
export function exportBookingworkticketNowAll(query) {
  return request({
    url: '/invoice/bookingworkticket/exportBookNowAll',
    method: 'get',
    params: query
  })
}

// 生成word并预览作业票
export function seeBookingworkticket(query) {
  return request({
    url: '/invoice/bookingworkticket/word',
    method: 'post',
    params: query
  })
}

//筛选出不同作业类型的台账数据
export function workType(query) {
  return request({
    url: '/invoice/bookingworkticket/workType',
    method: 'get',
    params: query
  })
}

//筛选出不同作业类型的台账数据
export function assion(id) {
  return request({
    url: '/invoice/bookingworkticket/assion'+id,
    method: 'get',
  })
}
