From ed739aec551cb6fad7a462cbd24e8bdea4b99b28 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 29 Aug 2023 09:48:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=94=AE=E5=90=8E=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=9A=E5=AE=8C=E5=96=84=E5=94=AE=E5=90=8E=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=8F=8A=E7=9B=B8=E5=85=B3=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/afterSale/index.ts | 24 ++++++- .../components/UpdateAuditReasonForm.vue | 70 ++++++++++++++++++ .../mall/trade/afterSale/detail/index.vue | 71 +++++++++++-------- src/views/mall/trade/afterSale/index.vue | 2 +- .../components/OrderUpdateRemarkForm.vue | 1 - 5 files changed, 134 insertions(+), 34 deletions(-) create mode 100644 src/views/mall/trade/afterSale/components/UpdateAuditReasonForm.vue diff --git a/src/api/mall/trade/afterSale/index.ts b/src/api/mall/trade/afterSale/index.ts index 8eb673b1..ba94df0a 100644 --- a/src/api/mall/trade/afterSale/index.ts +++ b/src/api/mall/trade/afterSale/index.ts @@ -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}` }) +} diff --git a/src/views/mall/trade/afterSale/components/UpdateAuditReasonForm.vue b/src/views/mall/trade/afterSale/components/UpdateAuditReasonForm.vue new file mode 100644 index 00000000..266135e3 --- /dev/null +++ b/src/views/mall/trade/afterSale/components/UpdateAuditReasonForm.vue @@ -0,0 +1,70 @@ + + diff --git a/src/views/mall/trade/afterSale/detail/index.vue b/src/views/mall/trade/afterSale/detail/index.vue index d651db8a..cd551a39 100644 --- a/src/views/mall/trade/afterSale/detail/index.vue +++ b/src/views/mall/trade/afterSale/detail/index.vue @@ -2,61 +2,61 @@ - {{ orderInfo.orderNo }} + {{ formData.orderNo }} - + - + - {{ orderInfo.order.receiverName }} + {{ formData.order.receiverName }} - {{ orderInfo.order.userRemark }} + {{ formData.order.userRemark }} - + - {{ orderInfo.order.receiverMobile }} + {{ formData.order.receiverMobile }} - {{ orderInfo.order.remark }} + {{ formData.order.remark }} - {{ orderInfo.order.payOrderId }} + {{ formData.order.payOrderId }} - + - + - {{ orderInfo.no }} + {{ formData.no }} - {{ formatDate(orderInfo.auditTime) }} + {{ formatDate(formData.auditTime) }} - + - + - {{ orderInfo.refundPrice }} - {{ orderInfo.applyReason }} + {{ formData.refundPrice }} + {{ formData.applyReason }} - {{ orderInfo.applyDescription }} + {{ formData.applyDescription }} - {{ orderInfo.applyPicUrls }} + {{ formData.applyPicUrls }} - + 同意售后 @@ -64,9 +64,6 @@ 确认收货 拒绝收货 确认退款 - - 更新售后订单为已退款 - @@ -81,7 +78,7 @@ - +