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
6874031a
Commit
6874031a
authored
Sep 09, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接完会员信息查询相关
parent
bd3df0de
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
478 additions
and
204 deletions
+478
-204
memberRoute.ts
config/routes/memberRoute.ts
+0
-14
menu.ts
src/locales/zh-CN/menu.ts
+0
-2
index.ts
src/module/memberModule/index.ts
+3
-4
index.tsx
src/pages/member/components/LevelInfo/index.tsx
+11
-0
index.tsx
src/pages/member/components/SincerityInfo/index.tsx
+9
-0
index.tsx
src/pages/member/memberMaintain/detailed/index.tsx
+4
-15
powerInfo.less
src/pages/member/memberMaintain/detailed/powerInfo.less
+0
-0
powerInfo.tsx
src/pages/member/memberMaintain/detailed/powerInfo.tsx
+0
-10
sincerityInfo.tsx
src/pages/member/memberMaintain/detailed/sincerityInfo.tsx
+6
-0
equityInfo.tsx
src/pages/member/memberQuery/detailed/equityInfo.tsx
+70
-5
index.tsx
src/pages/member/memberQuery/detailed/index.tsx
+63
-61
levelInfo.tsx
src/pages/member/memberQuery/detailed/levelInfo.tsx
+61
-5
powerInfo.less
src/pages/member/memberQuery/detailed/powerInfo.less
+0
-0
powerInfo.tsx
src/pages/member/memberQuery/detailed/powerInfo.tsx
+0
-10
sincerityInfo.tsx
src/pages/member/memberQuery/detailed/sincerityInfo.tsx
+191
-3
index.tsx
src/pages/member/memberQuery/index.tsx
+47
-30
index.tsx
src/pages/member/memberQuery/schema/index.tsx
+13
-45
No files found.
config/routes/memberRoute.ts
View file @
6874031a
...
...
@@ -58,13 +58,6 @@ const MemberRoute = {
hideInMenu
:
true
,
},
{
path
:
'/memberCenter/memberAbility/manage/maintainDetail/powerInfo'
,
name
:
'powerInfo'
,
key
:
'powerInfo'
,
component
:
'@/pages/member/memberMaintain/detailed/powerInfo'
,
hideInMenu
:
true
,
},
{
path
:
'/memberCenter/memberAbility/manage/maintainDetail/levelInfo'
,
name
:
'levelInfo'
,
key
:
'levelInfo'
,
...
...
@@ -188,13 +181,6 @@ const MemberRoute = {
hideInMenu
:
true
,
},
{
path
:
'/memberCenter/memberAbility/query/detailed/powerInfo'
,
name
:
'powerInfo'
,
key
:
'powerInfo'
,
component
:
'@/pages/member/memberQuery/detailed/powerInfo'
,
hideInMenu
:
true
,
},
{
path
:
'/memberCenter/memberAbility/query/detailed/levelInfo'
,
name
:
'levelInfo'
,
key
:
'levelInfo'
,
...
...
src/locales/zh-CN/menu.ts
View file @
6874031a
...
...
@@ -76,7 +76,6 @@ export default {
'menu.memberAbility.memberManage.addEquity'
:
'会员权益设置'
,
'menu.memberAbility.memberManage.maintainDetail'
:
'会员详情'
,
'menu.memberAbility.memberManage.maintainDetail.basicInfo'
:
'会员基本信息'
,
'menu.memberAbility.memberManage.maintainDetail.powerInfo'
:
'会员权限信息'
,
'menu.memberAbility.memberManage.maintainDetail.levelInfo'
:
'会员等级信息'
,
'menu.memberAbility.memberManage.maintainDetail.equityInfo'
:
'权益信息'
,
'menu.memberAbility.memberManage.maintainDetail.sincerityInfo'
:
'诚信信息'
,
...
...
@@ -84,7 +83,6 @@ export default {
'menu.memberAbility.memberQuery'
:
'会员信息查询'
,
'menu.memberAbility.memberQueryDetailed'
:
'会员信息详情'
,
'menu.memberAbility.memberQueryDetailed.basicInfo'
:
'会员基本信息'
,
'menu.memberAbility.memberQueryDetailed.powerInfo'
:
'会员权限信息'
,
'menu.memberAbility.memberQueryDetailed.levelInfo'
:
'会员等级信息'
,
'menu.memberAbility.memberQueryDetailed.equityInfo'
:
'权益信息'
,
'menu.memberAbility.memberQueryDetailed.sincerityInfo'
:
'诚信信息'
,
...
...
src/module/memberModule/index.ts
View file @
6874031a
import
{
GetMemberAbilityMaintenanceDetailBasicResponse
}
from
'@/services/MemberApi'
;
export
interface
IMemberModule
{
memberMaintainInfo
:
GetMemberAbilityMaintenanceDetailBasicResponse
;
memberMaintainInfo
:
any
;
setmemberMaintainInfo
(
data
:
GetMemberAbilityMaintenanceDetailBasicResponse
):
void
;
setmemberMaintainInfo
(
data
:
any
):
void
;
}
\ No newline at end of file
src/pages/member/components/LevelInfo/index.tsx
View file @
6874031a
...
...
@@ -3,6 +3,7 @@ import {
Row
,
Col
,
Progress
,
Radio
,
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
{
MiniArea
}
from
'@/components/Charts'
;
...
...
@@ -118,6 +119,16 @@ const LevelInfo: React.FC<LevelInfoProps> = ({
headStyle=
{
{
borderBottom
:
'none'
,
}
}
extra=
{
(
<
Radio
.
Group
buttonStyle=
"solid"
onChange=
{
()
=>
{
}
}
>
<
Radio
.
Button
value=
"all"
>
天
</
Radio
.
Button
>
<
Radio
.
Button
value=
"day7"
>
周
</
Radio
.
Button
>
<
Radio
.
Button
value=
"day30"
>
月
</
Radio
.
Button
>
</
Radio
.
Group
>
)
}
>
<
div
className=
{
styles
.
infoWrap
}
>
<
div
className=
{
styles
[
'infoWrap-left'
]
}
>
...
...
src/pages/member/components/SincerityInfo/index.tsx
View file @
6874031a
...
...
@@ -145,10 +145,19 @@ export interface ComplaintProps {
interface
SincerityInfoProps
{
basicInfo
?:
BasicInfo
;
salesEstimateSum
?:
EstimateSum
;
/*
交易评论历史记录
*/
fetchSalesList
?:
(
params
:
FetchParams
)
=>
Promise
<
{
data
:
SalesProps
[]
,
totalCount
:
number
}
>
;
afterEstimateSum
?:
EstimateSum
;
/*
售后评论历史记录
*/
fetchAfterList
?:
(
params
:
FetchParams
)
=>
Promise
<
{
data
:
SalesProps
[]
,
totalCount
:
number
}
>
;
complaintSum
?:
ComplaintSum
;
/*
投诉历史记录
*/
fetchComplaintList
?:
(
params
:
FetchParams
)
=>
Promise
<
{
data
:
ComplaintProps
[]
,
totalCount
:
number
}
>
;
};
...
...
src/pages/member/memberMaintain/detailed/index.tsx
View file @
6874031a
...
...
@@ -8,13 +8,6 @@ import { PublicApi } from '@/services/api';
import
{
GetMemberAbilityMaintenanceDetailBasicResponse
}
from
'@/services/MemberApi'
;
import
{
IMemberModule
}
from
'@/module/memberModule'
;
import
{
MEMBER_STATUS_NORMAL
,
MEMBER_STATUS_FROZEN
,
MEMBER_STATUS
,
MEMBER_OUTER_STATUS
,
MEMBER_INNER_STATUS_SUCCESS
,
}
from
'@/constants'
;
import
{
MEMBER_STATUS_TAG_MAP
,
MEMBER_INNER_STATUS_BADGE_COLOR
,
MEMBER_OUTER_STATUS_TYPE
,
...
...
@@ -34,8 +27,8 @@ interface QueryProps {
MemberStore
?:
IMemberModule
;
}
const
Member
Query
Detailed
:
React
.
FC
<
QueryProps
>
=
props
=>
{
const
{
MemberStore
,
location
,
children
}
=
props
;
const
Member
Maintain
Detailed
:
React
.
FC
<
QueryProps
>
=
props
=>
{
const
{
MemberStore
,
children
}
=
props
;
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
basicInfo
,
setBasicInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailBasicResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
...
...
@@ -70,10 +63,6 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
key
:
'basicInfo'
,
tab
:
'基本信息'
,
},
// {
// key: 'powerInfo',
// tab: '权限信息',
// },
{
key
:
'levelInfo'
,
tab
:
'等级信息'
,
...
...
@@ -172,4 +161,4 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
);
};
export
default
inject
(
'MemberStore'
)(
observer
(
MemberQueryDetailed
));
\ No newline at end of file
export
default
inject
(
'MemberStore'
)(
observer
(
MemberMaintainDetailed
));
\ No newline at end of file
src/pages/member/memberMaintain/detailed/powerInfo.less
deleted
100644 → 0
View file @
bd3df0de
src/pages/member/memberMaintain/detailed/powerInfo.tsx
deleted
100644 → 0
View file @
bd3df0de
import
React
from
'react'
;
const
PowerInfo
:
React
.
FC
<
{}
>
=
()
=>
{
return
(
<
div
>
123
</
div
>
);
};
export
default
PowerInfo
;
\ No newline at end of file
src/pages/member/memberMaintain/detailed/sincerityInfo.tsx
View file @
6874031a
...
...
@@ -57,6 +57,7 @@ const SincerityInfo: React.FC<{}> = () => {
});
};
// 交易评价汇总
const
getSalesEstimateSum
=
()
=>
{
setSalesEstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailCreditTradeSummary
({
...
...
@@ -76,6 +77,7 @@ const SincerityInfo: React.FC<{}> = () => {
});
};
// 售后评价汇总
const
getAfterEstimateSum
=
()
=>
{
setAfterEstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailCreditAftersaleSummary
({
...
...
@@ -95,6 +97,7 @@ const SincerityInfo: React.FC<{}> = () => {
});
};
// 投诉汇总
const
getComplaintSum
=
()
=>
{
setSalesEstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailCreditComplainSummary
({
...
...
@@ -119,6 +122,7 @@ const SincerityInfo: React.FC<{}> = () => {
getComplaintSum
();
},
[]);
// 交易评论历史记录
const
getSalesList
=
(
params
)
=>
{
return
new
Promise
<
{
data
:
SalesProps
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityMaintenanceDetailCreditTradeHistoryPage
({
...
...
@@ -134,6 +138,7 @@ const SincerityInfo: React.FC<{}> = () => {
});
};
// 售后评论历史记录
const
getAfterList
=
(
params
)
=>
{
return
new
Promise
<
{
data
:
SalesProps
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityMaintenanceDetailCreditAftersaleHistoryPage
({
...
...
@@ -149,6 +154,7 @@ const SincerityInfo: React.FC<{}> = () => {
});
};
// 投诉历史记录
const
getComplaintList
=
(
params
)
=>
{
return
new
Promise
<
{
data
:
ComplaintProps
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityMaintenanceDetailCreditComplainHistoryPage
({
...
...
src/pages/member/memberQuery/detailed/equityInfo.tsx
View file @
6874031a
import
React
from
'react'
;
import
Info
from
'../../components/EquityInfo'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Spin
}
from
'antd'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMemberAbilityMaintenanceDetailRightBasicResponse
}
from
'@/services/MemberApi'
;
import
Info
,
{
ReceivedData
,
UsageData
}
from
'../../components/EquityInfo'
;
const
EquityInfo
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
equityInfo
,
setEquityInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailRightBasicResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
getEquityInfo
=
()
=>
{
setInfoLoading
(
true
);
PublicApi
.
getMemberAbilityInfoDetailRightBasic
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setEquityInfo
(
res
.
data
);
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
};
useEffect
(()
=>
{
getEquityInfo
();
},
[]);
const
getReceivedList
=
params
=>
{
return
new
Promise
<
{
data
:
ReceivedData
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityInfoDetailRightHistoryPage
({
memberId
:
id
,
validateId
,
...
params
,
}).
then
(
res
=>
{
const
{
data
=
[],
totalCount
=
0
}
=
res
.
data
;
resolve
({
data
,
totalCount
});
}).
catch
(
err
=>
{
reject
(
err
);
});
})
};
const
getUsageList
=
params
=>
{
return
new
Promise
<
{
data
:
UsageData
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityInfoDetailRightSpendHistoryPage
({
memberId
:
id
,
validateId
,
...
params
,
}).
then
(
res
=>
{
const
{
data
=
[],
totalCount
=
0
}
=
res
.
data
;
resolve
({
data
,
totalCount
});
}).
catch
(
err
=>
{
reject
(
err
);
});
})
};
return
(
<
div
>
<
Info
/>
</
div
>
<
Spin
spinning=
{
infoLoading
}
>
<
Info
equityInfo=
{
{
sumReturnMoney
:
equityInfo
?.
sumReturnMoney
,
sumUsedPoint
:
equityInfo
?.
sumUsedPoint
,
sumPoint
:
equityInfo
?.
sumPoint
,
}
}
fetchReceivedList=
{
getReceivedList
}
fetchUsageList=
{
getUsageList
}
/>
</
Spin
>
);
};
...
...
src/pages/member/memberQuery/detailed/index.tsx
View file @
6874031a
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeader
,
Descriptions
,
Badge
}
from
'antd'
;
import
{
STATUS_COLOR_MAP
,
STATUS_COLOR_TXT
}
from
'../../constan
t'
;
import
{
PageHeader
,
Descriptions
,
Badge
,
Spin
}
from
'antd'
;
import
{
observer
,
inject
}
from
'mobx-reac
t'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMemberAbilityMaintenanceDetailBasicResponse
}
from
'@/services/MemberApi'
;
import
{
GetMemberAbilityInfoDetailBasicResponse
}
from
'@/services/MemberApi'
;
import
{
IMemberModule
}
from
'@/module/memberModule'
;
import
{
MEMBER_STATUS_TAG_MAP
,
MEMBER_OUTER_STATUS_TYPE
,
}
from
'../../constant'
;
import
HeadInfo
from
'../../components/HeadInfo'
;
import
StatusTag
from
'../../components/StatusTag'
;
import
styles
from
'./index.less'
;
...
...
@@ -18,28 +23,31 @@ interface QueryProps {
location
:
{
pathname
:
string
;
};
MemberStore
?:
IMemberModule
;
}
const
MemberQueryDetailed
:
React
.
FC
<
QueryProps
>
=
props
=>
{
const
{
children
}
=
props
;
const
{
pageStatus
,
id
,
validateId
}
=
usePageStatus
();
const
[
basicInfo
,
setBasicInfo
]
=
useState
<
GetMemberAbility
Maintenance
DetailBasicResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoa
a
ding
]
=
useState
(
false
);
const
{
MemberStore
,
children
}
=
props
;
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
basicInfo
,
setBasicInfo
]
=
useState
<
GetMemberAbility
Info
DetailBasicResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
getBasicInfo
=
()
=>
{
if
(
!
id
||
!
validateId
)
{
return
;
}
setInfoLoa
a
ding
(
true
);
PublicApi
.
getMemberAbility
Maintenance
DetailBasic
({
setInfoLoading
(
true
);
PublicApi
.
getMemberAbility
Info
DetailBasic
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
=
==
1000
)
{
setBasicInfo
(
res
.
data
)
;
if
(
res
.
code
!
==
1000
)
{
return
;
}
setBasicInfo
(
res
.
data
);
MemberStore
.
setmemberMaintainInfo
(
res
.
data
);
}).
finally
(()
=>
{
setInfoLoa
a
ding
(
false
);
setInfoLoading
(
false
);
});
};
...
...
@@ -54,10 +62,6 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
key
:
'basicInfo'
,
tab
:
'基本信息'
,
},
// {
// key: 'powerInfo',
// tab: '权限信息',
// },
{
key
:
'levelInfo'
,
tab
:
'等级信息'
,
...
...
@@ -108,51 +112,49 @@ const MemberQueryDetailed: React.FC<QueryProps> = props => {
};
return
(
<
PageHeaderWrapper
title=
{
<>
<
PageHeader
style=
{
{
padding
:
'0'
}
}
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
<
HeadInfo
info=
{
{
name
:
basicInfo
?.
name
,
level
:
1
,
}
}
/>
}
>
<
Descriptions
size=
"small"
column=
{
3
}
style=
{
{
padding
:
'0 32px'
,
}
}
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
title=
{
<>
<
PageHeader
style=
{
{
padding
:
'0'
}
}
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
<
HeadInfo
info=
{
{
name
:
basicInfo
?.
name
,
level
:
1
,
}
}
/>
}
>
<
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> */
}
<
StatusTag
type=
"success"
title=
"正常"
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态"
>
<
StatusTag
type=
"success"
title=
{
basicInfo
?.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
STATUS_COLOR_MAP
[
2
]
}
text=
{
basicInfo
?.
outerStatusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
}
tabList=
{
tabList
}
tabActiveKey=
{
getTabKey
()
}
onTabChange=
{
handleTabChange
}
>
{
children
}
</
PageHeaderWrapper
>
<
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=
{
basicInfo
?.
outerStatusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
}
tabList=
{
tabList
}
tabActiveKey=
{
getTabKey
()
}
onTabChange=
{
handleTabChange
}
>
{
children
}
</
PageHeaderWrapper
>
</
Spin
>
);
};
export
default
MemberQueryDetailed
;
\ No newline at end of file
export
default
inject
(
'MemberStore'
)(
observer
(
MemberQueryDetailed
));
\ No newline at end of file
src/pages/member/memberQuery/detailed/levelInfo.tsx
View file @
6874031a
import
React
from
'react'
;
import
Info
from
'../../components/LevelInfo'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Spin
}
from
'antd'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMemberAbilityMaintenanceDetailLevelBasicResponse
}
from
'@/services/MemberApi'
;
import
Info
,
{
DataProps
}
from
'../../components/LevelInfo'
;
import
{
reject
}
from
'lodash'
;
const
LevelInfo
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
levelInfo
,
setLevelInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailLevelBasicResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
getMemberLevelInfo
=
()
=>
{
if
(
!
id
&&
!
validateId
)
{
return
;
}
setInfoLoading
(
true
);
PublicApi
.
getMemberAbilityInfoDetailLevelBasic
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setLevelInfo
(
res
.
data
);
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
};
useEffect
(()
=>
{
getMemberLevelInfo
();
},
[]);
const
getHistroyList
=
params
=>
{
return
new
Promise
<
{
data
:
DataProps
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityInfoDetailLevelHistoryPage
({
memberId
:
id
,
validateId
,
...
params
,
}).
then
(
res
=>
{
const
{
data
=
[],
totalCount
=
0
}
=
res
.
data
;
resolve
({
data
,
totalCount
});
}).
catch
(
err
=>
{
reject
(
err
);
});
})
};
return
(
<
div
>
<
Info
/>
</
div
>
<
Spin
spinning=
{
infoLoading
}
>
<
Info
levelInfo=
{
{
level
:
levelInfo
?.
levelTag
,
score
:
levelInfo
?.
score
,
nextLevel
:
levelInfo
?.
nextLevelTag
,
nextScore
:
levelInfo
?.
nextScore
,
}
}
chartData=
{
levelInfo
?.
points
}
fetchList=
{
getHistroyList
}
/>
</
Spin
>
);
};
...
...
src/pages/member/memberQuery/detailed/powerInfo.less
deleted
100644 → 0
View file @
bd3df0de
src/pages/member/memberQuery/detailed/powerInfo.tsx
deleted
100644 → 0
View file @
bd3df0de
import
React
from
'react'
;
const
PowerInfo
:
React
.
FC
<
{}
>
=
()
=>
{
return
(
<
div
>
123
</
div
>
);
};
export
default
PowerInfo
;
\ No newline at end of file
src/pages/member/memberQuery/detailed/sincerityInfo.tsx
View file @
6874031a
import
React
from
'react'
;
import
Info
from
'../../components/SincerityInfo'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
Info
,
{
BasicInfo
,
ComplaintSum
,
EstimateSum
,
SalesProps
,
ComplaintProps
}
from
'../../components/SincerityInfo'
;
const
SincerityInfo
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
basicInfo
,
setBasicInfo
]
=
useState
<
BasicInfo
>
(
null
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
salesEstimateSum
,
setSalesEstimateSum
]
=
useState
<
EstimateSum
>
(
null
);
const
[
salesEstimateSumLoading
,
setSalesEstimateSumLoading
]
=
useState
(
false
);
const
[
afterEstimateSum
,
setAfterEstimateSum
]
=
useState
<
EstimateSum
>
(
null
);
const
[
afterEstimateSumLoading
,
setAfterEstimateSumLoading
]
=
useState
(
false
);
const
[
complainSum
,
setComplainSum
]
=
useState
<
ComplaintSum
>
(
null
);
const
[
complainSumLoading
,
setComplainSumLoading
]
=
useState
(
false
);
const
getBasicInfo
=
()
=>
{
setInfoLoading
(
true
);
PublicApi
.
getMemberAbilityInfoDetailCreditBasic
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
const
{
tradeCommentPoint
,
afterSaleCommentPoint
,
complainPoint
,
registerYearsPoint
,
configs
,
}
=
(
res
.
data
||
{});
const
pieData
=
[
{
x
:
'交易评价积分'
,
y
:
tradeCommentPoint
||
0
,
},
{
x
:
'售后评价积分'
,
y
:
afterSaleCommentPoint
||
0
,
},
{
x
:
'投诉扣分'
,
y
:
complainPoint
||
0
,
},
{
x
:
'入驻年数积分'
,
y
:
registerYearsPoint
||
0
,
},
];
setBasicInfo
({
pieData
,
items
:
configs
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
};
// 交易评价汇总
const
getSalesEstimateSum
=
()
=>
{
setSalesEstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityInfoDetailCreditTradeSummary
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
const
{
rows
=
[]
}
=
(
res
.
data
||
{});
setSalesEstimateSum
({
dataSource
:
rows
,
});
}).
finally
(()
=>
{
setSalesEstimateSumLoading
(
false
);
});
};
// 售后评价汇总
const
getAfterEstimateSum
=
()
=>
{
setAfterEstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityInfoDetailCreditAftersaleSummary
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
const
{
rows
=
[]
}
=
(
res
.
data
||
{});
setAfterEstimateSum
({
dataSource
:
rows
,
});
}).
finally
(()
=>
{
setAfterEstimateSumLoading
(
false
);
});
};
// 投诉汇总
const
getComplaintSum
=
()
=>
{
setSalesEstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityInfoDetailCreditComplainSummary
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setComplainSum
({
dataSource
:
res
.
data
,
});
}).
finally
(()
=>
{
setSalesEstimateSumLoading
(
false
);
});
};
useEffect
(()
=>
{
getBasicInfo
();
getSalesEstimateSum
();
getAfterEstimateSum
();
getComplaintSum
();
},
[]);
// 交易评论历史记录
const
getSalesList
=
(
params
)
=>
{
return
new
Promise
<
{
data
:
SalesProps
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityInfoDetailCreditTradeHistoryPage
({
memberId
:
id
,
validateId
,
...
params
,
}).
then
(
res
=>
{
const
{
data
=
[],
totalCount
=
0
}
=
res
.
data
;
resolve
({
data
,
totalCount
});
}).
catch
(
err
=>
{
reject
(
err
);
});
});
};
// 售后评论历史记录
const
getAfterList
=
(
params
)
=>
{
return
new
Promise
<
{
data
:
SalesProps
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityInfoDetailCreditAftersaleHistoryPage
({
memberId
:
id
,
validateId
,
...
params
,
}).
then
(
res
=>
{
const
{
data
=
[],
totalCount
=
0
}
=
res
.
data
;
resolve
({
data
,
totalCount
});
}).
catch
(
err
=>
{
reject
(
err
);
});
});
};
// 投诉历史记录
const
getComplaintList
=
(
params
)
=>
{
return
new
Promise
<
{
data
:
ComplaintProps
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityInfoDetailCreditComplainHistoryPage
({
memberId
:
id
,
validateId
,
...
params
,
}).
then
(
res
=>
{
const
{
data
=
[],
totalCount
=
0
}
=
res
.
data
;
resolve
({
data
,
totalCount
});
}).
catch
(
err
=>
{
reject
(
err
);
});
});
};
return
(
<
div
>
<
Info
/>
<
Info
basicInfo=
{
{
...
basicInfo
,
loading
:
infoLoading
,
}
}
salesEstimateSum=
{
{
...
salesEstimateSum
,
loading
:
salesEstimateSumLoading
,
}
}
fetchSalesList=
{
getSalesList
}
afterEstimateSum=
{
{
...
afterEstimateSum
,
loading
:
afterEstimateSumLoading
,
}
}
fetchAfterList=
{
getAfterList
}
complaintSum=
{
{
...
complainSum
,
loading
:
complainSumLoading
,
}
}
fetchComplaintList=
{
getComplaintList
}
/>
</
div
>
);
};
...
...
src/pages/member/memberQuery/index.tsx
View file @
6874031a
...
...
@@ -25,9 +25,16 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
LevelBrand
from
'../components/LevelBrand'
;
import
{
maintianSchema
}
from
'./schema'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
coverColFiltersItem
}
from
'../utils'
;
import
{
MEMBER_STATUS_TAG_MAP
,
MEMBER_INNER_STATUS_BADGE_COLOR
,
MEMBER_OUTER_STATUS_TYPE
,
MEMBER_OUTER_STATUS_BADGE_COLOR
,
}
from
'../constant'
;
const
mock
=
[
{
...
...
@@ -59,7 +66,7 @@ const mock = [
const
formActions
=
createFormActions
();
const
fetchData
=
async
(
params
:
any
)
=>
{
let
res
=
await
PublicApi
.
getMember
Maintenance
Page
(
params
);
let
res
=
await
PublicApi
.
getMember
AbilityInfo
Page
(
params
);
return
res
.
data
;
};
...
...
@@ -79,7 +86,7 @@ const MemberQuery: React.FC<[]> = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
EyePreview
url=
{
`/memberCenter/memberAbility/query/detailed?id=${record.memberId}&validateId=${record.validateId}&preview=1`
}
url=
{
`/memberCenter/memberAbility/query/detailed?id=${record.memberId}&validateId=${record.validateId}&preview=1`
}
>
{
text
}
</
EyePreview
>
...
...
@@ -98,33 +105,38 @@ const MemberQuery: React.FC<[]> = () => {
render
:
(
text
,
record
)
=>
<>
{
text
}
</>,
},
{
title
:
'所属会员等级'
,
dataIndex
:
'level'
,
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
{
text
}
</>,
},
{
title
:
'会员等级类型'
,
dataIndex
:
'levelTypeName'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
LevelBrand
level=
{
2
}
/>,
},
{
title
:
'
操作
时间'
,
dataIndex
:
'
sourceNa
me'
,
title
:
'
申请
时间'
,
dataIndex
:
'
registerTi
me'
,
align
:
'center'
,
},
{
title
:
'会员状态'
,
dataIndex
:
'
outerS
tatusName'
,
dataIndex
:
'
s
tatusName'
,
align
:
'center'
,
filters
:
[],
// filteredValue: searchForm.outerStatus || ['0'],
filterMultiple
:
false
,
onFilter
:
(
value
,
record
)
=>
record
.
status
===
value
,
render
:
(
text
,
record
)
=>
<
span
>
{
text
}
</
span
>,
},
{
title
:
'审核状态'
,
dataIndex
:
'
inn
erStatusName'
,
dataIndex
:
'
out
erStatusName'
,
align
:
'center'
,
filters
:
[],
// filteredValue: searchForm.innerStatus || ['0']
,
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
filterMultiple
:
false
,
render
:
(
text
,
record
)
=>
<
Badge
color=
"#FFC400"
text=
{
text
}
/>,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
MEMBER_OUTER_STATUS_BADGE_COLOR
[
record
.
outerStatus
]
}
text=
{
text
}
/>,
},
{
title
:
'操作'
,
...
...
@@ -134,7 +146,6 @@ const MemberQuery: React.FC<[]> = () => {
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
style=
{
{
color
:
'#00B37A'
}
}
>
变更信息
</
Button
>
...
...
@@ -164,31 +175,37 @@ const MemberQuery: React.FC<[]> = () => {
// 初始化高级筛选选项
const
fetchSelectOptions
=
async
()
=>
{
const
res
=
await
PublicApi
.
getMember
ValidateCommit
Pageitems
();
const
res
=
await
PublicApi
.
getMember
AbilityInfo
Pageitems
();
if
(
res
.
code
===
1000
)
{
const
{
data
}
=
res
;
const
{
data
=
{}
}:
any
=
res
;
const
{
outerStatus
=
[],
}
=
data
;
const
newColumns
=
columns
.
slice
();
// filter 0 过滤掉全部选项
coverColFiltersItem
(
newColumns
,
'outerStatusName'
,
outerStatus
.
map
(
item
=>
({
text
:
item
.
text
,
value
:
item
.
id
})).
filter
(
item
=>
item
.
value
!==
0
),
);
setColumns
(
newColumns
);
return
{
memberType
:
fetchFilterOptions
(
data
.
memberTypes
),
roleId
:
fetchFilterOptions
(
data
.
memberRoles
),
level
:
fetchFilterOptions
(
data
.
memberLevels
),
source
:
fetchFilterOptions
(
data
.
memberSource
),
outerStatus
:
outerStatus
.
map
(
item
=>
({
label
:
item
.
text
,
value
:
item
.
id
})),
};
}
return
{};
};
const
fetchFilterOptions
=
data
=>
{
return
data
.
map
(
v
=>
({
label
:
v
.
text
,
value
:
v
.
id
}));
};
return
(
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'memberId'
,
// onChange: (pagination: any, filter: any) => handleSearch(filter),
dataSource
:
mock
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
...
...
@@ -205,10 +222,10 @@ const MemberQuery: React.FC<[]> = () => {
'name'
,
FORM_FILTER_PATH
,
);
//
useAsyncInitSelect(
// ['memberType', 'roleId', 'level', 'source
'],
//
fetchSelectOptions,
//
);
useAsyncInitSelect
(
[
'outerStatus
'
],
fetchSelectOptions
,
);
}
}
schema=
{
maintianSchema
}
/>
...
...
src/pages/member/memberQuery/schema/index.tsx
View file @
6874031a
...
...
@@ -19,62 +19,30 @@ export const maintianSchema: ISchema = {
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'
mega
-layout'
,
'x-component'
:
'
flex
-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
memberType
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
defaultValue
:
undefined
,
},
enum
:
[],
},
roleId
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
defaultValue
:
undefined
,
},
enum
:
[],
},
level
:
{
outerStatus
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
defaultValue
:
undefined
,
},
default
:
undefined
,
enum
:
[],
},
source
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'
请选择
'
,
defaultValue
:
undefined
,
placeholder
:
'
审核状态(全部)
'
,
allowClear
:
true
,
},
enum
:
[],
},
timeRange
:
{
'[startDate, endDate]'
:
{
type
:
'string'
,
default
:
''
,
'x-component'
:
'dateSelect'
,
'x-component-props'
:
{
placeholder
:
'
请选择'
,
defaultValue
:
undefined
,
placeholder
:
'
时间范围(全部)'
,
allowClear
:
true
,
},
enum
:
[
{
label
:
'时间范围(全部)'
,
value
:
0
},
{
label
:
'今天'
,
value
:
1
},
{
label
:
'一周内'
,
value
:
2
},
{
label
:
'一个月内'
,
value
:
3
},
{
label
:
'三个月内'
,
value
:
4
},
{
label
:
'六个月内'
,
value
:
5
},
{
label
:
'一年内'
,
value
:
6
},
{
label
:
'一年前'
,
value
:
7
},
],
},
submit
:
{
'x-component'
:
'Submit'
,
...
...
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