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

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