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
2a658b80
Commit
2a658b80
authored
Aug 25, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 添加获取支付信息的逻辑中
parent
41c871d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
26 deletions
+50
-26
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+0
-7
index.tsx
src/pages/afterService/components/ReturnInfoDrawer/index.tsx
+47
-19
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+1
-0
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+2
-0
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
2a658b80
...
...
@@ -420,13 +420,6 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
})
:
[]
,
// 计算已支付金额,采购单价 * 支付比例 累加
payAmount
:
product
.
payInfoList
?
product
.
payInfoList
.
reduce
((
prev
,
now
)
=>
{
return
now
.
externalState
===
PayOutWorkState
.
CONFIRM_ACCOUNT
?
+
(
new
BigNumber
(
+
product
.
purchaseCount
).
multipliedBy
(
product
.
price
).
multipliedBy
(
new
BigNumber
(
now
.
payRatio
).
dividedBy
(
100
))).
toFixed
(
2
)
+
prev
:
prev
;
},
0
)
:
product
.
paidAmount
,
});
}
});
...
...
src/pages/afterService/components/ReturnInfoDrawer/index.tsx
View file @
2a658b80
...
...
@@ -2,13 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
11 09:46:59
* @LastEditTime: 2021-08-
25 15:47:51
* @Description: 查看退货数量与退款金额 抽屉
*/
import
React
,
{
useEffect
}
from
'react'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Drawer
,
Button
,
Spin
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createAsyncFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
ORDER_TYPE_INQUIRY_CONTRACT
,
ORDER_TYPE_BIDDING_CONTRACT
,
...
...
@@ -69,6 +70,10 @@ export interface OrderInfo {
*/
orderNo
:
string
;
/**
* 订单id
*/
orderId
:
number
;
/**
* 订单类型
*/
orderType
:
number
;
...
...
@@ -148,6 +153,27 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
onSubmit
,
isEdit
=
false
,
})
=>
{
const
[
payInfoLoading
,
setPayInfoLoading
]
=
useState
(
false
);
console
.
log
(
'orderInfo'
,
orderInfo
);
const
getPayInfo
=
()
=>
{
if
(
!
orderInfo
||
!
orderInfo
.
orderId
)
{
return
;
}
setPayInfoLoading
(
true
);
PublicApi
.
getOrderCommonAfterSalePaymentFind
({
orderId
:
`
${
orderInfo
.
orderId
}
`
,
}).
then
((
res
)
=>
{
console
.
log
(
'res'
,
res
);
}).
finally
(()
=>
{
setPayInfoLoading
(
false
);
});
};
useEffect
(()
=>
{
getPayInfo
();
},
[
orderInfo
]);
useEffect
(()
=>
{
const
{
setFieldState
}
=
schemaAction
;
...
...
@@ -221,22 +247,24 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
}
destroyOnClose
>
<
NiceForm
initialValues=
{
orderInfo
}
previewPlaceholder=
" "
components=
{
{
Stamp
,
SteamerTicket
,
}
}
editable=
{
isEdit
}
effects=
{
(
$
,
actions
)
=>
{
createEffects
(
$
,
actions
);
}
}
onSubmit=
{
handleSubmit
}
actions=
{
schemaAction
}
schema=
{
schema
}
colon
/>
<
Spin
spinning=
{
payInfoLoading
}
>
<
NiceForm
initialValues=
{
orderInfo
}
previewPlaceholder=
" "
components=
{
{
Stamp
,
SteamerTicket
,
}
}
editable=
{
isEdit
}
effects=
{
(
$
,
actions
)
=>
{
createEffects
(
$
,
actions
);
}
}
onSubmit=
{
handleSubmit
}
actions=
{
schemaAction
}
schema=
{
schema
}
colon
/>
</
Spin
>
</
Drawer
>
);
};
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
2a658b80
...
...
@@ -289,6 +289,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
{
title
:
!
isPointsOrder
?
'采购金额'
:
'所需积分小计'
,
dataIndex
:
'paidAmount'
,
render
:
(
text
,
record
)
=>
+
text
?
`¥
${
text
}
`
:
record
.
amount
,
},
{
title
:
'已换货数量'
,
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
2a658b80
...
...
@@ -672,6 +672,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({
const
preValues
=
addSchemaAction
.
getFieldValue
(
'returnGoodsList'
);
const
value
=
[];
console
.
log
(
'values'
,
values
)
values
.
forEach
(
item
=>
{
const
atom
=
{
id
:
item
.
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