import { HcApi } from '../../../request/index'
//  中间计量申请
export default {
    //分页
    async getPage(form) {
        return HcApi({
            url: '/api//blade-meter/middleMeterApply/page',
            method: 'get',
            params: form,
        })
    },
    //修改
    async edit(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/update',
            method: 'post',
            data: form,
        }, false)
    },
    //新增
    async add(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/add',
            method: 'post',
            data: form,
        }, false)
    },
    //删除
    async remove(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/remove',
            method: 'post',
            params: form,
        }, false)
    },
    //获取详情
    async getDetail(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/detail',
            method: 'get',
            params: form,
        })
    },
    //获取清单明细
    async getFormDetail(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/formDetail',
            method: 'get',
            params: form,
        })
    },
    //添加清单
    async addFormList(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/addFormList',
            method: 'get',
            params: form,
        })
    },
    //添加分解清单
    async addResolveForm(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/addResolveForm',
            method: 'get',
            params: form,
        }, false)
    },
    //获取当前节点工程划分
    async getNodeDivide(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/getNodeDivide',
            method: 'get',
            params: form,
        })
    },
    //获取当前节点变更令
    async getNodeToken(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/getNodeToken',
            method: 'get',
            params: form,
        })
    },
    //获取计量单编号
    async getMeterNumber(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/getMeterNumber',
            method: 'get',
            params: form,
        })
    },
    //合同计量期列表-全部
    async getAllPeriod(form) {
        return HcApi({
            url: '/api/blade-meter/contractMeterPeriod/allPeriod',
            method: 'get',
            params: form,
        })
    },
    //获取本期计量总金额
    async getCurrentMeterMoney(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/getCurrentMeterMoney',
            method: 'get',
            params: form,
        })
    },
    //获取当前节点下，当期未被计量的所有清单
    async getCurrentNodeAllForm(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/getCurrentNodeAllForm',
            method: 'post',
            data: form,
        })
    },
    //自动批量计量
    async autoBatchMeter(form) {
        return HcApi({
            url: '/api/blade-meter/middleMeterApply/autoBatchMeter',
            method: 'get',
            params: form,
        }, false)
    },
}
