diff --git a/src/pages/plan/add/edit.js b/src/pages/plan/add/edit.js index 88eb22a2..1d81d0c5 100644 --- a/src/pages/plan/add/edit.js +++ b/src/pages/plan/add/edit.js @@ -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) + }) + }) + } }