Index.js 4.5 KB

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