|
|
|
@ -30,6 +30,7 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
window.document.title = '竞赛';
|
|
|
|
|
// console.log("3获取用户信息");
|
|
|
|
|
// console.log(this.props)
|
|
|
|
|
this.props.triggerRef(this);
|
|
|
|
|
//初始化值
|
|
|
|
|
if (this.props.bank_account) {
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
@ -40,40 +41,15 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
|
if (prevProps.bank_account != this.props.bank_account) {
|
|
|
|
|
console.log("componentDidUpdate");
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
console.log(prevProps);
|
|
|
|
|
////console.log("Registration");
|
|
|
|
|
////console.log("componentDidUpdate");
|
|
|
|
|
////console.log(this.props.user.admin);
|
|
|
|
|
try {
|
|
|
|
|
if(this.props.bank_account){
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
openingbank: this.props.bank_account.bank,
|
|
|
|
|
subbranch: this.props.bank_account.second_bank,
|
|
|
|
|
subbranchs: this.props.bank_account.card_no,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if(prevProps.bank_account){
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
openingbank:prevProps.bank_account.bank,
|
|
|
|
|
subbranch: prevProps.bank_account.second_bank,
|
|
|
|
|
subbranchs: prevProps.bank_account.card_no,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
setdata(bank,second_bank,card_no){
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
openingbank: bank,
|
|
|
|
|
subbranch: second_bank,
|
|
|
|
|
subbranchs:card_no,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
yhBankstrue = () => {
|
|
|
|
@ -83,16 +59,34 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
axios.patch(url, {
|
|
|
|
|
user_id:this.props.userdata.id,
|
|
|
|
|
bank: values.openingbank,
|
|
|
|
|
second_bank: values.subbranchs,
|
|
|
|
|
card_no: values.subbranch
|
|
|
|
|
second_bank: values.subbranch ,
|
|
|
|
|
card_no: values.subbranchs
|
|
|
|
|
})
|
|
|
|
|
.then((result) => {
|
|
|
|
|
try {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// console.log(JSON.stringify(result));
|
|
|
|
|
this.props.showNotification(`提交成功,等待审核!`);
|
|
|
|
|
this.props.getdata(this.props.userdata.id);
|
|
|
|
|
this.props.GetawardinformationAPI();
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
openingbank: values.openingbank,
|
|
|
|
|
subbranch: values.subbranch,
|
|
|
|
|
subbranchs: values.subbranchs,
|
|
|
|
|
})
|
|
|
|
|
try {
|
|
|
|
|
this.props.showNotification(`提交成功,等待审核!`);
|
|
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
this.props.getdata(this.props.userdata.id);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
this.props.GetawardinformationAPI();
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
@ -109,6 +103,24 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
const {getFieldDecorator} = this.props.form;
|
|
|
|
|
const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state
|
|
|
|
|
var bank="";
|
|
|
|
|
if(this.props.bank_account){
|
|
|
|
|
if(this.props.bank_account.bank){
|
|
|
|
|
bank=this.props.bank_account.bank;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var second_bank ="";
|
|
|
|
|
if(this.props.bank_account){
|
|
|
|
|
if(this.props.bank_account.second_bank){
|
|
|
|
|
second_bank=this.props.bank_account.second_bank;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var card_no="";
|
|
|
|
|
if(this.props.bank_account){
|
|
|
|
|
if(this.props.bank_account.card_no){
|
|
|
|
|
card_no=this.props.bank_account.card_no;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="flexdirections mt36">
|
|
|
|
@ -188,7 +200,7 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('openingbank', {
|
|
|
|
|
rules: [{
|
|
|
|
|
initialValue: this.state.openingbank&&this.state.openingbank,
|
|
|
|
|
initialValue:this.state.openingbank,
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入开户行',
|
|
|
|
|
}],
|
|
|
|
@ -203,7 +215,7 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('subbranch', {
|
|
|
|
|
rules: [{
|
|
|
|
|
initialValue: this.props.subbranch&&this.props.subbranch,
|
|
|
|
|
initialValue: this.state.subbranch,
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入支行',
|
|
|
|
|
}],
|
|
|
|
@ -218,7 +230,7 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('subbranchs', {
|
|
|
|
|
rules: [{
|
|
|
|
|
initialValue: this.props.subbranchs&&this.props.subbranchs,
|
|
|
|
|
initialValue: this.state.subbranchs,
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入账号',
|
|
|
|
|
}],
|
|
|
|
|