Update edit.js

This commit is contained in:
姜棚 2022-01-11 15:02:50 +08:00
parent 6dfdbdf90f
commit 0963854a62
1 changed files with 24 additions and 1 deletions

View File

@ -408,6 +408,9 @@ export default class add extends React.Component{
this.setState({audit_visible:false})
let approval_id = sessionStorage.getItem("approval_id")
if(approval_id > 0)
{
getApprovalsStatus(approval_id).then((res)=>{
handelResponse(res,(req,msg)=>{
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)
})
})
}
}