Step3.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import React, { Fragment } from 'react';
  2. import { connect } from 'dva';
  3. import { Button, Row, Col } from 'antd';
  4. import { routerRedux } from 'dva/router';
  5. import Result from '../../../components/Result';
  6. import styles from './style.less';
  7. class Step3 extends React.PureComponent {
  8. render() {
  9. const { dispatch, data } = this.props;
  10. const onFinish = () => {
  11. dispatch(routerRedux.push('/form/step-form'));
  12. };
  13. const information = (
  14. <div className={styles.information}>
  15. <Row>
  16. <Col span={8} className={styles.label}>付款账户:</Col>
  17. <Col span={16}>{data.payAccount}</Col>
  18. </Row>
  19. <Row>
  20. <Col span={8} className={styles.label}>收款账户:</Col>
  21. <Col span={16}>{data.receiverAccount}</Col>
  22. </Row>
  23. <Row>
  24. <Col span={8} className={styles.label}>收款人姓名:</Col>
  25. <Col span={16}>{data.receiverName}</Col>
  26. </Row>
  27. <Row>
  28. <Col span={8} className={styles.label}>转账金额:</Col>
  29. <Col span={16}><span className={styles.money}>{data.amount}</span> 元</Col>
  30. </Row>
  31. </div>
  32. );
  33. const actions = (
  34. <Fragment>
  35. <Button type="primary" onClick={onFinish}>
  36. 再转一笔
  37. </Button>
  38. <Button>
  39. 查看账单
  40. </Button>
  41. </Fragment>
  42. );
  43. return (
  44. <Result
  45. type="success"
  46. title="操作成功"
  47. description="预计两小时内到账"
  48. extra={information}
  49. actions={actions}
  50. className={styles.result}
  51. />
  52. );
  53. }
  54. }
  55. export default connect(({ form }) => ({
  56. data: form.step,
  57. }))(Step3);