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
d04db7a0
Commit
d04db7a0
authored
Sep 07, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接完毕现有会员维护-》会员详情接口相关
parent
eae42aa1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
56 deletions
+112
-56
index.tsx
src/components/Charts/Pie/index.tsx
+1
-1
index.less
src/pages/member/components/LevelInfo/index.less
+1
-0
index.tsx
src/pages/member/components/LevelInfo/index.tsx
+1
-1
index.tsx
src/pages/member/components/SincerityInfo/index.tsx
+0
-0
sincerityInfo.tsx
src/pages/member/memberMaintain/detailed/sincerityInfo.tsx
+109
-54
No files found.
src/components/Charts/Pie/index.tsx
View file @
d04db7a0
...
...
@@ -245,7 +245,7 @@ class Pie extends Component<PieProps, PieState> {
'x*y*percent'
,
(
x
:
string
,
y
:
number
,
p
:
number
)
=>
({
name
:
x
,
value
:
`
${
y
}
|
${(
p
*
100
).
toFixed
(
2
)}
%
`
,
value
:
`
${
y
}
`
,
}),
];
...
...
src/pages/member/components/LevelInfo/index.less
View file @
d04db7a0
...
...
@@ -25,6 +25,7 @@
z-index: 0;
&-name {
min-height: 33px;
margin-bottom: 48px;
line-height: 33px;
font-size: 24px;
...
...
src/pages/member/components/LevelInfo/index.tsx
View file @
d04db7a0
...
...
@@ -156,7 +156,7 @@ const LevelInfo: React.FC<LevelInfoProps> = ({
padding=
{
[
10
,
20
,
50
,
60
]
}
scale=
{
{
x
:
{
alias
:
'2021年'
,
// 别名
alias
:
`${new Date().getFullYear()}年`
,
// 别名
},
y
:
{
tickCount
:
5
,
...
...
src/pages/member/components/SincerityInfo/index.tsx
View file @
d04db7a0
This diff is collapsed.
Click to expand it.
src/pages/member/memberMaintain/detailed/sincerityInfo.tsx
View file @
d04db7a0
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
Info
,
{
BasicInfo
,
EstimateSum
}
from
'../../components/SincerityInfo'
;
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
[
estimateSum
,
setEstimateSum
]
=
useState
<
EstimateSum
>
(
null
);
const
[
estimateSumLoading
,
setEstimateSumLoading
]
=
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
);
...
...
@@ -53,8 +57,8 @@ const SincerityInfo: React.FC<{}> = () => {
});
};
const
getEstimateSum
=
()
=>
{
setEstimateSumLoading
(
true
);
const
get
Sales
EstimateSum
=
()
=>
{
set
Sales
EstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailCreditTradeSummary
({
memberId
:
id
,
validateId
,
...
...
@@ -64,62 +68,102 @@ const SincerityInfo: React.FC<{}> = () => {
}
const
{
rows
=
[]
}
=
(
res
.
data
||
{});
const
mock
=
[
{
before180days
:
1
,
last7days
:
1
,
last30days
:
1
,
last180days
:
1
,
star
:
1
,
sum
:
1
,
},
{
before180days
:
2
,
last7days
:
2
,
last30days
:
2
,
last180days
:
2
,
star
:
2
,
sum
:
2
,
},
{
before180days
:
3
,
last7days
:
3
,
last30days
:
3
,
last180days
:
3
,
star
:
3
,
sum
:
3
,
},
{
before180days
:
4
,
last7days
:
4
,
last30days
:
4
,
last180days
:
4
,
star
:
4
,
sum
:
4
,
},
{
before180days
:
5
,
last7days
:
5
,
last30days
:
5
,
last180days
:
5
,
star
:
5
,
sum
:
5
,
},
];
setSalesEstimateSum
({
dataSource
:
rows
,
});
}).
finally
(()
=>
{
setSalesEstimateSumLoading
(
false
);
});
};
const
getAfterEstimateSum
=
()
=>
{
setAfterEstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailCreditAftersaleSummary
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
const
{
rows
=
[]
}
=
(
res
.
data
||
{});
setEstimateSum
({
dataSource
:
mock
,
set
After
EstimateSum
({
dataSource
:
rows
,
});
}).
finally
(()
=>
{
setEstimateSumLoading
(
false
);
setAfterEstimateSumLoading
(
false
);
});
};
const
getComplaintSum
=
()
=>
{
setSalesEstimateSumLoading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailCreditComplainSummary
({
memberId
:
id
,
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setComplainSum
({
dataSource
:
res
.
data
,
});
}).
finally
(()
=>
{
setSalesEstimateSumLoading
(
false
);
});
};
useEffect
(()
=>
{
getBasicInfo
();
getEstimateSum
();
getSalesEstimateSum
();
getAfterEstimateSum
();
getComplaintSum
();
},
[]);
const
getSalesList
=
(
params
)
=>
{
return
new
Promise
<
{
data
:
SalesProps
[]
,
totalCount
:
number
}
>
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberAbilityMaintenanceDetailCreditTradeHistoryPage
({
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
.
getMemberAbilityMaintenanceDetailCreditAftersaleHistoryPage
({
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
.
getMemberAbilityMaintenanceDetailCreditComplainHistoryPage
({
memberId
:
id
,
validateId
,
...
params
,
}).
then
(
res
=>
{
const
{
data
=
[],
totalCount
=
0
}
=
res
.
data
;
resolve
({
data
,
totalCount
});
}).
catch
(
err
=>
{
reject
(
err
);
});
});
};
return
(
<
div
>
<
Info
...
...
@@ -127,10 +171,21 @@ const SincerityInfo: React.FC<{}> = () => {
...
basicInfo
,
loading
:
infoLoading
,
}
}
estimateSum=
{
{
...
estimateSum
,
loading
:
estimateSumLoading
,
salesEstimateSum=
{
{
...
salesEstimateSum
,
loading
:
salesEstimateSumLoading
,
}
}
fetchSalesList=
{
getSalesList
}
afterEstimateSum=
{
{
...
afterEstimateSum
,
loading
:
afterEstimateSumLoading
,
}
}
fetchAfterList=
{
getAfterList
}
complaintSum=
{
{
...
complainSum
,
loading
:
complainSumLoading
,
}
}
fetchComplaintList=
{
getComplaintList
}
/>
</
div
>
);
...
...
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