123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544 |
- import React, {Component} from 'react';
- import {createStackNavigator} from '@react-navigation/stack';
- import login from '../../page/login/login';
- import home_page from '../../page/homePage/home_page';
- import forget_password from '../../page/login/forget_password';
- import invoice from '../../page/invoice/invoice';
- import invoice_product_list_add from '../../page/invoice/invoice_product_list_add';
- import invoice_select_customer from '../../page/invoice/invoice_select_customer';
- import notice from '../../page/notice/notice';
- import notice_message from '../../page/notice/notice_message';
- import message from '../../page/notice/message';
- import home_amount_statistics from '../../page/statistics/home_amount_statistics';
- import product_list_info from '../product/product_list_info';
- import product_confirm from '../product/product_confirm';
- import loan from '../../page/activity/loan/loan';
- import loan_apply from '../../page/activity/loan/loan_apply';
- import invoice_qrcode from '../../page/invoiceQrcode/invoice_qrcode';
- import buyer_invoice from '../../page/buyerInvoice/buyer_invoice';
- import buyer_qrcode from '../../page/buyerInvoice/buyer_qrcode';
- import invoice_head_list from '../../page/invoiceHead/invoice_head_list';
- import {Image, TouchableOpacity, View} from 'react-native';
- import invoice_head from '../../page/invoiceHead/invoice_head';
- import wait_invoice_list from '../../page/waitInvoice/wait_invoice_list';
- import wait_invoice from '../../page/waitInvoice/wait_invoice';
- import application_info from '../../page/invoiceApplication/application_info';
- import {SvgXml} from 'react-native-svg';
- import {searchIcon} from '../../source/icon/icon';
- import invoice_application from '../../page/invoiceApplication/invoice_application';
- import invoice_distribution from '../../page/invoiceDistribution/invoice_distribution';
- import activity from '../../page/activity/activity';
- import enterprise_list from '../../page/enterpriseInfo/enterprise_list';
- import select_user from '../selectUser/select_user';
- import electronics_ordinary_invoice from '../../page/tax/invoiceInquiry/electronics_ordinary_invoice';
- import invoice_info from '../../page/tax/invoiceInquiry/invoice_info';
- import preview_pdf from '../onlinePreviewPDF/preview_pdf';
- import message_info from '../../page/notice/message_info';
- import user_agreement from '../../page/login/user_agreement';
- const HomeStack = createStackNavigator();
- export default class home_navigation extends Component {
- constructor(props) {
- super(props);
- this.state = {
- language: '',
- };
- }
- render() {
- return (
- <HomeStack.Navigator initialRouteName="home_page">
- <HomeStack.Screen
- name="home_page"
- component={home_page}
- options={{
- title: '首页',
- headerTitleAlign: 'left',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="enterprise_list"
- component={enterprise_list}
- options={{
- title: '企业信息',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="login"
- component={login}
- options={{
- title: '登录',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="user_agreement"
- component={user_agreement}
- options={{
- title: '云票在线用户使用协议',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="forget_password"
- component={forget_password}
- options={{
- title: '密码修改',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'invoice'}
- component={invoice}
- options={{
- headerTitle: '发票开具',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'invoice_product_list_add'}
- component={invoice_product_list_add}
- options={{
- title: '添加开票产品',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'invoice_select_customer'}
- component={invoice_select_customer}
- options={{
- title: '客户信息选择',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="notice"
- component={notice}
- options={{
- title: '消息',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="notice_message"
- component={notice_message}
- options={{
- title: '公告',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="message"
- component={message}
- options={{
- title: '消息',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="home_amount_statistics"
- component={home_amount_statistics}
- options={{
- title: '数据概览',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#2A67FE',
- },
- headerTintColor: '#ffffff',
- }}
- />
- <HomeStack.Screen
- name={'product_list_info'}
- component={product_list_info}
- options={{
- headerTitle: '选择商品',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'product_confirm'}
- component={product_confirm}
- options={{
- headerTitle: '商品信息',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'loan'}
- component={loan}
- options={{
- headerTitle: '农信合作申请',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'loan_apply'}
- component={loan_apply}
- options={{
- headerTitle: '填写申请信息',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'activity'}
- component={activity}
- options={{
- headerTitle: '推荐活动',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="invoice_qrcode"
- component={invoice_qrcode}
- options={{
- title: '扫码开票',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="buyer_invoice"
- component={buyer_invoice}
- options={{
- title: '购方开票',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="buyer_qrcode"
- component={buyer_qrcode}
- options={{
- title: '扫码开票',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'invoice_head_list'}
- component={invoice_head_list}
- options={{
- headerTitle: '待开抬头',
- headerTitleAlign: 'center',
- headerRight: () => (
- <View style={{marginRight: 20}}>
- <TouchableOpacity
- onPress={() => {
- this.props.navigation.navigate('invoice_head_list', {
- isShow: true,
- });
- }}>
- <Image
- source={require('../../source/img/search.png')}
- style={{height: 16, width: 16}}
- />
- </TouchableOpacity>
- </View>
- ),
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="invoice_head"
- component={invoice_head}
- options={{
- title: '发票开具',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'wait_invoice_list'}
- component={wait_invoice_list}
- options={{
- headerTitle: '待开发票',
- headerTitleAlign: 'center',
- headerRight: () => (
- <View style={{marginRight: 20}}>
- <TouchableOpacity
- style={{
- height: 30,
- width: 50,
- justifyContent: 'center',
- alignItems: 'center',
- }}
- onPress={() => {
- this.props.navigation.navigate('wait_invoice_list', {
- isShow: true,
- });
- }}>
- <SvgXml height={20} xml={searchIcon()} />
- </TouchableOpacity>
- </View>
- ),
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="wait_invoice"
- component={wait_invoice}
- options={{
- title: '发票开具',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="application_info"
- component={application_info}
- options={{
- title: '申领查询',
- headerTitleAlign: 'center',
- headerRight: () => (
- <View style={{marginRight: 20}}>
- <TouchableOpacity
- style={{
- height: 30,
- width: 50,
- justifyContent: 'center',
- alignItems: 'center',
- }}
- onPress={() => {
- this.props.navigation.navigate('application_info', {
- isShow: true,
- });
- }}>
- <SvgXml height={20} xml={searchIcon()} />
- </TouchableOpacity>
- </View>
- ),
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'invoice_application'}
- component={invoice_application}
- options={{
- title: '发票申领',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="invoice_distribution"
- component={invoice_distribution}
- options={{
- title: '发票分发',
- headerTitleAlign: 'center',
- headerRight: () => (
- <View style={{marginRight: 20}}>
- <TouchableOpacity
- style={{
- height: 30,
- width: 50,
- justifyContent: 'center',
- alignItems: 'center',
- }}
- onPress={() => {
- this.props.navigation.navigate('invoice_distribution', {
- isShow: true,
- });
- }}>
- <SvgXml height={20} xml={searchIcon()} />
- </TouchableOpacity>
- </View>
- ),
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name="select_user"
- component={select_user}
- options={{
- title: '人员管理',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'electronics_ordinary_invoice'}
- component={electronics_ordinary_invoice}
- options={{
- headerTitle: '电子普票查询',
- headerTitleAlign: 'center',
- headerRight: () => (
- <View style={{marginRight: 20}}>
- <TouchableOpacity
- style={{
- height: 30,
- width: 50,
- justifyContent: 'center',
- alignItems: 'center',
- }}
- onPress={() => {
- this.props.navigation.navigate(
- 'electronics_ordinary_invoice',
- {
- isShow: true,
- },
- );
- }}>
- <SvgXml height={20} xml={searchIcon()} />
- </TouchableOpacity>
- </View>
- ),
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'invoice_info'}
- component={invoice_info}
- options={{
- title: '发票详情',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'preview_pdf'}
- component={preview_pdf}
- options={{
- title: '发票在线查看',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- <HomeStack.Screen
- name={'message_info'}
- component={message_info}
- options={{
- title: '消息详情',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#ffffff',
- },
- headerTintColor: '#000000',
- }}
- />
- </HomeStack.Navigator>
- );
- }
- shouldComponentUpdate(
- nextProps: Readonly<P>,
- nextState: Readonly<S>,
- nextContext: any,
- ): boolean {
- //console.log("state: "+ JSON.stringify(nextProps.route));
- if (nextProps.route.name === 'home_navigation') {
- if (nextProps.route.state !== null && nextProps.route.state.index === 0) {
- this.props.navigation.setOptions({
- tabBarVisible: true,
- });
- }
- }
- return true;
- }
- }
|