|
|
|
@ -8,7 +8,7 @@ |
|
|
|
|
</div> |
|
|
|
|
<div class="body"> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-form ref="form" :model="form" label-width="140px"> |
|
|
|
|
<el-form ref="form" :model="form" label-width="140px" :rules="rules"> |
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
|
<el-form-item label="证件类型"> |
|
|
|
|
<el-select v-model="form.idType" disabled placeholder="请选择"> |
|
|
|
@ -20,10 +20,10 @@ |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item :rules="rules.username" label="客户姓名" required> |
|
|
|
|
<el-form-item label="客户姓名" prop="userName"> |
|
|
|
|
<el-input v-model="form.userName" ref="userName"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="出生日期" required> |
|
|
|
|
<el-form-item label="出生日期" prop="birthday"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.birthday" |
|
|
|
|
type="date" |
|
|
|
@ -41,7 +41,7 @@ |
|
|
|
|
<p>请刷身份证</p> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="性别" required> |
|
|
|
|
<el-form-item label="性别" prop="sex"> |
|
|
|
|
<el-select v-model="form.sex" placeholder="请选择" ref='sex'> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item,key) in gender" |
|
|
|
@ -62,7 +62,7 @@ |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="联系电话" :rules="rules.phone" required> |
|
|
|
|
<el-form-item label="联系电话" :rules="rules.phone" prop="phone"> |
|
|
|
|
<el-input :value="form.phone" @input="(val) => phoneListen(val, form, 'phone')" maxlength="12" ref='phone'></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
@ -126,8 +126,30 @@ export default { |
|
|
|
|
phone:'',//联系电话 |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
username: vername, |
|
|
|
|
phone: vermob |
|
|
|
|
userName: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入客户姓名', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
}, |
|
|
|
|
...vername |
|
|
|
|
], |
|
|
|
|
phone: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入联系电话', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
}, |
|
|
|
|
...vermob |
|
|
|
|
], |
|
|
|
|
birthday: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入出生日期', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
disForm:{name:'002009' ,pass:'123456'}, |
|
|
|
|
visible:false,// 表单 |
|
|
|
@ -157,18 +179,19 @@ export default { |
|
|
|
|
}, |
|
|
|
|
//提交个人用户信息 |
|
|
|
|
submitForm(){ |
|
|
|
|
let formExternalData = sessionStorage.getItem('formExternalData') |
|
|
|
|
let consumerClientDragList = JSON.parse(formExternalData); |
|
|
|
|
// |
|
|
|
|
const requiredField = { |
|
|
|
|
// idNumber:'证件号码', |
|
|
|
|
userName:'客户姓名', |
|
|
|
|
sex:'性别', |
|
|
|
|
birthday:'出生日期', |
|
|
|
|
phone:'联系电话' |
|
|
|
|
this.$refs.form.validate((valid, obj) => { |
|
|
|
|
console.log(valid) |
|
|
|
|
console.log(obj) |
|
|
|
|
let tmpObj = {}; |
|
|
|
|
for(const key in obj) { |
|
|
|
|
console.log(key) |
|
|
|
|
tmpObj = { |
|
|
|
|
key: obj[key] |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
const judgeRef = checkRequired(this.form, requiredField) |
|
|
|
|
if(judgeRef === '') { |
|
|
|
|
console.log(tmpObj) |
|
|
|
|
if (valid) { |
|
|
|
|
this.visible = true; |
|
|
|
|
let formList = []; |
|
|
|
|
if(this.form.nationality){ |
|
|
|
@ -195,9 +218,33 @@ export default { |
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,47", "type": ""} |
|
|
|
|
); |
|
|
|
|
sessionStorage.setItem('ruleReqs', JSON.stringify(formList)) |
|
|
|
|
}else { |
|
|
|
|
this.$refs[judgeRef].focus(); |
|
|
|
|
} else { |
|
|
|
|
// 获取所有校验错误结果的第一项 |
|
|
|
|
let tmpObj = {}; |
|
|
|
|
for(const key in obj) { |
|
|
|
|
tmpObj = { |
|
|
|
|
[key]: obj[key] |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log(tmpObj) |
|
|
|
|
// const requiredField = { |
|
|
|
|
// // idNumber:'证件号码', |
|
|
|
|
// userName:'客户姓名', |
|
|
|
|
// sex:'性别', |
|
|
|
|
// birthday:'出生日期', |
|
|
|
|
// phone:'联系电话' |
|
|
|
|
// } |
|
|
|
|
// const judgeRef = checkRequired(this.form, requiredField) |
|
|
|
|
// if(judgeRef !== '') { |
|
|
|
|
// this.$refs[judgeRef].focus(); |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return false |
|
|
|
|
let formExternalData = sessionStorage.getItem('formExternalData') |
|
|
|
|
let consumerClientDragList = JSON.parse(formExternalData); |
|
|
|
|
// |
|
|
|
|
// if(this.form.idNumber && this.form.idNumber.userName && this.form.idNumber.sex && this.form.idNumber.birthday && this.form.idNumber.phone) { |
|
|
|
|
// this.visible = true; |
|
|
|
|
// let formList = []; |
|
|
|
|