import React, {Component} from 'react'; import {View, TouchableOpacity, Image, Text, SafeAreaView} from 'react-native'; import { DatePicker, Drawer, List, Provider, Tabs, Picker, InputItem, } from '@ant-design/react-native'; import NoticeMessage from "./notice_message"; import Message from "./message"; import public_css from '../../source/css/public_css'; import invoice_inquiry_css from '../tax/invoiceInquiry/invoice_inquiry_css'; export default class notice extends Component { constructor(props) { super(props); this.props.navigation.dangerouslyGetParent().setOptions({ tabBarVisible: false, }); this.state = { isShowSearch: false, visible1: false, tab: 0, clickNum: 0, beginDateTime: undefined, endDateTime: undefined, customerName: '', customerEntTaxId: '', invoiceCode: '', invoiceNumber: '', hongchongFlag: undefined, }; } render() { const tabs = [{title: '消息'}, {title: '公告'}]; return ( this.onChanges(i, l)} page={0}> ); } //tab变化事件 onChanges = (i, l) => { this.setState({ tab: l, clickNum: 0, beginDateTime: undefined, endDateTime: undefined, customerName: '', customerEntTaxId: '', invoiceCode: '', invoiceNumber: '', hongchongFlag: undefined, }); }; //传递方法到子组件 getOnGoingRef = ref => { this.goingChild = ref; }; //传递方法到子组件 getCompletedRef = ref => { this.completedChild = ref; }; //传递方法到子组件 getFailRef = ref => { this.failChild = ref; }; //查询菜单开关状态 openStatus = open => { if (open) { } else { // this.props.children.setClickNum(); } }; //获取查询开始时间 beginTimeChange = time => { this.setState({ beginDateTime: time, }); }; //获取查询结束时间 endTimeChange = time => { this.setState({ endDateTime: time, }); }; //获取查询是否红冲 flagChange = select => { this.setState({ hongchongFlag: select, }); }; //查询 submitData = () => { let tab = this.state.tab; if (tab == 0) { this.drawer.closeDrawer(); this.goingChild.initData(); } if (tab == 1) { this.drawer.closeDrawer(); this.completedChild.initData(); } if (tab == 2) { this.drawer.closeDrawer(); this.failChild.initData(); } }; //清空查询数据 searchDataEmpty = () => { this.setState({ beginDateTime: undefined, endDateTime: undefined, customerName: '', customerEntTaxId: '', invoiceCode: '', invoiceNumber: '', hongchongFlag: undefined, }); }; }