This commit is contained in:
caishi 2020-07-22 10:30:54 +08:00
parent 21ec6df821
commit 46b5123fab
1 changed files with 3 additions and 5 deletions

View File

@ -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`