import React, { Component } from "react"; import { Alert } from 'antd'; import { connect } from 'dva'; import { BhAccountSendVerifyCode, getComWalletAccountAmount, comWalletAccountExtract, getWalletRechargeToken, taskComBhAccountGetComBhAccountAmount, taskComBhAccountWithdrawa } from '../../../../services/api'; import $modal from '../../../../utils/modal'; import $nModal from '../../../../utils/modal/nModal'; import { SMS_OP_WITHDRAW } from '../../../../common/shortMessage'; import { Tooltip, Icon, Button, Modal, notification, Radio, Form, Input } from 'antd'; import WalletModal from './WalletModal'; import UpdateMobileModal from './UpdateMobileModal'; import { formItemLayout1, commanFormItemLayout } from '../../../../constants/formItemLayout'; import yl from '../../../../assets/images/wallet/yl.png'; import cq from '../../../../assets/images/wallet/cq.png'; @connect(state => ({ companyInfo: state.global.companyInfo })) @Form.create() export default class StepFive extends Component { constructor(props, context) { super(props, context); if (this.props.companyInfo) { window.sessionStorage.setItem('companyInfo', JSON.stringify(this.props.companyInfo)); } this.state = { companyInfo: this.props.companyInfo, // 公司信息 rechargeVisbale: false, rechargeTime: 0, // 充值倒计时时间 rechargeTimer: null, //充值倒计时定时器 rechargeBtnName: '获取验证码', //充值发送验证码按钮名字 codeValue: '', //提现短信验证码 moneyReg: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, //金额正则 cashOutVisbale: false, // 提现对话框 accountInfo: {}, // 资金信息 accountInfo: {}, //账户信息 payUrl: '', //充值表单提交url time: 0, // 可发送验证码剩余时间 btnName: '获取验证码', // 发送验证码按钮名字 timer: null, // 验证码定时器 orderId: '',//提现的时候短信验证码发送后返回的orderid 在提现接口中要用到 editModalVisble: false, // 修改对公账户模态框 updateMobileModal:false,//修改手机号 accountStatusValue: { 0: '正常', 7: '客户绑卡未激活', 8: "平台客户开户处理中", 9: '普通客户开户处理中', } }; } componentDidMount() { if (window.sessionStorage.getItem('companyInfo')) { this.setState({ companyInfo: JSON.parse(window.sessionStorage.getItem('companyInfo')) }); } } componentDidUpdate() { this.__initPage(); } static getDerivedStateFromProps(nextProps, prevState) { let props = { bankInfo: nextProps.bankInfo }; return props; } //提现 _cashOutSubmit = e => { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { const POST_DATA = { ...values, }; taskComBhAccountWithdrawa(POST_DATA).then(res => { $modal('提交提现成功!', '到账时间:根据人行处理转账情况决定,一般为实时到账。', [{ text: '确定', type: 'primary', onPress: () => { // this.__initPage(); taskComBhAccountGetComBhAccountAmount().then(res => { this.setState({ accountInfo: res.data }); }); this.setState({ cashOutVisbale: false }); } }], 'success'); }); } }); } __initPage() { const { bankInfo } = this.props; if (!this.state.hasLoad) { if (bankInfo) { this.setState({ hasLoad: true }); taskComBhAccountGetComBhAccountAmount().then(res => { this.setState({ accountInfo: res.data }); }); } } } render() { const { getFieldDecorator, getFieldValue } = this.props.form; const { rechargeVisbale, cashOutVisbale, bankInfo } = this.state; return (

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

  1. 发薪账号:
    {this.state.bankInfo.bhVirlAcctNo ? {this.state.bankInfo.bhVirlAcctNo} : }
  2. 账户状态:
    { this.state.accountStatusValue[this.state.bankInfo.accountStatus] }
  3. 绑定手机号:
    {this.state.bankInfo.mobilePhone}
    { this.setState({ updateMobileModal:true }) }}>修改
  4. {/*
  5. 充值卡账户:
    建设银行 8888 8888 8888 8888 888
  6. */}
  7. 企业基本户:
    {this.state.bankInfo.bankOutlets} {this.state.bankInfo.bankCardNo}
    { this.setState({ editModalVisble: true }); }} > 修改
  8. 发薪权限:
    { this.state.bankInfo.isOpenSalaryAuth == '0' ? 未开启 (请联系在线客服进行申请) : 已开启 }
{/* 修改对公账户对话框 */} { this.__initPage() }} update={() => { this.props.updateBackInfo() }} onCancel={() => { this.setState({ editModalVisble: false }); }} /> {/* 修改手机号 */} { this.props.updateBackInfo() }} onCancel={() => { this.setState({ updateMobileModal: false }); }} /> {/* 充值对话框*/} { rechargeVisbale && { this.setState({ rechargeVisbale: false }); }} visible={rechargeVisbale} >
线下转账充值说明:
请使用您的企业基本户向您企业开通的发薪账户转账,系统确认到账后会自动为您的账户充值; 使用其他银行账户转账将无法识别充值,系统会自动退款!
{getFieldDecorator('amount', { // initialValue: this.state.cashOutValue, rules: [ { required: true, message: '获取付款账户失败' } ] })(
{this.state.bankInfo.bankOutlets} {this.state.bankInfo.bankCardNo}
)}
{getFieldDecorator('amount', { // initialValue: 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.companyInfo.comName}
收款账户:{this.state.bankInfo.bhVirlAcctNo}
)}
} {/* 提现对话框*/} { cashOutVisbale && { this.setState({ cashOutVisbale: false }); }} visible={cashOutVisbale} >

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

{(() => { const { getFieldDecorator } = this.props.form; return (
{getFieldDecorator('bankCardNo', { initialValue: this.state.bankInfo.bankCardNo, rules: [ { required: true, message: '获取收款账户失败' } ] })()} {getFieldDecorator('amount', { // initialValue: 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.bankInfo.mobilePhone}

{getFieldDecorator('activeCode', { // initialValue: 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} />)}
); })()}
}
); } }