dev_home
杨树林 5 years ago
parent 3bad57edb1
commit 493cec2953

@ -30,6 +30,7 @@ class Bankcardnumberverification extends Component {
window.document.title = '竞赛'; window.document.title = '竞赛';
// console.log("3获取用户信息"); // console.log("3获取用户信息");
// console.log(this.props) // console.log(this.props)
this.props.triggerRef(this);
//初始化值 //初始化值
if (this.props.bank_account) { if (this.props.bank_account) {
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
@ -40,6 +41,14 @@ class Bankcardnumberverification extends Component {
} }
} }
setdata(bank,second_bank,card_no){
this.props.form.setFieldsValue({
openingbank: bank,
subbranch: second_bank,
subbranchs:card_no,
})
}
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
} }
@ -50,13 +59,18 @@ class Bankcardnumberverification extends Component {
axios.patch(url, { axios.patch(url, {
user_id:this.props.userdata.id, user_id:this.props.userdata.id,
bank: values.openingbank, bank: values.openingbank,
second_bank: values.subbranchs, second_bank: values.subbranch ,
card_no: values.subbranch card_no: values.subbranchs
}) })
.then((result) => { .then((result) => {
try { try {
if (result.data.status == 0) { if (result.data.status == 0) {
// console.log(JSON.stringify(result)); // console.log(JSON.stringify(result));
this.props.form.setFieldsValue({
openingbank: values.openingbank,
subbranch: values.subbranch,
subbranchs: values.subbranchs,
})
try { try {
this.props.showNotification(`提交成功,等待审核!`); this.props.showNotification(`提交成功,等待审核!`);
@ -186,7 +200,7 @@ class Bankcardnumberverification extends Component {
> >
{getFieldDecorator('openingbank', { {getFieldDecorator('openingbank', {
rules: [{ rules: [{
initialValue:bank&&bank, initialValue:this.state.openingbank,
required: true, required: true,
message: '请输入开户行', message: '请输入开户行',
}], }],
@ -201,7 +215,7 @@ class Bankcardnumberverification extends Component {
> >
{getFieldDecorator('subbranch', { {getFieldDecorator('subbranch', {
rules: [{ rules: [{
initialValue: second_bank&&second_bank, initialValue: this.state.subbranch,
required: true, required: true,
message: '请输入支行', message: '请输入支行',
}], }],
@ -216,7 +230,7 @@ class Bankcardnumberverification extends Component {
> >
{getFieldDecorator('subbranchs', { {getFieldDecorator('subbranchs', {
rules: [{ rules: [{
initialValue: card_no&&card_no, initialValue: this.state.subbranchs,
required: true, required: true,
message: '请输入账号', message: '请输入账号',
}], }],

@ -319,7 +319,7 @@ class CompetitionContentspdfpeopledata extends Component {
} }
bindRef = ref => { this.child = ref }
//撤销认证 //撤销认证
Cancellationofapplication = (index) => { Cancellationofapplication = (index) => {
let userid; let userid;
@ -529,7 +529,7 @@ class CompetitionContentspdfpeopledata extends Component {
{ {
bank_account_editable === true ? bank_account_editable === true ?
<Bankcardnumberverifications {...this.props} {...this.state} basicInfo={userdata} <Bankcardnumberverifications triggerRef={this.bindRef} {...this.props} {...this.state} basicInfo={userdata}
hideUpdating={(i) => this.hideUpdating(i)} hideUpdating={(i) => this.hideUpdating(i)}
getdata={(id) => this.getdata(id)} getdata={(id) => this.getdata(id)}
GetawardinformationAPI={() => this.GetawardinformationAPI()} GetawardinformationAPI={() => this.GetawardinformationAPI()}
@ -570,7 +570,7 @@ class CompetitionContentspdfpeopledata extends Component {
<div> <div>
{ {
admins===true? admins===true?
<Bankcardnumberverifications {...this.props} {...this.state} basicInfo={userdata} <Bankcardnumberverifications triggerRef={this.bindRef} {...this.props} {...this.state} basicInfo={userdata}
hideUpdating={(i) => this.hideUpdating(i)} hideUpdating={(i) => this.hideUpdating(i)}
getdata={(id) => this.getdata(id)} getdata={(id) => this.getdata(id)}
GetawardinformationAPI={() => this.GetawardinformationAPI()} GetawardinformationAPI={() => this.GetawardinformationAPI()}

Loading…
Cancel
Save