|
|
|
@ -16,14 +16,24 @@ import zhCNlocale from 'antd/es/date-picker/locale/zh_CN';
|
|
|
|
|
class AgentGroup extends Component {
|
|
|
|
|
|
|
|
|
|
static contextType = stores_Context;
|
|
|
|
|
|
|
|
|
|
state = {
|
|
|
|
|
selectedRowKeys: [],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
console.info('AgentGroup.componentDidMount');
|
|
|
|
|
const {customerServicesStore} = this.context;
|
|
|
|
|
customerServicesStore.fetchAgentList();
|
|
|
|
|
// const {customerServicesStore} = this.context;
|
|
|
|
|
// customerServicesStore.fetchAgentList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleSearchClick() {
|
|
|
|
|
const {customerServicesStore} = this.context;
|
|
|
|
|
customerServicesStore.fetchAgentList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
@ -32,12 +42,14 @@ class AgentGroup extends Component {
|
|
|
|
|
const agentListColumns = customerServicesStore.agentListColumns;
|
|
|
|
|
const groupList = customerServicesStore.groupList;
|
|
|
|
|
const groupListColumns = customerServicesStore.groupListColumns;
|
|
|
|
|
const {startDate, endDate, dateType} = customerServicesStore;
|
|
|
|
|
const { selectedRowKeys } = this.state;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}>
|
|
|
|
|
<Col md={8} lg={7} xxl={6}>
|
|
|
|
|
<Select value={"ConfirmDate"} style={{ width: "95%" }} onChange={(value) => console.info(value)}>
|
|
|
|
|
<Select value={dateType} style={{ width: "95%" }} onChange={(value) => customerServicesStore.selectDateType(value)}>
|
|
|
|
|
<Select.Option key="1" value="startDate">
|
|
|
|
|
走团日期
|
|
|
|
|
</Select.Option>
|
|
|
|
@ -50,8 +62,8 @@ class AgentGroup extends Component {
|
|
|
|
|
<DatePicker.RangePicker
|
|
|
|
|
format={config.DATE_FORMAT} locale={zhCNlocale}
|
|
|
|
|
allowClear={false}
|
|
|
|
|
value={[moment().startOf('week').subtract(7, 'days'), moment().endOf('week').subtract(7, 'days')]}
|
|
|
|
|
onChange={(dates) => {console.info(dates)}}
|
|
|
|
|
value={[startDate, endDate]}
|
|
|
|
|
onChange={(dates) => {customerServicesStore.selectDateRange(dates[0], dates[1])}}
|
|
|
|
|
ranges={{
|
|
|
|
|
'本周': [moment().startOf('week'), moment().endOf('week')],
|
|
|
|
|
'上周': [moment().startOf('week').subtract(7, 'days'), moment().endOf('week').subtract(7, 'days')],
|
|
|
|
@ -70,7 +82,7 @@ class AgentGroup extends Component {
|
|
|
|
|
icon={<SearchOutlined />}
|
|
|
|
|
loading={false}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
console.info('click...');
|
|
|
|
|
this.handleSearchClick();
|
|
|
|
|
}}>
|
|
|
|
|
统计
|
|
|
|
|
</Button>
|
|
|
|
@ -78,7 +90,27 @@ class AgentGroup extends Component {
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
<Table dataSource={agentList} columns={agentListColumns} size="small" rowKey={(record) => record.key} loading={false} pagination={false} scroll={{ x: "100%" }} />
|
|
|
|
|
<Table
|
|
|
|
|
dataSource={agentList}
|
|
|
|
|
columns={agentListColumns}
|
|
|
|
|
size="small"
|
|
|
|
|
rowKey={(record) => record.key}
|
|
|
|
|
loading={false}
|
|
|
|
|
pagination={false}
|
|
|
|
|
scroll={{ x: "100%" }}
|
|
|
|
|
// rowSelection={{
|
|
|
|
|
// type: 'radio',
|
|
|
|
|
// selectedRowKeys,
|
|
|
|
|
// onChange: (selectedRowKeys) => {
|
|
|
|
|
// console.info({ selectedRowKeys });
|
|
|
|
|
// },
|
|
|
|
|
// }}
|
|
|
|
|
onRow={(agent) => ({
|
|
|
|
|
onClick: () => {
|
|
|
|
|
customerServicesStore.selectAgent(agent);
|
|
|
|
|
},
|
|
|
|
|
})}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|