Commit b5769fff authored by XieZhiXiong's avatar XieZhiXiong

后台补充字段对接

parent d5b3367e
......@@ -39,4 +39,24 @@
/* autoprefixer: on */
-webkit-line-clamp: @line;
overflow: hidden;
}
.silkyScrollbar() {
&::-webkit-scrollbar {
height: 8px;
width: 6px;
background: #f0f2f5;
border-radius: 5px;
}
&::-webkit-scrollbar-button {
display: none;
}
&::-webkit-scrollbar-thumb {
width: 8px;
min-height: 15px;
background: rgba(0,0,0,.2);
border-radius: 5px;
}
}
\ No newline at end of file
@import '../../../../global/styles/utils.less';
.equityInfo {
.container {
display: flex;
......@@ -9,7 +11,7 @@
border-radius: 8px;
&-title {
margin-bottom: 24px;
margin-bottom: 20px;
line-height: 24px;
font-size: 16px;
font-weight: 500;
......@@ -23,11 +25,14 @@
.tofo {
display: flex;
padding: 0;
padding: 0 0 4px;
margin: 0;
min-height: 101px;
overflow-x: auto;
.silkyScrollbar();
&-item {
flex: 1;
flex: 0 0 33.333%;
list-style: none;
&-logo {
......
......@@ -3,6 +3,7 @@ import {
Row,
Col,
Tabs,
Tooltip,
} from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import classNames from 'classnames';
......@@ -47,12 +48,28 @@ export interface EquityInfoProps {
sumReturnMoney?: number, // 累计返现金额
sumUsedPoint?: number, // 已用积分
sumPoint?: number, // 累计积分
rights?: {
acquireWay: string,
id: number,
name: string,
paramWay: string,
parameter: string,
remark: string,
rightTypeEnum: number,
status: number,
}[];
};
fetchReceivedList?: (params: FetchParams) => Promise<{ data: ReceivedData[] , totalCount: number }>;
fetchUsageList?: (params: FetchParams) => Promise<{ data: UsageData[] , totalCount: number }>;
}
const equityTxtMap = {
1: '折扣',
2: '返现',
3: '积分',
};
const EquityInfo: React.FC<EquityInfoProps> = ({
equityInfo = {},
fetchReceivedList,
......@@ -216,44 +233,26 @@ const EquityInfo: React.FC<EquityInfoProps> = ({
<div className={styles['container-content']}>
<ul className={styles.tofo}>
<li className={styles['tofo-item']}>
<div className={styles['tofo-item-logo']}>
<img src={equity3} />
</div>
<div className={styles['tofo-item-title']}>
价格权益
<QuestionCircleOutlined />
</div>
<div className={styles['tofo-item-extra']}>
<span className={classNames(styles['tofo-item-tag'], styles['tofo-item-tag-price'])}>95% 折扣</span>
</div>
</li>
<li className={styles['tofo-item']}>
<div className={styles['tofo-item-logo']}>
<img src={equity1} />
</div>
<div className={styles['tofo-item-title']}>
返现权益
<QuestionCircleOutlined />
</div>
<div className={styles['tofo-item-extra']}>
<span className={classNames(styles['tofo-item-tag'], styles['tofo-item-tag-recurrence'])}>0.1% 返现</span>
</div>
</li>
<li className={styles['tofo-item']}>
<div className={styles['tofo-item-logo']}>
<img src={equity2} />
</div>
<div className={styles['tofo-item-title']}>
积分权益
<QuestionCircleOutlined />
</div>
<div className={styles['tofo-item-extra']}>
<span className={classNames(styles['tofo-item-tag'], styles['tofo-item-tag-integral'])}>1% 积分</span>
</div>
</li>
{equityInfo.rights ? equityInfo.rights.map(item => (
<li key={item.id} className={styles['tofo-item']}>
<div className={styles['tofo-item-logo']}>
<img src={require(`@/assets/imgs/equity-${item.rightTypeEnum}.png`)} />
</div>
<div className={styles['tofo-item-title']}>
{item.name}
<Tooltip title={item.remark}>
<QuestionCircleOutlined />
</Tooltip>
</div>
<div className={styles['tofo-item-extra']}>
<span
className={classNames(styles['tofo-item-tag'], styles['tofo-item-tag-price'])}
>
{item.parameter} {equityTxtMap[item.rightTypeEnum] || ''}
</span>
</div>
</li>
)) : null}
</ul>
</div>
</div>
......
......@@ -119,16 +119,6 @@ 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']}>
......
......@@ -5,7 +5,7 @@ import {
Tabs,
Card,
Tooltip,
Radio,
Button,
Spin,
} from 'antd';
import {
......@@ -425,12 +425,13 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
};
// 获取交易评价记录列表
const getSalesRecordList = () => {
const getSalesRecordList = (extraParams: {[key: string]: any} = {}) => {
if (fetchSalesList) {
setSalesListLoading(true);
fetchSalesList({
current: salesPage,
pageSize: salesSize,
...extraParams,
}).then(res => {
const { data = [], totalCount = 0 } = (res || {});
setSalesList(data);
......@@ -442,12 +443,13 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
};
// 获取售后评价记录列表
const getAfterRecordList = () => {
const getAfterRecordList = (extraParams: {[key: string]: any} = {}) => {
if (fetchAfterList) {
setAfterListLoading(true);
fetchAfterList({
current: afterPage,
pageSize: afterSize,
...extraParams,
}).then(res => {
const { data = [], totalCount = 0 } = (res || {});
setAfterList(data);
......@@ -529,6 +531,20 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
getComplaintList();
};
const handleSalesRadioChange = value => {
setSalesPage(1);
getSalesRecordList({
starLevel: value,
});
};
const handleAfterRadioChange = value => {
setAfterPage(1);
getAfterRecordList({
starLevel: value,
});
};
return (
<div className={styles.sincerityInfo}>
<Row gutter={[0, 24]}>
......@@ -582,12 +598,12 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
onChange={handleSalesTabChange}
tabBarExtraContent={
salesTabKey === 'evaluateRecord' ? (
<Radio.Group onChange={() => { }}>
<Radio.Button value="good">好评</Radio.Button>
<Radio.Button value="notBad">中评</Radio.Button>
<Radio.Button value="bad">差评</Radio.Button>
<Radio.Button value="all">全部</Radio.Button>
</Radio.Group>
<>
<Button type="text" onClick={() => handleSalesRadioChange(3)}>好评</Button>
<Button type="text" onClick={() => handleSalesRadioChange(2)}>中评</Button>
<Button type="text" onClick={() => handleSalesRadioChange(1)}>差评</Button>
<Button type="text" onClick={() => handleSalesRadioChange(0)}>全部</Button>
</>
) : null
}
>
......@@ -646,12 +662,12 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
onChange={handleAfterTabChange}
tabBarExtraContent={
afterTabKey === 'evaluateRecord' ? (
<Radio.Group onChange={() => { }}>
<Radio.Button value="good">好评</Radio.Button>
<Radio.Button value="notBad">中评</Radio.Button>
<Radio.Button value="bad">差评</Radio.Button>
<Radio.Button value="all">全部</Radio.Button>
</Radio.Group>
<>
<Button type="text" onClick={() => handleAfterRadioChange(3)}>好评</Button>
<Button type="text" onClick={() => handleAfterRadioChange(2)}>中评</Button>
<Button type="text" onClick={() => handleAfterRadioChange(1)}>差评</Button>
<Button type="text" onClick={() => handleAfterRadioChange(0)}>全部</Button>
</>
) : null
}
>
......@@ -705,16 +721,11 @@ const SincerityInfo: React.FC<SincerityInfoProps> = ({
<Col span={24}>
<MellowCard title="投诉记录">
<div className={styles['record-btns']}>
<Radio.Group
buttonStyle="solid"
onChange={() => { }}
>
<Radio.Button value="all">全部({complaintSumData?.sum})</Radio.Button>
<Radio.Button value="day7">最近7天({complaintSumData?.last7days})</Radio.Button>
<Radio.Button value="day30">最近30天({complaintSumData?.last30days})</Radio.Button>
<Radio.Button value="day180">最近180天({complaintSumData?.last180days})</Radio.Button>
<Radio.Button value="day180+">180天前({complaintSumData?.before180days})</Radio.Button>
</Radio.Group>
<Button type="text">全部({complaintSumData?.sum})</Button>
<Button type="text">最近7天({complaintSumData?.last7days})</Button>
<Button type="text">最近30天({complaintSumData?.last30days})</Button>
<Button type="text">最近180天({complaintSumData?.last180days})</Button>
<Button type="text">180天前({complaintSumData?.before180days})</Button>
</div>
<PolymericTable
......
......@@ -66,6 +66,7 @@ const EquityInfo: React.FC<{}> = () => {
sumReturnMoney: equityInfo?.sumReturnMoney,
sumUsedPoint: equityInfo?.sumUsedPoint,
sumPoint: equityInfo?.sumPoint,
rights: equityInfo?.rights,
}}
fetchReceivedList={getReceivedList}
fetchUsageList={getUsageList}
......
......@@ -66,6 +66,7 @@ const EquityInfo: React.FC<{}> = () => {
sumReturnMoney: equityInfo?.sumReturnMoney,
sumUsedPoint: equityInfo?.sumUsedPoint,
sumPoint: equityInfo?.sumPoint,
rights: equityInfo?.rights,
}}
fetchReceivedList={getReceivedList}
fetchUsageList={getUsageList}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment