Commit b8a7d420 authored by 杨梦雪's avatar 杨梦雪

多形式活动-线下-验证

parent 8051a648
...@@ -564,7 +564,13 @@ ...@@ -564,7 +564,13 @@
<el-col :span="12" v-show="configJson.pastMedicalHistory == 1"> <el-col :span="12" v-show="configJson.pastMedicalHistory == 1">
<el-form-item <el-form-item
label="既往病史或过敏史" label="既往病史或过敏史"
prop="past_medical_history"
style="height: 73px" style="height: 73px"
:rules="
(configJson.pastMedicalHistory == 1?true:false)&&isOffline==true
? referInfoRules.clothesSize
: [{ required: false }]
"
> >
<el-input <el-input
ref="code" ref="code"
...@@ -579,7 +585,13 @@ ...@@ -579,7 +585,13 @@
<el-col :span="12" v-show="configJson.noteOther == 1"> <el-col :span="12" v-show="configJson.noteOther == 1">
<el-form-item <el-form-item
label="备注或其它" label="备注或其它"
prop="clothes_size"
style="height: 73px" style="height: 73px"
:rules="
(configJson.noteOther == 1?true:false)&&isOffline==true
? referInfoRules.clothesSize
: [{ required: false }]
"
> >
<el-input <el-input
ref="code" ref="code"
...@@ -597,7 +609,7 @@ ...@@ -597,7 +609,7 @@
prop="clothes_size" prop="clothes_size"
style="height: 73px" style="height: 73px"
:rules=" :rules="
configJson.clothesSize == 1 (configJson.clothesSize == 1?true:false)&&isOffline==true
? referInfoRules.clothesSize ? referInfoRules.clothesSize
: [{ required: false }] : [{ required: false }]
" "
...@@ -620,7 +632,7 @@ ...@@ -620,7 +632,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 邀请码 --> <!-- 邀请码 -->
<el-col :span="12" v-show="doubt_code == 1"> <el-col :span="12" v-show="configJson.code == 1">
<el-form-item <el-form-item
prop="code" prop="code"
label="邀请码" label="邀请码"
...@@ -999,9 +1011,9 @@ ...@@ -999,9 +1011,9 @@
school_phone: null, school_phone: null,
code: null code: null
}, },
doubt_code: window.localStorage.getItem( // doubt_code: window.localStorage.getItem(
"doubt_code" + this.$store.state.indexIdentity // "doubt_code" + this.$store.state.indexIdentity
),//是否填写邀请码 // ),//是否填写邀请码
schoolName: {}, schoolName: {},
referInfoRules: { referInfoRules: {
name: [{required: true, message: "姓名不能为空!", trigger: "blur"}], name: [{required: true, message: "姓名不能为空!", trigger: "blur"}],
...@@ -1329,6 +1341,7 @@ ...@@ -1329,6 +1341,7 @@
fileList: [], fileList: [],
resultPicture: "", resultPicture: "",
disabled: false, //限制输入框 disabled: false, //限制输入框
isOffline: false, //活动形式是否包含线下字段
}; };
}, },
created() { created() {
...@@ -1351,7 +1364,20 @@ ...@@ -1351,7 +1364,20 @@
this.configJson = this.$store.state.configJson; this.configJson = this.$store.state.configJson;
if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) { if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) {
this.getProAndCity(); this.getProAndCity();
}; }
;
//若线下形式(既往病史或过敏史,备注或其它,衣服尺码)为必填项,否则为选填。
let multiform = JSON.parse(window.localStorage.getItem("multiform" + code));
let multiform_id = window.localStorage.getItem("multiform_id" + code);
console.log(typeof multiform)
multiform.forEach((i) => {
if (i.id == multiform_id) {
let reg = /[\u7ebf][\u4e0b]/
this.isOffline = reg.test(i.multiform_name)
}
})
// console.log(this.isOffline)
}, },
watch: { watch: {
referForm(val) { referForm(val) {
...@@ -1974,7 +2000,8 @@ ...@@ -1974,7 +2000,8 @@
obj.school_phone = _this.referForm.school_phone; obj.school_phone = _this.referForm.school_phone;
} }
//是否需要填写邀请码 //是否需要填写邀请码
if (this.doubt_code == 1 && this.code != '') { // if (this.doubt_code == 1 && this.code != '') {
if (this.configJson.code == 1) {
obj.code = _this.referForm.code; obj.code = _this.referForm.code;
} }
setAccount(obj).then((res) => { setAccount(obj).then((res) => {
......
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