
import request from '@/utils/request'

/***************************************************** hello world ****************************************************/

// 售后列表
export function getPintuanRefundList(params: Record<string, any>) {
    return request.get(`pintuan/order/refund/list`,params)
}

// 订单状态
export function getPintuanRefundInit() {
    return request.get(`pintuan/order/refund/init`)
}
// 关闭退款
export function pintuanRefundClose(order_refund_no: string) {
    return request.post(`pintuan/order/refund/close/${order_refund_no}`)
}

// 售后订单详情
export function getPintuanRefundDetail(order_refund_no: string) {
    return request.get(`pintuan/order/refund/detail/${order_refund_no}`)
}

// 获取可退款金额
export function getPintuanRefundCalculate(order_no: string) {
    return request.get(`pintuan/order/refund/calculate/${order_no}`)
}

// 发起退款申请
export function applyPintuanRefund(params: Record<string, any>) {
    return request.post(`pintuan/order/refund/apply`,params)
}

// 编辑退款申请
export function editPintuanRefund(order_refund_no:string, params: Record<string, any>) {
    return request.post(`pintuan/order/refund/edit/${order_refund_no}`,params)
}
