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

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