diff --git a/src/views/longtermvehicleinputportmessage/auditChronicallyCar/components/sendUtil.vue b/src/views/longtermvehicleinputportmessage/auditChronicallyCar/components/sendUtil.vue index 3bf8196..e1737ce 100644 --- a/src/views/longtermvehicleinputportmessage/auditChronicallyCar/components/sendUtil.vue +++ b/src/views/longtermvehicleinputportmessage/auditChronicallyCar/components/sendUtil.vue @@ -127,19 +127,24 @@ export default { this.$parent.activeName = 'List' }, sendMessage() { - requestFN( - '/vehiclemessage/auditChronicallyCar', - { - FIRST_AUDIT_USER_ID: JSON.parse(sessionStorage.getItem('user')).USER_ID, - IS_AUDIT: this.form.STATUS, - VEHICLE_ID: this.VEHICLE_ID, - REMARK: this.form.OPINION + this.$refs.form.validate((valid) => { + if (!valid) { + return false } - ).then((data) => { - this.visible = false - this.$emit('refresh', '') - }).catch((e) => { - this.loading = false + requestFN( + '/vehiclemessage/auditChronicallyCar', + { + FIRST_AUDIT_USER_ID: JSON.parse(sessionStorage.getItem('user')).USER_ID, + IS_AUDIT: this.form.STATUS, + VEHICLE_ID: this.VEHICLE_ID, + REMARK: this.form.OPINION + } + ).then((data) => { + this.visible = false + this.$emit('refresh', '') + }).catch((e) => { + this.loading = false + }) }) } } diff --git a/src/views/truckinputportmanage/dangertruckcheck/components/sendUtil.vue b/src/views/truckinputportmanage/dangertruckcheck/components/sendUtil.vue index 82edfb4..ef73660 100644 --- a/src/views/truckinputportmanage/dangertruckcheck/components/sendUtil.vue +++ b/src/views/truckinputportmanage/dangertruckcheck/components/sendUtil.vue @@ -129,19 +129,25 @@ export default { this.$parent.activeName = 'List' }, sendMessage() { - requestFN( - '/vehiclemessage/qyAudit', - { - AUDITOR: JSON.parse(sessionStorage.getItem('user')).USER_ID, - VEHICLE_ID: this.VEHICLE_ID, - IS_AUDIT: this.form.STATUS, - REMARK: this.form.OPINION + this.$refs.form.validate((valid) => { + if (!valid) { + return false } - ).then((data) => { - this.visible = false - this.$emit('refresh', '') - }).catch((e) => { - this.loading = false + requestFN( + '/vehiclemessage/qyAudit', + { + AUDITOR: JSON.parse(sessionStorage.getItem('user')).USER_ID, + VEHICLE_ID: this.VEHICLE_ID, + IS_AUDIT: this.form.STATUS, + REMARK: this.form.OPINION + } + ).then((data) => { + this.visible = false + this.handleClose() + this.$emit('refresh', '') + }).catch((e) => { + this.loading = false + }) }) } }