|
@@ -1,33 +1,67 @@
|
|
|
-import { ProFormDatePicker, QueryFilter } from '@ant-design/pro-components';
|
|
|
+import ReportFileShow from '@/pages/product/report_form_config_reportcreater/reportFileShow';
|
|
|
import { SDPage } from '@sundata/ui-frame';
|
|
|
+import { Button, DatePicker, Form, Layout } from 'antd';
|
|
|
import React, { useRef, useState } from 'react';
|
|
|
-import {Button} from "antd";
|
|
|
+
|
|
|
+const { Header, Content, Footer } = Layout;
|
|
|
|
|
|
const g4b_1: React.FC<any> = () => {
|
|
|
const [visible, setVisible] = useState<boolean>(false); //弹窗是否显示
|
|
|
- const [dataSource, setDataSource] = useState<any>();
|
|
|
+ const [monthStr, setMonthStr] = useState<any>();
|
|
|
const monthRef = useRef();
|
|
|
+ // const monthRef02 = new Ref;
|
|
|
|
|
|
const downloadReportExcel = () => {};
|
|
|
|
|
|
- const showHtml = () =>{
|
|
|
- console.log(monthRef.current)
|
|
|
- }
|
|
|
+ const showHtml = () => {
|
|
|
+ console.log(monthRef.current);
|
|
|
+ // monthRef.current.value;
|
|
|
+ };
|
|
|
+
|
|
|
+ const [form] = Form.useForm();
|
|
|
|
|
|
+ // 自定义的提交方法
|
|
|
+ const handleSubmit = (values: any) => {
|
|
|
+ console.log('Received values of form: ', values.month.format('YYYYMM'));
|
|
|
+ setMonthStr(values.month.format('YYYYMM'));
|
|
|
+ // 在这里调用你自己的方法
|
|
|
+ };
|
|
|
|
|
|
return (
|
|
|
<SDPage>
|
|
|
- <QueryFilter
|
|
|
- defaultCollapsed
|
|
|
- split
|
|
|
- optionRender={(searchConfig) => [
|
|
|
- <Button key="submit" onClick={() => showHtml} type="primary">
|
|
|
- 查询
|
|
|
- </Button>,
|
|
|
- ]}
|
|
|
- >
|
|
|
- <ProFormDatePicker.Month dataFormat={'YYYYMM'} fieldRef={monthRef} label={'期次'} />
|
|
|
- </QueryFilter>
|
|
|
+ <Layout>
|
|
|
+ {/*<Header >*/}
|
|
|
+ <Form
|
|
|
+ layout={'inline'}
|
|
|
+ form={form}
|
|
|
+ name="basic"
|
|
|
+ initialValues={{ remember: true }}
|
|
|
+ // ref={monthRef}
|
|
|
+ onFinish={handleSubmit} // 使用自定义的提交方法
|
|
|
+ style={{ maxWidth: 'inline' }}
|
|
|
+ >
|
|
|
+ <Form.Item
|
|
|
+ label="期次"
|
|
|
+ name="month"
|
|
|
+ // labelCol={{ span: 8 }}
|
|
|
+ // wrapperCol={{ span: 16 }}
|
|
|
+ rules={[{ required: true, message: '请选择月份' }]}
|
|
|
+ >
|
|
|
+ {/*<Input />*/}
|
|
|
+ <DatePicker format="YYYY-MM" type={'month'} />
|
|
|
+ </Form.Item>
|
|
|
+ <Form.Item>
|
|
|
+ <Button type="primary" htmlType="submit">
|
|
|
+ 查询
|
|
|
+ </Button>
|
|
|
+ </Form.Item>
|
|
|
+ </Form>
|
|
|
+
|
|
|
+ {/*</Header>*/}
|
|
|
+ <Content>
|
|
|
+ <ReportFileShow term={monthStr} reportNo="G4B_1" />
|
|
|
+ </Content>
|
|
|
+ </Layout>
|
|
|
</SDPage>
|
|
|
);
|
|
|
};
|