import React, { Component } from "react"; import moment from 'moment'; // import { // } from '../../../services/api'; import { Button, Form, Select, DatePicker, Input } from "antd"; const { RangePicker } = DatePicker; const { Option } = Select; // const formItemLayout = { // labelCol: { // xs: { span: 5 }, // sm: { span: 5 }, // }, // wrapperCol: { // xs: { span: 18 }, // sm: { span: 18 }, // }, // }; @Form.create() export default class Messages extends Component { constructor(props, context) { super(props, context); this.state = { month: [], mode: ['month', 'month'] }; } componentDidMount() { this.props.onSearch(this.props.form.getFieldsValue()); } _search = (e) => { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { // 搜索的时候重置为第一页 values.pageNumber = 1; this.props.onSearch(values); } }); } _reset = () => { this.props.form.resetFields(); this.setState({ month: [] }); const data = this.props.form.getFieldsValue(); data.month = []; this.props.onSearch(data); } render() { const { getFieldDecorator } = this.props.form; return (
{getFieldDecorator('keyword', { initialValue: '' })( )} {getFieldDecorator('bizInvoiceType', { initialValue: '0' })( , )} {getFieldDecorator('month',{ initialValue: this.state.month })( { this.setState({ month: value }); }} /> )} {getFieldDecorator('drawerConfirm', { initialValue: '' })( )} {getFieldDecorator('receiverConfirm', { initialValue: '' })( )} {/* {getFieldDecorator('makeStatus', { initialValue: '' })( )} */}
); } }