import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 查询发票核销列表
 * @param query
 * @returns {*}
 */

export const listBusinessInvoice = (query) => {
  return request({
    url: '/bfs/businessInvoice/list',
    method: 'get',
    params: query
  });
};

export const queryInvoiceDetail = (invoiceId) => {
  const data = {
    invoiceId
  };
  return request({
    url: '/bfs/businessInvoice/queryInvoiceDetail',
    method: 'post',
    data: data
  });
};

export const editWriteof = (data) => {
  return request({
    url: '/bfs/businessInvoice/editWriteof',
    method: 'post',
    data: data
  });
};

export const addWriteof = (data) => {
  return request({
    url: '/bfs/businessInvoice/addWriteof',
    method: 'post',
    data: data
  });
};

export const queryWriteofList = (data) => {
  return request({
    url: '/bfs/businessInvoice/getWriteofList',
    method: 'post',
    data: data
  });
};

export const delWriteofList = (data) => {
  return request({
    url: '/bfs/businessInvoice/deleteWriteof',
    method: 'post',
    data: data
  });
};

export const submitInvoice = (data) => {
  return request({
    url: '/bfs/businessInvoice/submitInvoice',
    method: 'post',
    data: data
  });
}
