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

export default {
    //获取分页
    async getprojectCostBudgetStats(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/page',
            method: 'get',
            params: form
        }, msg);
    },
    //获取详情
    async getBudgetStatsById(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/getBudgetStatsById',
            method: 'get',
            params: form
        }, msg);
    },
    //查询预览测算
    async getBudgetList(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/budgetList',
            method: 'get',
            params: form
        }, msg);
    },
    //获取未做预算的项目列表
    async getProjectList(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/getProjectList',
            method: 'get',
            params: form
        }, msg);
    },
    //获取费用分类
    async getCostTypeDict(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/getCostTypeDict',
            method: 'get',
            params: form
        }, msg);
    },
    //获取岗位字典
    async getPostDict(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/getPostDict',
            method: 'get',
            params: form
        }, msg);
    },
    //获取项目环节
    async getProcessList(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/getProcessList',
            method: 'get',
            params: form
        }, msg);
    },
    //获取预算分类
    async getSecondSubject(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/annualBudget/getSecondSubject',
            method: 'get',
            params: form
        }, msg);
    },
    //获取任务明细
    async getChlidList(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/dictinfo/child-list',
            method: 'get',
            params: form
        }, msg);
    },
    ///新增或修改成本测算
    async AddOrUpdate(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/AddOrUpdate',
            method: 'post',
            data: form
        }, msg);
    },
    //删除成本预算
    async deleteByStatsId(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/projectCostBudgetStats/deleteByStatsId',
            method: 'get',
            params: form
        }, msg);
    },
}

