import request from '@/router/axios';

export const getPage = (current, size, params) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const getConfirmDelayPage = (current, size, params) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/confirm/delay/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const getHistroyPage = (current, size, params) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/histroy/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}


export const remove = (ids) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

export const add = (row) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/save',
        method: 'post',
        data: row
    })
}

export const update = (row) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/update',
        method: 'post',
        data: row
    })
}

export const getDetail = (id) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/detail',
        method: 'get',
        params: {
            id
        }
    })
}

export const getSettingDetail = () => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/setting/detail',
        method: 'get',
    })
}

export const submitSetting = (data) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/setting/submit',
        method: 'post',
        data: data
    })
}

export const orderConfirm = (params) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/confirm',
        method: 'post',
        data: {
            ...params,
        }
    })
}


export const orderClose = (params) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/close',
        method: 'post',
        params: {
            ...params,
        }
    })
}

export const orderChange = (params) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/change',
        method: 'post',
        data: params
    })
}

export const todayOrderList = () => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/today/list',
        method: 'get',
    })
}

export const getCountInfo = (adCode) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/count',
        method: 'get',
        params: {
            adCode
        }
    })
}


export const manuallyOrder = (data) => {
    return request({
        url: '/api/galaxy-business/rtu/check/order/manually',
        method: 'post',
        data: data
    })
}



