diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 2570e183..723107f1 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -104,7 +104,7 @@ class order_form extends Component { branches: result.data.branches, isSpin:false }); - if(this.props.form_type === "edit"){ + if(this.props.form_type !== "new"){ this.get_detail(); }else{ this.props.form.setFieldsValue({ @@ -166,8 +166,7 @@ class order_form extends Component { start_date: start_date, due_date: due_date, issue_type: issue_type, - }) - .then((result) => { + }).then((result) => { if (result && result.data.id) { this.props.showNotification("任务创建成功!"); this.props.history.push(`/projects/${projectsId}/orders/${result.data.id}/detail`); @@ -194,8 +193,7 @@ class order_form extends Component { due_date: due_date, issue_type: issue_type, ...values, - }) - .then((result) => { + }).then((result) => { if (result) { this.props.history.push( `/projects/${projectsId}/orders/${orderId}/detail`