import {
    Row,
    Col,
    Form,
    Input,
    DatePicker,
    Button,
} from 'antd';
import { DownOutlined } from '@ant-design/icons';
import style from "@/global.less";
const FormItem = Form.Item;

const Aa01RenderSimpleForm = (props) => {

    const [form] = Form.useForm();

    const { submitButtons, handleSearch, handleFormReset, toggleForm } = props;

    const onFinish = values => {
        //console.log('Received values of form: ', values);
        handleSearch(values);
    };

    const myhandleFormReset = () => {
        form.resetFields();
        handleFormReset();
    };

    return (

        <Form form={form} onFinish={onFinish} layout="inline">

            <Row gutter={{ md: 8, lg: 24, xl: 48 }} style={{ width: '100%' }} className={style.searchinput}>

                <Col md={8} sm={24}>
                    <FormItem label="本单位工龄" name="aa0101">
                        <Input placeholder="" style={{ width: '100%' }} />
                    </FormItem>
                </Col>

                <Col md={8} sm={24}>
                    <FormItem label="人工成本统计标识" name="aa0106">
                        <Input placeholder="" style={{ width: '100%' }} />
                    </FormItem>
                </Col>


                <Col md={8} sm={24}>
                    <div style={{ marginBottom: 12, display: 'flex', justifyContent: 'flex-end' }}>
                        <Button type="primary" htmlType="submit">
                            查询
                        </Button>
                        <Button style={{ marginLeft: 8 }} onClick={myhandleFormReset}>
                            重置
                        </Button>
                        <a style={{ marginLeft: 8, lineHeight: '32px' }} onClick={toggleForm}>
                            展开 <DownOutlined />
                        </a>
                    </div>
                </Col>
            </Row>

        </Form>

    );


};

export default Aa01RenderSimpleForm;