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
a6f555ee
Commit
a6f555ee
authored
Oct 28, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 资金账户-审核提现
parent
eed25b1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
51 deletions
+91
-51
checkDetail.tsx
...dSettle/amountAccountManage/checkWithdraw/checkDetail.tsx
+60
-48
index.tsx
.../payandSettle/amountAccountManage/checkWithdraw/index.tsx
+31
-3
No files found.
src/pages/payandSettle/amountAccountManage/checkWithdraw/checkDetail.tsx
View file @
a6f555ee
...
...
@@ -24,7 +24,7 @@ const CheckDetail: React.FC<{}> = () => {
const
[
dealRecord
,
setDealRecord
]
=
useState
<
any
>
()
const
[
checkStatus
,
setCheckStatus
]
=
useState
<
number
>
(
4
)
const
[
disableCheck
,
setDisableCheck
]
=
useState
<
boolean
>
(
false
)
const
[
isDisabled
,
setIsDisabled
]
=
useState
<
boolean
>
(
false
)
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
const
[
details
,
setDetails
]
=
useState
<
any
>
({
accountBalance
:
0
,
lockBalance
:
0
})
const
[
bankDetail
,
setBankDetail
]
=
useState
<
GetSettleAccountsCorporateAccountConfigResponse
>
()
...
...
@@ -45,52 +45,52 @@ const CheckDetail: React.FC<{}> = () => {
}
}
// 获取交易记录
const
fetchTradeData
=
(
params
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayMemberAssetAccountGetAccountTradeRecord
({
memberAssetAccountId
:
urlParams
.
id
+
''
,
...
params
}).
then
(
res
=>
{
const
{
data
}
=
res
resolve
(
data
)
})
// 获取提现处理记录
const
fetchTradeData
=
(
params
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayMemberAssetAccountGetCashOutRecordList
({
tradeCode
:
urlParams
.
tradeCode
,
...
params
}).
then
(
res
=>
{
const
{
data
}
=
res
resolve
(
data
)
})
}
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'交易流水号'
,
dataIndex
:
'tradeCode'
,
key
:
'tradeCode'
,
},
{
title
:
'交易时间'
,
dataIndex
:
'tradeTime'
,
key
:
'tradeTime'
,
render
:
(
text
:
any
)
=>
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
},
{
title
:
'交易金额(元)'
,
dataIndex
:
'tradeMoney'
,
key
:
'tradeMoney'
,
render
:
(
t
,
r
)
=>
`
${
operationMap
[
r
.
operation
][
'operator'
]}
${
t
.
toFixed
(
2
)}
`
},
{
title
:
'交易项目'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
render
:
(
t
,
r
)
=>
operationMap
[
t
][
'title'
]
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(<
StatusTag
title=
{
statusMap
[
text
][
'title'
]
}
type=
{
statusMap
[
text
][
'type'
]
}
/>)
},
{
title
:
'意见'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
];
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'交易流水号'
,
dataIndex
:
'tradeCode'
,
key
:
'tradeCode'
,
},
{
title
:
'交易时间'
,
dataIndex
:
'tradeTime'
,
key
:
'tradeTime'
,
render
:
(
text
:
any
)
=>
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
},
{
title
:
'交易金额(元)'
,
dataIndex
:
'tradeMoney'
,
key
:
'tradeMoney'
,
render
:
(
t
,
r
)
=>
`
${
operationMap
[
r
.
operation
][
'operator'
]}
${
t
.
toFixed
(
2
)}
`
},
{
title
:
'交易项目'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
render
:
(
t
,
r
)
=>
operationMap
[
t
][
'title'
]
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(<
StatusTag
title=
{
statusMap
[
text
][
'title'
]
}
type=
{
statusMap
[
text
][
'type'
]
}
/>)
},
{
title
:
'意见'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
];
const
handleStatusChange
=
(
value
:
any
)
=>
{
setCheckStatus
(
value
.
target
.
value
)
...
...
@@ -98,7 +98,18 @@ const CheckDetail: React.FC<{}> = () => {
const
handleOK
=
()
=>
{
checkForm
.
validateFields
().
then
(
values
=>
{
console
.
log
(
values
,
'value'
)
setConfirmLoading
(
true
)
// @ts-ignore
PublicApi
.
postPayMemberAssetAccountCheck
({
id
:
urlParams
.
id
,...
values
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setDisableCheck
(
true
)
console
.
log
(
res
.
data
)
console
.
log
(
values
,
res
.
data
,
'value'
)
}
else
{
setDisableCheck
(
false
)
}
setVisibleModal
(
false
)
})
})
}
...
...
@@ -126,7 +137,7 @@ const CheckDetail: React.FC<{}> = () => {
>
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"外部流转"
>
<
Steps
progressDot
current=
{
0
}
>
<
Steps
progressDot
current=
{
1
}
>
<
Step
title=
"申请提现"
description=
"采购商"
/>
<
Step
title=
"审核提现"
description=
"平台"
/>
<
Step
title=
"支付提现"
description=
"平台"
/>
...
...
@@ -269,6 +280,7 @@ const CheckDetail: React.FC<{}> = () => {
visible=
{
visibleModal
}
onOk=
{
handleOK
}
onCancel=
{
handleCancel
}
confirmLoading=
{
confirmLoading
}
>
<
Form
layout=
"vertical"
...
...
@@ -292,7 +304,7 @@ const CheckDetail: React.FC<{}> = () => {
</
Form
.
Item
>
{
checkStatus
===
3
&&
<
Form
.
Item
name=
"
checkR
emark"
name=
"
r
emark"
label=
{
'审核不通过原因'
}
rules=
{
[
{
...
...
src/pages/payandSettle/amountAccountManage/checkWithdraw/index.tsx
View file @
a6f555ee
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
Card
,
Space
,
Button
,
}
from
'antd'
import
{
Card
,
Space
,
Button
,
Modal
,
message
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
...
...
@@ -15,11 +15,15 @@ import { DatePicker } from '@formily/antd-components'
import
StatusTag
from
'@/components/StatusTag'
import
{
statusMap
}
from
'../../constant'
import
moment
from
'moment'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
const
{
confirm
}
=
Modal
const
formActions
=
createFormActions
();
const
CheckWithdraw
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
withdrawRowSelection
,
withdrawRowCtl
]
=
useRowSelectionTable
()
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -79,11 +83,34 @@ const CheckWithdraw: React.FC<{}> = () => {
}
const
clickUp
=
(
r
:
any
)
=>
{
history
.
push
(
`/memberCenter/payandSettle/amountAccountManage/checkWithdraw/detail?detailinfo=
${
btoa
(
JSON
.
stringify
({
id
:
r
.
memberAssetAccount
.
id
,
amount
:
r
.
tradeMoney
}))}
`
)
let
params
=
{
tradeCode
:
r
.
tradeCode
,
id
:
r
.
memberAssetAccount
.
id
,
amount
:
r
.
tradeMoney
}
history
.
push
(
`/memberCenter/payandSettle/amountAccountManage/checkWithdraw/detail?detailinfo=
${
btoa
(
JSON
.
stringify
(
params
))}
`
)
}
const
handleBatchCheck
=
()
=>
{
console
.
log
(
'批量通过'
)
if
(
withdrawRowCtl
.
selectedRowKeys
.
length
>
0
){
confirm
({
title
:
'确定要执行批量审核操作?'
,
icon
:
<
ExclamationCircleOutlined
/>,
onOk
()
{
PublicApi
.
postPayMemberAssetAccountBatchCheck
({
idList
:
withdrawRowCtl
.
selectedRowKeys
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
},
okType
:
'danger'
,
onCancel
()
{
console
.
log
(
'Cancel'
);
},
okText
:
'确定'
,
cancelText
:
'取消'
})
}
else
{
message
.
error
(
'请先选择对应项目进行操作!'
)
}
}
const
controllerBtns
=
(
...
...
@@ -101,6 +128,7 @@ const CheckWithdraw: React.FC<{}> = () => {
columns=
{
columns
}
currentRef=
{
ref
}
tableProps=
{
{
rowKey
:
"id"
}
}
rowSelection=
{
withdrawRowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
...
...
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