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

export default {
    //分页查询
    async page(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/loan/page',
            method: 'post',
            data: form
        }, msg);
    },
    //草稿箱列表
    async draft(form = {}, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/loan/draft/list',
            method: 'get',
            params: form
        }, msg);
    },
    //数据详情
    async detail(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/loan/detail',
            method: 'get',
            params: form
        }, msg);
    },
    //提交申请
    async submit(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/loan/submit',
            method: 'post',
            data: form
        }, msg);
    },
    //记录物理删除
    async remove(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/loan/remove',
            method: 'post',
            params: form
        }, msg);
    },
    //记录撤销
    async cancel(form, msg = false) {
        return httpApi({
            url: '/api/blade-control/expense/loan/cancel',
            method: 'post',
            params: form
        }, msg);
    },
}
