完成地接社接团数据增加查询条件,收缩评论和城市

feature/2.0-sales-trade
Jimmy Liow 3 years ago
parent ede4834577
commit a62d5c744c

@ -48,7 +48,6 @@ class CustomerServices {
.append('DepList', this.selectedTeam)
.append('Country', this.selectedCountry)
.build();
console.info('fetchUrl: ' + fetchUrl);
req.fetchJSON(fetchUrl)
.then(json => {
if (json.errcode === 0) {
@ -167,16 +166,26 @@ class CustomerServices {
fetchGroupListByAgentId(agentId) {
this.inProgress = true;
this.selectedAgent = {VendorName: '...'};
this.agentCompany = '...';
this.groupList = [];
this.groupListColumns = [];
req.fetchJSON(config.HT_HOST + '/service-web/QueryData/GetAgentGroupInfo?VEI_SN=' + agentId + '&DateType=' + this.dateType + '&Date1=' + this.startDateString + '&Date2=' + this.endDateString + '&OldDate1=' + this.startDateString + '&OldDate2=' + this.endDateString)
const fetchUrl = prepareUrl(config.HT_HOST + '/service-web/QueryData/GetAgentGroupInfo')
.append('VEI_SN', agentId)
.append('DateType', this.dateType)
.append('Date1', this.startDateString)
.append('Date2', this.endDateString)
.append('OldDate1', this.startDateString)
.append('OldDate2', this.endDateString)
.append('DepList', this.selectedTeam)
.append('Country', this.selectedCountry)
.build();
req.fetchJSON(fetchUrl)
.then(json => {
if (json.errcode === 0) {
runInAction(() => {
this.groupList = json.result1;
if (json.result1.length > 0) {
this.selectedAgent = {VendorName: json.result1[0].VendorName};
this.agentCompany = json.result1[0].VendorName;
}
const total1 = json.total1;
this.groupListColumns = [
@ -220,20 +229,20 @@ class CustomerServices {
]
},
{
title: '经过城市',
dataIndex: 'PassCity',
title: '导游',
dataIndex: 'GuideName',
children: [{
title: '-',
dataIndex: 'PassCity'
dataIndex: 'GuideName'
}
]
},
{
title: '导游',
dataIndex: 'GuideName',
title: '前勤分',
dataIndex: 'qianqin',
children: [{
title: '-',
dataIndex: 'GuideName'
dataIndex: 'qianqin'
}
]
},
@ -256,15 +265,6 @@ class CustomerServices {
dataIndex: 'Bad'
}
]
},
{
title: '评论内容',
dataIndex: 'ECI_Content',
children: [{
title: '-',
dataIndex: 'ECI_Content'
}
]
}
];
});

@ -1,5 +1,5 @@
import React, {useContext, useEffect} from 'react';
import {Row, Col, Typography, Space, DatePicker, Button, Select, Table} from 'antd';
import {Row, Col, Typography, Space, DatePicker, Button, Select, Table, List} from 'antd';
import {
SearchOutlined,
} from '@ant-design/icons';
@ -28,8 +28,48 @@ const GroupList = () => {
<>
<Space direction="vertical" style={{width: '100%'}}>
<Row gutter={{md: 24}} justify="end">
<Col span={12}>
<Col span={4}>
<NavLink to={'/AgentGroupCount'}>返回</NavLink>
</Col>
<Col span={4}>
<Select
style={{ width: "95%" }}
value={customerServicesStore.selectedTeam}
onChange={(value) => customerServicesStore.selectTeam(value)}
>
<Select.Option key="0" value="">所有小组</Select.Option>
<Select.Option key="31" value="1,2,28,7">GH事业部</Select.Option>
<Select.Option key="32" value="8,9,11,12,20,21">国际事业部</Select.Option>
<Select.Option key="33" value="10,18,16,30">孵化学院</Select.Option>
<Select.Option key="1" value="1">CH直销</Select.Option>
<Select.Option key="2" value="2">CH大客户</Select.Option>
<Select.Option key="28" value="28">AH</Select.Option>
<Select.Option key="7" value="7">市场推广</Select.Option>
<Select.Option key="8" value="8">德语</Select.Option>
<Select.Option key="9" value="9">日语</Select.Option>
<Select.Option key="11" value="11">法语</Select.Option>
<Select.Option key="12" value="12">西语</Select.Option>
<Select.Option key="20" value="20">俄语</Select.Option>
<Select.Option key="21" value="21">意语</Select.Option>
<Select.Option key="10" value="10">商旅</Select.Option>
<Select.Option key="18" value="18">CT</Select.Option>
<Select.Option key="16" value="16">APP</Select.Option>
<Select.Option key="30" value="30">Trippest</Select.Option>
<Select.Option key="31" value="31">花梨鹰</Select.Option>
</Select>
</Col>
<Col span={4}>
<Select value={customerServicesStore.selectedCountry} style={{ width: "95%" }} onChange={(value) => customerServicesStore.selectCountry(value)}>
<Select.Option key="ALL" value="">
所有国家
</Select.Option>
<Select.Option key="china" value="china">
国内
</Select.Option>
<Select.Option key="foreign" value="foreign">
国外
</Select.Option>
</Select>
</Col>
<Col span={4}>
<Select value={dateType} style={{ width: "95%" }} onChange={(value) => customerServicesStore.selectDateType(value)}>
@ -66,7 +106,7 @@ const GroupList = () => {
loading={inProgress}
onClick={() => {
customerServicesStore.fetchGroupListByAgentId(agentId);
customerServicesStore.fetchAgentList();
customerServicesStore.fetchAgentGroupList();
}}>
统计
</Button>
@ -74,8 +114,37 @@ const GroupList = () => {
</Row>
<Row>
<Col span={24}>
<Typography.Title level={3}>{customerServicesStore.selectedAgent.VendorName}</Typography.Title>
<Table dataSource={groupList} columns={groupListColumns} size="small" rowKey={(record) => record.key} loading={inProgress} pagination={false} scroll={{ x: "100%" }} />
<Typography.Title level={3}>{customerServicesStore.agentCompany}</Typography.Title>
<Table
dataSource={groupList}
columns={groupListColumns}
size="small"
rowKey={(record) => record.key}
loading={inProgress}
pagination={false}
scroll={{ x: "100%" }}
expandable={{
expandedRowRender: (record) => (
<List
itemLayout="horizontal"
>
<List.Item>
<List.Item.Meta
title='经过城市'
description={record.PassCity}
/>
</List.Item>
<List.Item>
<List.Item.Meta
title='评论内容'
description={record.ECI_Content}
/>
</List.Item>
</List>
),
}}
/>
</Col>
</Row>
</Space>

Loading…
Cancel
Save