Result.js 1.82 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';

8 9 10
@connect(({ form }) => ({
  data: form.step,
}))
afc163's avatar
afc163 committed
11
class Step3 extends React.PureComponent {
WhatAKitty's avatar
WhatAKitty committed
12
  render() {
zinkey's avatar
zinkey committed
13
    const { data } = this.props;
WhatAKitty's avatar
WhatAKitty committed
14
    const onFinish = () => {
xiaohuoni's avatar
xiaohuoni committed
15
      router.push('/forms/stepform/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}
      />
    );
  }
}
lijiehua's avatar
lijiehua committed
73 74

export default Step3;