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
2e97b30c
Commit
2e97b30c
authored
Sep 03, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接后台补充的接口
parent
90736543
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
561 additions
and
200 deletions
+561
-200
memberRoute.ts
config/routes/memberRoute.ts
+11
-4
index.ts
src/constants/index.ts
+28
-0
menu.ts
src/locales/zh-CN/menu.ts
+4
-3
index.tsx
src/pages/member/components/AuditProcess/index.tsx
+10
-3
index.tsx
src/pages/member/components/FlowRecords/index.tsx
+18
-7
index.tsx
src/pages/member/components/LevelInfo/index.tsx
+1
-5
index.less
src/pages/member/components/StatusTag/index.less
+6
-0
index.tsx
src/pages/member/components/StatusTag/index.tsx
+1
-1
constant.tsx
src/pages/member/constant.tsx
+56
-3
addMember.tsx
src/pages/member/memberImport/addMember.tsx
+49
-30
index.tsx
src/pages/member/memberImport/index.tsx
+76
-97
frozen.less
src/pages/member/memberMaintain/frozen.less
+0
-0
frozen.tsx
src/pages/member/memberMaintain/frozen.tsx
+199
-0
index.tsx
src/pages/member/memberMaintain/index.tsx
+57
-28
index.tsx
src/pages/member/memberMaintain/schema/index.tsx
+1
-1
index.tsx
src/pages/member/memberQuery/detailed/index.tsx
+44
-18
No files found.
config/routes/memberRoute.ts
View file @
2e97b30c
...
...
@@ -51,6 +51,13 @@ const MemberRoute = {
component
:
'@/pages/member/memberMaintain/maintainDetail'
,
},
{
path
:
'/memberCenter/memberAbility/manage/frozen'
,
name
:
'maintainFrozen'
,
key
:
'maintainFrozen'
,
hideInMenu
:
true
,
component
:
'@/pages/member/memberMaintain/frozen'
,
},
{
path
:
'/memberCenter/memberAbility/manage/memberPrSubmit'
,
name
:
'memberPrSubmit'
,
key
:
'memberPrSubmit'
,
...
...
@@ -136,10 +143,10 @@ const MemberRoute = {
component
:
'@/pages/member/memberQuery/detailed'
,
hideInMenu
:
true
,
routes
:
[
{
path
:
'/memberCenter/memberAbility/query/detailed'
,
redirect
:
'/memberCenter/memberAbility/query/detailed/basicInfo'
,
},
//
{
//
path: '/memberCenter/memberAbility/query/detailed',
//
redirect: '/memberCenter/memberAbility/query/detailed/basicInfo',
//
},
{
path
:
'/memberCenter/memberAbility/query/detailed/basicInfo'
,
name
:
'basicInfo'
,
...
...
src/constants/index.ts
View file @
2e97b30c
...
...
@@ -208,6 +208,34 @@ export const MEMBER_TYPE = {
[
MEMBER_TYPE_CHANNEL_INDIVIDUAL
]:
'渠道个人会员'
,
};
// 会员内部状态
export
const
MEMBER_INNER_STATUS_REGISTERED
=
0
;
// 申请注册(已注册)
export
const
MEMBER_INNER_STATUS_UNCOMMITTED
=
1
;
// 待提交审核
export
const
MEMBER_INNER_STATUS_UNREVIEWED_1
=
2
;
// 待一级审核
export
const
MEMBER_INNER_STATUS_UNREVIEWED_2
=
3
;
// 待二级审核
export
const
MEMBER_INNER_STATUS_FAILED
=
4
;
// 审核不通过
export
const
MEMBER_INNER_STATUS_SUCCESS
=
5
;
// 审核通过
export
const
MEMBER_INNER_STATUS
=
{
[
MEMBER_INNER_STATUS_REGISTERED
]:
'申请注册'
,
[
MEMBER_INNER_STATUS_UNCOMMITTED
]:
'待提交审核'
,
[
MEMBER_INNER_STATUS_UNREVIEWED_1
]:
'待一级审核'
,
[
MEMBER_INNER_STATUS_UNREVIEWED_2
]:
'待二级审核'
,
[
MEMBER_INNER_STATUS_FAILED
]:
'审核不通过'
,
[
MEMBER_INNER_STATUS_SUCCESS
]:
'审核通过'
,
};
// 会员外部状态
export
const
MEMBER_OUTER_STATUS_UNCOMMITTED
=
0
;
// 待提交审核
export
const
MEMBER_OUTER_STATUS_UNREVIEWED
=
1
;
// 待审核
export
const
MEMBER_OUTER_STATUS_FAILED
=
2
;
// 审核不通过
export
const
MEMBER_OUTER_STATUS_SUCCESS
=
3
;
// 审核通过
export
const
MEMBER_OUTER_STATUS
=
{
[
MEMBER_OUTER_STATUS_UNCOMMITTED
]:
'待提交'
,
[
MEMBER_OUTER_STATUS_UNREVIEWED
]:
'待审核'
,
[
MEMBER_OUTER_STATUS_FAILED
]:
'审核不通过'
,
[
MEMBER_OUTER_STATUS_SUCCESS
]:
'审核通过'
,
};
export
const
ORDER_TYPE
=
[
''
,
'询价采购'
,
'需求采购'
,
...
...
src/locales/zh-CN/menu.ts
View file @
2e97b30c
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors:
LeeJianc
ong
* @LastEditTime: 2020-09-0
2 15:11:21
* @LastEditors:
XieZhiXi
ong
* @LastEditTime: 2020-09-0
3 09:56:52
*/
export
default
{
...
...
@@ -74,7 +74,8 @@ export default {
'menu.memberAbility.memberManage.memberUpgradeRule'
:
'会员升级规则'
,
'menu.memberAbility.memberManage.memberLevel'
:
'会员等级'
,
'menu.memberAbility.memberManage.addEquity'
:
'会员权益设置'
,
'menu.memberAbility.memberManage.maintainDetail'
:
'未命名'
,
'menu.memberAbility.memberManage.maintainDetail'
:
'会员详情'
,
'menu.memberAbility.memberManage.maintainFrozen'
:
'会员冻结与解除'
,
'menu.memberAbility.memberQuery'
:
'会员信息查询'
,
'menu.memberAbility.memberQueryDetailed'
:
'会员信息详情'
,
'menu.memberAbility.memberQueryDetailed.basicInfo'
:
'会员基本信息'
,
...
...
src/pages/member/components/AuditProcess/index.tsx
View file @
2e97b30c
...
...
@@ -7,15 +7,22 @@ import MellowCard from '@/components/MellowCard';
import
styles
from
'./index.less'
;
interface
AuditProcessProp
{
outerVerifyCurrent
?:
number
;
innerVerifyCurrent
?:
number
;
outerVerifySteps
?:
{
step
:
number
,
stepName
:
string
,
roleName
:
string
}[];
innerVerifySteps
?:
{
step
:
number
,
stepName
:
string
,
roleName
:
string
}[];
};
const
AuditProcess
:
React
.
FC
<
AuditProcessProp
>
=
({
outerVerifySteps
=
[],
innerVerifySteps
=
[]
})
=>
(
const
AuditProcess
:
React
.
FC
<
AuditProcessProp
>
=
({
outerVerifyCurrent
=
0
,
innerVerifyCurrent
=
0
,
outerVerifySteps
=
[],
innerVerifySteps
=
[],
})
=>
(
<
MellowCard
>
<
Tabs
onChange=
{
()
=>
{}
}
>
<
Tabs
.
TabPane
tab=
"外部审核流程"
key=
"1"
>
<
Steps
style=
{
{
marginTop
:
30
}
}
progressDot
current=
{
2
}
>
<
Steps
style=
{
{
marginTop
:
30
}
}
progressDot
current=
{
outerVerifyCurrent
}
>
{
outerVerifySteps
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
step
}
...
...
@@ -26,7 +33,7 @@ const AuditProcess: React.FC<AuditProcessProp> = ({ outerVerifySteps = [], inner
</
Steps
>
</
Tabs
.
TabPane
>
<
Tabs
.
TabPane
tab=
"内部审核流程"
key=
"2"
>
<
Steps
style=
{
{
marginTop
:
30
}
}
progressDot
current=
{
2
}
>
<
Steps
style=
{
{
marginTop
:
30
}
}
progressDot
current=
{
innerVerifyCurrent
}
>
{
innerVerifySteps
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
step
}
...
...
src/pages/member/components/FlowRecords/index.tsx
View file @
2e97b30c
...
...
@@ -7,7 +7,12 @@ import { STATUS_COLOR_MAP, STATUS_COLOR_TXT } from '../../constant';
import
PolymericTable
from
'@/components/PolymericTable'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
{
MEMBER_STATUS_TAG_MAP
,
MEMBER_INNER_STATUS_BADGE_COLOR
,
MEMBER_OUTER_STATUS_BADGE_COLOR
,
MEMBER_OUTER_STATUS_TYPE
,
}
from
'../../constant'
;
import
styles
from
'./index.less'
;
export
interface
InnerHistoryItem
{
...
...
@@ -19,6 +24,7 @@ export interface InnerHistoryItem {
operation
?:
string
;
innerStatusName
?:
string
;
remark
?:
string
;
innerStatus
?:
string
;
};
export
interface
OuterHistoryItem
{
...
...
@@ -28,6 +34,7 @@ export interface OuterHistoryItem {
operatorRoleName
?:
string
;
remark
?:
string
;
statusDescription
?:
string
;
status
?:
number
,
};
interface
FlowRecordsProps
{
...
...
@@ -37,7 +44,7 @@ interface FlowRecordsProps {
const
FlowRecords
:
React
.
FC
<
FlowRecordsProps
>
=
({
outerHistory
=
[],
innerHistory
=
[]
})
=>
{
const
c
olumns
:
EditableColumns
[]
=
[
const
outerC
olumns
:
EditableColumns
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'index'
,
...
...
@@ -53,7 +60,9 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
title
:
'状态'
,
dataIndex
:
'statusDescription'
,
align
:
'center'
,
render
:
text
=>
<
Badge
color=
{
STATUS_COLOR_MAP
[
text
]
}
text=
{
STATUS_COLOR_TXT
[
text
]
}
/>,
render
:
(
text
,
record
)
=>
(
<
Badge
color=
{
MEMBER_OUTER_STATUS_BADGE_COLOR
[
record
.
status
]
}
text=
{
text
}
/>
),
},
{
title
:
'操作'
,
...
...
@@ -74,7 +83,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
},
];
const
columns2
:
EditableColumns
[]
=
[
const
innerColumns
:
EditableColumns
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'index'
,
...
...
@@ -100,7 +109,9 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
title
:
'状态'
,
dataIndex
:
'innerStatusName'
,
align
:
'center'
,
render
:
text
=>
<
Badge
color=
{
STATUS_COLOR_MAP
[
text
]
}
text=
{
text
}
/>,
render
:
(
text
,
record
)
=>
(
<
Badge
color=
{
MEMBER_INNER_STATUS_BADGE_COLOR
[
record
.
innerStatus
]
}
text=
{
text
}
/>
),
},
{
title
:
'操作'
,
...
...
@@ -127,7 +138,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
<
Tabs
.
TabPane
tab=
"流转记录"
key=
"1"
>
<
PolymericTable
dataSource=
{
outerHistory
}
columns=
{
c
olumns
}
columns=
{
outerC
olumns
}
loading=
{
false
}
pagination=
{
null
}
/>
...
...
@@ -135,7 +146,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
<
Tabs
.
TabPane
tab=
"内部单据流转记录"
key=
"2"
>
<
PolymericTable
dataSource=
{
innerHistory
}
columns=
{
columns2
}
columns=
{
innerColumns
}
loading=
{
false
}
pagination=
{
null
}
/>
...
...
src/pages/member/components/LevelInfo/index.tsx
View file @
2e97b30c
...
...
@@ -12,14 +12,10 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import
MellowCard
from
'@/components/MellowCard'
;
import
styles
from
'./index.less'
;
interface
Page
Props
{
interface
LevelInfo
Props
{
detailData
:
any
;
}
function
fixedZero
(
val
:
number
)
{
return
val
*
1
<
10
?
`0
${
val
}
`
:
val
;
}
function
getActiveData
()
{
const
activeData
=
[];
for
(
let
i
=
0
;
i
<
12
;
i
+=
1
)
{
...
...
src/pages/member/components/StatusTag/index.less
View file @
2e97b30c
...
...
@@ -26,4 +26,9 @@
color: #E63F3B;
background: #FFEBE6;
}
&__primary {
color: #3F7ED2;
background: #F0F8FF;
}
}
\ No newline at end of file
src/pages/member/components/StatusTag/index.tsx
View file @
2e97b30c
...
...
@@ -10,7 +10,7 @@ import classNames from 'classnames';
import
styles
from
'./index.less'
;
interface
StatusTagProps
{
type
:
'success'
|
'warnning'
|
'default'
|
'danger'
;
type
:
'success'
|
'warnning'
|
'default'
|
'danger'
|
'primary'
;
title
:
string
;
};
...
...
src/pages/member/constant.tsx
View file @
2e97b30c
import
{
MEMBER_STATUS_NORMAL
,
MEMBER_STATUS_FROZEN
}
from
'@/constants'
;
import
{
MEMBER_STATUS_NORMAL
,
MEMBER_STATUS_FROZEN
,
MEMBER_INNER_STATUS_REGISTERED
,
MEMBER_INNER_STATUS_UNCOMMITTED
,
MEMBER_INNER_STATUS_UNREVIEWED_1
,
MEMBER_INNER_STATUS_UNREVIEWED_2
,
MEMBER_INNER_STATUS_FAILED
,
MEMBER_INNER_STATUS_SUCCESS
,
MEMBER_OUTER_STATUS_UNCOMMITTED
,
MEMBER_OUTER_STATUS_UNREVIEWED
,
MEMBER_OUTER_STATUS_FAILED
,
MEMBER_OUTER_STATUS_SUCCESS
,
}
from
'@/constants'
;
export
const
STATUS_COLOR_MAP
=
{
0
:
'#669EDE'
,
...
...
@@ -12,7 +27,44 @@ export const STATUS_COLOR_TXT = {
2
:
'冻结'
,
};
// 会员状态 StatusTag map
export
const
MEMBER_STATUS_TAG_MAP
=
{
MEMBER_STATUS_NORMAL
:
'default'
,
MEMBER_STATUS_FROZEN
:
'success'
[
MEMBER_STATUS_NORMAL
]:
'success'
,
[
MEMBER_STATUS_FROZEN
]:
'default'
};
// 会员内部状态 StatusTag map
export
const
MEMBER_INNER_STATUS_TYPE
=
{
[
MEMBER_INNER_STATUS_REGISTERED
]:
'default'
,
[
MEMBER_INNER_STATUS_UNCOMMITTED
]:
'primary'
,
[
MEMBER_INNER_STATUS_UNREVIEWED_1
]:
'warnning'
,
[
MEMBER_INNER_STATUS_UNREVIEWED_2
]:
'warnning'
,
[
MEMBER_INNER_STATUS_FAILED
]:
'danger'
,
[
MEMBER_INNER_STATUS_SUCCESS
]:
'success'
,
};
// 会员外部状态 StatusTag map
export
const
MEMBER_OUTER_STATUS_TYPE
=
{
[
MEMBER_OUTER_STATUS_UNCOMMITTED
]:
'primary'
,
[
MEMBER_OUTER_STATUS_UNREVIEWED
]:
'warnning'
,
[
MEMBER_OUTER_STATUS_FAILED
]:
'danger'
,
[
MEMBER_OUTER_STATUS_SUCCESS
]:
'success'
,
};
// 会员内部状态 Tag badge map
export
const
MEMBER_INNER_STATUS_BADGE_COLOR
=
{
[
MEMBER_INNER_STATUS_REGISTERED
]:
'#42526E'
,
[
MEMBER_INNER_STATUS_UNCOMMITTED
]:
'#3F7ED2'
,
[
MEMBER_INNER_STATUS_UNREVIEWED_1
]:
'#FF991F'
,
[
MEMBER_INNER_STATUS_UNREVIEWED_2
]:
'#FF991F'
,
[
MEMBER_INNER_STATUS_FAILED
]:
'#E63F3B'
,
[
MEMBER_INNER_STATUS_SUCCESS
]:
'#00B37A'
,
};
// 会员外部状态 Tag badge map
export
const
MEMBER_OUTER_STATUS_BADGE_COLOR
=
{
[
MEMBER_OUTER_STATUS_UNCOMMITTED
]:
'#3F7ED2'
,
[
MEMBER_OUTER_STATUS_UNREVIEWED
]:
'#FF991F'
,
[
MEMBER_OUTER_STATUS_FAILED
]:
'#E63F3B'
,
[
MEMBER_OUTER_STATUS_SUCCESS
]:
'#00B37A'
,
};
\ No newline at end of file
src/pages/member/memberImport/addMember.tsx
View file @
2e97b30c
...
...
@@ -19,12 +19,8 @@ import { initDetailSchema } from './schema';
const
formActions
=
createFormActions
();
const
{
onFormInit$
,
onFormInitialValueChange$
,
onFieldValueChange$
,
onFieldInit$
,
onFieldInputChange$
,
onFieldInitialValueChange$
,
}
=
FormEffectHooks
;
const
addMember
:
React
.
FC
<
any
>
=
props
=>
{
...
...
@@ -36,7 +32,7 @@ const addMember: React.FC<any> = props => {
const
getDetailedInfo
=
()
=>
{
if
(
id
&&
validateId
)
{
setInfoLoading
(
fals
e
);
setInfoLoading
(
tru
e
);
PublicApi
.
getMemberAbilitySubGet
({
memberId
:
id
,
validateId
,
...
...
@@ -63,6 +59,8 @@ const addMember: React.FC<any> = props => {
}
}
console
.
log
(
'detail'
,
detail
)
setMemberInfo
({
memberTypeId
:
memberTypeEnum
,
...
rest
,
...
...
@@ -80,7 +78,6 @@ const addMember: React.FC<any> = props => {
},
[]);
const
handleSubmit
=
(
values
:
any
)
=>
{
setSubmitLoading
(
true
);
const
{
memberTypeId
,
roleId
,
...
...
@@ -95,29 +92,51 @@ const addMember: React.FC<any> = props => {
...
rest
}
=
values
;
PublicApi
.
postMemberAbilitySubAdd
({
memberTypeId
,
roleId
,
levelId
,
countryCodeId
,
phone
,
email
,
channelTypeId
,
areas
,
remark
,
detail
:
rest
,
},
{
ctlType
:
'none'
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
message
.
success
(
!
id
?
'保存成功'
:
'修改'
);
history
.
replace
(
'/memberCenter/memberAbility/manage/import'
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
if
(
!
id
)
{
setSubmitLoading
(
true
);
PublicApi
.
postMemberAbilitySubAdd
({
memberTypeId
,
roleId
,
levelId
,
countryCodeId
,
phone
,
email
,
channelTypeId
,
areas
,
remark
,
detail
:
rest
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
history
.
replace
(
'/memberCenter/memberAbility/manage/import'
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
else
{
setSubmitLoading
(
true
);
PublicApi
.
postMemberAbilitySubUpdate
({
memberId
:
id
,
validateId
,
memberTypeId
,
roleId
,
levelId
,
countryCodeId
,
phone
,
email
,
channelTypeId
,
areas
,
remark
,
detail
:
rest
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
history
.
replace
(
'/memberCenter/memberAbility/manage/import'
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
};
// 会员类型、注册手机下拉框
...
...
@@ -289,7 +308,7 @@ const addMember: React.FC<any> = props => {
loading=
{
submitLoading
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
{
!
id
?
'保存'
:
'修改'
}
保存
</
Button
>,
]
}
>
...
...
src/pages/member/memberImport/index.tsx
View file @
2e97b30c
...
...
@@ -7,8 +7,6 @@ import {
Menu
,
Popconfirm
,
Dropdown
,
Badge
,
Modal
,
}
from
'antd'
;
import
{
PlusOutlined
,
...
...
@@ -18,18 +16,23 @@ import {
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
UploadModal
from
'@/components/UploadModal'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
importSchema
,
auditModalSchema
}
from
'./schema'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMemberAbilitySubPageitemsResponse
}
from
'@/services/MemberApi'
;
import
{
MEMBER_OUTER_STATUS
,
MEMBER_OUTER_STATUS_UNCOMMITTED
,
MEMBER_OUTER_STATUS_SUCCESS
,
}
from
'@/constants'
;
import
StatusTag
from
'../components/StatusTag'
;
import
{
importSchema
,
auditModalSchema
}
from
'./schema'
;
import
{
coverColFiltersItem
}
from
'../utils'
;
import
{
MEMBER_OUTER_STATUS_TYPE
,
MEMBER_STATUS_TAG_MAP
}
from
'../constant'
;
const
formActions
=
createFormActions
();
...
...
@@ -42,8 +45,30 @@ const memberMaintain: React.FC<[]> = () => {
const
ref
=
useRef
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([]);
const
[
visibleModal
,
setVisibleModal
]
=
useState
(
false
);
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
currentItem
,
setCurrentItem
]
=
useState
<
any
>
({});
const
handleDelete
=
(
memberId
:
number
,
validateId
:
number
)
=>
{
PublicApi
.
postMemberAbilitySubDelete
({
memberId
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
ref
.
current
.
reload
();
});
};
const
handleCommit
=
(
memberId
:
number
,
validateId
:
number
)
=>
{
PublicApi
.
postMemberAbilitySubCommit
({
memberId
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
ref
.
current
.
reload
();
});
};
const
defaultColumns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -97,14 +122,9 @@ const memberMaintain: React.FC<[]> = () => {
dataIndex
:
'statusName'
,
align
:
'center'
,
filters
:
[],
// filteredValue: searchForm.memberStatus || ['0'],
filterMultiple
:
false
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
handleConfirm=
{
()
=>
handleModify
(
record
)
}
record=
{
record
}
fieldNames=
"status"
/>
onFilter
:
(
value
,
record
)
=>
record
.
status
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
{
MEMBER_STATUS_TAG_MAP
[
record
.
status
]
}
title=
{
text
}
/>
),
},
{
...
...
@@ -112,9 +132,10 @@ const memberMaintain: React.FC<[]> = () => {
dataIndex
:
'outerStatusName'
,
align
:
'center'
,
filters
:
[],
// filteredValue: searchForm.outerStatus || ['0'],
filterMultiple
:
false
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
span
>
{
text
}
</
span
>,
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
_
,
record
)
=>
(
<
StatusTag
type=
{
MEMBER_OUTER_STATUS_TYPE
[
record
.
outerStatus
]
}
title=
{
MEMBER_OUTER_STATUS
[
record
.
outerStatus
]
}
/>
),
},
{
title
:
'操作'
,
...
...
@@ -122,32 +143,41 @@ const memberMaintain: React.FC<[]> = () => {
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
{
/* {record.innerStatusName === '审核通过' ? (
<Button
type="link"
onClick={() => {
setCurrentItem(record), setModalVisible(true);
}}
style={{ color: '#00B37A' }}
>
{record.status === 1 ? '解冻' : '冻结'}
</Button>
) : (
''
)} */
}
<>
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/memberAbility/manage/addMember?id=${record.memberId}&validateId=${record.validateId}`
)
}
{
/* 外部审核状态等于 待提交 可进行提交、及编辑操作 */
}
{
record
.
outerStatus
===
MEMBER_OUTER_STATUS_UNCOMMITTED
&&
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
handleCommit
(
record
.
memberId
,
record
.
validateId
)
}
>
提交审核
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/memberAbility/manage/addMember?id=${record.memberId}&validateId=${record.validateId}`
)
}
>
编辑
</
Button
>
</>
)
}
{
/* 外部审核状态不等于 审核通过 可进行删除操作 */
}
{
record
.
outerStatus
!==
MEMBER_OUTER_STATUS_SUCCESS
&&
(
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
record
.
memberId
,
record
.
validateId
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
>
删除
</
Button
>
<
Button
type=
"link"
danger
>
删除
</
Button
>
</
Popconfirm
>
</>
)
}
</>
),
},
...
...
@@ -170,36 +200,6 @@ const memberMaintain: React.FC<[]> = () => {
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
// 更改会员状态
const
handleModify
=
record
=>
{
PublicApi
.
postMemberMaintenanceStatus
({
memberId
:
record
.
memberId
,
validateId
:
record
.
validateId
,
status
:
record
.
status
===
1
?
0
:
1
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
return
ref
.
current
.
reload
();
});
};
// 冻结与解冻
const
handleSubmit
=
(
values
:
any
,
type
?:
string
)
=>
{
if
(
!
type
)
{
PublicApi
.
postMemberMaintenanceStatus
({
memberId
:
currentItem
.
memberId
,
validateId
:
currentItem
.
validateId
,
status
:
currentItem
.
status
,
remark
:
values
.
remark
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setModalVisible
(
false
);
}
});
}
else
{
setModalVisible
(
false
);
}
};
const
handleMenuClick
=
(
e
:
any
)
=>
{
console
.
log
(
'menu'
,
e
);
};
...
...
@@ -215,16 +215,16 @@ const memberMaintain: React.FC<[]> = () => {
memberTypes
=
[],
memberRoles
=
[],
memberLevels
=
[],
status
=
[],
}
=
data
;
const
newColumns
=
columns
.
slice
();
// filter 0 过滤掉全部选项
// 这里接口缺少会员状态哦
coverColFiltersItem
(
newColumns
,
'statusName'
,
[]
.
map
(
item
=>
({
text
:
item
.
text
,
value
:
item
.
id
})).
filter
(
item
=>
item
.
value
!==
0
),
status
.
map
(
item
=>
({
text
:
item
.
text
,
value
:
item
.
id
})).
filter
(
item
=>
item
.
value
!==
0
),
);
coverColFiltersItem
(
newColumns
,
...
...
@@ -271,7 +271,6 @@ const memberMaintain: React.FC<[]> = () => {
<
StandardTable
tableProps=
{
{
rowKey
:
'memberId'
,
// onChange: (pagination: any, filter: any) => handleSearch(filter),
}
}
columns=
{
columns
}
currentRef=
{
ref
}
...
...
@@ -300,27 +299,7 @@ const memberMaintain: React.FC<[]> = () => {
/>
}
/>
<
Modal
title=
{
currentItem
.
status
===
1
?
'会员解冻'
:
'会员冻结'
}
visible=
{
modalVisible
}
onOk=
{
()
=>
formActions
.
submit
()
}
onCancel=
{
()
=>
handleSubmit
(
false
,
'cancel'
)
}
destroyOnClose
>
<
NiceForm
previewPlaceholder=
"' '"
effects=
{
(
$
,
{
setFieldState
})
=>
{
FormEffectHooks
.
onFieldValueChange$
(
'agree'
).
subscribe
(
state
=>
{
setFieldState
(
'reason'
,
targetState
=>
{
targetState
.
visible
=
state
.
value
!=
1
;
});
});
}
}
onSubmit=
{
handleSubmit
}
actions=
{
formActions
}
schema=
{
auditModalSchema
(
currentItem
)
}
/>
</
Modal
>
<
UploadModal
visibleModal=
{
visibleModal
}
fileText=
"会员资料"
...
...
src/pages/member/memberMaintain/frozen.less
0 → 100644
View file @
2e97b30c
src/pages/member/memberMaintain/frozen.tsx
0 → 100644
View file @
2e97b30c
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeader
,
Tag
,
Descriptions
,
Button
,
Modal
,
Badge
,
Spin
}
from
'antd'
;
import
{
SettingOutlined
,
StopOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
STATUS_COLOR_MAP
,
STATUS_COLOR_TXT
}
from
'../constant'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMemberAbilityMaintenanceDetailBasicResponse
}
from
'@/services/MemberApi'
;
import
{
MEMBER_STATUS_NORMAL
,
MEMBER_STATUS_FROZEN
,
MEMBER_OUTER_STATUS
,
}
from
'@/constants'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
auditModalSchema
}
from
'./schema'
;
import
{
MEMBER_STATUS_TAG_MAP
,
MEMBER_INNER_STATUS_BADGE_COLOR
,
MEMBER_OUTER_STATUS_TYPE
,
}
from
'../constant'
;
import
HeadInfo
from
'../components/HeadInfo'
;
import
AuditProcess
from
'../components/AuditProcess'
;
import
BasicInfo
from
'../components/BasicInfo'
;
import
StatusTag
from
'../components/StatusTag'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
Frozen
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
pageStatus
,
id
,
validateId
}
=
usePageStatus
();
const
[
basicInfo
,
setBasicInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailBasicResponse
>
(
null
);
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoaading
]
=
useState
(
false
);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
getBasicInfo
=
()
=>
{
if
(
!
id
||
!
validateId
)
{
return
;
}
setInfoLoaading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailBasic
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setBasicInfo
(
res
.
data
);
}
}).
finally
(()
=>
{
setInfoLoaading
(
false
);
});
};
useEffect
(()
=>
{
getBasicInfo
();
},
[]);
// 冻结与解冻
const
handleSubmit
=
(
values
:
{
reason
:
string
},
oldStatus
)
=>
{
setConfirmLoading
(
true
);
return
PublicApi
.
postMemberAbilityMaintenanceStatus
({
memberId
:
id
,
validateId
:
validateId
,
status
:
oldStatus
===
MEMBER_STATUS_NORMAL
?
MEMBER_STATUS_FROZEN
:
MEMBER_STATUS_NORMAL
,
reason
:
values
.
reason
||
''
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setModalVisible
(
false
);
getBasicInfo
();
}).
finally
(()
=>
{
setConfirmLoading
(
false
);
});
};
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
title=
{
<>
<
PageHeader
style=
{
{
padding
:
'0'
}
}
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
<
HeadInfo
info=
{
{
name
:
basicInfo
?.
name
,
level
:
1
,
}
}
/>
}
extra=
{
(
<>
{
basicInfo
&&
(
basicInfo
.
status
===
MEMBER_STATUS_NORMAL
?
(
<
Button
icon=
{
<
StopOutlined
/>
}
onClick=
{
()
=>
setModalVisible
(
true
)
}
>
冻结
</
Button
>
)
:
(
<
Button
type=
"primary"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
setModalVisible
(
true
)
}
>
解冻
</
Button
>
)
)
}
</>
)
}
>
<
Descriptions
size=
"small"
column=
{
3
}
style=
{
{
padding
:
'0 32px'
,
}
}
>
<
Descriptions
.
Item
label=
"会员类型"
>
{
basicInfo
?.
memberTypeName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员角色"
span=
{
2
}
>
{
basicInfo
?.
roleName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员状态"
>
<
StatusTag
type=
{
MEMBER_STATUS_TAG_MAP
[
basicInfo
?.
status
]
}
title=
{
basicInfo
?.
statusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态"
>
<
StatusTag
type=
{
MEMBER_OUTER_STATUS_TYPE
[
basicInfo
?.
outerStatus
]
}
title=
{
MEMBER_OUTER_STATUS
[
basicInfo
?.
outerStatus
]
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
MEMBER_INNER_STATUS_BADGE_COLOR
[
basicInfo
?.
innerStatus
]
}
text=
{
basicInfo
?.
innerStatusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
}
>
<
div
style=
{
{
marginBottom
:
24
,
}
}
>
<
AuditProcess
outerVerifyCurrent=
{
basicInfo
?.
currentOuterStep
}
innerVerifyCurrent=
{
basicInfo
?.
currentInnerStep
}
outerVerifySteps=
{
basicInfo
?.
outerVerifySteps
}
innerVerifySteps=
{
basicInfo
?.
innerVerifySteps
}
/>
</
div
>
<
BasicInfo
basic=
{
{
account
:
basicInfo
?.
account
,
phone
:
basicInfo
?.
phone
,
email
:
basicInfo
?.
email
,
created
:
basicInfo
?.
createTime
,
}
}
channel=
{
{
memberType
:
basicInfo
?.
memberTypeEnum
,
level
:
basicInfo
?.
channelLevelTag
,
type
:
basicInfo
?.
channelTypeName
,
areas
:
basicInfo
?.
areas
,
desc
:
basicInfo
?.
remark
,
}
}
extra=
{
basicInfo
?.
groups
}
outerHistory=
{
basicInfo
?.
outerHistory
}
innerHistory=
{
basicInfo
?.
innerHistory
}
/>
<
Modal
title=
{
basicInfo
?
basicInfo
.
status
===
MEMBER_STATUS_NORMAL
?
'会员冻结'
:
'会员解冻'
:
''
}
visible=
{
modalVisible
}
confirmLoading=
{
confirmLoading
}
onOk=
{
()
=>
formActions
.
submit
()
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
destroyOnClose
>
<
NiceForm
previewPlaceholder=
"' '"
effects=
{
(
$
,
{
setFieldState
})
=>
{
FormEffectHooks
.
onFieldInit$
(
'reason'
).
subscribe
(
state
=>
{
setFieldState
(
'reason'
,
fieldState
=>
{
fieldState
.
props
.
title
=
basicInfo
?
`会员${basicInfo.status === MEMBER_STATUS_NORMAL ? '冻结' : '解冻'}原因`
:
''
;
});
});
}
}
actions=
{
formActions
}
schema=
{
auditModalSchema
}
onSubmit=
{
value
=>
handleSubmit
(
value
,
basicInfo
.
status
)
}
/>
</
Modal
>
</
PageHeaderWrapper
>
</
Spin
>
);
};
export
default
Frozen
;
src/pages/member/memberMaintain/index.tsx
View file @
2e97b30c
import
React
,
{
ReactNode
,
useState
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
Card
,
Space
,
Button
,
Menu
,
Popconfirm
,
Dropdown
,
Badge
,
Modal
,
}
from
'antd'
;
import
{
PlusOutlined
,
...
...
@@ -23,14 +18,24 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
LevelBrand
from
'../components/LevelBrand'
;
import
StatusTag
from
'../components/StatusTag'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
MEMBER_STATUS_NORMAL
,
MEMBER_STATUS_FROZEN
,
MEMBER_STATUS
}
from
'@/constants'
;
import
{
MEMBER_STATUS_TAG_MAP
}
from
'../constant'
;
import
{
MEMBER_STATUS_NORMAL
,
MEMBER_STATUS_FROZEN
,
MEMBER_STATUS
,
MEMBER_OUTER_STATUS
,
MEMBER_INNER_STATUS_SUCCESS
,
}
from
'@/constants'
;
import
{
maintianSchema
}
from
'./schema'
;
import
{
MEMBER_STATUS_TAG_MAP
,
MEMBER_INNER_STATUS_BADGE_COLOR
,
MEMBER_OUTER_STATUS_TYPE
,
}
from
'../constant'
;
import
{
coverColFiltersItem
}
from
'../utils'
;
const
formActions
=
createFormActions
();
...
...
@@ -55,7 +60,7 @@ const memberMaintain: React.FC<[]> = () => {
render
:
(
text
,
record
)
=>
(
<>
<
EyePreview
url=
{
`/memberCenter/memberAbility/
manage/maintainDetail?id=${record.memberId}&validateId=${record.validateId}&preview=1
`
}
url=
{
`/memberCenter/memberAbility/
query/detailed?id=${record.memberId}&validateId=${record.validateId}
`
}
>
{
text
}
</
EyePreview
>
...
...
@@ -96,27 +101,31 @@ const memberMaintain: React.FC<[]> = () => {
},
{
title
:
'会员状态'
,
dataIndex
:
'status'
,
dataIndex
:
'status
Name
'
,
align
:
'center'
,
filters
:
[],
filterMultiple
:
false
,
render
:
(
text
,
record
)
=>
<
StatusTag
type=
{
MEMBER_STATUS_TAG_MAP
[
text
]
}
title=
{
MEMBER_STATUS
[
text
]
}
/>,
onFilter
:
(
value
,
record
)
=>
record
.
status
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
{
MEMBER_STATUS_TAG_MAP
[
record
.
status
]
}
title=
{
text
}
/>
),
},
{
title
:
'外部状态'
,
dataIndex
:
'outerStatusName'
,
align
:
'center'
,
filters
:
[],
filterMultiple
:
false
,
render
:
(
text
,
record
)
=>
<
Badge
color=
"#FFC400"
text=
{
text
}
/>,
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
_
,
record
)
=>
(
<
StatusTag
type=
{
MEMBER_OUTER_STATUS_TYPE
[
record
.
outerStatus
]
}
title=
{
MEMBER_OUTER_STATUS
[
record
.
outerStatus
]
}
/>
),
},
{
title
:
'内部状态
状态
'
,
title
:
'内部状态'
,
dataIndex
:
'innerStatusName'
,
align
:
'center'
,
filters
:
[],
filterMultiple
:
fals
e
,
render
:
(
text
,
record
)
=>
<
Badge
color=
"#FFC400"
text=
{
text
}
/>,
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
valu
e
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
MEMBER_INNER_STATUS_BADGE_COLOR
[
record
.
innerStatus
]
}
text=
{
text
}
/>,
},
{
title
:
'操作'
,
...
...
@@ -124,16 +133,15 @@ const memberMaintain: React.FC<[]> = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
{
/* 暂时用中文,已与后台商量 */
}
{
record
.
innerStatusName
===
'审核通过'
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
style=
{
{
color
:
'#00B37A'
}
}
>
{
record
.
status
===
MEMBER_STATUS_NORMAL
?
'冻结'
:
'解冻'
}
</
Button
>
)
}
{
/* {record.innerStatus === MEMBER_INNER_STATUS_SUCCESS && ( */
}
<
Link
to=
{
`/memberCenter/memberAbility/manage/frozen?id=${record.memberId}&validateId=${record.validateId}`
}
>
<
Button
type=
"link"
>
{
record
.
status
===
MEMBER_STATUS_NORMAL
?
'冻结'
:
'解冻'
}
</
Button
>
</
Link
>
{
/* )} */
}
</>
),
},
...
...
@@ -168,6 +176,27 @@ const memberMaintain: React.FC<[]> = () => {
sources
=
[],
}
=
data
;
const
newColumns
=
columns
.
slice
();
// filter 0 过滤掉全部选项
coverColFiltersItem
(
newColumns
,
'statusName'
,
status
.
map
(
item
=>
({
text
:
item
.
text
,
value
:
item
.
id
})).
filter
(
item
=>
item
.
value
!==
0
),
);
coverColFiltersItem
(
newColumns
,
'outerStatusName'
,
outerStatus
.
map
(
item
=>
({
text
:
item
.
text
,
value
:
item
.
id
})).
filter
(
item
=>
item
.
value
!==
0
),
);
coverColFiltersItem
(
newColumns
,
'innerStatusName'
,
innerStatus
.
map
(
item
=>
({
text
:
item
.
text
,
value
:
item
.
id
})).
filter
(
item
=>
item
.
value
!==
0
),
);
setColumns
(
newColumns
);
return
{
memberType
:
memberTypes
.
map
(
item
=>
({
label
:
item
.
memberTypeName
,
value
:
item
.
memberTypeId
})),
roleId
:
memberRoles
.
map
(
item
=>
({
label
:
item
.
roleName
,
value
:
item
.
roleId
})),
...
...
src/pages/member/memberMaintain/schema/index.tsx
View file @
2e97b30c
...
...
@@ -126,7 +126,7 @@ export const auditModalSchema: ISchema = {
labelAlign
:
'top'
,
},
properties
:
{
re
mark
:
{
re
ason
:
{
type
:
'string'
,
title
:
'会员解冻原因'
,
'x-component'
:
'textarea'
,
...
...
src/pages/member/memberQuery/detailed/index.tsx
View file @
2e97b30c
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeader
,
Tag
,
Descriptions
,
Steps
}
from
'antd'
;
import
{
PageHeader
,
Descriptions
,
Badge
}
from
'antd'
;
import
{
STATUS_COLOR_MAP
,
STATUS_COLOR_TXT
}
from
'../../constant'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMemberAbilityMaintenanceDetailBasicResponse
}
from
'@/services/MemberApi'
;
import
HeadInfo
from
'../../components/HeadInfo'
;
import
StatusTag
from
'../../components/StatusTag'
;
import
styles
from
'./index.less'
;
interface
QueryProps
{
...
...
@@ -21,10 +23,30 @@ interface QueryProps {
const
MemberQueryDetailed
:
React
.
FC
<
QueryProps
>
=
props
=>
{
const
{
children
}
=
props
;
const
{
pageStatus
,
id
,
validateId
}
=
usePageStatus
();
const
[
detailed
,
setDetailed
]
=
useState
<
any
>
({});
const
[
basicInfo
,
setBasicInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailBasicResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoaading
]
=
useState
(
false
);
useEffect
(()
=>
{
const
getBasicInfo
=
()
=>
{
if
(
!
id
||
!
validateId
)
{
return
;
}
setInfoLoaading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailBasic
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setBasicInfo
(
res
.
data
);
}
}).
finally
(()
=>
{
setInfoLoaading
(
false
);
});
};
useEffect
(()
=>
{
// 手动重定向到基础信息页,防止查询字符串被弄掉
history
.
replace
(
`/memberCenter/memberAbility/query/detailed/basicInfo?id=
${
id
}
&validateId=
${
validateId
}
`
);
getBasicInfo
();
},
[]);
const
tabList
=
[
...
...
@@ -32,10 +54,10 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
key
:
'basicInfo'
,
tab
:
'基本信息'
,
},
{
key
:
'powerInfo'
,
tab
:
'权限信息'
,
},
//
{
//
key: 'powerInfo',
//
tab: '权限信息',
//
},
{
key
:
'levelInfo'
,
tab
:
'等级信息'
,
...
...
@@ -56,19 +78,19 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
switch
(
val
)
{
case
'basicInfo'
:
history
.
push
(
`
${
url
}
/basicInfo`
);
history
.
push
(
`
${
url
}
/basicInfo
?id=
${
id
}
&validateId=
${
validateId
}
`
);
break
;
case
'powerInfo'
:
history
.
push
(
`
${
url
}
/powerInfo`
);
history
.
push
(
`
${
url
}
/powerInfo
?id=
${
id
}
&validateId=
${
validateId
}
`
);
break
;
case
'levelInfo'
:
history
.
push
(
`
${
url
}
/levelInfo`
);
history
.
push
(
`
${
url
}
/levelInfo
?id=
${
id
}
&validateId=
${
validateId
}
`
);
break
;
case
'equityInfo'
:
history
.
push
(
`
${
url
}
/equityInfo`
);
history
.
push
(
`
${
url
}
/equityInfo
?id=
${
id
}
&validateId=
${
validateId
}
`
);
break
;
case
'sincerityInfo'
:
history
.
push
(
`
${
url
}
/sincerityInfo`
);
history
.
push
(
`
${
url
}
/sincerityInfo
?id=
${
id
}
&validateId=
${
validateId
}
`
);
break
;
default
:
break
;
...
...
@@ -95,7 +117,7 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
title=
{
<
HeadInfo
info=
{
{
name
:
'广州市极致皮具有限公司'
,
name
:
basicInfo
?.
name
,
level
:
1
,
}
}
/>
...
...
@@ -103,18 +125,22 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
>
<
Descriptions
size=
"small"
column=
{
2
}
column=
{
3
}
style=
{
{
padding
:
'0 32px'
,
}
}
>
<
Descriptions
.
Item
label=
"会员类型"
>
{
123
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员角色"
>
{
123
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员类型"
>
{
basicInfo
?.
memberTypeName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员角色"
span=
{
2
}
>
{
basicInfo
?.
roleName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员状态"
>
<
Tag
color=
{
STATUS_COLOR_MAP
[
1
]
}
>
{
STATUS_COLOR_TXT
[
1
]
}
</
Tag
>
{
/* <Tag color={STATUS_COLOR_MAP[1]}>{STATUS_COLOR_TXT[1]}</Tag> */
}
<
StatusTag
type=
"success"
title=
"正常"
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态"
>
<
Tag
color=
{
STATUS_COLOR_MAP
[
2
]
}
>
{
STATUS_COLOR_TXT
[
2
]
}
</
Tag
>
<
StatusTag
type=
"success"
title=
{
basicInfo
?.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
STATUS_COLOR_MAP
[
2
]
}
text=
{
basicInfo
?.
outerStatusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
...
...
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