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
ddeae51c
Commit
ddeae51c
authored
May 25, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 删除无用文件
parent
2b5668bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
187 deletions
+0
-187
maintainDetail.tsx
src/pages/member/memberMaintain/maintainDetail.tsx
+0
-187
No files found.
src/pages/member/memberMaintain/maintainDetail.tsx
deleted
100644 → 0
View file @
2b5668bf
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_TYPE_CHANNEL_CORPORATE
,
MEMBER_TYPE_CHANNEL_INDIVIDUAL
,
}
from
'@/constants'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
{
auditModalSchema
}
from
'./schema'
;
import
AuditProcess
from
'../components/AuditProcess'
;
import
BasicInfo
from
'../components/BasicInfo'
;
import
StatusTag
from
'../components/StatusTag'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
MaintainDetail
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
pageStatus
,
id
,
validateId
}
=
usePageStatus
();
const
[
detailed
,
setDetailed
]
=
useState
<
GetMemberAbilityMaintenanceDetailBasicResponse
>
(
null
);
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoaading
]
=
useState
(
false
);
const
getDetailed
=
()
=>
{
if
(
!
id
||
!
validateId
)
{
return
;
}
setInfoLoaading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailBasic
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setDetailed
(
res
.
data
);
}
}).
finally
(()
=>
{
setInfoLoaading
(
false
);
});
};
useEffect
(()
=>
{
getDetailed
();
},
[]);
// 冻结与解冻
const
handleSubmit
=
(
values
:
{
remark
:
string
})
=>
{
return
PublicApi
.
postMemberMaintenanceStatus
({
memberId
:
id
,
validateId
:
validateId
,
status
:
detailed
&&
detailed
.
status
===
MEMBER_STATUS_NORMAL
?
MEMBER_STATUS_FROZEN
:
MEMBER_STATUS_NORMAL
,
remark
:
values
.
remark
||
''
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
getDetailed
();
}
});
};
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
title=
{
<>
<
PageHeader
style=
{
{
padding
:
'0'
}
}
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
<
AvatarWrap
info=
{
{
name
:
detailed
?.
name
,
}
}
extra=
{
(
<
span
style=
{
{
fontSize
:
12
,
fontWeight
:
'normal'
}
}
>
{
detailed
?.
levelTag
}
</
span
>
)
}
/>
}
extra=
{
(
<>
{
detailed
&&
detailed
.
status
===
MEMBER_STATUS_NORMAL
?
(
<
Button
icon=
{
<
StopOutlined
/>
}
onClick=
{
()
=>
{}
}
>
冻结
</
Button
>
)
:
(
<
Button
type=
"primary"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
{}
}
>
解冻
</
Button
>
)
}
</>
)
}
>
<
Descriptions
size=
"small"
column=
{
3
}
style=
{
{
padding
:
'0 32px'
,
}
}
>
<
Descriptions
.
Item
label=
"会员类型"
>
{
detailed
?.
memberTypeName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员角色"
span=
{
2
}
>
{
detailed
?.
roleName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员状态"
>
{
/* <Tag color={STATUS_COLOR_MAP[1]}>{STATUS_COLOR_TXT[1]}</Tag> */
}
<
StatusTag
type=
"success"
title=
"正常"
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态"
>
<
StatusTag
type=
"success"
title=
{
detailed
?.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
STATUS_COLOR_MAP
[
2
]
}
text=
{
detailed
?.
outerStatusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
}
>
<
div
style=
{
{
marginBottom
:
24
,
}
}
>
<
AuditProcess
outerVerifySteps=
{
detailed
?.
outerVerifySteps
}
innerVerifySteps=
{
detailed
?.
innerVerifySteps
}
/>
</
div
>
<
BasicInfo
basic=
{
{
account
:
detailed
?.
account
,
phone
:
detailed
?.
phone
,
email
:
detailed
?.
email
,
created
:
detailed
?.
createTime
,
}
}
channel=
{
{
memberType
:
detailed
?.
memberTypeEnum
,
level
:
detailed
?.
channelLevelTag
,
type
:
detailed
?.
channelTypeName
,
areas
:
detailed
?.
areas
,
desc
:
detailed
?.
remark
,
}
}
extra=
{
detailed
?.
groups
}
outerHistory=
{
detailed
?.
outerHistory
}
innerHistory=
{
detailed
?.
innerHistory
}
/>
<
Modal
title=
{
detailed
&&
detailed
.
status
===
1
?
'会员解冻'
:
'会员冻结'
}
visible=
{
modalVisible
}
onOk=
{
()
=>
formActions
.
submit
()
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
destroyOnClose
>
<
NiceForm
previewPlaceholder=
"' '"
effects=
{
(
$
,
{
setFieldState
})
=>
{
FormEffectHooks
.
onFieldInit$
(
'remark'
).
subscribe
(
state
=>
{
setFieldState
(
'remark'
,
targetState
=>
{
targetState
.
props
.
title
=
`会员${detailed && detailed.status === 1 ? '解冻' : '冻结'}原因`
;
});
});
}
}
actions=
{
formActions
}
schema=
{
auditModalSchema
}
onSubmit=
{
handleSubmit
}
/>
</
Modal
>
</
PageHeaderWrapper
>
</
Spin
>
);
};
export
default
MaintainDetail
;
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