import request from '@/utils/request';

// 分页查询工单列表
export function getWorkOrderPageList(query) {
    return request({
        url: '/workorder/workorderinfo/pagelist',
        method: 'get',
        params: query
    });
}

// 新增工单
export function addWorkOrder(data) {
    return request({
        url: '/workorder/workorderinfo/add',
        method: 'post',
        data: data
    });
}

// 修改工单
export function updateWorkOrder(data) {
    return request({
        url: '/workorder/workorderinfo/update',
        method: 'post',
        data: data
    });
}

// 获取工单详细信息
export function getWorkOrder(id) {
    return request({
        url: '/workorder/workorderinfo/' + id,
        method: 'get'
    });
}

// 删除工单
export function delWorkOrder(id) {
    return request({
        url: '/workorder/workorderinfo/' + id,
        method: 'delete'
    });
}
