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
shenshaokai
jinfa-platform
Commits
75049b75
Commit
75049b75
authored
Dec 10, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善业务逻辑
parent
43e6adb6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
15 deletions
+24
-15
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+8
-1
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+1
-0
index.ts
...tion/returnPrSubmit/components/ReturnForm/schema/index.ts
+1
-1
verify.tsx
...pages/afterService/returnManage/returnPrReturn/verify.tsx
+14
-13
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
75049b75
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-25 11:22:4
0
* @LastEditTime: 2020-1
2-10 17:56:2
0
* @Description: 维修商品抽屉组件
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -392,6 +392,13 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
})
:
[]
,
// 计算已支付金额,采购单价 * 支付比例 累加
payAmount
:
item
.
payInfoList
?
item
.
payInfoList
.
reduce
((
prev
,
now
)
=>
{
return
+
((
product
.
price
*
product
.
purchaseCount
*
(
now
.
payRatio
/
100
)).
toFixed
(
2
))
+
prev
;
},
0
)
:
0
});
}
});
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
75049b75
...
...
@@ -473,6 +473,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
purchaseCount
:
item
.
purchaseCount
,
purchaseAmount
:
+
(
item
.
price
*
item
.
purchaseCount
).
toFixed
(
2
),
returnedCount
:
item
.
returnCount
||
item
.
purchaseCount
||
0
,
// 已退货数量
payAmount
:
item
.
payAmount
,
returnCount
:
''
,
returnAmount
:
''
,
extraData
:
{
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/schema/index.ts
View file @
75049b75
...
...
@@ -270,7 +270,7 @@ export const addBillSchema: ISchema = {
title
:
'采购金额'
,
'x-component'
:
'Text'
,
},
costPrice4
:
{
payAmount
:
{
type
:
'string'
,
title
:
'已支付金额'
,
'x-component'
:
'Text'
,
...
...
src/pages/afterService/returnManage/returnPrReturn/verify.tsx
View file @
75049b75
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
09 15:30:56
* @LastEditTime: 2020-12-
10 18:28:29
* @Description:
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -14,24 +14,24 @@ import { usePageStatus } from '@/hooks/usePageStatus';
import
DetailInfo
from
'../components/DetailInfo'
;
const
ReturnPrReturnVerify
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
{
id
}
=
usePageStatus
();
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
()
=>
{
if
(
!
id
)
{
return
;
}
//
setSubmitLoading(true);
// PublicApi.postAsReturnGoodsConfirmAll
Refund({
//
dataId: id,
//
}).then(res => {
//
if (res.code === 1000) {
//
history.goBack();
//
}
//
}).finally(() => {
//
setSubmitLoading(false);
//
});
setSubmitLoading
(
true
);
PublicApi
.
postAsReturnGoodsComplete
Refund
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
return
(
...
...
@@ -44,6 +44,7 @@ const ReturnPrReturnVerify: React.FC = () => {
type=
"primary"
icon=
{
<
FormOutlined
/>
}
loading=
{
submitLoading
}
onClick=
{
handleSubmit
}
>
确认本单已完成所有退款
</
Button
>
...
...
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