Index.js 4.3 KB

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