|
@@ -105,13 +105,19 @@ export default {
|
|
|
|
|
|
// 提交
|
|
// 提交
|
|
getSubmit() {
|
|
getSubmit() {
|
|
- this.form.province = this.form.cascader[0]
|
|
|
|
- this.form.city = this.form.cascader[1]
|
|
|
|
- this.form.area = this.form.cascader[2]
|
|
|
|
- submit(this.form).then(res => {
|
|
|
|
- if (res.code === 0) {
|
|
|
|
- this.$message.success('提交成功!')
|
|
|
|
- this.cancel()
|
|
|
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.form.province = this.form.cascader[0]
|
|
|
|
+ this.form.city = this.form.cascader[1]
|
|
|
|
+ this.form.area = this.form.cascader[2]
|
|
|
|
+ submit(this.form).then(res => {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ this.$message.success('提交成功!')
|
|
|
|
+ this.cancel()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|