Step3.js 1.63 KB
Newer Older
陈帅's avatar
陈帅 committed
1
import React, { Fragment } from 'react';
WhatAKitty's avatar
WhatAKitty committed
2
import { connect } from 'dva';
3 4
import { Button, Row, Col } from 'antd';
import { routerRedux } from 'dva/router';
niko's avatar
niko committed
5
import Result from 'components/Result';
6 7
import styles from './style.less';

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

export default connect(({ form }) => ({
  data: form.step,
}))(Step3);