Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
linweijiong
jinfa-platform
Commits
b6692a78
Commit
b6692a78
authored
Sep 16, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复物料订单退款金额显示为0的问题
parent
c8d88aff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
index.tsx
src/pages/afterService/components/ReturnInfoDrawer/index.tsx
+14
-14
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+1
-1
No files found.
src/pages/afterService/components/ReturnInfoDrawer/index.tsx
View file @
b6692a78
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-1
5 10:08:33
* @LastEditTime: 2021-09-1
6 10:31:19
* @Description: 查看退货数量与退款金额 抽屉
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -179,21 +179,23 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
onSubmit
,
isEdit
=
false
,
})
=>
{
const
[
innerApplyInfo
,
setInnerApplyInfo
]
=
useState
<
ReturnApplyInfo
|
null
>
(
null
);
const
[
innerApplyInfo
,
setInnerApplyInfo
]
=
useState
<
ReturnApplyInfo
|
null
>
(
applyInfo
);
const
[
payInfoLoading
,
setPayInfoLoading
]
=
useState
(
false
);
const
{
orderType
}
=
(
innerApplyInfo
||
{});
const
isMateriel
=
(
orderType
===
ORDER_TYPE_INQUIRY_CONTRACT
||
orderType
===
ORDER_TYPE_BIDDING_CONTRACT
||
orderType
===
ORDER_TYPE_TENDER_CONTRACT
);
const
getPayInfo
=
async
()
=>
{
if
(
!
applyInfo
||
!
applyInfo
.
orderId
)
{
return
;
}
const
isMateriel
=
(
applyInfo
.
orderType
===
ORDER_TYPE_INQUIRY_CONTRACT
||
applyInfo
.
orderType
===
ORDER_TYPE_BIDDING_CONTRACT
||
applyInfo
.
orderType
===
ORDER_TYPE_TENDER_CONTRACT
);
if
(
isMateriel
)
{
schemaAction
.
setFieldState
(
'productName'
,
state
=>
{
state
.
title
=
'物料名称'
;
});
}
let
payList
=
applyInfo
.
payList
?
applyInfo
.
payList
.
map
((
item
)
=>
({
...
item
,
payRatio
:
+
(
new
BigNumber
(
item
.
payRatio
).
multipliedBy
(
100
)).
toFixed
(
2
),
...
...
@@ -201,7 +203,7 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
setPayInfoLoading
(
true
);
try
{
// 编辑状态才请求支付信息,否则默认取申请信息里边的支付信息
if
(
isEdit
)
{
if
(
isEdit
&&
isMateriel
)
{
const
res
=
await
PublicApi
.
getOrderCommonAfterSalePaymentFind
({
orderId
:
`
${
applyInfo
.
orderId
}
`
,
});
...
...
@@ -247,9 +249,7 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
};
useEffect
(()
=>
{
if
(
!
isMateriel
)
{
getPayInfo
();
}
getPayInfo
();
},
[
applyInfo
]);
const
handleClose
=
()
=>
{
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
b6692a78
...
...
@@ -736,7 +736,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
returnReason
:
extraData
.
returnReason
,
orderType
:
orderTypeValue
,
});
setVisibleReturnInfoDrawer
(
true
)
setVisibleReturnInfoDrawer
(
true
)
;
};
const
handleReturnInfoSubmit
=
values
=>
{
...
...
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