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
02b5daa6
Commit
02b5daa6
authored
Oct 23, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
parent
1f43df86
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
186 additions
and
66 deletions
+186
-66
index.tsx
...dSettle/amountAccountManage/memberAccountManage/index.tsx
+57
-21
memberAccountDetail.tsx
...AccountManage/memberAccountManage/memberAccountDetail.tsx
+49
-19
accountDetail.tsx
...yandSettle/capitalAccounts/accountLists/accountDetail.tsx
+35
-10
applyWithdraw.tsx
...yandSettle/capitalAccounts/accountLists/applyWithdraw.tsx
+29
-10
index.tsx
...pages/payandSettle/capitalAccounts/accountLists/index.tsx
+9
-6
constant.ts
src/pages/payandSettle/constant.ts
+7
-0
No files found.
src/pages/payandSettle/amountAccountManage/memberAccountManage/index.tsx
View file @
02b5daa6
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
Card
,
Space
,
Button
,
Popconfi
rm
}
from
'antd'
import
{
Card
,
Space
,
Button
,
Input
,
Modal
,
Fo
rm
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
...
...
@@ -16,11 +16,17 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import
StatusTag
from
'@/components/StatusTag'
import
{
accountStatusMap
,
memberStatusMap
}
from
'../../constant'
import
LevelBrand
from
'@/pages/member/components/LevelBrand'
import
{
validatorByte
}
from
'@/utils/regExp'
import
{
GetPayMemberAssetAccountGetMemberAssetAccountListResponseDetail
}
from
'@/services/PayApi'
const
formActions
=
createFormActions
();
const
{
TextArea
}
=
Input
;
const
AccountLists
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
checkForm
]
=
Form
.
useForm
()
const
[
currentRecord
,
setCurrentRecord
]
=
useState
<
GetPayMemberAssetAccountGetMemberAssetAccountListResponseDetail
>
()
const
[
visibleModal
,
setVisibleModal
]
=
useState
<
boolean
>
(
false
)
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -30,11 +36,10 @@ const AccountLists: React.FC<{}> = () => {
className
:
'commonPickColor'
,
render
:
(
text
,
record
)
=>
<>
<
EyePreview
url=
{
`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/
memberAccountD
etail?id=${record.id}`
}
url=
{
`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/
d
etail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
{
/* <LevelBrand level={record.level} /> */
}
</>
},
{
...
...
@@ -49,8 +54,9 @@ const AccountLists: React.FC<{}> = () => {
},
{
title
:
'会员等级'
,
dataIndex
:
'memberLevelName'
,
key
:
'memberLevelName'
,
dataIndex
:
'memberLevel'
,
key
:
'memberLevel'
,
render
:
(
t
,
r
)
=>
<
LevelBrand
level=
{
r
.
level
}
/>
},
{
title
:
'账户余额'
,
...
...
@@ -68,7 +74,7 @@ const AccountLists: React.FC<{}> = () => {
title
:
'可用余额'
,
dataIndex
:
'usableBalance'
,
key
:
'usableBalance'
,
render
:
text
=>
`¥
${
text
}
`
render
:
(
t
,
r
)
=>
`¥
${
r
.
accountStatus
-
r
.
lockBalance
}
`
},
{
title
:
'会员状态'
,
...
...
@@ -80,25 +86,22 @@ const AccountLists: React.FC<{}> = () => {
title
:
'账户状态'
,
dataIndex
:
'accountStatus'
,
key
:
'accountStatus'
,
render
:
(
t
,
r
)
=>
(<
span
className=
{
memberStatusMap
[
t
][
'className'
]
}
>
{
accountStatusMap
[
t
][
'title'
]
}
</
span
>)
render
:
(
t
,
r
)
=>
(<
><
span
className=
{
accountStatusMap
[
t
][
'className'
]
}
></
span
>
{
accountStatusMap
[
t
][
'title'
]
}
</
>)
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
clickHandle
(
record
)
}
onCancel=
{
cancel
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
'link'
>
{
record
.
accountStatus
===
1
?
'冻结'
:
'解除'
}
</
Button
>
</
Popconfirm
>
render
:
(
t
:
any
,
r
:
any
)
=>
(
<
Button
type=
'link'
onClick=
{
()
=>
handleRow
(
r
)
}
>
{
r
.
accountStatus
===
1
?
'冻结'
:
'解除'
}
</
Button
>
)
}
]
const
handleRow
=
(
data
:
any
)
=>
{
setCurrentRecord
(
data
)
setVisibleModal
(
true
)
}
const
fetchData
=
(
params
:
any
)
=>
{
console
.
log
(
params
)
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -129,12 +132,18 @@ const AccountLists: React.FC<{}> = () => {
return
{}
}
const
c
ancel
=
()
=>
{
console
.
log
(
'cancel'
)
const
handleC
ancel
=
()
=>
{
setVisibleModal
(
false
)
}
const
clickHandle
=
(
r
:
any
)
=>
{
console
.
log
(
r
,
'操作r'
)
const
handleOK
=
()
=>
{
checkForm
.
validateFields
().
then
(
values
=>
{
setVisibleModal
(
false
)
PublicApi
.
postPayMemberAssetAccountUpdateMemberAssetAccountEnable
({
id
:
currentRecord
.
id
,
status
:
currentRecord
.
accountStatus
===
1
?
2
:
1
,
...
values
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
ref
.
current
.
reload
()
})
})
}
return
(
...
...
@@ -169,6 +178,33 @@ const AccountLists: React.FC<{}> = () => {
}
/>
</
Card
>
<
Modal
title=
{
currentRecord
?.
accountStatus
===
1
?
'会员冻结'
:
'会员解冻'
}
visible=
{
visibleModal
}
onOk=
{
handleOK
}
onCancel=
{
handleCancel
}
>
<
Form
layout=
"vertical"
form=
{
checkForm
}
>
<
Form
.
Item
name=
"remark"
label=
{
currentRecord
?.
accountStatus
===
1
?
'会员冻结原因'
:
'会员解冻原因'
}
rules=
{
[
{
required
:
true
,
message
:
'请填写原因'
},
{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
120
)
}
]
}
>
<
TextArea
rows=
{
6
}
placeholder=
"请填写原因"
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
</
PageHeaderWrapper
>
)
}
...
...
src/pages/payandSettle/amountAccountManage/memberAccountManage/memberAccountDetail.tsx
View file @
02b5daa6
...
...
@@ -8,9 +8,11 @@ import StatusTag from '@/components/StatusTag'
import
cx
from
'classnames'
import
moment
from
'moment'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
moveStatusMap
,
statusMap
}
from
'../../constant'
import
{
SettingOutlined
}
from
'@ant-design/icons'
import
{
m
emberStatusMap
,
m
oveStatusMap
,
statusMap
}
from
'../../constant'
import
{
SettingOutlined
,
StopOutlined
}
from
'@ant-design/icons'
import
{
validatorByte
}
from
'@/utils/regExp'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetPayMemberAssetAccountGetMemberAssetAccountResponse
}
from
'@/services/PayApi'
const
{
TextArea
}
=
Input
...
...
@@ -20,6 +22,25 @@ const AccountDetail: React.FC<{}> = () => {
const
[
moveRecord
,
setMoveRecord
]
=
useState
<
any
>
()
const
[
isDisabled
,
setIsDisabled
]
=
useState
<
boolean
>
(
false
)
const
[
visibleModal
,
setVisibleModal
]
=
useState
<
boolean
>
(
false
)
const
[
details
,
setDetails
]
=
useState
<
any
>
({
accountBalance
:
0
,
lockBalance
:
0
})
useEffect
(()
=>
{
getAccountInfo
()
// pay/memberAssetAccount/getMemberAssetAccount
},
[])
const
getAccountInfo
=
async
()
=>
{
const
{
id
}
=
history
.
location
.
query
let
res
=
await
PublicApi
.
getPayMemberAssetAccountGetMemberAssetAccount
({
id
})
const
{
code
,
data
}
=
res
setDetails
(
data
)
if
(
code
===
1000
){
let
tradeRecord
=
await
PublicApi
.
getPayMemberAssetAccountGetAccountTradeRecord
({
memberAssetAccountId
:
data
.
id
+
''
})
let
statusRecord
=
await
PublicApi
.
getPayMemberAssetAccountGetAccountCheckRecord
({
memberAssetAccountId
:
data
.
id
+
''
})
setDealRecord
(
tradeRecord
.
data
)
setMoveRecord
(
statusRecord
.
data
)
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -102,18 +123,22 @@ const AccountDetail: React.FC<{}> = () => {
const
handleRelieve
=
()
=>
{
setVisibleModal
(
true
)
console
.
log
(
'解除'
)
}
const
handleOK
=
()
=>
{
console
.
log
(
'OK'
)
}
const
handleCancel
=
()
=>
{
console
.
log
(
'取消'
)
setVisibleModal
(
false
)
}
const
handleOK
=
()
=>
{
checkForm
.
validateFields
().
then
(
values
=>
{
setVisibleModal
(
false
)
PublicApi
.
postPayMemberAssetAccountUpdateMemberAssetAccountEnable
({
id
:
details
.
id
,
status
:
details
.
accountStatus
===
1
?
2
:
1
,
...
values
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
getAccountInfo
()
})
})
}
return
(
<
PageHeaderWrapper
title=
"账户详情"
...
...
@@ -124,10 +149,10 @@ const AccountDetail: React.FC<{}> = () => {
key=
"1"
onClick=
{
handleRelieve
}
type=
"primary"
icon=
{
<
Setting
Outlined
/>
}
icon=
{
details
?.
accountStatus
===
1
?
<
SettingOutlined
/>
:
<
Stop
Outlined
/>
}
disabled=
{
isDisabled
}
>
解冻
{
details
?.
accountStatus
===
1
?
'冻结'
:
'解冻'
}
</
Button
>,
]
}
>
...
...
@@ -140,12 +165,12 @@ const AccountDetail: React.FC<{}> = () => {
<
div
className=
{
styles
.
statistic
}
>
<
div
className=
{
styles
[
'statistic-title'
]
}
>
可用余额(元):
</
div
>
<
div
className=
{
styles
[
'statistic-amount'
]
}
>
{
`
100000
`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
{
`
${details.accountBalance - details.lockBalance}
`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
</
div
>
</
div
>
<
div
className=
{
styles
[
'repayment-end'
]
}
>
<
span
className=
{
styles
[
'repayment-time'
]
}
>
温州市龙昌皮具有限公司
{
details
?.
memberName
}
</
span
>
</
div
>
</
div
>
...
...
@@ -158,7 +183,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户归属:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
广州数商云网络科技有限公司
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
parentMemberName
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -166,7 +191,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户余额(元):
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
10,000
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
accountBalance
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -174,7 +199,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
锁定金额(元):
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
0.00
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
lockBalance
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -182,7 +207,12 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户状态:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
><
StatusTag
type=
"success"
title=
"正常"
/></
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
accountStatus
&&
<
StatusTag
title=
{
memberStatusMap
[
details
.
accountStatus
][
'title'
]
}
type=
{
memberStatusMap
[
details
.
accountStatus
][
'type'
]
}
/>
}
</
p
>
</
Col
>
</
Row
>
</
div
>
...
...
@@ -201,7 +231,7 @@ const AccountDetail: React.FC<{}> = () => {
</
Card
>
</
Space
>
<
Modal
title=
"会员冻结"
title=
{
details
?.
accountStatus
===
1
?
'会员冻结'
:
'会员解冻'
}
visible=
{
visibleModal
}
onOk=
{
handleOK
}
onCancel=
{
handleCancel
}
...
...
@@ -211,8 +241,8 @@ const AccountDetail: React.FC<{}> = () => {
form=
{
checkForm
}
>
<
Form
.
Item
name=
"
checkR
emark"
label=
{
'会员冻结
原因'
}
name=
"
r
emark"
label=
{
details
?.
accountStatus
===
1
?
'会员冻结原因'
:
'会员解冻
原因'
}
rules=
{
[
{
required
:
true
,
...
...
src/pages/payandSettle/capitalAccounts/accountLists/accountDetail.tsx
View file @
02b5daa6
...
...
@@ -11,14 +11,34 @@ import { ColumnType } from 'antd/lib/table/interface'
import
ModalForm
from
'@/components/ModalForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
rechargeSchema
}
from
'./schema'
import
{
moveStatusMap
,
statusMap
}
from
'../../constant'
import
{
memberStatusMap
,
moveStatusMap
,
statusMap
}
from
'../../constant'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetPayAssetAccountGetAssetAccountResponse
}
from
'@/services/PayApi'
const
schemaActions
=
createFormActions
()
const
AccountDetail
:
React
.
FC
<
{}
>
=
()
=>
{
const
modalRef
=
useRef
<
any
>
()
const
[
dealRecord
,
setDealRecord
]
=
useState
<
any
>
()
const
[
moveRecord
,
setMoveRecord
]
=
useState
<
any
>
()
const
[
details
,
setDetails
]
=
useState
<
any
>
({
accountBalance
:
0
,
lockBalance
:
0
})
const
[
dealRecord
,
setDealRecord
]
=
useState
<
any
>
([])
const
[
moveRecord
,
setMoveRecord
]
=
useState
<
any
>
([])
useEffect
(()
=>
{
getAccountInfo
()
}
,[])
const
getAccountInfo
=
async
()
=>
{
const
{
id
}
=
history
.
location
.
query
let
res
=
await
PublicApi
.
getPayAssetAccountGetAssetAccount
({
id
})
const
{
code
,
data
}
=
res
setDetails
(
data
)
if
(
code
===
1000
){
let
tradeRecord
=
await
PublicApi
.
getPayAssetAccountGetAccountTradeRecord
({
memberAssetAccountId
:
data
.
id
+
''
})
let
statusRecord
=
await
PublicApi
.
getPayAssetAccountGetAccountStatusRecord
({
memberAssetAccountId
:
data
.
id
+
''
})
setDealRecord
(
tradeRecord
.
data
)
setMoveRecord
(
statusRecord
.
data
)
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -134,12 +154,12 @@ const AccountDetail: React.FC<{}> = () => {
<
div
className=
{
styles
.
statistic
}
>
<
div
className=
{
styles
[
'statistic-title'
]
}
>
可用余额(元):
</
div
>
<
div
className=
{
styles
[
'statistic-amount'
]
}
>
{
`
100000
`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
{
`
${details.accountBalance - details.lockBalance}
`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
</
div
>
</
div
>
<
div
className=
{
styles
[
'repayment-end'
]
}
>
<
span
className=
{
styles
[
'repayment-time'
]
}
>
温州市龙昌皮具有限公司
{
details
?.
memberName
}
</
span
>
</
div
>
</
div
>
...
...
@@ -152,7 +172,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户归属:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
广州数商云网络科技有限公司
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
parentMemberName
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -160,7 +180,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户余额(元):
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
10,000
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
accountBalance
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -168,7 +188,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
锁定金额(元):
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
0.00
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
lockBalance
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -176,7 +196,12 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户状态:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
><
StatusTag
type=
"success"
title=
"正常"
/></
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
accountStatus
&&
<
StatusTag
title=
{
memberStatusMap
[
details
.
accountStatus
][
'title'
]
}
type=
{
memberStatusMap
[
details
.
accountStatus
][
'type'
]
}
/>
}
</
p
>
</
Col
>
</
Row
>
</
div
>
...
...
@@ -184,7 +209,7 @@ const AccountDetail: React.FC<{}> = () => {
<
Col
span=
{
6
}
>
<
div
className=
{
styles
.
rightActions
}
>
<
Button
className=
{
styles
.
rightAction
}
type=
"primary"
onClick=
{
handleRecharge
}
>
充值
</
Button
>
<
Button
className=
{
styles
.
rightAction
}
>
申请提现
</
Button
>
<
Button
className=
{
styles
.
rightAction
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/payandSettle/capitalAccounts/accountLists/applyWithdraw?id=${details?.id}`
)
}
>
申请提现
</
Button
>
</
div
>
</
Col
>
</
Row
>
...
...
src/pages/payandSettle/capitalAccounts/accountLists/applyWithdraw.tsx
View file @
02b5daa6
...
...
@@ -8,14 +8,30 @@ import StatusTag from '@/components/StatusTag'
import
cx
from
'classnames'
import
moment
from
'moment'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
statusMap
}
from
'../../constant'
import
{
memberStatusMap
,
statusMap
}
from
'../../constant'
import
{
PublicApi
}
from
'@/services/api'
const
{
Step
}
=
Steps
;
const
AccountDetail
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
details
,
setDetails
]
=
useState
<
any
>
({
accountBalance
:
0
,
lockBalance
:
0
})
const
[
dealRecord
,
setDealRecord
]
=
useState
<
any
>
()
useEffect
(()
=>
{
getAccountInfo
()
},
[])
const
getAccountInfo
=
async
()
=>
{
const
{
id
}
=
history
.
location
.
query
let
res
=
await
PublicApi
.
getPayAssetAccountGetAssetAccount
({
id
})
const
{
code
,
data
}
=
res
setDetails
(
data
)
if
(
code
===
1000
){
let
tradeRecord
=
await
PublicApi
.
getPayAssetAccountGetAccountTradeRecord
({
memberAssetAccountId
:
data
.
id
+
''
})
setDealRecord
(
tradeRecord
.
data
)
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'交易流水号'
,
...
...
@@ -94,7 +110,7 @@ const AccountDetail: React.FC<{}> = () => {
</
div
>
<
div
className=
{
styles
[
'repayment-end'
]
}
>
<
span
className=
{
styles
[
'repayment-time'
]
}
>
最多可以提现:¥
10,000.00
最多可以提现:¥
{
details
.
accountBalance
-
details
.
lockBalance
}
</
span
>
</
div
>
</
div
>
...
...
@@ -110,7 +126,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户归属:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
广州数商云网络科技有限公司
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
parentMemberName
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -143,12 +159,12 @@ const AccountDetail: React.FC<{}> = () => {
<
div
className=
{
styles
.
statistic
}
>
<
div
className=
{
styles
[
'statistic-title'
]
}
>
可用余额(元):
</
div
>
<
div
className=
{
styles
[
'statistic-amount'
]
}
>
{
`
100000
`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
{
`
${details.accountBalance - details.lockBalance}
`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
</
div
>
</
div
>
<
div
className=
{
styles
[
'repayment-end'
]
}
>
<
span
className=
{
styles
[
'repayment-time'
]
}
>
温州市龙昌皮具有限公司
{
details
?.
memberName
}
</
span
>
</
div
>
</
div
>
...
...
@@ -161,7 +177,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户归属:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
广州数商云网络科技有限公司
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
parentMemberName
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -169,7 +185,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户余额(元):
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
10,000
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
accountBalance
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -177,7 +193,7 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
锁定金额(元):
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
0.00
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
lockBalance
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -185,7 +201,10 @@ const AccountDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户状态:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
><
StatusTag
type=
"success"
title=
"正常"
/></
p
>
{
details
?.
accountStatus
&&
<
StatusTag
title=
{
memberStatusMap
[
details
.
accountStatus
][
'title'
]
}
type=
{
memberStatusMap
[
details
.
accountStatus
][
'type'
]
}
/>
}
</
Col
>
</
Row
>
</
div
>
...
...
src/pages/payandSettle/capitalAccounts/accountLists/index.tsx
View file @
02b5daa6
...
...
@@ -13,7 +13,8 @@ import { PlusOutlined } from '@ant-design/icons'
import
EyePreview
from
'@/components/EyePreview'
import
{
DatePicker
}
from
'@formily/antd-components'
import
StatusTag
from
'@/components/StatusTag'
import
{
accountStatusMap
,
memberStatusMap
}
from
'../../constant'
import
{
accountStatusMap
,
memberStatusMap
,
memberLevelTypeMap
}
from
'../../constant'
import
LevelBrand
from
'@/pages/member/components/LevelBrand'
const
formActions
=
createFormActions
();
...
...
@@ -43,14 +44,16 @@ const AccountLists: React.FC<{}> = () => {
key
:
'memberRoleName'
,
},
{
title
:
'会员等级'
,
dataIndex
:
'memberLevelName'
,
key
:
'memberLevelName'
,
title
:
'所属会员等级'
,
dataIndex
:
'memberLevel'
,
key
:
'memberLevel'
,
render
:
(
t
,
r
)
=>
<
LevelBrand
level=
{
r
.
memberLevel
}
/>
},
{
title
:
'会员等级类型'
,
dataIndex
:
'memberLevelType'
,
key
:
'memberLevelType'
,
render
:
(
t
,
r
)
=>
memberLevelTypeMap
[
t
]
},
{
title
:
'会员状态'
,
...
...
@@ -62,7 +65,7 @@ const AccountLists: React.FC<{}> = () => {
title
:
'账户状态'
,
dataIndex
:
'accountStatus'
,
key
:
'accountStatus'
,
render
:
(
t
,
r
)
=>
(<
span
className=
{
memberStatusMap
[
t
][
'className'
]
}
>
{
accountStatusMap
[
t
][
'title'
]
}
</
span
>)
render
:
(
t
,
r
)
=>
(<
><
span
className=
{
accountStatusMap
[
t
][
'className'
]
}
></
span
>
{
accountStatusMap
[
t
][
'title'
]
}
</
>)
},
{
title
:
'账户余额'
,
...
...
@@ -80,7 +83,7 @@ const AccountLists: React.FC<{}> = () => {
title
:
'可用余额'
,
dataIndex
:
'usableBalance'
,
key
:
'usableBalance'
,
render
:
text
=>
`¥
${
text
}
`
render
:
(
t
,
r
)
=>
`¥
${
r
.
accountStatus
-
r
.
lockBalance
}
`
},
]
...
...
src/pages/payandSettle/constant.ts
View file @
02b5daa6
...
...
@@ -84,4 +84,10 @@ export const memberStatusMap = {
export
const
accountStatusMap
=
{
'1'
:
{
title
:
'正常'
,
className
:
'commonStatusValid'
},
'2'
:
{
title
:
'已冻结'
,
className
:
'commonStatusNoPass'
},
}
export
const
memberLevelTypeMap
=
{
'1'
:
'平台会员'
,
'2'
:
'商户会员'
,
'3'
:
'渠道会员'
,
}
\ No newline at end of file
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