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

export default {
    //获取分页
    async getPage(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractInfo/getPage',
            method: 'get',
            params: form
        }, msg);
    },
    //获取详情
    async getContractInfoById(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractInfo/getContractInfoById',
            method: 'get',
            params: form
        }, msg);
    },
    //获取合同类型字典
    async getContractTypeDict(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractInfo/getContractTypeDict',
            method: 'get',
            params: form
        }, msg);
    },
    //获取未被关联的任务
    async getNoConnectionProject(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractInfo/getNoConnectionProject',
            method: 'get',
            params: form
        }, msg);
    },
    //获取合同回款里程碑根据合同id
    async getListByContractId(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractReturnedInfo/getListByContractId',
            method: 'get',
            params: form
        }, msg);
    },
    //获取合同回款里程碑根据项目id
    async getListByProjectId(form, msg = true) {
        return httpApi({
            url: '/api//blade-control/contractReturnedInfo/getListByProjectId',
            method: 'get',
            params: form
        }, msg);
    },
      //新增合同
    async addContractInfo(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractInfo/addContractInfo',
            method: 'post',
            data: form
        }, msg);
    },
    //修改合同
    async updateContractInfo(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractInfo/updateContractInfo',
            method: 'post',
            data: form
        }, msg);
    },
    //回款更新
    async getReturnList(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractInfo/getList',
            method: 'get',
            params: form
        }, msg);
    },
    //修改合同回款信息
    async saveOrUpdateBatchReturned(form, msg = true) {
        return httpApi({
            url: '/api/blade-control/contractReturnedInfo/saveOrUpdateBatchReturned',
            method: 'post',
            data: form
        }, msg);
    },
}
