import request from '@/utils/request'

// 查询发票列表
export function listInvoice(query) {
    return request({
        url: '/finance/invoice/list',
        method: 'get',
        params: query
    })
}

// 查询发票所有列表
export function listAllInvoice(query) {
    return request({
        url: '/finance/invoice/listAll',
        method: 'get',
        params: query
    })
}

// 查询发票详细
export function getInvoice(invoiceId) {
    return request({
        url: '/finance/invoice/getInfo/' + invoiceId,
        method: 'get'
    })
}

// 新增发票
export function addInvoice(data) {
    return request({
        url: '/finance/invoice/add',
        method: 'post',
        data: data
    })
}

// 修改发票
export function updateInvoice(data) {
    return request({
        url: '/finance/invoice/edit',
        method: 'post',
        data: data
    })
}

// 删除发票
export function delInvoice(invoiceId) {
    return request({
        url: '/finance/invoice/remove/' + invoiceId,
        method: 'get'
    })
}