diff --git a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue index 02690e35ed..02506b0fa5 100644 --- a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue @@ -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: '提交失败' - }) } }) } diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue index ed42d52d54..770ba95124 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue +++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue @@ -756,7 +756,7 @@ export default { this.$refs['form_obj'].validate(valid => { if (valid) { this.submitdisabled = true - req.saveOrUpdate(this.formobj).then(resp => { + req.saveOrUpdate(this.formobj).then((resp) => { this.submitdisabled = false /* this.$message({ showClose: true, @@ -789,7 +789,7 @@ export default { return } if (this.formobj.departureDate === '') { - alert('物流发车日期不能为空!') + this.$message({ showClose: true, type: 'error', message: '物流发车日期不能为空' }) return } if (this.freightChecked) { @@ -838,7 +838,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,