Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project
jinfa-admin
Commits
c1a0cfc2
Commit
c1a0cfc2
authored
Dec 28, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加是否可退款判断
parent
63cee027
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
index.tsx
src/pages/returnManage/components/DetailInfo/index.tsx
+1
-0
index.tsx
src/pages/returnManage/components/ReturnDetailInfo/index.tsx
+15
-3
No files found.
src/pages/returnManage/components/DetailInfo/index.tsx
View file @
c1a0cfc2
...
...
@@ -400,6 +400,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataSource=
{
detailInfo
&&
detailInfo
.
refundList
?
detailInfo
.
refundList
:
[]
}
onRefund=
{
handleRefund
}
isPurchaser=
{
isPurchaser
}
innerStatus=
{
detailInfo
?.
innerStatus
}
/>
</
Suspense
>
</
Col
>
...
...
src/pages/returnManage/components/ReturnDetailInfo/index.tsx
View file @
c1a0cfc2
...
...
@@ -18,6 +18,8 @@ import {
PAY_CHANNEL_BALANCE
,
PAY_CHANNEL_CREDIT
,
PAY_CHANNEL_COD
,
RETURN_INNER_STATUS_TO_BE_REFUNDED
,
RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED
,
}
from
'@/constants'
;
import
Stamp
from
'../Stamp'
;
import
CheckVoucherModal
from
'../CheckVoucherModal'
;
...
...
@@ -51,6 +53,10 @@ interface ReturnDetailInfoProps {
* 是否是采购商
*/
isPurchaser
?:
boolean
;
/**
* 退货申请单内部状态
*/
innerStatus
:
number
;
};
const
ReturnDetailInfo
:
React
.
FC
<
ReturnDetailInfoProps
>
=
({
...
...
@@ -58,6 +64,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
onRefund
,
onConfirm
,
isPurchaser
=
false
,
innerStatus
,
})
=>
{
const
[
visibleResult
,
setVisibleResult
]
=
useState
(
false
);
const
[
notReceivedLoading
,
setNotReceivedLoading
]
=
useState
(
false
);
...
...
@@ -207,9 +214,11 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
const
handleRefundConfirm
=
(
values
,
modalName
)
=>
{
setSubmitLoading
(
true
);
if
(
onRefund
)
{
onRefund
(
values
).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
};
return
(
...
...
@@ -219,7 +228,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
dataSource=
{
dataSource
}
columns=
{
columns
}
loading=
{
false
}
pagination=
{
null
}
pagination=
{
false
}
expandable=
{
{
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
expanded
?
(
...
...
@@ -255,7 +264,9 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
<
div
className=
{
styles
[
'deliver-item-actions'
]
}
>
{
!
isPurchaser
&&
(
!
isPurchaser
&&
innerStatus
===
RETURN_INNER_STATUS_TO_BE_REFUNDED
&&
item
.
canRefund
&&
(
item
.
outerStatus
===
REFUND_OUTER_STATUS_NOT_RECEIVED
||
item
.
innerStatus
===
REFUND_INNER_STATUS_NO_REFUND
||
item
.
innerStatus
===
REFUND_INNER_STATUS_REFUND_FAILED
...
...
@@ -272,7 +283,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
{
item
.
channel
===
PAY_CHANNEL_OFFLINE
&&
(
<>
{
isPurchaser
&&
(
isPurchaser
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED
&&
(
item
.
outerStatus
===
REFUND_OUTER_STATUS_UNCONFIRMED_REFUND
||
item
.
outerStatus
===
REFUND_OUTER_STATUS_NOT_RECEIVED
)
&&
(
...
...
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