import React from 'react'; import { Input, Button, Form, Icon, Spin, message, Cascader } from 'antd'; import { areaSelect } from '../NewDicProvinceList'; import './certify.less'; import ajax from 'jquery/src/ajax/xhr.js' import $ from 'jquery/src/ajax'; const Content = Form.create()(React.createClass({ getData() { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", url: globalConfig.context + "/api/user/orgProcess", success: function (data) { if (data.data) { this.setState({ firstContacts: data.data.firstContacts, firstMobile: data.data.firstMobile, bankAccount: data.data.bankAccount, address: [data.data.locationProvince, data.data.locationCity, data.data.locationArea], banks: data.data.banks, bankBranch: data.data.bankBranch, bankCardNumber: data.data.bankCardNumber, }); }; }.bind(this), }).done(function (data) { if (data.error.length) { message.warning(data.error[0].message); } }.bind(this)).always(function () { this.setState({ loading: false }); }.bind(this)); }, getInitialState() { return { loading: false }; }, handleSubmit(e) { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { this.setState({ loading: true }); $.ajax({ method: "POST", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/user/orgNextPro", data: { bankAccount: values.bankAccount, banks: values.banks, bankBranch: values.bankBranch, bankCardNumber: values.bankCardNumber, locationProvince: values.address[0], locationCity: values.address[1], locationArea: values.address[2], process: 2 } }).done(function (data) { if (!data.error.length) { message.success('保存成功!'); this.props.changeStep(3); } else { message.warning(data.error[0].message); this.setState({ loading: false }); } }.bind(this)); } }); }, checkBankCardNum(rule, value, callback) { if (!/(^\d{15,}$)/.test(value)) { callback('请输入正确的银行卡号!'); } else { callback(); } }, componentWillMount() { this.getData(); }, changeStep() { this.props.changeStep(1); }, render() { const FormItem = Form.Item; const { getFieldDecorator } = this.props.form; const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 12 }, }; const _me = this; return (

请填写您的银行卡信息,该银行卡仅用于认证您的身份。

必须使用以该名称为开户名的银行卡进行认证} > {getFieldDecorator('bankAccount', { initialValue: this.state.bankAccount || null, rules: [{ required: true, message: '请输入开户银行开户名!' }] })( )} 不支持信用卡和存折进行认证} > {getFieldDecorator('banks', { initialValue: this.state.banks || null, rules: [{ required: true, message: '请输入开户银行名称!' }] })( )} {getFieldDecorator('address', { initialValue: this.state.address || null, rules: [{ type: 'array', required: true, message: '请选择地址!' }] })( )} {getFieldDecorator('bankBranch', { initialValue: this.state.bankBranch || null, rules: [{ required: true, message: '请输入银行开户支行名称!' }] })( )} {getFieldDecorator('bankCardNumber', { initialValue: this.state.bankCardNumber || null, rules: [{ validator: this.checkIdcardnum, }], })( )} 我们会将重要进度以短信形式通知您 } > {getFieldDecorator('contactMobile')( {(this.state.firstContacts || '') + ' ' + (this.state.firstMobile || '')} )}
); }, })); export default Content;