Commit 54f8c72e authored by 杨梦雪's avatar 杨梦雪

个人信息新增

parent 9723fbea
......@@ -498,6 +498,9 @@ export default {
toPaying() {
this.commonApi(34)
this.dialogPayingVisible = false;
console.log(this.has_amount )
console.log(this.transfer_account )
return
if (this.has_amount == 0) {
getWxConfig({ pay_type: 3 }).then((res) => {
console.log(res, "signUpInit");
......
......@@ -70,7 +70,7 @@
/>
</el-form-item>
</el-col>
<!--国籍-->
<el-col :span="12" v-show="configJson.country == 1">
<el-form-item
label="国籍"
......@@ -499,20 +499,78 @@
</el-form-item>
</el-col>
<!-- 选科情况 -->
<el-col :span="12" v-show="configJson.electSubjectSituation == 1">
<el-form-item
label="选科情况"
prop="elect_subject_situation"
:rules="
configJson.electSubjectSituation == 1
? referInfoRules.elect_subject_situation
: [{ required: false }]
"
>
<el-select
v-model="subjectState"
placeholder="请选科"
:popper-append-to-body="false"
@change="changeSubjectState"
clearable
>
<el-option
v-for="(item, index) in electSubjectArrs"
:key="index"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--已选科-->
<el-col :span="12" v-show="showSubject == 1">
<el-form-item
label="选科(最多选三科)"
prop="chooseSubject"
:rules="
showSubject == 1
? referInfoRules.chooseSubject
: [{ required: false }]
"
>
<el-select
v-model="referForm.elect_subject_situation"
multiple
placeholder="请选课"
:popper-append-to-body="false"
:multiple-limit="3"
@change="changeSubjectList"
clearable
>
<el-option
v-for="(item, index) in SubjectArrs"
:key="index"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- 既往病史 -->
<el-col :span="12" v-show="configJson.pastMedicalHistory == 1">
<el-form-item
label="既往病史"
prop="pastMedicalHistory"
prop="past_medical_history"
:rules="
configJson.pastMedicalHistory == 1
? referInfoRules.pastMedicalHistory
? referInfoRules.past_medical_history
: [{ required: false }]
"
>
<el-input
ref="code"
v-model="referForm.pastMedicalHistory"
v-model="referForm.past_medical_history"
placeholder="填写既往病史"
size="small"
clearable
......@@ -523,22 +581,45 @@
<el-col :span="12" v-show="configJson.noteOther == 1">
<el-form-item
label="备注或其它"
prop="pastMedicalHistory"
prop="note_other"
:rules="
configJson.pastMedicalHistory == 1
? referInfoRules.pastMedicalHistory
configJson.noteOther == 1
? referInfoRules.note_other
: [{ required: false }]
"
>
<el-input
ref="code"
v-model="referForm.noteOther"
v-model="referForm.note_other"
placeholder="填写备注或其它"
size="small"
clearable
/>
</el-form-item>
</el-col>
<!-- 邀请码 -->
<el-col :span="12" v-show="doubt_code == 1">
<el-form-item
label="邀请码"
style="height: 73px"
>
<el-input
ref="code"
v-model="referForm.code"
placeholder="邀请码"
size="small"
:disabled="referForm.code==null?false:true"
clearable
/>
</el-form-item>
<div class="tipsMsg">
每个邀请码仅能绑定一个用户
</div>
</el-col>
</el-row>
<!-- 紧急联系人-->
<div class="cont_title">紧急联系人</div>
<el-row :gutter="20">
<!-- 紧急联系人 -->
<el-col :span="12" v-show="configJson.emergency == 1">
<el-form-item
......@@ -563,41 +644,22 @@
<el-col :span="12" v-show="configJson.emergencyPhone == 1">
<el-form-item
label="紧急联系人电话"
prop="emergencyPhone"
prop="emergency_phone"
:rules="
configJson.emergencyPhone == 1
? referInfoRules.emergencyPhone
? referInfoRules.emergency_phone
: [{ required: false }]
"
>
<el-input
ref="code"
v-model="referForm.emergencyPhone"
v-model="referForm.emergency_phone"
placeholder="填写紧急联系人电话"
size="small"
clearable
/>
</el-form-item>
</el-col>
<!-- 邀请码 -->
<el-col :span="12" v-show="doubt_code == 1">
<el-form-item
label="邀请码"
style="height: 73px"
>
<el-input
ref="code"
v-model="referForm.code"
placeholder="邀请码"
size="small"
:disabled="referForm.code==null?false:true"
clearable
/>
</el-form-item>
<div class="tipsMsg">
每个邀请码仅能绑定一个用户
</div>
</el-col>
</el-row>
<!-- 学校信息 -->
<div
......@@ -860,9 +922,19 @@
callback();
}
};
const validateSubject = (rule, value, callback) => {
if (!this.elect_subject_situation) {
callback(new Error("选科不能为空!"));
} else {
callback();
}
};
return {
configJson: {},
isUploading: false, // 图片上传蒙层
showSubject: 0,//是否展示选科(多选)
subjectState: '',
elect_subject_situation: null,
referForm: {
name: null,
gender: null,
......@@ -881,10 +953,11 @@
unit_and_identity: null,
email: null,
recommend: null,
pastMedicalHistory: null,
noteOther: null,
elect_subject_situation: null,
past_medical_history: null,
note_other: null,
emergency: null,
emergencyPhone: null,
emergency_phone: null,
school_province: null,
school_city: null,
school: null,
......@@ -913,7 +986,6 @@
trigger: "change",
},
],
jiguan_code: [
{required: true, validator: validateContents, trigger: "change"},
],
......@@ -963,14 +1035,29 @@
trigger: "blur",
},
],
pastMedicalHistory: [
elect_subject_situation: [
{
required: true,
message: "选科不能为空!",
trigger: "change",
},
],
chooseSubject: [
{
required: true,
validator: validateSubject,
trigger: "change",
},
],
past_medical_history: [
{
required: true,
message: "既往病史不能为空!",
trigger: "blur",
},
],
noteOther: [
note_other: [
{
required: true,
message: "备注或其它不能为空!",
......@@ -984,12 +1071,13 @@
trigger: "blur",
},
],
emergencyPhone: [
emergency_phone: [
{
required: true,
message: "紧急联系人电话不能为空!",
trigger: "blur",
},
{validator: validator.validatePhone, trigger: "blur"},
],
school_province: [
{
......@@ -1021,7 +1109,6 @@
],
// backgroundPicture: [{ required: true, message: "请上传图片" }],
},
EducationArrs: ["初中", "高中", "大学", "硕士", "博士"],
countryList: area.country, //国籍
selectProvince: [], //省份
CityName: {}, //根据省份筛选出所有城市的对象
......@@ -1030,6 +1117,9 @@
selectSchoolList: [], //就读中学-中学列表
jgProvinceCode: "", //省份id
jiguan_city: "", //城市id(和省份id拼接)
electSubjectArrs: ["已选科", "未选科"],
SubjectArrs: ["物理", "历史", "化学", "地理", "生物", "政治",],
EducationArrs: ["初中", "高中", "大学", "硕士", "博士"],
yearArrs: [], //生日涉及的近10年的年份
monthArrs: [
"01",
......@@ -1195,6 +1285,16 @@
if (this.invitation_code != null) {
this.referForm.code = this.invitation_code
}
if (val.elect_subject_situation !== null) {
this.subjectState = '已选科';
this.showSubject = 1;
this.referForm.elect_subject_situation=val.elect_subject_situation.split('#')
this.elect_subject_situation=val.elect_subject_situation
console.log(this.referForm.elect_subject_situation)
} else {
this.subjectState = '未选科'
}
},
},
mounted() {
......@@ -1249,6 +1349,22 @@
// + "-" +
// this.start_grade.toString();
},
// 选科情况
changeSubjectState(val) {
// console.log(val)
this.subjectState = val
if (val == '已选科') {
this.showSubject = 1
} else {
this.showSubject = 0
}
},
changeSubjectList(val) {
val.forEach((i) => {
this.elect_subject_situation = val.join("#", i)
console.log(this.elect_subject_situation)
})
},
// 获取省份城市
getProAndCity() {
getProAndCity({}).then((res) => {
......@@ -1657,21 +1773,27 @@
if (this.configJson.start_school_date == 1) {
obj.start_school_date = _this.referForm.start_school_date;
}
if (this.configJson.birthday == 1) {
obj.birthday = _this.referForm.birthday;
}
if (this.configJson.electSubjectSituation == 1) {
obj.elect_subject_situation = _this.elect_subject_situation;
}
if (this.configJson.pastMedicalHistory == 1) {
obj.pastMedicalHistory = _this.referForm.pastMedicalHistory;
obj.past_medical_history = _this.referForm.past_medical_history;
}
if (this.configJson.noteOther == 1) {
obj.noteOther = _this.referForm.noteOther;
if (this.configJson.note_other == 1) {
obj.note_other = _this.referForm.note_other;
}
if (this.configJson.emergency == 1) {
obj.emergency = _this.referForm.emergency;
}
if (this.configJson.emergencyPhone == 1) {
obj.emergencyPhone = _this.referForm.emergencyPhone;
}
if (this.configJson.birthday == 1) {
obj.birthday = _this.referForm.birthday;
obj.emergency_phone = _this.referForm.emergency_phone;
}
if (this.configJson.school == 1) {
obj.school_province = _this.referForm.school_province;
obj.school_city = _this.referForm.school_city;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment