diff --git a/anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldAdd.vue b/anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldAdd.vue
index 75b4e7c8f7..cf0fa45fa1 100644
--- a/anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldAdd.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldAdd.vue
@@ -9,7 +9,7 @@
保存
- 提交
+ 提交
关闭
@@ -459,14 +459,11 @@ export default {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
- this.submitdisabled = false
if (resp.success) {
- this.$message({
- showClose: true,
- type: 'success',
- message: resp.msg
- })
+ this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
+ } else {
+ this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
@@ -477,23 +474,22 @@ export default {
})
},
submitVehicleApply() {
- if (this.formobj.isPay == '1' && this.formobj.payAccountAll !== this.formobj.money) {
- this.$message({ showClose: true, type: 'error', message: '因买断金额合计与付款金额合计不一致,提交失败' })
- return
- }
- req.submitVehicleApply(this.formobj).then((res) => {
- if (res.success) {
- this.$message({
- showClose: true,
- type: 'success',
- message: '提交成功'
- })
- this.handleReturn('true')
- } else {
- this.$message({
- showClose: true,
- type: 'error',
- message: '提交失败'
+ this.$refs['form_obj'].validate((valid) => {
+ if (valid) {
+ this.submitdisabled = true
+ req.submitVehicleApply(this.formobj).then((res) => {
+ if (res.success) {
+ this.$message({
+ showClose: true,
+ type: 'success',
+ message: '提交成功'
+ })
+ this.handleReturn('true')
+ } else {
+ this.submitdisabled = false
+ }
+ }).catch(() => {
+ this.submitdisabled = false
})
}
})
@@ -575,6 +571,7 @@ export default {
purchaseSystemName: ''
}
this.dialogStatus = ''
+ this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},