订单售后列表:完善售后详情及相关操作

This commit is contained in:
puhui999
2023-08-29 09:48:33 +08:00
parent 8a51c9c771
commit ed739aec55
5 changed files with 134 additions and 34 deletions

View File

@ -1,6 +1,5 @@
import request from '@/config/axios'
// 定义 TradeAfterSaleDTO 接口,映射 TradeAfterSaleDO
export interface TradeAfterSaleVO {
id?: number | null // 售后编号,主键自增
no?: string // 售后单号
@ -44,8 +43,27 @@ export interface ProductPropertiesVO {
export const getAfterSalePage = async (params) => {
return await request.get({ url: `/trade/after-sale/page`, params })
}
// 获得交易售后详情
export const getAfterSale = async (id) => {
export const getAfterSale = async (id: any) => {
return await request.get({ url: `/trade/after-sale/get-detail?id=${id}` })
}
// 同意售后
export const agree = async (id: any) => {
return await request.put({ url: `/trade/after-sale/agree?id=${id}` })
}
// 拒绝售后
export const disagree = async (data: any) => {
return await request.put({ url: `/trade/after-sale/disagree`, data })
}
// 确认收货
export const receive = async (id: any) => {
return await request.put({ url: `/trade/after-sale/receive?id=${id}` })
}
// 拒绝收货
export const refuse = async (id: any) => {
return await request.put({ url: `/trade/after-sale/refuse?id=${id}` })
}
// 确认退款
export const refund = async (id: any) => {
return await request.put({ url: `/trade/after-sale/refund?id=${id}` })
}