import { HcApi } from '../../../request/index'
//  中期支付证书
export default {
    //分页
    async getPage(form) {
        return HcApi({
            url: '/api/blade-meter/interimPayCertificate/page',
            method: 'get',
            params: form,
        })
    },
    //修改
    async edit(form) {
        return HcApi({
            url: '/api/blade-meter/interimPayCertificate/update',
            method: 'post',
            data: form,
        }, false)
    },
    //新增
    async add(form) {
        return HcApi({
            url: '/api/blade-meter/interimPayCertificate/add',
            method: 'post',
            data: form,
        }, false)
    },
    //删除
    async remove(form) {
        return HcApi({
            url: '/api/blade-meter/interimPayCertificate/delete',
            method: 'post',
            params: form,
        }, false)
    },
    //获取详情
    async getDetail(form) {
        return HcApi({
            url: '/api/blade-meter/interimPayCertificate/detail',
            method: 'get',
            params: form,
        })
    },
    //锁定
    async setLocking(form) {
        return HcApi({
            url: '/api/blade-meter/interimPayCertificate/locking',
            method: 'get',
            params: form,
        }, false)
    },
    //所有合同计量期
    async getAllPeriod(form) {
        return HcApi({
            url: '/api/blade-meter/contractMeterPeriod/allPeriod',
            method: 'get',
            params: form,
        })
    },
        //未被计量的合同计量期
     async getConditionPeriod(form) {
            return HcApi({
                url: '/api/blade-meter/contractMeterPeriod/conditionPeriod',
                method: 'get',
                params: form,
            })
        },
    //材料计量期
    async getMeterPeriod(form = true) {
        return HcApi({
            url: '/api/blade-meter/meterPeriod/approvalPeriod',
            method: 'get',
            params: form,
        })
    },
    async recalculate(form = true) {
        return HcApi({
            url: '/api/blade-meter/task/meterPdfInfo',
            method: 'get',
            params: form,
        }, false)
    },
}
