|
|
|
@ -40,12 +40,48 @@ 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) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
yhBankstrue = () => {
|
|
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
|
|
|
if (!err) {
|
|
|
|
|
let url = `/competitions/${this.props.match.params.identifier}/prize_leader_account.json`;
|
|
|
|
|
axios.patch(url, {
|
|
|
|
|
user_id:this.props.userdata.id,
|
|
|
|
|
bank: values.openingbank,
|
|
|
|
|
second_bank: values.subbranchs,
|
|
|
|
|
card_no: values.subbranch
|
|
|
|
@ -152,7 +188,7 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('openingbank', {
|
|
|
|
|
rules: [{
|
|
|
|
|
// initialValue: this.state.cityDefaultValue,
|
|
|
|
|
initialValue: this.state.openingbank&&this.state.openingbank,
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入开户行',
|
|
|
|
|
}],
|
|
|
|
@ -167,7 +203,7 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('subbranch', {
|
|
|
|
|
rules: [{
|
|
|
|
|
// initialValue: this.state.cityDefaultValue,
|
|
|
|
|
initialValue: this.props.subbranch&&this.props.subbranch,
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入支行',
|
|
|
|
|
}],
|
|
|
|
@ -182,7 +218,7 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('subbranchs', {
|
|
|
|
|
rules: [{
|
|
|
|
|
// initialValue: this.state.cityDefaultValue,
|
|
|
|
|
initialValue: this.props.subbranchs&&this.props.subbranchs,
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入账号',
|
|
|
|
|
}],
|
|
|
|
|