SummaryV2.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. /**
  2. * 新版充电结算页面
  3. * @邠心vbe on 2023/02/08
  4. */
  5. import React, { Component } from 'react';
  6. import { View, Text, StyleSheet, ScrollView, RefreshControl } from 'react-native';
  7. import apiCharge from '../../api/apiCharge';
  8. import Button from '../../components/Button';
  9. import Dialog from '../../components/Dialog';
  10. import { MyRefreshProps } from '../../components/ThemesConfig';
  11. import utils from '../../utils/utils';
  12. import { PageList } from '../Router';
  13. import app from '../../../app.json';
  14. import TextView from '../../components/TextView';
  15. import Skeleton from '../../components/VbeSkeleton';
  16. export default class SummaryV2 extends Component {
  17. constructor(props) {
  18. super(props);
  19. this.state = {
  20. loading: true,
  21. isActully: true,
  22. refreshing: false,
  23. summaryInfo: {
  24. top: {},
  25. station: {},
  26. connector: {},
  27. chargingFee: {},
  28. idleFee: {},
  29. reservationFee: {},
  30. payment: {}
  31. },
  32. chargingPk: "",
  33. isPendding: false
  34. };
  35. this.action = "";
  36. this.canBack = false;
  37. }
  38. componentDidMount() {
  39. const params = this.props.route.params;
  40. if (params.chargingPk) {
  41. Dialog.showProgressDialog();
  42. this.setState({
  43. chargingPk: params.chargingPk
  44. })
  45. if (params.action && params.action == "view") {
  46. this.setState({
  47. isActully: false
  48. });
  49. setTimeout(() => {
  50. this.getSummaryData(params.chargingPk);
  51. }, 1000);
  52. } else {
  53. setTimeout(() => {
  54. this.getSummaryData(params.chargingPk);
  55. }, 3000);
  56. }
  57. }
  58. if (params.action) {
  59. this.action = params.action;
  60. }
  61. this.props.navigation.addListener('focus', e => {
  62. this.canBack = false;
  63. });
  64. this.props.navigation.addListener('beforeRemove', e => {
  65. if (this.state.isActully && !this.canBack) {
  66. this.toRating();
  67. e.preventDefault();
  68. }
  69. });
  70. }
  71. getSummaryData(chargingPk) {
  72. apiCharge.getChargeSummaryV2({
  73. chargingPk: chargingPk
  74. }).then(res => {
  75. Dialog.dismissLoading();
  76. if (res.data) {
  77. this.setState({
  78. loading: false,
  79. refreshing: false,
  80. summaryInfo: res.data,
  81. isPendding: (res.data.hasSettled != true)
  82. });
  83. }
  84. }).catch((err) => {
  85. Dialog.dismissLoading();
  86. toastShort(err);
  87. this.setState({
  88. isPendding: true,
  89. refreshing: false
  90. });
  91. });
  92. }
  93. onRefresh() {
  94. if (this.state.chargingPk) {
  95. this.setState({
  96. refreshing: true
  97. });
  98. this.getSummaryData(this.state.chargingPk);
  99. }
  100. }
  101. toRating() {
  102. this.canBack = true;
  103. if (this.action == "view") {
  104. goBack();
  105. } else {
  106. //routeUtil.resetToHome(this.props);
  107. startPage(PageList.home);
  108. //startPage(PageList.rating, this.state.stationInfo);
  109. }
  110. }
  111. toTransaction() {
  112. if (this.action == "view") {
  113. goBack();
  114. } else {
  115. startPage(PageList.wallet)
  116. }
  117. }
  118. getSummaryText(data) {
  119. if (this.state.summaryInfo?.paymentType == 'Fleet Credit') {
  120. return '-';
  121. } else {
  122. return currency + '' + (data ?? '0');
  123. }
  124. }
  125. getTaxTitle(title="") {
  126. if (this.state.summaryInfo?.taxRate) {
  127. return title.replace("$s", this.state.summaryInfo.taxRate)
  128. } else {
  129. return title.replace(" ($s)", "");
  130. }
  131. }
  132. isLoading(precond) {
  133. return utils.isNotEmpty(precond) || this.state.loading;
  134. }
  135. getSkeletonLeft(size=3) {
  136. const list = [];
  137. for (let i = 0; i < size; i++) {
  138. list.push({width: i % 2 ==0 ? '100%' : '70%', height: 18, marginTop: 4, marginBottom: 4, borderRadius: 3});
  139. }
  140. return list;
  141. }
  142. getSkeletonRight(size=3) {
  143. const list = [];
  144. for (let i = 0; i < size; i++) {
  145. list.push({width: '100%', height: 18, marginTop: 4, marginBottom: 4, borderRadius: 3});
  146. }
  147. return list;
  148. }
  149. getSectionSkeleton(size) {
  150. if (this.state.loading) {
  151. return (
  152. <View style={[styles.sections, ui.flexc]}>
  153. <Skeleton
  154. containerStyle={ui.flex2}
  155. isLoading={this.state.loading}
  156. boneColor='#eeeeee'
  157. highlightColor='#f6f6f6'
  158. animationType="shiver"
  159. layout={this.getSkeletonLeft(size)}
  160. animationDirection={'horizontalRight'}>
  161. </Skeleton>
  162. <View style={ui.flex2}></View>
  163. <Skeleton
  164. containerStyle={ui.flex1}
  165. isLoading={this.state.loading}
  166. boneColor='#eeeeee'
  167. highlightColor='#f6f6f6'
  168. animationType="shiver"
  169. layout={this.getSkeletonRight(size)}
  170. animationDirection={'horizontalRight'}>
  171. </Skeleton>
  172. </View>
  173. )
  174. } else {
  175. return <></>
  176. }
  177. }
  178. render() {
  179. if (this.state.isPendding) {
  180. return (
  181. <ScrollView
  182. style={styles.container}
  183. contentContainerStyle={ui.flex1}
  184. refreshControl={
  185. <RefreshControl
  186. {...MyRefreshProps()}
  187. refreshing={this.state.refreshing}
  188. onRefresh={() => this.onRefresh()}
  189. />
  190. }>
  191. <View style={styles.processContent}>
  192. <TextView style={styles.processTitle}>{$t("receipt.processTitle")}</TextView>
  193. <TextView style={styles.processText}>{$t("receipt.processMessage1")}</TextView>
  194. <TextView style={styles.processText}>Please pull down refresh this page after a few minutes to view your receipt.</TextView>
  195. {/* <TextView style={styles.processText}>
  196. {$t("receipt.processMessage2")}
  197. <Text style={[ui.bold, ui.underline]} onPress={() => this.toTransaction()}>{$t("receipt.processMessage3")}</Text>.
  198. </TextView> */}
  199. <TextView style={styles.processText}>{$t("receipt.processMessage4")}</TextView>
  200. </View>
  201. <View style={styles.bottomButton}>
  202. <Button
  203. text={$t('home.done')}
  204. elevation={1.5}
  205. onClick={() => this.toRating()}/>
  206. </View>
  207. </ScrollView>
  208. )
  209. } else {
  210. return (
  211. <ScrollView
  212. style={styles.container}
  213. refreshControl={
  214. <RefreshControl
  215. {...MyRefreshProps()}
  216. refreshing={this.state.refreshing}
  217. onRefresh={() => this.onRefresh()}
  218. />
  219. }>
  220. { this.isLoading(this.state.summaryInfo.top) &&
  221. <View style={styles.headerView}>
  222. { this.state.isActully && <>
  223. <Skeleton
  224. isLoading={this.state.loading}
  225. boneColor='#eeeeee'
  226. highlightColor='#f6f6f6'
  227. animationType="shiver"
  228. layout={[{width: 56, height: 56, borderRadius: 56}]}
  229. animationDirection={'horizontalRight'}>
  230. <Octicons
  231. name="check-circle-fill"
  232. color={colorAccent}
  233. size={56}/>
  234. </Skeleton>
  235. <Skeleton
  236. isLoading={this.state.loading}
  237. boneColor='#eeeeee'
  238. highlightColor='#f6f6f6'
  239. animationType="shiver"
  240. layout={[{width: 60, height: 20, marginTop: 8, borderRadius: 3}]}
  241. animationDirection={'horizontalRight'}>
  242. <TextView style={styles.topTitle}>{$t('receipt.successful')}</TextView>
  243. </Skeleton>
  244. <Skeleton
  245. isLoading={this.state.loading}
  246. boneColor='#eeeeee'
  247. highlightColor='#f6f6f6'
  248. animationType="shiver"
  249. layout={[{width: 100, height: 18, marginTop: 4, marginBottom: 32, borderRadius: 3}]}
  250. animationDirection={'horizontalRight'}>
  251. <TextView style={styles.topDesc}>{$t('receipt.chargingSessionComplete')}</TextView>
  252. </Skeleton>
  253. </>}
  254. { utils.isNotEmpty(this.state.summaryInfo.top.company) &&
  255. <View style={styles.formRow}>
  256. <TextView style={styles.label}>{$t('sign.labelCompany')}:</TextView>
  257. <TextView style={styles.text}>{this.state.summaryInfo.top.company}</TextView>
  258. </View>
  259. }
  260. { utils.isNotEmpty(this.state.summaryInfo.top.registrationNo) &&
  261. <View style={styles.formRow}>
  262. <TextView style={styles.label}>{$t('receipt.labelRegistrationNo')}</TextView>
  263. <TextView style={styles.text}>{this.state.summaryInfo.top.registrationNo}</TextView>
  264. </View>
  265. }
  266. <View style={styles.formRow}>
  267. <Skeleton
  268. containerStyle={ui.flex1}
  269. isLoading={this.state.loading}
  270. boneColor='#eeeeee'
  271. highlightColor='#f6f6f6'
  272. animationType="shiver"
  273. layout={this.getSkeletonLeft()}
  274. animationDirection={'horizontalRight'}>
  275. </Skeleton>
  276. <View style={ui.flex2}></View>
  277. <Skeleton
  278. containerStyle={ui.flex1}
  279. isLoading={this.state.loading}
  280. boneColor='#eeeeee'
  281. highlightColor='#f6f6f6'
  282. animationType="shiver"
  283. layout={this.getSkeletonRight()}
  284. animationDirection={'horizontalRight'}>
  285. </Skeleton>
  286. </View>
  287. { utils.isNotEmpty(this.state.summaryInfo.top.transactionId) &&
  288. <View style={styles.formRow}>
  289. <TextView style={styles.label}>{$t('receipt.labelTransactionID')}</TextView>
  290. <TextView style={styles.text}>{this.state.summaryInfo.top.transactionId}</TextView>
  291. </View>
  292. }
  293. { utils.isNotEmpty(this.state.summaryInfo.top.referenceId) &&
  294. <View style={styles.formRow}>
  295. <TextView style={styles.label}>{$t('receipt.labelReferenceID')}</TextView>
  296. <TextView style={styles.text}>{this.state.summaryInfo.top.referenceId}</TextView>
  297. </View>
  298. }
  299. { utils.isNotEmpty(this.state.summaryInfo.top.dateTime) &&
  300. <View style={styles.formRow}>
  301. <TextView style={styles.label}>{$t('receipt.labelDateTime')}</TextView>
  302. <TextView style={styles.text}>{this.state.summaryInfo.top.dateTime}</TextView>
  303. </View>
  304. }
  305. </View>
  306. }
  307. {this.getSectionSkeleton(2)}
  308. {/* <View style={styles.sections}>
  309. <View style={styles.formRow}>
  310. <Text style={styles.label}>{$t('wallet.labelTransactionId')}</Text>
  311. <Text style={styles.text}>{this.state.summaryInfo.transactionPk}</Text>
  312. </View>
  313. <View style={styles.formRow}>
  314. <Text style={styles.label}>{$t('wallet.labelReferenceId')}</Text>
  315. <Text style={styles.text}>{this.state.summaryInfo.chargingPk}</Text>
  316. </View>
  317. <View style={styles.formRow}>
  318. <Text style={styles.label}>{$t('wallet.labelDateTime')}</Text>
  319. <Text style={styles.text}>{this.state.summaryInfo.dateTime}</Text>
  320. </View>
  321. </View> */}
  322. { utils.isNotEmpty(this.state.summaryInfo.station) &&
  323. <View style={styles.sections}>
  324. <TextView style={styles.formTitle}>{$t('wallet.labelYourStation')}</TextView>
  325. <View style={styles.formRow}>
  326. <TextView style={styles.label}>{$t('wallet.labelStationId')}</TextView>
  327. <TextView style={styles.text}>{this.state.summaryInfo.station.stationId}</TextView>
  328. </View>
  329. <View style={styles.formRow}>
  330. <TextView style={styles.label}>{$t('receipt.labelSiteName')}</TextView>
  331. <TextView style={styles.text}>{this.state.summaryInfo.station.siteName ?? "-"}</TextView>
  332. </View>
  333. </View>
  334. }
  335. {this.getSectionSkeleton()}
  336. { utils.isNotEmpty(this.state.summaryInfo.connector) &&
  337. <View style={styles.sections}>
  338. <TextView style={styles.formTitle}>{$t('wallet.labelYourConnector')}</TextView>
  339. <View style={styles.formRow}>
  340. <TextView style={styles.label}>{$t('charging.labelType')}:</TextView>
  341. <TextView style={styles.text}>{this.state.summaryInfo.connector.type}</TextView>
  342. </View>
  343. <View style={styles.formRow}>
  344. <TextView style={styles.label}>{$t('charging.labelPower')}:</TextView>
  345. <TextView style={styles.text}>{this.state.summaryInfo.connector.power}</TextView>
  346. </View>
  347. <View style={styles.formRow}>
  348. <TextView style={styles.label}>{$t('charging.labelRates')}:</TextView>
  349. <TextView style={styles.text}>{this.state.summaryInfo.connector.rates}</TextView>
  350. </View>
  351. </View>
  352. }
  353. {this.getSectionSkeleton()}
  354. { utils.isNotEmpty(this.state.summaryInfo.chargingFee) &&
  355. <View style={styles.sections}>
  356. <TextView style={styles.formTitle}>{$t('receipt.breakdownChargingFees')}</TextView>
  357. <View style={styles.formRow}>
  358. <TextView style={styles.label}>{$t('wallet.labelChargeTime')}</TextView>
  359. <TextView style={styles.text}>{this.state.summaryInfo.chargingFee.chargeTime ?? "-"}</TextView>
  360. </View>
  361. <View style={styles.formRow}>
  362. <TextView style={styles.label}>{$t('wallet.labelChargeDelivered')}</TextView>
  363. <TextView style={styles.text}>{this.state.summaryInfo.chargingFee.chargeDelivered ?? 0}</TextView>
  364. </View>
  365. <View style={styles.formRow}>
  366. <TextView style={styles.label}>{this.getTaxTitle($t('receipt.labelChargTransSubtotal2'))}</TextView>
  367. <TextView style={styles.text}>{this.state.summaryInfo.chargingFee.transactionSubtotal}</TextView>
  368. </View>
  369. </View>
  370. }
  371. {this.getSectionSkeleton()}
  372. { utils.isNotEmpty(this.state.summaryInfo.idleFeeV2) &&
  373. <View style={styles.sections}>
  374. <TextView style={styles.formTitle}>{$t('receipt.breakdownIdlesFees')}</TextView>
  375. <View style={styles.formRow}>
  376. <TextView style={styles.label}>Idle Fee Rules:</TextView>
  377. <TextView style={styles.text}>{this.state.summaryInfo.idleFeeV2.idleRule}</TextView>
  378. </View>
  379. <View style={styles.formRow}>
  380. <TextView style={styles.label}>Idle Fee Start Time:</TextView>
  381. <TextView style={styles.text}>{this.state.summaryInfo.idleFeeV2.gracePeriodStartTime}</TextView>
  382. </View>
  383. <View style={styles.formRow}>
  384. <TextView style={styles.label}>Idle Fee Period:</TextView>
  385. <TextView style={styles.text}>{this.state.summaryInfo.idleFeeV2.idlePeriod}</TextView>
  386. </View>
  387. <View style={styles.formRow}>
  388. <TextView style={styles.label}>Idle Fee End Time:</TextView>
  389. <TextView style={styles.text}>{this.state.summaryInfo.idleFeeV2.gracePeriodEndTime}</TextView>
  390. </View>
  391. <View style={styles.formRow}>
  392. <TextView style={styles.label}>{$t('receipt.labelIdleFeeSubtotal3')}</TextView>
  393. <TextView style={styles.text}>{this.state.summaryInfo.idleFeeV2.sumFee}</TextView>
  394. </View>
  395. </View>
  396. }
  397. {/* utils.isNotEmpty(this.state.summaryInfo.idleFee) &&
  398. <View style={styles.sections}>
  399. <TextView style={styles.formTitle}>{$t('receipt.breakdownIdlesFees')}</TextView>
  400. <View style={styles.formRow}>
  401. <TextView style={styles.label}>{$t('receipt.labelIdleStartTime')}</TextView>
  402. <TextView style={styles.text}>{this.state.summaryInfo.idleFee.startTime}</TextView>
  403. </View>
  404. <View style={styles.formRow}>
  405. <TextView style={styles.label}>{$t('receipt.labelIdleDuration')}</TextView>
  406. <TextView style={styles.text}>{this.state.summaryInfo.idleFee.duration}</TextView>
  407. </View>
  408. <View style={styles.formRow}>
  409. <TextView style={styles.label}>{$t('receipt.labelIdleFeeSubtotal3')}</TextView>
  410. <TextView style={styles.text}>{this.state.summaryInfo.idleFee.subtotal}</TextView>
  411. </View>
  412. </View>
  413. */}
  414. {this.getSectionSkeleton()}
  415. { utils.isNotEmpty(this.state.summaryInfo.reservationFee) &&
  416. <View style={styles.sections}>
  417. <TextView style={styles.formTitle}>{$t('receipt.breakdownReservationFees')}</TextView>
  418. <View style={styles.formRow}>
  419. <TextView style={styles.label}>{$t('receipt.labelTimeReservation')}</TextView>
  420. <TextView style={styles.text}>{this.state.summaryInfo.reservationFee.reservationTime}</TextView>
  421. </View>
  422. <View style={styles.formRow}>
  423. <TextView style={styles.label}>{$t('receipt.labelDurationReservation')}</TextView>
  424. <TextView style={styles.text}>{this.state.summaryInfo.reservationFee.reservationDuration}</TextView>
  425. </View>
  426. <View style={styles.formRow}>
  427. <TextView style={styles.label}>{this.getTaxTitle($t('receipt.labelReservationFeeSubtotal2'))}</TextView>
  428. <TextView style={styles.text}>{this.state.summaryInfo.reservationFee.reservationFeeSubtotal}</TextView>
  429. </View>
  430. </View>
  431. }
  432. {this.getSectionSkeleton(8)}
  433. { utils.isNotEmpty(this.state.summaryInfo.payment) &&
  434. <View style={styles.sections}>
  435. <TextView style={styles.formTitle}>{$t('receipt.breakdownPayment')}</TextView>
  436. <View style={styles.formRow}>
  437. <TextView style={styles.label}>{$t('wallet.labelPaymentMadeBy')}</TextView>
  438. <TextView style={styles.text}>{this.state.summaryInfo.payment.paymentMadeBy ?? "-"}</TextView>
  439. </View>
  440. { utils.isNotEmpty(this.state.summaryInfo.payment.transactionSubtotal) &&
  441. <View style={styles.formRow}>
  442. <TextView style={styles.label}>{this.getTaxTitle($t('receipt.labelChargTransSubtotal2'))}</TextView>
  443. <TextView style={styles.text}>{this.state.summaryInfo.payment.transactionSubtotal}</TextView>
  444. </View>
  445. }
  446. { utils.isNotEmpty(this.state.summaryInfo.payment.idleFeeSubtotal) &&
  447. <View style={styles.formRow}>
  448. <TextView style={styles.label}>{$t('receipt.labelIdleFeeSubtotal3')}</TextView>
  449. <TextView style={styles.text}>{this.state.summaryInfo.payment.idleFeeSubtotal}</TextView>
  450. </View>
  451. }
  452. { utils.isNotEmpty(this.state.summaryInfo.payment.reservationFeeSubtotal) &&
  453. <View style={styles.formRow}>
  454. <TextView style={styles.label}>{this.getTaxTitle($t('receipt.labelReservationFeeSubtotal2'))}</TextView>
  455. <TextView style={styles.text}>{this.state.summaryInfo.payment.reservationFeeSubtotal}</TextView>
  456. </View>
  457. }
  458. { utils.isNotEmpty(this.state.summaryInfo.payment.finalPayment) &&
  459. <View style={styles.formRow}>
  460. <TextView style={styles.label}>
  461. { utils.isNotEmpty(this.state.summaryInfo.payment.discountCredit)
  462. ? $t('receipt.labelAfterDiscount')
  463. : $t('receipt.labelFinalPaymentAmount')
  464. }
  465. </TextView>
  466. <TextView style={styles.text}>{this.state.summaryInfo.payment.finalPayment ?? "-"}</TextView>
  467. </View>
  468. }
  469. {/* <View style={styles.formRow}>
  470. <Text style={styles.label}>{$t('wallet.labelChargeRates')}</Text>
  471. <Text style={styles.text}>{currency}{this.state.summaryInfo.chargeRates ?? '0.0'}</Text>
  472. </View> */}
  473. { utils.isNotEmpty(this.state.summaryInfo.payment.exchangeRate) &&
  474. <View style={styles.formRow}>
  475. <TextView style={styles.label}>{$t('wallet.labelExchangeRate')}</TextView>
  476. <TextView style={styles.text}>{this.state.summaryInfo.payment.exchangeRate ?? "-"}</TextView>
  477. </View>
  478. }
  479. {/* <View style={styles.formRow}>
  480. <Text style={styles.label}>{$t('wallet.labelPreviousBalance')}</Text>
  481. <Text style={styles.text}>{this.getSummaryText(this.state.summaryInfo.previousBalance)}</Text>
  482. </View> */}
  483. { utils.isNotEmpty(this.state.summaryInfo.payment.resultingBalance) &&
  484. <View style={styles.formRow}>
  485. <TextView style={styles.label}>{$t('wallet.labelResultingBalance')}</TextView>
  486. <TextView style={styles.text}>{this.state.summaryInfo.payment.resultingBalance ?? "-"}</TextView>
  487. </View>
  488. }
  489. { utils.isNotEmpty(this.state.summaryInfo.payment.refundAmount) &&
  490. <View style={styles.formRow}>
  491. <TextView style={styles.label}>{$t('wallet.labelRefundAmount')}</TextView>
  492. <TextView style={styles.text}>{this.state.summaryInfo.payment.refundAmount ?? "-"}</TextView>
  493. </View>
  494. }
  495. </View>
  496. }
  497. <EndView/>
  498. { (this.state.isActully && utils.isNotEmpty(this.state.summaryInfo.top)) &&
  499. <View style={styles.bottomButton}>
  500. {/* <TextView
  501. style={styles.feedback}
  502. onPress={() => startPage(PageList.feedback)}>{$t('wallet.linkSubmitFeedback')}</TextView> */}
  503. {/* <Text style={styles.tipText}>{$t('wallet.tipsReceipt')}</Text> */}
  504. <Button
  505. text={$t('home.done')}
  506. elevation={1.5}
  507. onClick={() => this.toRating()}/>
  508. </View>
  509. }
  510. </ScrollView>
  511. );
  512. }
  513. }
  514. }
  515. const styles = StyleSheet.create({
  516. container: {
  517. flex: 1,
  518. paddingLeft: 16,
  519. paddingRight: 16,
  520. backgroundColor: colorLight
  521. },
  522. headerView: {
  523. alignItems: 'center',
  524. paddingTop: 16,
  525. paddingBottom: 24
  526. },
  527. topTitle: {
  528. color: textPrimary,
  529. fontSize: 16,
  530. paddingTop: 8,
  531. paddingLeft: 8,
  532. fontWeight: 'bold'
  533. },
  534. topDesc: {
  535. color: textPrimary,
  536. fontSize: 14,
  537. marginBottom: 32
  538. },
  539. sections: {
  540. borderRadius: 10,
  541. marginBottom: 12,
  542. backgroundColor: colorLight
  543. },
  544. sections2: {
  545. paddingTop: 0,
  546. paddingLeft: 0,
  547. paddingRight: 0,
  548. paddingBottom: 8,
  549. borderRadius: 10,
  550. marginBottom: 8,
  551. backgroundColor: colorLight
  552. },
  553. formTitle: {
  554. color: '#000',
  555. fontSize: 14,
  556. marginTop: -4,
  557. marginBottom: 6,
  558. paddingBottom: 6,
  559. fontWeight: 'bold',
  560. borderBottomWidth: 1,
  561. borderBottomColor: textPrimary
  562. },
  563. formRow: {
  564. paddingTop: 3,
  565. paddingBottom: 3,
  566. alignItems: 'center',
  567. flexDirection: 'row'
  568. },
  569. label: {
  570. flex: 1,
  571. color: textPrimary,
  572. fontSize: 13,
  573. },
  574. text: {
  575. color: textPrimary,
  576. fontSize: 12,
  577. fontWeight: 'bold'
  578. },
  579. stationInfoView: {
  580. padding: 12,
  581. marginBottom: 0,
  582. alignItems: 'center',
  583. flexDirection: 'row',
  584. justifyContent: 'space-between'
  585. },
  586. stationInfoText: {
  587. color: '#999',
  588. fontSize: 11
  589. },
  590. connectorView: {
  591. alignItems: 'center',
  592. flexDirection: 'row'
  593. },
  594. typeIcon: {
  595. width: 36,
  596. height: 36
  597. },
  598. feedback: {
  599. color: '#12A5F9',
  600. fontSize: 14,
  601. textAlign: 'center',
  602. marginBottom: 16,
  603. ...ui.underline
  604. },
  605. bottomButton: {
  606. marginTop: 16,
  607. marginBottom: 32
  608. },
  609. tipText: {
  610. color: textPrimary,
  611. fontSize: 12,
  612. textAlign: 'center',
  613. marginBottom: 8
  614. },
  615. processContent: {
  616. flex: 1,
  617. justifyContent: 'center'
  618. },
  619. processTitle: {
  620. color: textTitle,
  621. fontSize: 24,
  622. fontWeight: 'bold',
  623. textAlign: 'center'
  624. },
  625. processText: {
  626. color: textPrimary,
  627. fontSize: 14,
  628. textAlign: 'center',
  629. paddingTop: 16
  630. }
  631. });