|
|
|
@ -1,23 +1,19 @@
|
|
|
|
|
import React, {useContext, useEffect} from 'react';
|
|
|
|
|
import {Row, Col, Divider, Table} from 'antd';
|
|
|
|
|
import {utils, writeFileXLSX} from 'xlsx';
|
|
|
|
|
import {stores_Context} from '../config';
|
|
|
|
|
import {observer} from 'mobx-react';
|
|
|
|
|
import React, { useContext, useEffect } from 'react';
|
|
|
|
|
import { Row, Col, Divider, Table } from 'antd';
|
|
|
|
|
import { utils, writeFileXLSX } from 'xlsx';
|
|
|
|
|
import { stores_Context } from '../config';
|
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
|
import SearchForm from './../components/search/SearchForm';
|
|
|
|
|
|
|
|
|
|
const Customer_care_regular = () => {
|
|
|
|
|
|
|
|
|
|
const {orders_store, date_picker_store, customer_store} = useContext(stores_Context);
|
|
|
|
|
const { orders_store, date_picker_store, customer_store } = useContext(stores_Context);
|
|
|
|
|
const regular_data = customer_store.regular_data;
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<Row gutter={16} style={{ margin: '-16px -8px', position: 'relative', top: 0, zIndex: 10 }}>
|
|
|
|
|
<Row gutter={16} className="sticky-top">
|
|
|
|
|
<Col className="gutter-row" span={24}>
|
|
|
|
|
<SearchForm
|
|
|
|
|
defaultValue={{
|
|
|
|
@ -39,12 +35,16 @@ const Customer_care_regular = () => {
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
<h2>老客户</h2>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
<Table dataSource={regular_data.data} loading={regular_data.loading} columns={
|
|
|
|
|
[
|
|
|
|
|
<Table
|
|
|
|
|
dataSource={regular_data.data}
|
|
|
|
|
loading={regular_data.loading}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '统计条目',
|
|
|
|
|
dataIndex: 'ItemName',
|
|
|
|
@ -64,7 +64,7 @@ const Customer_care_regular = () => {
|
|
|
|
|
title: '成行率',
|
|
|
|
|
dataIndex: 'SUCRate',
|
|
|
|
|
key: 'SUCRate',
|
|
|
|
|
render: (text, record) => <span>{Math.round(text * 100)}%</span>
|
|
|
|
|
render: (text, record) => <span>{Math.round(text * 100)}%</span>,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '毛利',
|
|
|
|
@ -76,18 +76,30 @@ const Customer_care_regular = () => {
|
|
|
|
|
dataIndex: 'PersonNum',
|
|
|
|
|
key: 'PersonNum',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
} size="small" pagination={false} rowKey={record => record.ItemName}
|
|
|
|
|
]}
|
|
|
|
|
size="small"
|
|
|
|
|
pagination={false}
|
|
|
|
|
rowKey={(record) => record.ItemName}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
<Divider orientation="right" plain><a
|
|
|
|
|
<Divider orientation="right" plain>
|
|
|
|
|
<a
|
|
|
|
|
onClick={() => {
|
|
|
|
|
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
|
|
|
|
|
writeFileXLSX(wb, "老客户.xlsx");
|
|
|
|
|
}}>导出excel</a></Divider>
|
|
|
|
|
<Table id="table_to_xlsx" pagination={false} loading={regular_data.loading} dataSource={regular_data.data_detail} scroll={{x: 1200 }} columns={
|
|
|
|
|
[
|
|
|
|
|
const wb = utils.table_to_book(document.getElementById('table_to_xlsx').getElementsByTagName('table')[0]);
|
|
|
|
|
writeFileXLSX(wb, '老客户.xlsx');
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
导出excel
|
|
|
|
|
</a>
|
|
|
|
|
</Divider>
|
|
|
|
|
<Table
|
|
|
|
|
id="table_to_xlsx"
|
|
|
|
|
pagination={false}
|
|
|
|
|
loading={regular_data.loading}
|
|
|
|
|
dataSource={regular_data.data_detail}
|
|
|
|
|
scroll={{ x: 1200 }}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '订单号',
|
|
|
|
|
dataIndex: 'COLI_ID',
|
|
|
|
@ -160,16 +172,13 @@ const Customer_care_regular = () => {
|
|
|
|
|
dataIndex: 'ZH',
|
|
|
|
|
key: 'ZH',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
} size="small"
|
|
|
|
|
rowKey={record => record.COLI_ID}
|
|
|
|
|
]}
|
|
|
|
|
size="small"
|
|
|
|
|
rowKey={(record) => record.COLI_ID}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
export default observer(Customer_care_regular);
|
|
|
|
|
|
|
|
|
|