|
|
@ -742,20 +742,15 @@ export default { |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req.saveOrUpdate(this.formobj).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
/* this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: resp.msg |
|
|
|
})*/ |
|
|
|
if (resp.success) { |
|
|
|
this.handleReturn('true') |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
req.saveOrUpdate(this.formobj).then((resp) => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
|
this.handleReturn('true') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
@ -768,7 +763,7 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.departureDate === '') { |
|
|
|
alert('物流发车日期不能为空!') |
|
|
|
this.$message({ showClose: true, type: 'error', message: '物流发车日期不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.freightChecked) { |
|
|
@ -817,7 +812,7 @@ export default { |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
req.submitVehicleApply(this.formobj).then(res => { |
|
|
|
req.submitVehicleApply(this.formobj).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
@ -825,12 +820,6 @@ export default { |
|
|
|
message: '提交成功' |
|
|
|
}) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'error', |
|
|
|
message: '提交失败' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
@ -845,12 +834,6 @@ export default { |
|
|
|
message: '提交成功' |
|
|
|
}) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'error', |
|
|
|
message: '提交失败' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|