修复兑换码新增和复制字段转换错误
This commit is contained in:
parent
6fe7499eb0
commit
acb5c92f63
|
@ -105,11 +105,15 @@ export default class exchangeAdd extends React.Component {
|
||||||
getResellerFunction(reseller_id) {
|
getResellerFunction(reseller_id) {
|
||||||
getReseller(reseller_id).then((res) => {
|
getReseller(reseller_id).then((res) => {
|
||||||
handelResponse(res, (req1, msg) => {
|
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({
|
this.setState({
|
||||||
direct_reseller_id: req1.direct_reseller_id,
|
direct_reseller_id: req1.direct_reseller_id,
|
||||||
reseller: req1,
|
reseller: reseller_obj
|
||||||
phone_list: req1.contact_phone,
|
|
||||||
email_list: req1.contact_email[0]
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -574,6 +578,8 @@ export default class exchangeAdd extends React.Component {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(this.state.reseller)
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
reseller_id: this.state.reseller.id,
|
reseller_id: this.state.reseller.id,
|
||||||
reseller_name: this.state.reseller.name,
|
reseller_name: this.state.reseller.name,
|
||||||
|
@ -632,13 +638,12 @@ export default class exchangeAdd extends React.Component {
|
||||||
if (this.state.isState === 1) {
|
if (this.state.isState === 1) {
|
||||||
newData.copy_code_batch_id = code_batch_id
|
newData.copy_code_batch_id = code_batch_id
|
||||||
}
|
}
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
code_batch: [newData],
|
code_batch: [newData],
|
||||||
reseller_id: this.state.reseller.id,
|
reseller_id: this.state.reseller.id,
|
||||||
reseller_name: this.state.reseller.name,
|
reseller_name: this.state.reseller.name,
|
||||||
company_name: this.state.reseller.company_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]
|
payment_direction: this.state.payment_direction[this.state.paytype - 1]
|
||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in New Issue