import React, { Component } from "react"; import { Alert } from 'antd'; import { sendVerifyCode, getComWalletAccountAmount, comWalletAccountExtract, getWalletRechargeToken } from '../../../../services/api'; // import $modal from '../../modal'; import $modal from '../../../../utils/modal'; import $nModal from '../../../../utils/modal/nModal'; import { SMS_OP_WITHDRAW } from '../../../../common/shortMessage'; // import { getHostByPath } from '../../../../utils/request.js'; import { Tooltip, Icon, Button, Modal, notification, Radio, Form, Input } from 'antd'; import WalletModal from './WalletModal'; import yl from '../../../../assets/images/wallet/yl.png'; import cq from '../../../../assets/images/wallet/cq.png'; const formItemLayout = { labelCol: { xs: { span: 24 }, sm: { span: 7 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 12 }, md: { span: 12 } } }; @Form.create() export default class StepFive extends Component { constructor(props, context) { super(props, context); this.state = { companyInfo: JSON.parse(window.sessionStorage.getItem('companyInfo')), // 公司信息 rechargeVisbale: false, rechargeValue: '', // 充值金额的值 rechargeShowTip: false, //显示提示 codeValue: '', //提现短信验证码 rechargeRadio: '1', // 充值选项框 0->企业网银充值 1->线下转账充值, rechargeBtnDisable: false, // 充值按钮的disable控制 rechargeBtnToken: '', // 充值时通过接口获取的token moneyReg: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, //金额正则 cashOutVisbale: false, // 提现对话框 moneyInfo: {}, // 资金信息 accountInfo: {}, //账户信息 payUrl: '', //充值表单提交url time: 0, // 可发送验证码剩余时间 btnName: '获取验证码', // 发送验证码按钮名字 timer: null, // 验证码定时器 orderId: '',//提现的时候短信验证码发送后返回的orderid 在提现接口中要用到 editModalVisble: false // 修改对公账户模态框 }; } componentDidMount() { this.setState({ companyInfo: JSON.parse(window.sessionStorage.getItem('companyInfo')) }); } componentDidUpdate() { this.__initPage(); } static getDerivedStateFromProps(nextProps, prevState) { let props = { accountInfo: nextProps.accountInfo }; return props; } _cashOutSubmit = e => { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { const { bankCardNo, walletAccountNo, mobilePhone } = this.state.accountInfo; const POST_DATA = { ...values, comName: this.state.companyInfo.comName, bankCardNo, walletAccountNo, mobilePhone, orderId: this.state.orderId }; comWalletAccountExtract(POST_DATA).then(res => { // const MSG = res.msg; $modal('钱包提现申请提交成功!', '根据银行转账的时效,预计一天内会提现到您的结算卡中。', [{ text: '确定', type: 'primary', onPress: () => { console.log('成功'); this.props.updateBackInfo(); } }], 'success'); }); } }); } __initPage() { // getComWalletAccount().then(res => { // this.setState({ // accountInfo: res.data // }); const { walletAccountNo } = this.state.accountInfo; if (!this.state.hasLoad) { if (walletAccountNo) { this.setState({ hasLoad: true }); getComWalletAccountAmount({ walletAccountNo }).then(res => { this.setState({ moneyInfo: res.data }); }); } } // }); } render() { return (

您好{this.state.companyInfo.comName && `,${this.state.companyInfo.comName}!`}

中国银联 与富民银行 联合为您提供资金监管及安全保障服务! 《富民银行委托结算服务协议》

  1. 企业ID:
    {this.state.accountInfo.comId ? {this.state.accountInfo.comId} : }
  2. 钱包账户号:
    {this.state.accountInfo.walletAccountNo ? {this.state.accountInfo.walletAccountNo} : }
  3. 账户状态:
    {this.state.accountInfo.accountStatus}
  4. 验证手机号:
    {this.state.accountInfo.mobilePhone}
    { $nModal({ footer: null, title: '修改企业绑定手机号及企业名称', content: ( <> 1、请下载页面中的模板,根据页面提示完成信息填写;
    2、表格信息填写完毕后,需加盖企业公章;
    3、加盖公章后,请扫描成电子档,发送给平台在线客服,平台在线客服审核后系统自动修改,审核时间预计1~3个工作日。
    } type="warning" showIcon style={{ marginBottom: '15px' }} /> 点击下载: 重庆富民银行企富通用户信息变更申请表.doc ) }) }}>修改
{/*
  • 充值卡账户:
    建设银行 8888 8888 8888 8888 888
  • */}
  • 企业对公账户:
    {this.state.accountInfo.bankName} {this.state.accountInfo.bankCardNo}
    { this.setState({ editModalVisble: true }); }} > 修改
  • 开户时间:
    {this.state.accountInfo.createTime}
  • {/* 修改对公账户对话框 */} { this.__initPage() }} onCancel={() => { this.setState({ editModalVisble: false }); }} /> {/* 充值对话框*/} { this.setState({ rechargeVisbale: false }); }} visible={this.state.rechargeVisbale} >
    {/* { this.setState({ rechargeRadio: e.target.value }); }} > 企业网银充值 转账充值 */} {/*

    转账充值

    */}
    {/* 企业网银充值 */} {this.state.rechargeRadio == '0' &&

    注:企业网银充值服务,由中国银联提供技术支持与资金数据处理服务,确保您的资金安全到账!本充值方式,次日到账,请知悉。

    {(() => { const { getFieldDecorator } = this.props.form; return (
    { const value = e.target.value; this.setState({ rechargeValue: value, rechargeShowTip: !this.state.moneyReg.test(value) || value == 0 }); }} maxLength={50} />
    请输入正确金额,如:1000.00
    ); })()}
    } {/* 线下转账充值 */} { this.state.rechargeRadio == '1' &&

    转账充值说明: 请使用绑定的企业对公账户向富民银行安保人资服务专用户转账,系统确认到账后会自动为您的账户充值; 使用其他银行账户转账将无法识别充值!

    企业对公账户:

    {this.state.accountInfo.bankCardNo} {this.state.accountInfo.bankName}

    转账至:

    收款银行: 重庆富民银行

    收款户名: 富民银行安保人资服务专用户

    收款账户: 6800 0010 1931 0967 121

    注:部分银行系统,收款银行选择不到"重庆富民银行"的,请选择"民营银行",并填写"重庆富民银行"。

    }
    {/* 提现对话框*/} { this.setState({ cashOutVisbale: false }); }} visible={this.state.cashOutVisbale} >

    注:钱包提现服务,由中国银联提供技术支持与资金数据处理服务,确保您的资金安全到账!

    {(() => { const { getFieldDecorator } = this.props.form; return (
    {getFieldDecorator('amount', { value: this.state.cashOutValue, rules: [ { required: true, message: '请输入提现金额' }, { validator: (rule, value, callback) => { if (value && !this.state.moneyReg.test(value) || parseFloat(value) == 0) { callback('请输入正确金额,如:1000.00'); } else { callback(); } } } ] })()} {this.state.accountInfo.bankCardNo}

    {this.state.accountInfo.mobilePhone}

    {getFieldDecorator('activeCode', { value: this.state.activeCode, rules: [ { required: true, message: '请输入验证码' }, { validator: (rule, value, callback) => { if (value && !/\d{0,6}/.test(value)) { callback('请输入正确验证码'); } else { callback(); } } } ] })( { this.setState({ codeValue: e.target.value }); }} maxLength={50} />)}
    ); })()}
    {/*
    */}
    ); } }