增加表格排序

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

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

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

Loading…
Cancel
Save