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
黄庭坚
jinfa-platform
Commits
d8272dd2
Commit
d8272dd2
authored
Jan 05, 2022
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 业务请款选择会员逻辑填充
parent
13b4fa4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
index.tsx
...ce/businessRequestFunds/components/memberDrawer/index.tsx
+19
-14
No files found.
src/pages/balance/businessRequestFunds/components/memberDrawer/index.tsx
View file @
d8272dd2
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
{
Drawer
,
Button
,
message
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
createFormActions
}
from
'@formily/antd'
// import { getSettleAccountsBusinessReconciliationToReconciliationList } from '@/services/Settle
V2Api'
import
{
postMemberManageLowerProviderPage
}
from
'@/services/Member
V2Api'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
NiceForm
from
'@/components/NiceForm'
import
{
getIntl
}
from
'umi'
;
...
...
@@ -11,18 +11,21 @@ import { getIntl } from 'umi';
interface
MemberDrawerProps
{
visible
:
boolean
,
onClose
?:
()
=>
void
,
onOk
?:
(
record
:
any
)
=>
void
}
const
intl
=
getIntl
();
const
formActions
=
createFormActions
();
const
MemberDrawer
:
React
.
FC
<
MemberDrawerProps
>
=
(
props
:
MemberDrawerProps
)
=>
{
const
{
visible
,
onClose
}
=
props
;
const
{
visible
,
onClose
,
onOk
}
=
props
;
const
ref
=
useRef
<
any
>
({})
const
[
selectedRow
,
setSelectedRow
]
=
useState
<
any
>
({})
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
}
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationToReconciliationList
(
_params
)
const
{
data
}
=
await
postMemberManageLowerProviderPage
(
_params
)
message
.
destroy
();
return
data
;
}
...
...
@@ -32,24 +35,25 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
dataIndex
:
'memberId'
,
},
{
title
:
'会员名称'
,
key
:
'
memberN
ame'
,
dataIndex
:
'
memberN
ame'
,
key
:
'
n
ame'
,
dataIndex
:
'
n
ame'
,
},
{
title
:
'会员类型'
,
key
:
'memberType'
,
dataIndex
:
'memberType'
,
key
:
'memberType
Name
'
,
dataIndex
:
'memberType
Name
'
,
},
{
title
:
'会员角色'
,
key
:
'
memberRol
e'
,
dataIndex
:
'
memberRol
e'
,
key
:
'
roleNam
e'
,
dataIndex
:
'
roleNam
e'
,
},
{
title
:
'会员等级'
,
key
:
'
memberLevel
'
,
dataIndex
:
'
memberLevel
'
,
key
:
'
levelTag
'
,
dataIndex
:
'
levelTag
'
,
}];
const
handleSelectChange
=
(
record
,
selected
,
selectedRow
,
nativeEvent
)
=>
{
setSelectedRowKeys
([
record
.
id
]);
setSelectedRow
(
record
)
};
...
...
@@ -66,7 +70,7 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'balance.quxiao'
})
}
</
Button
>
<
Button
onClick=
{
onClose
}
type=
"primary"
>
<
Button
onClick=
{
()
=>
{
onOk
?.(
selectedRow
)
}
}
type=
"primary"
>
{
'确定'
}
</
Button
>
</
div
>
...
...
@@ -74,7 +78,7 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
>
<
StandardTable
keepAlive=
{
false
}
//
fetchTableData={params => loadingTableData(params)}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"id"
...
...
@@ -102,6 +106,7 @@ const MemberDrawer: React.FC<MemberDrawerProps> = (props: MemberDrawerProps) =>
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'请输入会员名称'
,
advanced
:
false
,
align
:
'flex-start'
,
},
},
...
...
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