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
3c315cf2
authored
Sep 09, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review:完善订单详情和售后退款 TODO 提到的问题
parent
dbfabcbb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
21 deletions
+17
-21
src/api/mall/trade/order/index.ts
+1
-0
src/config/axios/service.ts
+1
-0
src/views/mall/trade/afterSale/detail/index.vue
+4
-15
src/views/mall/trade/order/detail/index.vue
+11
-6
No files found.
src/api/mall/trade/order/index.ts
View file @
3c315cf2
...
@@ -54,6 +54,7 @@ export interface OrderVO {
...
@@ -54,6 +54,7 @@ export interface OrderVO {
logs
?:
logs
[]
logs
?:
logs
[]
}
}
// TODO @puhui999:OrderLogRespVO 会不会更好哈。
export
interface
logs
{
export
interface
logs
{
content
?:
string
content
?:
string
createTime
?:
Date
createTime
?:
Date
...
...
src/config/axios/service.ts
View file @
3c315cf2
...
@@ -191,6 +191,7 @@ service.interceptors.response.use(
...
@@ -191,6 +191,7 @@ service.interceptors.response.use(
}
}
return
Promise
.
reject
(
'error'
)
return
Promise
.
reject
(
'error'
)
}
else
{
}
else
{
// TODO @puhui999:这个先不用支持哈;
// 前端处理 data 为 null 的情况,进行提示
// 前端处理 data 为 null 的情况,进行提示
if
(
data
.
msg
!==
''
)
{
if
(
data
.
msg
!==
''
)
{
ElNotification
.
error
({
title
:
msg
})
ElNotification
.
error
({
title
:
msg
})
...
...
src/views/mall/trade/afterSale/detail/index.vue
View file @
3c315cf2
...
@@ -132,23 +132,11 @@
...
@@ -132,23 +132,11 @@
placement=
"top"
placement=
"top"
>
>
<div
class=
"el-timeline-right-content"
>
<div
class=
"el-timeline-right-content"
>
<span>
售后状态(之前):
</span>
<span>
{{ saleLog.content }}
</span>
<dict-tag
:type=
"DICT_TYPE.TRADE_AFTER_SALE_STATUS"
:value=
"saleLog.beforeStatus"
class=
"mr-10px"
/>
<span>
售后状态(之后):
</span>
<dict-tag
:type=
"DICT_TYPE.TRADE_AFTER_SALE_STATUS"
:value=
"saleLog.afterStatus"
class=
"mr-10px"
/>
<span>
操作明细:{{ saleLog.content }}
</span>
</div>
</div>
<
template
#
dot
>
<
template
#
dot
>
<span
<span
:style=
"
{ backgroundColor:
updateStyles
(saleLog.userType) }"
:style=
"
{ backgroundColor:
getUserTypeColor
(saleLog.userType) }"
class="dot-node-style"
class="dot-node-style"
>
>
{{
getDictLabel
(
DICT_TYPE
.
USER_TYPE
,
saleLog
.
userType
)[
0
]
||
'系'
}}
{{
getDictLabel
(
DICT_TYPE
.
USER_TYPE
,
saleLog
.
userType
)[
0
]
||
'系'
}}
...
@@ -185,7 +173,8 @@ const formData = ref({
...
@@ -185,7 +173,8 @@ const formData = ref({
})
})
const
updateAuditReasonFormRef
=
ref
()
// 拒绝售后表单 Ref
const
updateAuditReasonFormRef
=
ref
()
// 拒绝售后表单 Ref
const
updateStyles
=
(
type
:
number
)
=>
{
/** 获得 userType 颜色 */
const
getUserTypeColor
=
(
type
:
number
)
=>
{
const
dict
=
getDictObj
(
DICT_TYPE
.
USER_TYPE
,
type
)
const
dict
=
getDictObj
(
DICT_TYPE
.
USER_TYPE
,
type
)
switch
(
dict
?.
colorType
)
{
switch
(
dict
?.
colorType
)
{
case
'success'
:
case
'success'
:
...
...
src/views/mall/trade/order/detail/index.vue
View file @
3c315cf2
...
@@ -167,7 +167,7 @@
...
@@ -167,7 +167,7 @@
</div>
</div>
<
template
#
dot
>
<
template
#
dot
>
<span
<span
:style=
"
{ backgroundColor:
updateStyles
(log.userType!) }"
:style=
"
{ backgroundColor:
getUserTypeColor
(log.userType!) }"
class="dot-node-style"
class="dot-node-style"
>
>
{{
getDictLabel
(
DICT_TYPE
.
USER_TYPE
,
log
.
userType
)[
0
]
}}
{{
getDictLabel
(
DICT_TYPE
.
USER_TYPE
,
log
.
userType
)[
0
]
}}
...
@@ -201,7 +201,8 @@ defineOptions({ name: 'TradeOrderDetail' })
...
@@ -201,7 +201,8 @@ defineOptions({ name: 'TradeOrderDetail' })
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
updateStyles
=
(
type
:
number
)
=>
{
/** 获得 userType 颜色 */
const
getUserTypeColor
=
(
type
:
number
)
=>
{
const
dict
=
getDictObj
(
DICT_TYPE
.
USER_TYPE
,
type
)
const
dict
=
getDictObj
(
DICT_TYPE
.
USER_TYPE
,
type
)
switch
(
dict
?.
colorType
)
{
switch
(
dict
?.
colorType
)
{
case
'success'
:
case
'success'
:
...
@@ -221,22 +222,24 @@ const formData = ref<TradeOrderApi.OrderVO>({
...
@@ -221,22 +222,24 @@ const formData = ref<TradeOrderApi.OrderVO>({
logs
:
[]
logs
:
[]
})
})
const
deliveryFormRef
=
ref
()
// 发货表单 Ref
/** 各种操作 */
const
updateRemarkForm
=
ref
()
// 订单备注表单 Ref
const
updateRemarkForm
=
ref
()
// 订单备注表单 Ref
const
updateAddressFormRef
=
ref
()
// 收货地址表单 Ref
const
updatePriceFormRef
=
ref
()
// 订单调价表单 Ref
const
remark
=
()
=>
{
const
remark
=
()
=>
{
updateRemarkForm
.
value
?.
open
(
formData
.
value
)
updateRemarkForm
.
value
?.
open
(
formData
.
value
)
}
}
const
deliveryFormRef
=
ref
()
// 发货表单 Ref
const
delivery
=
()
=>
{
const
delivery
=
()
=>
{
deliveryFormRef
.
value
?.
open
(
formData
.
value
)
deliveryFormRef
.
value
?.
open
(
formData
.
value
)
}
}
const
updateAddressFormRef
=
ref
()
// 收货地址表单 Ref
const
updateAddress
=
()
=>
{
const
updateAddress
=
()
=>
{
updateAddressFormRef
.
value
?.
open
(
formData
.
value
)
updateAddressFormRef
.
value
?.
open
(
formData
.
value
)
}
}
const
updatePriceFormRef
=
ref
()
// 订单调价表单 Ref
const
updatePrice
=
()
=>
{
const
updatePrice
=
()
=>
{
updatePriceFormRef
.
value
?.
open
(
formData
.
value
)
updatePriceFormRef
.
value
?.
open
(
formData
.
value
)
}
}
/** 获得详情 */
/** 获得详情 */
const
{
params
}
=
useRoute
()
// 查询参数
const
{
params
}
=
useRoute
()
// 查询参数
const
getDetail
=
async
()
=>
{
const
getDetail
=
async
()
=>
{
...
@@ -250,13 +253,15 @@ const getDetail = async () => {
...
@@ -250,13 +253,15 @@ const getDetail = async () => {
formData
.
value
=
res
formData
.
value
=
res
}
}
}
}
/** 关闭 tag */
const
{
delView
}
=
useTagsViewStore
()
// 视图操作
const
{
delView
}
=
useTagsViewStore
()
// 视图操作
const
{
push
,
currentRoute
}
=
useRouter
()
// 路由
const
{
push
,
currentRoute
}
=
useRouter
()
// 路由
/** 关闭 tag */
const
close
=
()
=>
{
const
close
=
()
=>
{
delView
(
unref
(
currentRoute
))
delView
(
unref
(
currentRoute
))
push
({
name
:
'TradeAfterSale'
})
push
({
name
:
'TradeAfterSale'
})
}
}
/** 复制 */
/** 复制 */
const
clipboardSuccess
=
()
=>
{
const
clipboardSuccess
=
()
=>
{
message
.
success
(
'复制成功'
)
message
.
success
(
'复制成功'
)
...
...
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