You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import React, {Component} from 'react';
|
|
|
|
import {Table, Button, Space} from 'antd';
|
|
|
|
import {Line} from '@ant-design/charts';
|
|
|
|
import SiteSelect from './SiteSelect';
|
|
|
|
import {SearchOutlined} from '@ant-design/icons';
|
|
|
|
import * as config from '../config' ;
|
|
|
|
import {stores_Context} from "../config";
|
|
|
|
import DatePickerCharts from "./DatePickerCharts";
|
|
|
|
import {observer} from "mobx-react";
|
|
|
|
|
|
|
|
|
|
|
|
class OrdersTempTable extends Component {
|
|
|
|
|
|
|
|
static contextType = stores_Context;
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// componentDidMount() {
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const {dashboard_store} = this.context;
|
|
|
|
const ordersTemp_data=dashboard_store.ordersTemp_data;
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<h2>临时订单数量</h2>
|
|
|
|
<SiteSelect store={ordersTemp_data} />
|
|
|
|
<Space><DatePickerCharts hide_vs={true}/>
|
|
|
|
<Button type="primary" icon={<SearchOutlined/>} loading={ordersTemp_data.loading} onClick={() => {
|
|
|
|
ordersTemp_data.asyncFetch();
|
|
|
|
}}>统计</Button>
|
|
|
|
<Button type="primary" icon={<SearchOutlined/>} loading={ordersTemp_data.loading_detail} onClick={() => {
|
|
|
|
ordersTemp_data.asyncFetch_detail();
|
|
|
|
}}>查看详情</Button>
|
|
|
|
</Space>
|
|
|
|
{ordersTemp_data.show_table ? (
|
|
|
|
<Table dataSource={ordersTemp_data.data_detail} columns={ordersTemp_data.columns} size="small"/>
|
|
|
|
) : (
|
|
|
|
<Line {...ordersTemp_data.line} data={ordersTemp_data.data} />
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default observer(OrdersTempTable);
|