|
|
@ -8,7 +8,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="body"> |
|
|
|
<div class="body"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<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-col :span="10" :offset="1"> |
|
|
|
<el-form-item label="证件类型"> |
|
|
|
<el-form-item label="证件类型"> |
|
|
|
<el-select v-model="form.idType" disabled placeholder="请选择"> |
|
|
|
<el-select v-model="form.idType" disabled placeholder="请选择"> |
|
|
@ -20,10 +20,10 @@ |
|
|
|
</el-option> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</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-input v-model="form.userName" ref="userName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="出生日期" required> |
|
|
|
<el-form-item label="出生日期" prop="birthday"> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker |
|
|
|
v-model="form.birthday" |
|
|
|
v-model="form.birthday" |
|
|
|
type="date" |
|
|
|
type="date" |
|
|
@ -41,7 +41,7 @@ |
|
|
|
<p>请刷身份证</p> |
|
|
|
<p>请刷身份证</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="性别" required> |
|
|
|
<el-form-item label="性别" prop="sex"> |
|
|
|
<el-select v-model="form.sex" placeholder="请选择" ref='sex'> |
|
|
|
<el-select v-model="form.sex" placeholder="请选择" ref='sex'> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="(item,key) in gender" |
|
|
|
v-for="(item,key) in gender" |
|
|
@ -62,7 +62,7 @@ |
|
|
|
</el-option> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</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-input :value="form.phone" @input="(val) => phoneListen(val, form, 'phone')" maxlength="12" ref='phone'></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
@ -126,8 +126,30 @@ export default { |
|
|
|
phone:'',//联系电话 |
|
|
|
phone:'',//联系电话 |
|
|
|
}, |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
rules: { |
|
|
|
username: vername, |
|
|
|
userName: [ |
|
|
|
phone: vermob |
|
|
|
{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: '请输入客户姓名', |
|
|
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
...vername |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
phone: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: '请输入联系电话', |
|
|
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
...vermob |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
birthday: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: '请输入出生日期', |
|
|
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
disForm:{name:'002009' ,pass:'123456'}, |
|
|
|
disForm:{name:'002009' ,pass:'123456'}, |
|
|
|
visible:false,// 表单 |
|
|
|
visible:false,// 表单 |
|
|
@ -157,47 +179,72 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
//提交个人用户信息 |
|
|
|
//提交个人用户信息 |
|
|
|
submitForm(){ |
|
|
|
submitForm(){ |
|
|
|
|
|
|
|
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; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(tmpObj) |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
this.visible = true; |
|
|
|
|
|
|
|
let formList = []; |
|
|
|
|
|
|
|
if(this.form.nationality){ |
|
|
|
|
|
|
|
formList.push({ |
|
|
|
|
|
|
|
"emptyOne": "", |
|
|
|
|
|
|
|
"emptyTwo": "", |
|
|
|
|
|
|
|
"operationIds": "0,5,25,33,45", |
|
|
|
|
|
|
|
"type": "" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this.form.mailbox){ |
|
|
|
|
|
|
|
formList.push({ |
|
|
|
|
|
|
|
"emptyOne": "", |
|
|
|
|
|
|
|
"emptyTwo": "", |
|
|
|
|
|
|
|
"operationIds": "0,5,25,33,46", |
|
|
|
|
|
|
|
"type": "" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
formList.push( |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,40", "type": ""}, |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,41,13", "type": ""}, |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,42", "type": ""}, |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,44", "type": ""}, |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,47", "type": ""} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
sessionStorage.setItem('ruleReqs', JSON.stringify(formList)) |
|
|
|
|
|
|
|
} 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 formExternalData = sessionStorage.getItem('formExternalData') |
|
|
|
let consumerClientDragList = JSON.parse(formExternalData); |
|
|
|
let consumerClientDragList = JSON.parse(formExternalData); |
|
|
|
// |
|
|
|
// |
|
|
|
const requiredField = { |
|
|
|
|
|
|
|
// idNumber:'证件号码', |
|
|
|
|
|
|
|
userName:'客户姓名', |
|
|
|
|
|
|
|
sex:'性别', |
|
|
|
|
|
|
|
birthday:'出生日期', |
|
|
|
|
|
|
|
phone:'联系电话' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const judgeRef = checkRequired(this.form, requiredField) |
|
|
|
|
|
|
|
if(judgeRef === '') { |
|
|
|
|
|
|
|
this.visible = true; |
|
|
|
|
|
|
|
let formList = []; |
|
|
|
|
|
|
|
if(this.form.nationality){ |
|
|
|
|
|
|
|
formList.push({ |
|
|
|
|
|
|
|
"emptyOne": "", |
|
|
|
|
|
|
|
"emptyTwo": "", |
|
|
|
|
|
|
|
"operationIds": "0,5,25,33,45", |
|
|
|
|
|
|
|
"type": "" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this.form.mailbox){ |
|
|
|
|
|
|
|
formList.push({ |
|
|
|
|
|
|
|
"emptyOne": "", |
|
|
|
|
|
|
|
"emptyTwo": "", |
|
|
|
|
|
|
|
"operationIds": "0,5,25,33,46", |
|
|
|
|
|
|
|
"type": "" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
formList.push( |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,40", "type": ""}, |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,41,13", "type": ""}, |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,42", "type": ""}, |
|
|
|
|
|
|
|
{"emptyOne": "", "emptyTwo": "", "operationIds": "0,5,25,33,44", "type": ""}, |
|
|
|
|
|
|
|
{"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) { |
|
|
|
// if(this.form.idNumber && this.form.idNumber.userName && this.form.idNumber.sex && this.form.idNumber.birthday && this.form.idNumber.phone) { |
|
|
|
// this.visible = true; |
|
|
|
// this.visible = true; |
|
|
|
// let formList = []; |
|
|
|
// let formList = []; |
|
|
|