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
49848366
Commit
49848366
authored
Dec 17, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改结算试用会员
parent
39548e5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
17 deletions
+21
-17
info.tsx
src/pages/balance/settleRules/memberSettle/info.tsx
+14
-9
index.tsx
src/pages/balance/settleRules/memberSettle/schema/index.tsx
+7
-8
No files found.
src/pages/balance/settleRules/memberSettle/info.tsx
View file @
49848366
...
...
@@ -49,7 +49,7 @@ const common_columns: any = [
]
const
MemberSettleAdd
:
React
.
FC
=
()
=>
{
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'
i
d'
});
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'
uniqueI
d'
});
const
[
initialValue
,
setInitialValue
]
=
useState
({});
const
{
id
,
preview
}
=
usePageStatus
();
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
...
...
@@ -77,7 +77,7 @@ const MemberSettleAdd: React.FC = () => {
title
:
'操作'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
onClick=
{
()
=>
handleRemove
(
record
.
member
Id
)
}
>
删除
</
div
>
<
div
onClick=
{
()
=>
handleRemove
(
record
.
unique
Id
)
}
>
删除
</
div
>
)
}
}
...
...
@@ -102,7 +102,11 @@ const MemberSettleAdd: React.FC = () => {
const
fetchMemberData
=
async
(
params
:
any
)
=>
{
//member/manage/lower/page/bynamerole
const
{
data
}
=
await
PublicApi
.
getMemberManageLowerPageBynamerole
(
params
);
return
data
return
{
...
data
,
data
:
data
.
data
.
map
((
v
)
=>
({...
v
,
uniqueId
:
v
.
memberId
+
"_"
+
v
.
roleId
})),
totalCount
:
data
.
totalCount
}
}
// 获取适用会员下拉搜索框
...
...
@@ -155,11 +159,11 @@ const MemberSettleAdd: React.FC = () => {
const
handleRemove
=
(
id
:
number
)
=>
{
const
string
=
'Tabs.memberTab.someLists'
;
const
chooseList
=
formActions
.
getFieldValue
(
string
);
const
res
=
chooseList
.
filter
((
item
)
=>
item
.
member
Id
!==
id
);
const
res
=
chooseList
.
filter
((
item
)
=>
item
.
unique
Id
!==
id
);
formActions
.
setFieldValue
(
string
,
res
);
// 必须设置key
memberRowCtl
.
setSelectRow
(
res
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
map
((
item
)
=>
item
.
member
Id
))
memberRowCtl
.
setSelectedRowKeys
(
res
.
map
((
item
)
=>
item
.
unique
Id
))
}
// 从PAAS平台--规则配置--平台规则配置取已勾选的结算方式决定是否显示结算方式
...
...
@@ -188,10 +192,11 @@ const MemberSettleAdd: React.FC = () => {
otherValues
:
[
res
.
data
.
settlementDays
,
res
.
data
.
settlementDate
],
}
})
formActions
.
setFieldValue
(
'Tabs.memberTab.someLists'
,
res
.
data
.
memberList
);
const
list
=
res
.
data
.
memberList
.
map
((
item
)
=>
({...
item
,
uniqueId
:
item
.
memberId
+
"_"
+
item
.
roleId
}))
formActions
.
setFieldValue
(
'Tabs.memberTab.someLists'
,
list
);
// 必须设置key
memberRowCtl
.
setSelectRow
(
res
.
data
.
memberL
ist
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
data
.
memberList
.
map
((
item
)
=>
item
.
memberId
))
memberRowCtl
.
setSelectRow
(
l
ist
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
data
.
memberList
.
map
((
item
)
=>
item
.
memberId
+
"_"
+
item
.
roleId
))
}
else
{
message
.
error
({
content
:
res
.
message
})
}
...
...
@@ -238,7 +243,7 @@ const MemberSettleAdd: React.FC = () => {
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberData
(
params
)
}
tableProps=
{
{
rowKey
:
'
i
d'
,
rowKey
:
'
uniqueI
d'
,
}
}
formilyProps=
{
{
...
...
src/pages/balance/settleRules/memberSettle/schema/index.tsx
View file @
49848366
...
...
@@ -27,13 +27,13 @@ export const indexSchema = {
},
},
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
type
:
'string'
,
'x-component'
:
'Search'
,
"x-mega-props"
:
{
"span"
:
2
},
'x-component-props'
:
{
placeholder
:
'搜索'
,
placeholder
:
'搜索'
,
advanced
:
false
,
},
},
...
...
@@ -44,7 +44,7 @@ export const indexSchema = {
/**
* 新增会员结算策略schema
*
*
*/
export
const
addSchema
=
{
...
...
@@ -129,7 +129,7 @@ export const addSchema = {
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
rowKey
:
'
member
Id'
,
rowKey
:
'
unique
Id'
,
prefix
:
"{{tableAddButton}}"
,
columns
:
"{{tableColumns}}"
// columns: "{{tableColumns}}",
...
...
@@ -176,7 +176,7 @@ export const memberSchema = {
style
:
{
width
:
'200px'
}
}
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
...
...
@@ -189,4 +189,4 @@ export const memberSchema = {
}
}
}
}
\ 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