Index.js 4.1 KB

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