表单验证补充完整返回
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
<ai-title title="添加档案" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
<ai-title title="添加档案" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<el-form class="content-right" :model="form" ref="ruleForm" :rules="rules" label-width="130px"
|
<el-form class="content-right" :model="form" ref="form" :rules="rules" label-width="130px"
|
||||||
label-position="right" size="small">
|
label-position="right" size="small">
|
||||||
|
|
||||||
<ai-card title="基本信息">
|
<ai-card title="基本信息">
|
||||||
@@ -191,6 +191,7 @@ export default {
|
|||||||
callback(new Error("身份证号格式错误"));
|
callback(new Error("身份证号格式错误"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
callback()
|
||||||
// else {
|
// else {
|
||||||
// callback(new Error("请输入身份证号"));
|
// callback(new Error("请输入身份证号"));
|
||||||
// }
|
// }
|
||||||
@@ -317,13 +318,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs['ruleForm'].validate(valid => {
|
this.$refs.form.validate().then(() => this.addOrUpdate())
|
||||||
if (valid) {
|
|
||||||
this.addOrUpdate()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'List',
|
type: 'List',
|
||||||
|
|||||||
Reference in New Issue
Block a user