|
@@ -242,13 +242,17 @@
|
|
|
},
|
|
|
// 表单提交
|
|
|
doSubmit () {
|
|
|
- this.serialnumTplService.save(this.inputForm).then(({data}) => {
|
|
|
- this.close()
|
|
|
- this.$message.success(data)
|
|
|
- this.$emit('refreshDataList')
|
|
|
- this.loading = false
|
|
|
- }).catch(() => {
|
|
|
- this.loading = false
|
|
|
+ this.$refs['inputForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.serialnumTplService.save(this.inputForm).then(({data}) => {
|
|
|
+ this.close()
|
|
|
+ this.$message.success(data)
|
|
|
+ this.$emit('refreshDataList')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
close () {
|