Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
361b9556
Commit
361b9556
authored
May 09, 2022
by
许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-jinfa-0518-member' into 'jinfa-0518'
feat: 完成会员管理金发需求更改 See merge request
project/jinfa-admin!1
parents
4cc659ad
55d49c6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
120 deletions
+7
-120
index.tsx
src/pages/memberManage/memberMaintain/index.tsx
+1
-109
index.tsx
src/pages/memberManage/memberMaintain/schema/index.tsx
+6
-11
No files found.
src/pages/memberManage/memberMaintain/index.tsx
View file @
361b9556
import
React
,
{
ReactNode
,
useState
,
useRef
}
from
'react'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
Card
,
Space
,
Button
,
Menu
,
Popconfirm
,
Badge
,
message
,
}
from
'antd'
;
import
{
PlusOutlined
,
DeleteOutlined
,
ClockCircleOutlined
,
}
from
'@ant-design/icons'
;
...
...
@@ -24,14 +18,6 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
moment
from
'moment'
;
import
{
MEMBER_INNER_STATUS_VERIFY_PASSED
,
MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED
,
MEMBER_INNER_STATUS_VERIFY_NOT_PASSED
,
MEMBER_INNER_STATUS_TO_BE_COMMIT
,
MEMBER_STATUS_NORMAL
,
MEMBER_SOURCE_PLATFORM
,
}
from
'@/constants/const/member'
;
import
{
importSchema
}
from
'./schema'
;
import
{
MEMBER_STATUS_TAG_MAP
,
...
...
@@ -39,7 +25,7 @@ import {
MEMBER_OUTER_STATUS_TYPE
,
}
from
'../constant'
;
import
StatusTag
from
'../components/StatusTag'
;
import
{
getMemberMaintenancePage
,
getMemberMaintenancePageitems
,
postMemberMaintenanceDelete
,
GetMemberMaintenancePageResponseDetail
}
from
'@/services/MemberV2Api'
;
import
{
getMemberMaintenancePage
,
getMemberMaintenancePageitems
,
GetMemberMaintenancePageResponseDetail
}
from
'@/services/MemberV2Api'
;
const
formActions
=
createFormActions
();
...
...
@@ -64,24 +50,6 @@ const memberMaintain: React.FC<[]> = () => {
return
{
data
:
[],
totalCount
:
0
};
};
const
handleDelete
=
(
memberId
:
number
,
validateId
:
number
)
=>
{
const
mesInstance
=
message
.
loading
({
content
:
'正在删除'
,
duration
:
0
,
});
postMemberMaintenanceDelete
({
memberId
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
ref
.
current
.
reload
();
}).
finally
(()
=>
{
mesInstance
();
});
};
const
defaultColumns
:
ColumnType
<
GetMemberMaintenancePageResponseDetail
>
[]
=
[
{
title
:
'ID'
,
...
...
@@ -161,59 +129,6 @@ const memberMaintain: React.FC<[]> = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
MEMBER_INNER_STATUS_BADGE_COLOR
[
record
.
innerStatus
]
||
'#606266'
}
text=
{
text
}
/>,
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
{
(
record
.
innerStatus
===
MEMBER_INNER_STATUS_VERIFY_PASSED
&&
record
.
outerStatus
===
MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED
)
&&
(
<
Link
to=
{
`/memberManage/manage/maintian/frozen?id=${record.memberId}&validateId=${record.validateId}`
}
>
<
Button
type=
"link"
>
{
record
.
status
===
MEMBER_STATUS_NORMAL
?
'冻结'
:
'解冻'
}
</
Button
>
</
Link
>
)
}
{
/* 平台代录入的会员资料才可以修改、删除 */
}
{
(
record
.
source
===
MEMBER_SOURCE_PLATFORM
&&
(
record
.
innerStatus
===
MEMBER_INNER_STATUS_TO_BE_COMMIT
||
record
.
innerStatus
===
MEMBER_INNER_STATUS_VERIFY_NOT_PASSED
)
)
&&
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberManage/manage/maintian/edit?id=${record.memberId}&validateId=${record.validateId}`
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
record
.
memberId
,
record
.
validateId
)
}
>
<
Button
type=
"link"
danger
>
删除
</
Button
>
</
Popconfirm
>
</>
)
}
</>
),
},
];
const
menu
=
(
...
...
@@ -259,26 +174,6 @@ const memberMaintain: React.FC<[]> = () => {
return
{};
};
const
controllerBtns
=
(
<
Space
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
`/memberManage/manage/maintian/add`
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
{
/* <Button onClick={() => setVisibleModal(true)}>导入</Button>
<Dropdown.Button
overlay={menu}
trigger={['click']}
icon={<DownOutlined />}
>
更多
</Dropdown.Button> */
}
</
Space
>
);
return
(
<
Card
>
<
StandardTable
...
...
@@ -292,9 +187,6 @@ const memberMaintain: React.FC<[]> = () => {
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
...
...
src/pages/memberManage/memberMaintain/schema/index.tsx
View file @
361b9556
...
...
@@ -17,30 +17,25 @@ export const importSchema: ISchema = {
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
tip
:
'输入 会员名称 进行搜索'
,
align
:
'flex-start'
,
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'
flex-l
ayout'
,
'x-component'
:
'
Mega-L
ayout'
,
'x-component-props'
:
{
colStyle
:
{
marginLeft
:
20
,
},
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
},
properties
:
{
memberTypeId
:
{
...
...
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