|
|
@ -1,4 +1,4 @@
|
|
|
|
import React, { useContext } from 'react';
|
|
|
|
import React, { useContext, useState } from 'react';
|
|
|
|
import { Row, Col, Divider, Table, Tooltip } from 'antd';
|
|
|
|
import { Row, Col, Divider, Table, Tooltip } from 'antd';
|
|
|
|
import { InfoCircleOutlined } from '@ant-design/icons';
|
|
|
|
import { InfoCircleOutlined } from '@ant-design/icons';
|
|
|
|
import { utils, writeFileXLSX } from 'xlsx';
|
|
|
|
import { utils, writeFileXLSX } from 'xlsx';
|
|
|
@ -6,10 +6,12 @@ import { stores_Context } from '../config';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import SearchForm from './../components/search/SearchForm';
|
|
|
|
import SearchForm from './../components/search/SearchForm';
|
|
|
|
import LineWithAvg from '../components/LineWithAvg';
|
|
|
|
import LineWithAvg from '../components/LineWithAvg';
|
|
|
|
|
|
|
|
import { flow } from 'mobx';
|
|
|
|
|
|
|
|
|
|
|
|
const Customer_care_regular = () => {
|
|
|
|
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;
|
|
|
|
const regular_data = customer_store.regular_data;
|
|
|
|
|
|
|
|
const [isCompareLine, setIsCompareLine] = useState(false);
|
|
|
|
|
|
|
|
|
|
|
|
// useEffect(() => {}, []);
|
|
|
|
// useEffect(() => {}, []);
|
|
|
|
|
|
|
|
|
|
|
@ -34,6 +36,7 @@ const Customer_care_regular = () => {
|
|
|
|
customer_store.setSearchValues(obj, form, 'regular_data');
|
|
|
|
customer_store.setSearchValues(obj, form, 'regular_data');
|
|
|
|
regular_data.data_compare=[];
|
|
|
|
regular_data.data_compare=[];
|
|
|
|
if (obj.DateDiff1 && obj.DateDiff2){
|
|
|
|
if (obj.DateDiff1 && obj.DateDiff2){
|
|
|
|
|
|
|
|
setIsCompareLine(true);
|
|
|
|
regular_data.showSum=false;
|
|
|
|
regular_data.showSum=false;
|
|
|
|
await customer_store.regular_customer_order();
|
|
|
|
await customer_store.regular_customer_order();
|
|
|
|
customer_store.regular_customer_order(false,true);
|
|
|
|
customer_store.regular_customer_order(false,true);
|
|
|
@ -41,6 +44,7 @@ const Customer_care_regular = () => {
|
|
|
|
customer_store.regular_customer_order(true,true,true);
|
|
|
|
customer_store.regular_customer_order(true,true,true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
else{
|
|
|
|
|
|
|
|
setIsCompareLine(false);
|
|
|
|
regular_data.showSum=true;
|
|
|
|
regular_data.showSum=true;
|
|
|
|
customer_store.regular_customer_order();
|
|
|
|
customer_store.regular_customer_order();
|
|
|
|
customer_store.regular_customer_order(true);
|
|
|
|
customer_store.regular_customer_order(true);
|
|
|
@ -113,7 +117,7 @@ const Customer_care_regular = () => {
|
|
|
|
|
|
|
|
|
|
|
|
<Col span={24}>
|
|
|
|
<Col span={24}>
|
|
|
|
<LineWithAvg dataSource={regular_data.pivotData} loading={regular_data.detail_loading} xField={regular_data.pivotX} yField={regular_data.pivotY}
|
|
|
|
<LineWithAvg dataSource={regular_data.pivotData} loading={regular_data.detail_loading} xField={regular_data.pivotX} yField={regular_data.pivotY}
|
|
|
|
seriesField='_ylabel' showSUM={regular_data.showSum} />
|
|
|
|
seriesField='_ylabel' showSUM={regular_data.showSum} solidLineTime={regular_data.solidLineTime} solidLineDash={regular_data.solidLineDash} isCompareLine={isCompareLine}/>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
|
|
|
|
<Col span={24}>
|
|
|
|
<Col span={24}>
|
|
|
|