|
@@ -97,12 +97,14 @@
|
|
|
<el-divider>基本信息</el-divider>
|
|
|
<el-form :model="studentForm"
|
|
|
:inline='true'
|
|
|
+ label-width="80px"
|
|
|
+ label-position="right"
|
|
|
ref='studentForm'
|
|
|
:rules="studentRules">
|
|
|
<el-form-item label="联系电话"
|
|
|
:rules="[{ required: true, message: '请输入手机号' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }]">
|
|
|
- <el-input v-model="studentForm.phone"
|
|
|
- @blur="checkPhone(studentForm.phone)"></el-input>
|
|
|
+ <!-- @blur="checkPhone(studentForm.phone)" -->
|
|
|
+ <el-input v-model="studentForm.phone"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属分部"
|
|
|
v-if="isNew"
|
|
@@ -133,9 +135,14 @@
|
|
|
label="男"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="名族"
|
|
|
+ prop="nation">
|
|
|
+ <el-input v-model="studentForm.nation"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="家长姓名">
|
|
|
<el-input v-model="studentForm.parseName"></el-input>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="出生日期">
|
|
|
<el-date-picker v-model="studentForm.date"
|
|
|
value-format="yyyy-MM-dd"
|
|
@@ -191,12 +198,14 @@ export default {
|
|
|
sex: '',
|
|
|
parseName: '',
|
|
|
date: '',
|
|
|
+ nation: ''
|
|
|
},
|
|
|
studentRules: {
|
|
|
name: [{ required: true, message: '请输入学生姓名' },],
|
|
|
sex: [{ required: true, message: '请选择学生姓名' },],
|
|
|
date: [{ required: true, message: '请选择出生日期' },],
|
|
|
- organId: [{ required: true, message: '请选择分部' }]
|
|
|
+ organId: [{ required: true, message: '请选择分部' }],
|
|
|
+ nation: [{ required: true, message: '请输入名族' }]
|
|
|
},
|
|
|
isNew: false,
|
|
|
active: null
|
|
@@ -270,7 +279,8 @@ export default {
|
|
|
gender: this.studentForm.sex,
|
|
|
realName: this.studentForm.parseName,
|
|
|
birthdate: this.studentForm.date,
|
|
|
- organId: this.studentForm.organId
|
|
|
+ organId: this.studentForm.organId,
|
|
|
+ nation: this.studentForm.nation
|
|
|
}
|
|
|
registerStudent(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -293,7 +303,8 @@ export default {
|
|
|
realName: this.studentForm.parseName,
|
|
|
birthdate: this.studentForm.date,
|
|
|
organId: this.studentForm.organId,
|
|
|
- id: this.active.userId
|
|
|
+ id: this.active.userId,
|
|
|
+ nation: this.studentForm.nation
|
|
|
}
|
|
|
updateStudent(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -319,13 +330,22 @@ export default {
|
|
|
sex: row.gender,
|
|
|
parseName: row.realName,
|
|
|
date: row.birthdate,
|
|
|
+ nation: row.nation
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
studentVisible (val) {
|
|
|
if (!val) {
|
|
|
- this.$refs['studentForm'].resetFields()
|
|
|
+ this.studentForm = {
|
|
|
+ phone: '',
|
|
|
+ organId: '',
|
|
|
+ name: '',
|
|
|
+ sex: '',
|
|
|
+ parseName: '',
|
|
|
+ date: '',
|
|
|
+ nation: ''
|
|
|
+ }
|
|
|
// this.studentForm.
|
|
|
}
|
|
|
}
|