Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bb08f6f5
authored
Oct 02, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trade:完善退款详情
parent
4fddbcce
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
44 deletions
+47
-44
src/router/modules/remaining.ts
+1
-1
src/views/mall/trade/afterSale/detail/index.vue
+42
-38
src/views/mall/trade/afterSale/index.vue
+4
-5
No files found.
src/router/modules/remaining.ts
View file @
bb08f6f5
...
...
@@ -405,7 +405,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
meta
:
{
title
:
'订单详情'
,
icon
:
'ep:view'
,
activeMenu
:
'/mall/trade/order'
}
},
{
path
:
'after-sale/detail/:
orderI
d(\\d+)'
,
path
:
'after-sale/detail/:
i
d(\\d+)'
,
component
:
()
=>
import
(
'@/views/mall/trade/afterSale/detail/index.vue'
),
name
:
'TradeAfterSaleDetail'
,
meta
:
{
title
:
'退款详情'
,
icon
:
'ep:view'
,
activeMenu
:
'/mall/trade/after-sale'
}
...
...
src/views/mall/trade/afterSale/detail/index.vue
View file @
bb08f6f5
...
...
@@ -6,7 +6,6 @@
<el-descriptions-item
label=
"配送方式: "
>
<dict-tag
:type=
"DICT_TYPE.TRADE_DELIVERY_TYPE"
:value=
"formData.order.deliveryType"
/>
</el-descriptions-item>
<!-- TODO 营销活动待实现 -->
<el-descriptions-item
label=
"订单类型: "
>
<dict-tag
:type=
"DICT_TYPE.TRADE_ORDER_TYPE"
:value=
"formData.order.type"
/>
</el-descriptions-item>
...
...
@@ -29,8 +28,7 @@
<el-descriptions-item
label=
"付款方式: "
>
<dict-tag
:type=
"DICT_TYPE.PAY_CHANNEL_CODE"
:value=
"formData.order.payChannelCode"
/>
</el-descriptions-item>
<!-- TODO 芋艿:待实现:跳转会员 -->
<!--
<el-descriptions-item
label=
"买家: "
>
{{
formData
.
user
.
nickname
}}
</el-descriptions-item>
-->
<el-descriptions-item
label=
"买家: "
>
{{
formData
?.
user
?.
nickname
}}
</el-descriptions-item>
</el-descriptions>
<!-- 售后信息 -->
...
...
@@ -46,7 +44,7 @@
<dict-tag
:type=
"DICT_TYPE.TRADE_AFTER_SALE_WAY"
:value=
"formData.way"
/>
</el-descriptions-item>
<el-descriptions-item
label=
"退款金额: "
>
{{
f
loatToFixed2
(
formData
.
refundPrice
)
}}
{{
f
enToYuan
(
formData
.
refundPrice
)
}}
</el-descriptions-item>
<el-descriptions-item
label=
"退款原因: "
>
{{
formData
.
applyReason
}}
</el-descriptions-item>
<el-descriptions-item
label=
"补充描述: "
>
...
...
@@ -92,7 +90,7 @@
<el-descriptions-item
labelClassName=
"no-colon"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"15"
>
<el-table
:data=
"
formData.items
"
border
>
<el-table
:data=
"
[formData.orderItem]
"
border
>
<el-table-column
label=
"商品"
prop=
"spuName"
width=
"auto"
>
<
template
#
default=
"{ row }"
>
{{
row
.
spuName
}}
...
...
@@ -102,19 +100,11 @@
</
template
>
</el-table-column>
<el-table-column
label=
"商品原价"
prop=
"price"
width=
"150"
>
<
template
#
default=
"{ row }"
>
{{
f
loatToFixed2
(
row
.
price
)
}}
元
</
template
>
<
template
#
default=
"{ row }"
>
{{
f
enToYuan
(
row
.
price
)
}}
元
</
template
>
</el-table-column>
<el-table-column
label=
"数量"
prop=
"count"
width=
"100"
/>
<el-table-column
label=
"合计"
prop=
"payPrice"
width=
"150"
>
<
template
#
default=
"{ row }"
>
{{
floatToFixed2
(
row
.
payPrice
)
}}
元
</
template
>
</el-table-column>
<el-table-column
label=
"售后状态"
prop=
"afterSaleStatus"
width=
"120"
>
<
template
#
default=
"{ row }"
>
<dict-tag
:type=
"DICT_TYPE.TRADE_ORDER_ITEM_AFTER_SALE_STATUS"
:value=
"row.afterSaleStatus"
/>
</
template
>
<
template
#
default=
"{ row }"
>
{{
fenToYuan
(
row
.
payPrice
)
}}
元
</
template
>
</el-table-column>
</el-table>
</el-col>
...
...
@@ -122,6 +112,8 @@
</el-row>
</el-descriptions-item>
</el-descriptions>
<!-- 操作日志 -->
<el-descriptions
title=
"售后日志"
>
<el-descriptions-item
labelClassName=
"no-colon"
>
<el-timeline>
...
...
@@ -153,7 +145,7 @@
</template>
<
script
lang=
"ts"
setup
>
import
*
as
AfterSaleApi
from
'@/api/mall/trade/afterSale/index'
import
{
f
loatToFixed2
}
from
'@/utils'
import
{
f
enToYuan
}
from
'@/utils'
import
{
DICT_TYPE
,
getDictLabel
,
getDictObj
}
from
'@/utils/dict'
import
{
formatDate
}
from
'@/utils/formatTime'
import
UpdateAuditReasonForm
from
'@/views/mall/trade/afterSale/form/AfterSaleDisagreeForm.vue'
...
...
@@ -191,7 +183,7 @@ const getUserTypeColor = (type: number) => {
/** 获得详情 */
const
getDetail
=
async
()
=>
{
const
id
=
params
.
orderI
d
as
unknown
as
number
const
id
=
params
.
i
d
as
unknown
as
number
if
(
id
)
{
const
res
=
await
AfterSaleApi
.
getAfterSale
(
id
)
// 没有表单信息则关闭页面返回
...
...
@@ -204,44 +196,56 @@ const getDetail = async () => {
}
/** 同意售后 */
const
agree
=
()
=>
{
message
.
confirm
(
'是否同意售后?'
).
then
(()
=>
{
AfterSaleApi
.
agree
(
formData
.
value
.
id
)
const
agree
=
async
()
=>
{
try
{
// 二次确认
await
message
.
confirm
(
'是否同意售后?'
)
await
AfterSaleApi
.
agree
(
formData
.
value
.
id
)
// 提示成功
message
.
success
(
t
(
'common.success'
))
getDetail
()
}
)
await
getDetail
()
}
catch
{}
}
/** 拒绝售后 */
const
disagree
=
()
=>
{
const
disagree
=
async
()
=>
{
updateAuditReasonFormRef
.
value
?.
open
(
formData
.
value
)
}
/** 确认收货 */
const
receive
=
()
=>
{
message
.
confirm
(
'是否确认收货?'
).
then
(()
=>
{
AfterSaleApi
.
receive
(
formData
.
value
.
id
)
const
receive
=
async
()
=>
{
try
{
// 二次确认
await
message
.
confirm
(
'是否确认收货?'
)
await
AfterSaleApi
.
receive
(
formData
.
value
.
id
)
// 提示成功
message
.
success
(
t
(
'common.success'
))
getDetail
()
}
)
await
getDetail
()
}
catch
{}
}
/** 拒绝收货 */
const
refuse
=
()
=>
{
message
.
confirm
(
'是否拒绝收货?'
).
then
(()
=>
{
AfterSaleApi
.
refuse
(
formData
.
value
.
id
)
const
refuse
=
async
()
=>
{
try
{
// 二次确认
await
message
.
confirm
(
'是否拒绝收货?'
)
await
AfterSaleApi
.
refuse
(
formData
.
value
.
id
)
// 提示成功
message
.
success
(
t
(
'common.success'
))
getDetail
()
}
)
await
getDetail
()
}
catch
{}
}
/** 确认退款 */
const
refund
=
()
=>
{
message
.
confirm
(
'是否确认退款?'
).
then
(()
=>
{
AfterSaleApi
.
refund
(
formData
.
value
.
id
)
const
refund
=
async
()
=>
{
try
{
// 二次确认
await
message
.
confirm
(
'是否确认退款?'
)
await
AfterSaleApi
.
refund
(
formData
.
value
.
id
)
// 提示成功
message
.
success
(
t
(
'common.success'
))
getDetail
()
}
)
await
getDetail
()
}
catch
{}
}
/** 图片预览 */
...
...
src/views/mall/trade/afterSale/index.vue
View file @
bb08f6f5
...
...
@@ -135,17 +135,16 @@
</el-table-column>
<el-table-column
align=
"center"
label=
"订单金额"
prop=
"refundPrice"
>
<
template
#
default=
"scope"
>
<span>
{{
f
loatToFixed2
(
scope
.
row
.
refundPrice
)
}}
元
</span>
<span>
{{
f
enToYuan
(
scope
.
row
.
refundPrice
)
}}
元
</span>
</
template
>
</el-table-column>
<!-- TODO 芋艿:未来要加个会员链接 -->
<el-table-column
align=
"center"
label=
"买家"
prop=
"user.nickname"
/>
<el-table-column
align=
"center"
label=
"申请时间"
prop=
"createTime"
width=
"180"
>
<
template
#
default=
"scope"
>
<span>
{{
formatDate
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"售后状态"
>
<el-table-column
align=
"center"
label=
"售后状态"
width=
"100"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.TRADE_AFTER_SALE_STATUS"
:value=
"scope.row.status"
/>
</
template
>
...
...
@@ -177,7 +176,7 @@ import { formatDate } from '@/utils/formatTime'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
TabsPaneContext
}
from
'element-plus'
import
{
cloneDeep
}
from
'lodash-es'
import
{
f
loatToFixed2
}
from
'@/utils'
import
{
f
enToYuan
}
from
'@/utils'
defineOptions
({
name
:
'TradeAfterSale'
})
...
...
@@ -240,7 +239,7 @@ const tabClick = async (tab: TabsPaneContext) => {
/** 处理退款 */
const
openAfterSaleDetail
=
(
id
:
number
)
=>
{
push
({
name
:
'TradeAfterSaleDetail'
,
params
:
{
orderId
:
id
}
})
push
({
name
:
'TradeAfterSaleDetail'
,
params
:
{
id
}
})
}
/** 查看订单详情 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment