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';

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