增加表格排序

feature/2.0-sales-trade
LiaoYijun 3 years ago
parent b74c97d4a5
commit 035e92a648

@ -56,14 +56,6 @@ const App = () => {
{ key: 35, label: <NavLink to="/whatsapp_session">WhatsApp会话存档</NavLink> },
],
},
{
key: 3,
label: "客服",
icon: <WechatOutlined />,
children: [
{ key: 36, label: <NavLink to="/AgentGroup">地接社接团</NavLink> },
],
},
{
key: 4,
label: "财务",
@ -73,6 +65,14 @@ const App = () => {
{ key: 42, label: <NavLink to="/exchange_rate">汇率</NavLink> },
],
},
{
key: 6,
label: "客服",
icon: <WechatOutlined />,
children: [
{ key: 61, label: <NavLink to="/AgentGroup">地接社接团</NavLink> },
],
}
];
return (

@ -47,8 +47,8 @@ class AgentGroup extends Component {
return (
<>
<Space direction="vertical" style={{width: '100%'}}>
<Row gutter={{md: 24}}>
<Col md={8} lg={7} xxl={6}>
<Row gutter={{md: 24}} justify="end">
<Col span={4}>
<Select value={dateType} style={{ width: "95%" }} onChange={(value) => customerServicesStore.selectDateType(value)}>
<Select.Option key="1" value="startDate">
走团日期
@ -58,7 +58,7 @@ class AgentGroup extends Component {
</Select.Option>
</Select>
</Col>
<Col span={8}>
<Col span={4}>
<DatePicker.RangePicker
format={config.DATE_FORMAT} locale={zhCNlocale}
allowClear={false}
@ -76,7 +76,7 @@ class AgentGroup extends Component {
}}
/>
</Col>
<Col md={8}>
<Col span={4}>
<Button
type="primary"
icon={<SearchOutlined />}

@ -141,39 +141,56 @@ class CustomerServices {
agentListColumns = [
{
title: '地接社名称',
dataIndex: 'VendorName'
dataIndex: 'VendorName',
render: (text) => <a>{text}</a>
},
{
title: '团数',
dataIndex: 'GroupCount'
dataIndex: 'GroupCount',
defaultSortOrder: 'descend',
sorter: (a, b) => a.GroupCount - b.GroupCount
},
{
title: '人数',
dataIndex: 'PersonNum'
dataIndex: 'PersonNum',
defaultSortOrder: 'descend',
sorter: (a, b) => a.PersonNum - b.PersonNum
},
{
title: '团天数',
dataIndex: 'GroupDays'
dataIndex: 'GroupDays',
defaultSortOrder: 'descend',
sorter: (a, b) => a.GroupDays - b.GroupDays
},
{
title: '交易额',
dataIndex: 'totalcost'
dataIndex: 'totalcost',
defaultSortOrder: 'descend',
sorter: (a, b) => a.totalcost - b.totalcost
},
{
title: '好评数',
dataIndex: 'GoodCount'
dataIndex: 'GoodCount',
defaultSortOrder: 'descend',
sorter: (a, b) => a.GoodCount - b.GoodCount
},
{
title: '好评率',
dataIndex: 'GoodRate'
dataIndex: 'GoodRate',
defaultSortOrder: 'descend',
sorter: (a, b) => parseInt(a.GoodRate) - parseInt(b.GoodRate)
},
{
title: '差评数',
dataIndex: 'BadCount'
dataIndex: 'BadCount',
defaultSortOrder: 'descend',
sorter: (a, b) => a.BadCount - b.BadCount
},
{
title: '差评率',
dataIndex: 'BadRate'
dataIndex: 'BadRate',
defaultSortOrder: 'descend',
sorter: (a, b) => parseInt(a.BadRate) - parseInt(b.BadRate)
}
];
}

Loading…
Cancel
Save