Index.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. 'use strict';
  2. import {createStackNavigator} from 'react-navigation-stack';
  3. import NavigationOptions from '../../components/NavbarOptions';
  4. import SalesHome from './Home';
  5. import ReportCustomerList from './ReportCustomerList';
  6. import ReportCustomerDetail from './ReportCustomerDetail';
  7. import ReportCustomerAdd from './ReportCustomerAdd';
  8. import SearchProject from './SearchProject';
  9. import ReviewTodayList from './ReviewTodayList';
  10. import ReviewDetail from './ReviewDetail';
  11. import WriteTrackReport from './WriteTrackReport';
  12. import EditCustomer from './EditCustomer';
  13. import WriteInternalReport from './WriteInternalReport';
  14. import CheckCustomerList from './CheckCustomerList';
  15. import checkCustomerDetail from './checkCustomerDetail';
  16. import CheckCustomer from './CheckCustomer';
  17. import UpdateProcess from './UpdateProcess';
  18. import ProcessList from './ProcessList';
  19. import ProcessDetail from './ProcessDetail';
  20. const HomeStack = createStackNavigator({
  21. SalesHome: {
  22. screen: SalesHome,
  23. navigationOptions: {
  24. title: '首页',
  25. },
  26. },
  27. ReportCustomerList: {
  28. screen: ReportCustomerList,
  29. navigationOptions: {
  30. title: '客户报备',
  31. },
  32. },
  33. ReportCustomerDetail: {
  34. screen: ReportCustomerDetail,
  35. navigationOptions: {
  36. title: '客户报备明细',
  37. },
  38. },
  39. ReportCustomerAdd: {
  40. screen: ReportCustomerAdd,
  41. navigationOptions: {
  42. title: '报备客户',
  43. },
  44. },
  45. SearchProject: {
  46. screen: SearchProject,
  47. navigationOptions: {
  48. title: '选择项目',
  49. },
  50. },
  51. ReviewTodayList: {
  52. screen: ReviewTodayList,
  53. navigationOptions: {
  54. title: '客户跟踪',
  55. },
  56. },
  57. ReviewDetail: {
  58. screen: ReviewDetail,
  59. navigationOptions: {
  60. title: '客户详情',
  61. },
  62. },
  63. WriteTrackReport: {
  64. screen: WriteTrackReport,
  65. navigationOptions: {
  66. title: '填写跟踪报告',
  67. },
  68. },
  69. EditCustomer: {
  70. screen: EditCustomer,
  71. navigationOptions: {
  72. title: '修改客户信息',
  73. },
  74. },
  75. WriteInternalReport: {
  76. screen: WriteInternalReport,
  77. navigationOptions: {
  78. title: '内部跟踪',
  79. },
  80. },
  81. CheckCustomerList: {
  82. screen: CheckCustomerList,
  83. navigationOptions: {
  84. title: '跟踪审核',
  85. },
  86. },
  87. checkCustomerDetail: {
  88. screen: checkCustomerDetail,
  89. navigationOptions: {
  90. title: '审核详情',
  91. },
  92. },
  93. CheckCustomer: {
  94. screen: CheckCustomer,
  95. navigationOptions: {
  96. title: '跟踪审核',
  97. },
  98. },
  99. UpdateProcess: {
  100. screen: UpdateProcess,
  101. navigationOptions: {
  102. title: '更新进度',
  103. },
  104. },
  105. ProcessList: {
  106. screen: ProcessList,
  107. navigationOptions: {
  108. title: '进度跟踪',
  109. },
  110. },
  111. ProcessDetail: {
  112. screen: ProcessDetail,
  113. navigationOptions: {
  114. title: '进度详情',
  115. },
  116. },
  117. },
  118. {
  119. initialRouteName: 'SalesHome',
  120. defaultNavigationOptions: NavigationOptions,
  121. //mode: 'modal',
  122. //headerMode: 'none',
  123. },
  124. );
  125. HomeStack.navigationOptions = ({navigation}) => { // ~注意~ 如果想实现隐藏Tabbar的功能要调用这个方法
  126. let tabBarVisible = true;
  127. if (navigation.state.index > 0) {
  128. tabBarVisible = false;
  129. }
  130. return {
  131. tabBarVisible,
  132. };
  133. };
  134. module.exports = HomeStack;