diff --git a/src/api/mall/trade/afterSale/index.ts b/src/api/mall/trade/afterSale/index.ts index cc97d628..8eb673b1 100644 --- a/src/api/mall/trade/afterSale/index.ts +++ b/src/api/mall/trade/afterSale/index.ts @@ -40,15 +40,12 @@ export interface ProductPropertiesVO { valueName?: string // 属性值的名称 } -// 获得交易售后 -export function getAfterSale(id) { - return request({ - url: '/trade/after-sale/get?id=' + id, - method: 'get' - }) -} - // 获得交易售后分页 export const getAfterSalePage = async (params) => { return await request.get({ url: `/trade/after-sale/page`, params }) } + +// 获得交易售后详情 +export const getAfterSale = async (id) => { + return await request.get({ url: `/trade/after-sale/get-detail?id=${id}` }) +} diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 690b5c3c..0681e166 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -401,10 +401,16 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, children: [ { - path: 'detail/:orderId(\\d+)', + path: 'orderDetail/:orderId(\\d+)', component: () => import('@/views/mall/trade/order/detail/index.vue'), name: 'TradeOrderDetail', meta: { title: '订单详情', icon: '', activeMenu: '/trade/trade/order' } + }, + { + path: 'afterSaleDetail/:orderId(\\d+)', + component: () => import('@/views/mall/trade/afterSale/detail/index.vue'), + name: 'TradeAfterSaleDetail', + meta: { title: '退款详情', icon: '', activeMenu: '/trade/trade/after-sale' } } ] }, diff --git a/src/views/mall/trade/afterSale/detail/index.vue b/src/views/mall/trade/afterSale/detail/index.vue new file mode 100644 index 00000000..d651db8a --- /dev/null +++ b/src/views/mall/trade/afterSale/detail/index.vue @@ -0,0 +1,190 @@ + + + + + {{ orderInfo.orderNo }} + + + + + + + + {{ orderInfo.order.receiverName }} + + + {{ orderInfo.order.userRemark }} + + + + + + {{ orderInfo.order.receiverMobile }} + + {{ orderInfo.order.remark }} + + {{ orderInfo.order.payOrderId }} + + + + + + + + + + + {{ orderInfo.no }} + + {{ formatDate(orderInfo.auditTime) }} + + + + + + + + + {{ orderInfo.refundPrice }} + {{ orderInfo.applyReason }} + + {{ orderInfo.applyDescription }} + + {{ orderInfo.applyPicUrls }} + + + + + + + + + 同意售后 + 拒绝售后 + 确认收货 + 拒绝收货 + 确认退款 + + 更新售后订单为已退款 + + + + 提醒: + 如果未发货,请点击同意退款给买家。 + 如果实际已发货,请主动与买家联系。 + 如果订单整体退款后,优惠券和余额会退还给买家. + + + + + + + + + + + + {{ row.spuName }} + + {{ property.propertyName }}: {{ property.valueName }} + + + + + {{ floatToFixed2(row.price) }}元 + + + + {{ floatToFixed2(row.payPrice) }}元 + + + + + + + + + + + + + + + + + + diff --git a/src/views/mall/trade/afterSale/index.vue b/src/views/mall/trade/afterSale/index.vue index b96fc93d..fcde9b04 100644 --- a/src/views/mall/trade/afterSale/index.vue +++ b/src/views/mall/trade/afterSale/index.vue @@ -91,19 +91,32 @@ - - - - - - - - - + + + + + {{ row.orderNo }} + + + + + + + + {{ row.spuName }} + + {{ property.propertyName }}: {{ property.valueName }} + + + - ¥{{ (scope.row.refundPrice / 100.0).toFixed(2) }} + {{ floatToFixed2(scope.row.refundPrice) }}元 @@ -124,8 +137,8 @@ - - 处理退款 + + 处理退款 @@ -142,11 +155,20 @@ import * as AfterSaleApi from '@/api/mall/trade/afterSale/index' import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' +import { createImageViewer } from '@/components/ImageViewer' import { TabsPaneContext } from 'element-plus' import { cloneDeep } from 'lodash-es' +import { floatToFixed2 } from '@/utils' defineOptions({ name: 'TradeAfterSale' }) +const { push } = useRouter() // 路由跳转 +/** 商品图预览 */ +const imagePreview = (imgUrl: string) => { + createImageViewer({ + urlList: [imgUrl] + }) +} const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 const list = ref([]) // 列表的数据 @@ -202,6 +224,15 @@ const tabClick = async (tab: TabsPaneContext) => { await getList() } +/** 处理退款 */ +const openAfterSaleDetail = (id: number) => { + push({ name: 'TradeAfterSaleDetail', params: { orderId: id } }) +} +/** 查看订单详情 */ +const openOrderDetail = (id: number) => { + push({ name: 'TradeOrderDetail', params: { orderId: id } }) +} + onMounted(async () => { await getList() // 设置 statuses 过滤