perf: 订单>仪表盘-移动订单: 搜索组件
parent
40b07c503e
commit
51ae4c9cea
@ -1,41 +1,45 @@
|
||||
import React, {Component} from 'react';
|
||||
import {Table, Button, Space, Radio} from 'antd';
|
||||
import {SearchOutlined} from '@ant-design/icons';
|
||||
import GroupSelect from '../components/search/GroupSelect';
|
||||
import DatePickerCharts from "../components/search/DatePickerCharts";
|
||||
import {stores_Context} from "../config";
|
||||
import {observer} from "mobx-react";
|
||||
import React, { Component } from 'react';
|
||||
import { Table, } from 'antd';
|
||||
import SearchForm from './../components/search/SearchForm';
|
||||
import { stores_Context } from '../config';
|
||||
import { observer } from 'mobx-react';
|
||||
|
||||
class MobileDeal extends Component {
|
||||
static contextType = stores_Context;
|
||||
static contextType = stores_Context;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
const {dashboard_store} = this.context;
|
||||
const mobile_data = dashboard_store.mobile_data;
|
||||
return (
|
||||
<div>
|
||||
<h2>移动成交</h2>
|
||||
<GroupSelect store={mobile_data}/>
|
||||
<Space size="large">
|
||||
<DatePickerCharts hide_vs={true}/>
|
||||
|
||||
<Radio.Group value={mobile_data.date_type} onChange={mobile_data.onChange_datetype}>
|
||||
<Radio value="applyDate">预定日期</Radio>
|
||||
<Radio value="startDate">出发日期</Radio>
|
||||
</Radio.Group>
|
||||
|
||||
<Button type="primary" icon={<SearchOutlined/>} loading={mobile_data.loading} onClick={() => {
|
||||
mobile_data.asyncFetch();
|
||||
}}>统计</Button>
|
||||
</Space>
|
||||
<Table dataSource={mobile_data.data} columns={mobile_data.columns} pagination={false} size="small"/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
const { dashboard_store, date_picker_store } = this.context;
|
||||
const mobile_data = dashboard_store.mobile_data;
|
||||
return (
|
||||
<div>
|
||||
<h2>移动成交</h2>
|
||||
<SearchForm
|
||||
defaultValue={{
|
||||
initialValue: {
|
||||
...date_picker_store.formValues,
|
||||
...mobile_data.mobileSearchValues,
|
||||
},
|
||||
shows: ['DateType', 'DepartmentList', 'dates'],
|
||||
fieldProps: {
|
||||
DepartmentList: { show_all: false, mode: 'multiple', col: 24 },
|
||||
WebCode: { show_all: true },
|
||||
dates: { hide_vs: true, col: 12 },
|
||||
DateType: { col: 6, disabledKeys: ['ConfirmDate'] },
|
||||
},
|
||||
}}
|
||||
onSubmit={(_err, obj, form, str) => {
|
||||
dashboard_store.setMobileSearchValues(obj, form);
|
||||
mobile_data.asyncFetch();
|
||||
}}
|
||||
/>
|
||||
<Table dataSource={mobile_data.data} columns={mobile_data.columns} pagination={false} size="small" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default observer(MobileDeal);
|
||||
|
Loading…
Reference in New Issue