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

afc163's avatar
afc163 committed
8
export default
9 10 11
@connect(({ form }) => ({
  data: form.step,
}))
afc163's avatar
afc163 committed
12
class Step3 extends React.PureComponent {
WhatAKitty's avatar
WhatAKitty committed
13
  render() {
zinkey's avatar
zinkey committed
14
    const { data } = this.props;
WhatAKitty's avatar
WhatAKitty committed
15
    const onFinish = () => {
zinkey's avatar
zinkey committed
16
      router.push('/form/step-form/info');
WhatAKitty's avatar
WhatAKitty committed
17 18 19 20
    };
    const information = (
      <div className={styles.information}>
        <Row>
jim's avatar
jim committed
21
          <Col xs={24} sm={8} className={styles.label}>
jim's avatar
jim committed
22 23
            付款账户
          </Col>
jim's avatar
jim committed
24 25 26
          <Col xs={24} sm={16}>
            {data.payAccount}
          </Col>
WhatAKitty's avatar
WhatAKitty committed
27 28
        </Row>
        <Row>
jim's avatar
jim committed
29
          <Col xs={24} sm={8} className={styles.label}>
jim's avatar
jim committed
30 31
            收款账户
          </Col>
jim's avatar
jim committed
32 33 34
          <Col xs={24} sm={16}>
            {data.receiverAccount}
          </Col>
WhatAKitty's avatar
WhatAKitty committed
35 36
        </Row>
        <Row>
jim's avatar
jim committed
37
          <Col xs={24} sm={8} className={styles.label}>
jim's avatar
jim committed
38 39
            收款人姓名
          </Col>
jim's avatar
jim committed
40 41 42
          <Col xs={24} sm={16}>
            {data.receiverName}
          </Col>
WhatAKitty's avatar
WhatAKitty committed
43 44
        </Row>
        <Row>
jim's avatar
jim committed
45
          <Col xs={24} sm={8} className={styles.label}>
jim's avatar
jim committed
46 47
            转账金额
          </Col>
jim's avatar
jim committed
48
          <Col xs={24} sm={16}>
jim's avatar
jim committed
49 50
            <span className={styles.money}>{data.amount}</span> 
          </Col>
WhatAKitty's avatar
WhatAKitty committed
51 52 53 54
        </Row>
      </div>
    );
    const actions = (
陈帅's avatar
陈帅 committed
55
      <Fragment>
WhatAKitty's avatar
WhatAKitty committed
56 57 58
        <Button type="primary" onClick={onFinish}>
          再转一笔
        </Button>
jim's avatar
jim committed
59
        <Button>查看账单</Button>
陈帅's avatar
陈帅 committed
60
      </Fragment>
WhatAKitty's avatar
WhatAKitty committed
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}
      />
    );
  }
}