diff --git a/src/pages/exchangecode/exchangecodeAdd/index.jsx b/src/pages/exchangecode/exchangecodeAdd/index.jsx index fd735680..9cfe8f15 100644 --- a/src/pages/exchangecode/exchangecodeAdd/index.jsx +++ b/src/pages/exchangecode/exchangecodeAdd/index.jsx @@ -105,11 +105,15 @@ export default class exchangeAdd extends React.Component { getResellerFunction(reseller_id) { getReseller(reseller_id).then((res) => { handelResponse(res, (req1, msg) => { + let reseller_obj = { + id: req1.id, + name: req1.name, + company_name: req1.company_name, + receive_email: req1.contact_email[0] + } this.setState({ direct_reseller_id: req1.direct_reseller_id, - reseller: req1, - phone_list: req1.contact_phone, - email_list: req1.contact_email[0] + reseller: reseller_obj }) }) }) @@ -574,6 +578,8 @@ export default class exchangeAdd extends React.Component { } }) + console.log(this.state.reseller) + let data = { reseller_id: this.state.reseller.id, reseller_name: this.state.reseller.name, @@ -632,13 +638,12 @@ export default class exchangeAdd extends React.Component { if (this.state.isState === 1) { newData.copy_code_batch_id = code_batch_id } - let data = { code_batch: [newData], reseller_id: this.state.reseller.id, reseller_name: this.state.reseller.name, company_name: this.state.reseller.company_name, - receive_email: this.state.reseller.contact_email[0], + receive_email: this.state.reseller.receive_email, payment_direction: this.state.payment_direction[this.state.paytype - 1] } return data