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