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