import {httpApi} from "../../request/httpApi";

export default {
    //分页查询
    async page(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/invoice/page',
            method: 'post',
            data: form
        }, msg);
    },
    //草稿箱列表
    async draft(form = {}, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/invoice/draft/list',
            method: 'get',
            params: form
        }, msg);
    },
    //数据详情
    async detail(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/invoice/detail',
            method: 'get',
            params: form
        }, msg);
    },
    //提交申请
    async submit(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/invoice/submit',
            method: 'post',
            data: form
        }, msg);
    },
    //记录物理删除
    async remove(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/invoice/remove',
            method: 'post',
            params: form
        }, msg);
    },
    //记录撤销
    async cancel(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/invoice/cancel',
            method: 'post',
            params: form
        }, msg);
    },
    //发票pdf上传
    async upload(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/invoice/upload',
            method: 'get',
            params: form
        }, msg);
    },
    //发票查看pdf
    async pdf(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/invoice/pdf',
            method: 'get',
            params: form
        }, msg);
    },
    //获取发票内容列表
    async getInvoiceContentList(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/ex/ma/getInvoiceContentList',
            method: 'get',
            params: form
        }, msg);
    },
}
