123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- 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 (
- <SafeAreaView style={public_css.body}>
- <Tabs tabs={tabs} onChange={(i, l) => this.onChanges(i, l)} page={0}>
- <View style={invoice_inquiry_css.container}>
- <Message children={this} />
- </View>
- <View style={invoice_inquiry_css.container}>
- <NoticeMessage children={this} />
- </View>
- </Tabs>
- </SafeAreaView>
- );
- }
- //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,
- });
- };
- }
|