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

export default {
    //财务报销分页查询
    async page(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/financial/page',
            method: 'post',
            data: form
        }, msg);
    },
    //财务报销草稿箱列表
    async draft(form = {}, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/financial/draft/list',
            method: 'get',
            params: form
        }, msg);
    },
    //财务报销信息详情
    async detail(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/financial/detail',
            method: 'get',
            params: form
        }, msg);
    },
    //财务报销草稿箱编辑详情
    async draftDetail(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/financial/draft/detail',
            method: 'get',
            params: form
        }, msg);
    },
    //财务报销信息提交
    async submit(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/financial/submit',
            method: 'post',
            data: form
        }, msg);
    },
    //财务报销记录物理删除
    async remove(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/financial/remove',
            method: 'post',
            params: form
        }, msg);
    },
    //财务报销记录上报撤销
    async cancel(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/financial/cancel',
            method: 'post',
            params: form
        }, msg);
    },
    //获取我的项目预算列表
    async budget(form) {
        return httpApi({
            url: '/api/blade-control/ex/ma/project/budget/list',
            method: 'get',
            params: form
        }, false);
    },
    //获取我的借款列表
    async loanList(form = {}) {
        return httpApi({
            url: '/api/blade-control/ex/ma/loan/list',
            method: 'get',
            params: form
        }, false);
    },
}
