import { HcApi } from '../../../request/index'
//  变更令
export default {
    //分页
    async getPage(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/page',
            method: 'get',
            params: form,
        }, msg)
    },
    //修改
    async edit(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/update',
            method: 'post',
            data: form,
        }, msg)
    },
    //新增
    async add(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/add',
            method: 'post',
            data: form,
        }, msg)
    },
    //删除
    async remove(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/delete',
            method: 'post',
            params: form,
        }, msg)
    },
    //获取详情
    async getDetail(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/detail',
            method: 'get',
            params: form,
        }, msg)
    },
    //新增确认选择清单
    async getSelectForm(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/selectForm',
            method: 'post',
            data: form,
        }, msg)
    },
    //新增添加清单
    async addForm(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/addForm',
            method: 'get',
            params: form,
        }, msg)
    },
    //新增-获取变更申请部位
    async getChangeNode(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/getChangeNode',
            method: 'get',
            params: form,
        }, msg)
    },
    //下达变更
    async executeChange(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/executeChange',
            method: 'get',
            params: form,
        }, msg)
    },
    //撤销变更
    async annulChange(form, msg = false) {
        return HcApi({
            url: '/api/blade-meter/changeTokenForm/annulChange',
            method: 'get',
            params: form,
        }, msg)
    },
}
