bookingSuccessPageComponent.tsx 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. import { View, Text, ScrollView, StyleSheet } from 'react-native';
  2. import { SafeAreaView } from 'react-native-safe-area-context';
  3. import NormalButton from '../global/normal_button';
  4. import { TickLogoSvg } from '../global/SVG';
  5. import { router } from 'expo-router';
  6. const BookingSuccessPageComponent = () => {
  7. return (
  8. <SafeAreaView
  9. style={{ flex: 1, backgroundColor: 'white' }}
  10. edges={['top', 'left', 'right']}
  11. >
  12. <ScrollView className="flex-1">
  13. <View>
  14. <View className="flex-row pl-8 pt-8 space-x-4 items-center">
  15. <TickLogoSvg />
  16. <Text className="text-3xl">成功預約</Text>
  17. </View>
  18. <View
  19. className="m-4"
  20. style={{
  21. borderWidth: 1,
  22. borderColor: '#EEEEEE',
  23. borderRadius: 12
  24. }}
  25. >
  26. <View className="space-y-3 py-4 mx-[5%]">
  27. <View className="flex-1 flex-row items-center ">
  28. <View className="flex-1 flex-column">
  29. <Text
  30. style={styles.grayColor}
  31. className="text-xs "
  32. >
  33. 時間日期
  34. </Text>
  35. <Text
  36. style={styles.greenColor}
  37. className="text-4xl pt-2 "
  38. >
  39. 3月14 · 16:15
  40. </Text>
  41. </View>
  42. </View>
  43. <View className="flex-1 flex-column justify-center">
  44. <Text
  45. style={styles.grayColor}
  46. className="text-xs"
  47. >
  48. 充電地點
  49. </Text>
  50. <Text
  51. style={styles.greenColor}
  52. className="text-xl"
  53. >
  54. 上環街市充電站
  55. </Text>
  56. <Text
  57. style={styles.grayColor}
  58. className="text-base"
  59. >
  60. 香港上環皇后大道中345號
  61. </Text>
  62. </View>
  63. <View className="flex-1 flex-row items-center ">
  64. <View className="flex-column flex-1">
  65. <Text
  66. style={styles.grayColor}
  67. className="text-xs"
  68. >
  69. 方案
  70. </Text>
  71. <Text
  72. style={styles.greenColor}
  73. className="text-lg"
  74. >
  75. 按每度電結算
  76. </Text>
  77. <Text
  78. style={styles.grayColor}
  79. className="text-sm"
  80. >
  81. 度數: 50kWh
  82. </Text>
  83. </View>
  84. <View className="flex-column flex-1">
  85. <Text
  86. style={styles.grayColor}
  87. className="text-xs"
  88. >
  89. 車輛
  90. </Text>
  91. <Text
  92. style={styles.greenColor}
  93. className="text-lg"
  94. >
  95. TESLA Model 3
  96. </Text>
  97. </View>
  98. </View>
  99. </View>
  100. </View>
  101. </View>
  102. <View className="mx-[5%]">
  103. <Text className="text-xl py-4">收費概要</Text>
  104. <View className="flex-row justify-between">
  105. <Text className="text-base">充電費用</Text>
  106. <Text className="text-base">HK$ 175</Text>
  107. </View>
  108. <Text style={styles.grayColor} className="text-base">
  109. 按每度電結算: 50 kWh
  110. </Text>
  111. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  112. <View className="flex-row justify-between">
  113. <Text className="text-base" style={styles.grayColor}>
  114. 小計
  115. </Text>
  116. <Text className="text-base">HK$ 175</Text>
  117. </View>
  118. <View className="flex-row justify-between">
  119. <Text className="text-base" style={styles.grayColor}>
  120. 其他費用
  121. </Text>
  122. <Text className="text-base">HK$ 11</Text>
  123. </View>
  124. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  125. <View className="flex-row justify-between ">
  126. <Text className="text-xl">總計</Text>
  127. <Text className="text-xl">HK$ 186</Text>
  128. </View>
  129. <View className="w-full h-1 my-4 bg-[#DBE4E8]" />
  130. <View className="space-y-4">
  131. <Text className="text-xl ">付款資訊</Text>
  132. <View>
  133. <Text
  134. className="text-base"
  135. style={styles.grayColor}
  136. >
  137. 訂單編號
  138. </Text>
  139. <Text className="text-base">CXZ-16336958</Text>
  140. </View>
  141. <View>
  142. <Text
  143. className="text-base"
  144. style={styles.grayColor}
  145. >
  146. 付款方式
  147. </Text>
  148. <Text className="text-base">預付銀包</Text>
  149. </View>
  150. <View>
  151. <Text
  152. className="text-base"
  153. style={styles.grayColor}
  154. >
  155. 電郵地址
  156. </Text>
  157. <Text className="text-base">
  158. mikechan123@gmail.com
  159. </Text>
  160. </View>
  161. </View>
  162. <View className="my-4 pb-8">
  163. <NormalButton
  164. title={
  165. <Text
  166. style={{
  167. color: 'white',
  168. fontSize: 16,
  169. fontWeight: '800'
  170. }}
  171. >
  172. 返回主頁
  173. </Text>
  174. }
  175. onPress={() => router.replace('mainPage')}
  176. extendedStyle={{ padding: 24 }}
  177. />
  178. </View>
  179. </View>
  180. </ScrollView>
  181. </SafeAreaView>
  182. );
  183. };
  184. export default BookingSuccessPageComponent;
  185. const styles = StyleSheet.create({
  186. grayColor: {
  187. color: '#888888'
  188. },
  189. greenColor: {
  190. color: '#02677D'
  191. }
  192. });