import request from '@/utils/request'
import {download} from '@/utils/request'

// 查询维保记录详情列表
export function listMaintenanceRecordDetails(query) {
    return request({
        url: '/tongzhou/maintenanceRecordDetails/maintenanceRecordDetails/list',
        method: 'get',
        params: query
    })
}

// 查询维保记录详情详细
export function getMaintenanceRecordDetails(maintenanceRecordDetailsId) {
    return request({
        url: '/tongzhou/maintenanceRecordDetails/maintenanceRecordDetails/' + maintenanceRecordDetailsId,
        method: 'get'
    })
}

// 新增维保记录详情
export function addMaintenanceRecordDetails(data) {
    return request({
        url: '/tongzhou/maintenanceRecordDetails/maintenanceRecordDetails',
        method: 'post',
        data: data
    })
}

// 修改维保记录详情
export function updateMaintenanceRecordDetails(data) {
    return request({
        url: '/tongzhou/maintenanceRecordDetails/maintenanceRecordDetails',
        method: 'put',
        data: data
    })
}

// 删除维保记录详情
export function delMaintenanceRecordDetails(maintenanceRecordDetailsId) {
    return request({
        url: '/tongzhou/maintenanceRecordDetails/maintenanceRecordDetails/' + maintenanceRecordDetailsId,
        method: 'delete'
    })
}

// 导出维保记录详情
export function downloadMaintenanceRecordDetails(data) {
    download(
        '/tongzhou/maintenanceRecordDetails/maintenanceRecordDetails/export',
        data,
        `maintenanceRecordDetails_${new Date().getTime()}.xlsx`)
}
