|
|
|
@ -20,14 +20,15 @@ |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="userName" :rules="rules.username" label="客户姓名"> |
|
|
|
|
<el-input v-model="form.userName"></el-input> |
|
|
|
|
<el-form-item :rules="rules.username" label="客户姓名" required> |
|
|
|
|
<el-input v-model="form.userName" ref="userName"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="出生日期" required> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.birthday" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期"> |
|
|
|
|
placeholder="选择日期" |
|
|
|
|
ref="birthday"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="通讯地址"> |
|
|
|
@ -41,12 +42,13 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="性别" required> |
|
|
|
|
<el-select v-model="form.sex" placeholder="请选择"> |
|
|
|
|
<el-select v-model="form.sex" placeholder="请选择" ref='sex'> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item,key) in gender" |
|
|
|
|
:key="key" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id"> |
|
|
|
|
:value="item.id" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -60,8 +62,8 @@ |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="联系电话" prop="phone" :rules="rules.phone" required> |
|
|
|
|
<el-input :value="form.phone" @input="(val) => phoneListen(val, form, 'phone')" maxlength="12"></el-input> |
|
|
|
|
<el-form-item label="联系电话" :rules="rules.phone" required> |
|
|
|
|
<el-input :value="form.phone" @input="(val) => phoneListen(val, form, 'phone')" maxlength="12" ref='phone'></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
@ -105,8 +107,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { mapState } from 'vuex' |
|
|
|
|
import { EventBus } from "@/utils/event-bus.js"; |
|
|
|
|
import { mapState, mapMutations } from 'vuex' |
|
|
|
|
import { vername, vermob } from '@/utils/verify.js' |
|
|
|
|
import { phoneListen, mailBoxListen, checkRequired } from '@/utils/utilFunction.js' |
|
|
|
|
|
|
|
|
@ -143,16 +144,21 @@ export default { |
|
|
|
|
nations : [{name:"汉族",id:0}, {name:"蒙古族",id:1}, {name:"回族",id:2}, {name:"藏族",id:3}, {name:"维吾尔族",id:4}, {name:"苗族",id:5}, {name:"彝族",id:6}, {name:"壮族",id:7}, {name:"布依族",id:8}, {name:"朝鲜族",id:9}, {name:"满族",id:10}, {name:"侗族",id:11}, {name:"瑶族",id:12}, {name:"白族",id:13}, {name:"土家族",id:14},{name:"哈尼族",id:15}, {name:"哈萨克族",id:16}, {name:"傣族",id:17}, {name:"黎族",id:18}, {name:"傈僳族",id:19}, {name:"佤族",id:20}, {name:"畲族",id:21}, {name:"高山族",id:22}, {name:"拉祜族",id:23}, {name:"水族",id:24}, {name:"东乡族",id:25}, {name:"纳西族",id:26}, {name:"景颇族",id:27}, {name:"柯尔克孜族",id:28},{name:"土族",id:29}, {name:"达斡尔族",id:0}, {name:"仫佬族",id:31}, {name:"羌族",id:32}, {name:"布朗族",id:33}, {name:"撒拉族",id:34}, {name:"毛南族",id:35}, {name:"仡佬族",id:36}, {name:"锡伯族",id:37}, {name:"阿昌族",id:38}, {name:"普米族",id:39}, {name:"塔吉克族",id:40}, {name:"怒族",id:41}, {name:"乌孜别克族",id:42},{name:"俄罗斯族",id:43}, {name:"鄂温克族",id:44}, {name:"德昂族",id:45}, {name:"保安族",id:46}, {name:"裕固族",id:47}, {name:"京族",id:48}, {name:"塔塔尔族",id:49}, {name:"独龙族",id:50}, {name:"鄂伦春族",id:51}, {name:"赫哲族",id:52}, {name:"门巴族",id:53}, {name:"珞巴族",id:54}, {name:"基诺族",id:55}], |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.$refs.userName.focus(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
...mapMutations({ |
|
|
|
|
changeShowGoods: 'system/changeShowGoods' |
|
|
|
|
}), |
|
|
|
|
popUp(){// 唤起弹窗 |
|
|
|
|
this.$store.commit('system/changePop',{show:true,text:'身份证扫描仪',id:'33'}) |
|
|
|
|
EventBus.$emit("changeShowGoods", true); |
|
|
|
|
this.changeShowGoods(true) |
|
|
|
|
}, |
|
|
|
|
//提交个人用户信息 |
|
|
|
|
submitForm(){ |
|
|
|
|
let formExternalData = sessionStorage.getItem('formExternalData') |
|
|
|
|
let consumerClientDragList = JSON.parse(formExternalData); |
|
|
|
|
console.log(consumerClientDragList) |
|
|
|
|
// |
|
|
|
|
const requiredField = { |
|
|
|
|
// idNumber:'证件号码', |
|
|
|
@ -161,7 +167,8 @@ export default { |
|
|
|
|
birthday:'出生日期', |
|
|
|
|
phone:'联系电话' |
|
|
|
|
} |
|
|
|
|
if(checkRequired(this.form, requiredField)) { |
|
|
|
|
const judgeRef = checkRequired(this.form, requiredField) |
|
|
|
|
if(judgeRef === '') { |
|
|
|
|
this.visible = true; |
|
|
|
|
let formList = []; |
|
|
|
|
if(this.form.nationality){ |
|
|
|
@ -188,6 +195,8 @@ export default { |
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,47", "type": ""} |
|
|
|
|
); |
|
|
|
|
sessionStorage.setItem('ruleReqs', JSON.stringify(formList)) |
|
|
|
|
}else { |
|
|
|
|
this.$refs[judgeRef].focus(); |
|
|
|
|
} |
|
|
|
|
// if(this.form.idNumber && this.form.idNumber.userName && this.form.idNumber.sex && this.form.idNumber.birthday && this.form.idNumber.phone) { |
|
|
|
|
// this.visible = true; |
|
|
|
|