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

// 查询订单详情列表
export function listPaymentDetails(query) {
    return request({
        url: '/PaymentDetails/PaymentDetails/list',
        method: 'get',
        params: query
    })
}

// 查询订单详情详细
export function getPaymentDetails(id) {
    return request({
        url: '/PaymentDetails/PaymentDetails/' + id,
        method: 'get'
    })
}

// 新增订单详情
export function addPaymentDetails(data) {
    return request({
        url: '/PaymentDetails/PaymentDetails',
        method: 'post',
        data: data
    })
}

// 修改订单详情
export function updatePaymentDetails(data) {
    return request({
        url: '/PaymentDetails/PaymentDetails',
        method: 'put',
        data: data
    })
}

// 删除订单详情
export function delPaymentDetails(id) {
    return request({
        url: '/PaymentDetails/PaymentDetails/' + id,
        method: 'delete'
    })
}

// 导出订单详情
export function downloadPaymentDetails(data) {
    download(
        '/PaymentDetails/PaymentDetails/export',
        data,
        `PaymentDetails_${new Date().getTime()}.xlsx`)
}
