Update edit.js
This commit is contained in:
parent
6dfdbdf90f
commit
0963854a62
|
@ -408,6 +408,9 @@ export default class add extends React.Component{
|
||||||
this.setState({audit_visible:false})
|
this.setState({audit_visible:false})
|
||||||
|
|
||||||
let approval_id = sessionStorage.getItem("approval_id")
|
let approval_id = sessionStorage.getItem("approval_id")
|
||||||
|
|
||||||
|
if(approval_id > 0)
|
||||||
|
{
|
||||||
getApprovalsStatus(approval_id).then((res)=>{
|
getApprovalsStatus(approval_id).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
if(req.status == 0)
|
if(req.status == 0)
|
||||||
|
@ -451,7 +454,27 @@ export default class add extends React.Component{
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let data =
|
||||||
|
{
|
||||||
|
"reseller_id":this.state.reseller.id,
|
||||||
|
"reseller_name":this.state.reseller.name,
|
||||||
|
"company_name":this.state.reseller.company_name,
|
||||||
|
"receive_email":this.state.email_list[0],
|
||||||
|
"payment_direction":this.state.payment_direction[this.state.paytype - 1],
|
||||||
|
}
|
||||||
|
|
||||||
|
approvals(plan_id,data).then((res)=>{
|
||||||
|
handelResponse(res,(req,msg)=>{
|
||||||
|
Notify.success("成功发起审批")
|
||||||
|
this.setState({audit_visible:false})
|
||||||
|
this.props.history.push('/home/plan-list/');
|
||||||
|
},(err)=>{
|
||||||
|
Notify.error(err)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue