<template>
|
<view style="background: #F7F7F7;">
|
<view class="content">
|
<steps style="margin-bottom: 10rpx;" :active="1"></steps>
|
<view class="info">
|
<view class="title">资质信息</view>
|
<uv-form :labelStyle='lstyle' labelWidth="100" style="padding:0 36rpx;">
|
<uv-form-item label="学历" prop="educationStr" borderBottom @click="openPicker('education')">
|
<uv-input v-model="userInfo.educationStr" disabled border="none" disabledColor="none" placeholder="请选择"></uv-input>
|
<template v-slot:right>
|
<uv-icon name="arrow-down" size="12"></uv-icon>
|
</template>
|
</uv-form-item>
|
<uv-form-item label="婚姻状况" prop="maritalStatus" @click="openPicker('maritalStatus')">
|
<uv-input v-model="userInfo.maritalStatusStr" disabled border="none" disabledColor="none" placeholder="请选择"></uv-input>
|
<template v-slot:right>
|
<uv-icon name="arrow-down" size="12"></uv-icon>
|
</template>
|
</uv-form-item>
|
|
|
|
|
|
|
</uv-form>
|
|
</view>
|
<view class="info" style="margin-top: 10rpx;">
|
<view class="title">亲属联系人</view>
|
<uv-form :labelStyle='lstyle' :model="userInfo" labelWidth="100" style="padding:0 36rpx;">
|
<uv-form-item label="亲属关系" prop="relationStr" borderBottom @click="openPicker('relation')">
|
<uv-input v-model="userInfo.relationStr" disabled border="none" disabledColor="none" placeholder="请选择"></uv-input>
|
<template v-slot:right>
|
<uv-icon name="arrow-down" size="12"></uv-icon>
|
</template>
|
</uv-form-item>
|
<uv-form-item label="姓名" prop="relationName" borderBottom>
|
<uv-input v-model="userInfo.relationName" border="none" placeholder="请输入姓名"></uv-input>
|
</uv-form-item>
|
|
|
<uv-form-item label="手机号" prop="relationPhone" borderBottom>
|
<uv-input maxlength="11" type="tel" v-model="userInfo.relationPhone" border="none" placeholder="请输入手机号"></uv-input>
|
</uv-form-item>
|
<uv-form-item v-if="userInfo.relation=='01'" label="配偶身份证" prop="certNo" borderBottom>
|
<uv-input maxlength="18" type="idcard" v-model="userInfo.certNo" border="none" placeholder="请输入配偶身份证信息"></uv-input>
|
</uv-form-item>
|
<uv-form-item v-if="userInfo.relation=='01'" label="配偶公司" prop="contactCompany" >
|
<uv-input type="tel" v-model="userInfo.contactCompany" border="none" placeholder="请输入配偶公司"></uv-input>
|
</uv-form-item>
|
</uv-form>
|
|
</view>
|
|
<view class="info" style="margin-top: 10rpx;">
|
<view class="title">一般联系人</view>
|
<uv-form :labelStyle='lstyle' :model="userInfo" labelWidth="100" style="padding:0 36rpx;">
|
<uv-form-item label="姓名" prop="contactName" borderBottom>
|
<uv-input v-model="userInfo.contactName" border="none" placeholder="请输入姓名"></uv-input>
|
</uv-form-item>
|
|
|
<uv-form-item label="手机号" prop="contactPhone" >
|
<uv-input maxlength="11" type="tel" v-model="userInfo.contactPhone" border="none" placeholder="请输入手机号"></uv-input>
|
</uv-form-item>
|
|
</uv-form>
|
|
|
</view>
|
|
<view class="agreement" style="margin-top: 12rpx;">
|
<uv-checkbox-group
|
v-model="protocolChecked">
|
<uv-checkbox :name="1" size="14">
|
<view style="display: flex;flex-direction: row;font-size: 24rpx">
|
我已阅读并同意<text class="protocol" @click="openAgreement">《平台服务协议》</text>
|
</view>
|
</uv-checkbox>
|
</uv-checkbox-group>
|
|
</view>
|
<uv-button
|
:disabled="loading"
|
:loading="loading"
|
color="linear-gradient(104deg, #6d89ff 0%, #2865f2 100%), linear-gradient(270deg, #4766fe 0%, #7d9fff 100%)"
|
shape="circle" type="primary" text="下一步" customStyle="margin-top: 54rpx;height:100rpx" @click="submit"></uv-button>
|
</view>
|
|
|
|
|
|
<loanUsage ref="loanUsage" @confirm="getValueLoanUsage"></loanUsage>
|
<education ref="education" @confirm="getValueEducation"></education>
|
<maritalStatus ref="maritalStatus" @confirm="getValueMaritalStatus"></maritalStatus>
|
<relation ref="relation" @confirm="getValueRelation"></relation>
|
<agreement ref="agreement"></agreement>
|
<sfkef></sfkef>
|
</view>
|
</template>
|
<script>
|
import { mobile, idCard } from '@/uni_modules/uv-ui-tools/libs/function/test.js';
|
import debounce from '@/uni_modules/uv-ui-tools/libs/function/debounce.js';
|
import loanUsage from "@/components/picker/loanUsage.vue";
|
import steps from "@/components/steps/index.vue";
|
import {appFourAddRelationInfo, checkUserStatus} from "@/api/modules/user";
|
import agreement from "@/components/agreement/index.vue";
|
import Education from "@/components/picker/education.vue";
|
import maritalStatus from "@/components/picker/maritalStatus.vue";
|
import relation from '@/components/picker/relation.vue'
|
import sfkef from "@/components/sfkef/index.vue";
|
export default {
|
components: {
|
steps,loanUsage,agreement,Education,maritalStatus,relation,sfkef
|
},
|
data() {
|
return {
|
|
loading:false,
|
protocolChecked:[1],
|
lstyle:{
|
color:'#252938',
|
fontSize:'28rpx',
|
fontWeight:'800'
|
},
|
userInfo: {
|
education: '',
|
educationStr: '',
|
maritalStatus: '',
|
maritalStatusStr: '',
|
relation: '',
|
relationStr: '',
|
relationName: '',
|
relationPhone: '',
|
certNo: '',
|
contactCompany: '',
|
phone: '',
|
|
},
|
|
}
|
},
|
created() {
|
checkUserStatus().then(res=>{uni.setStorageSync('customerId', res.customerId);});
|
},
|
methods: {
|
openAgreement() {
|
this.$refs.agreement.open();
|
},
|
|
|
|
// 获取Picker的值
|
|
|
getValueLoanUsage(e){
|
this.userInfo.loanUsageStr = e['value'][0].text
|
this.loanUsageStrBox = e
|
},
|
getValueEducation(e){
|
this.userInfo.educationStr = e['value'][0].text
|
this.userInfo.education = e['value'][0].value
|
this.educationStrBox = e
|
},
|
getValueMaritalStatus(e){
|
this.userInfo.maritalStatusStr = e['value'][0].text;
|
this.userInfo.maritalStatus = e['value'][0].value;
|
this.maritalStatusStrBox = e
|
},
|
getValueRelation(e){
|
this.userInfo.relationStr = e['value'][0].text;
|
this.userInfo.relation = e['value'][0].value;
|
this.relationStrBox = e
|
},
|
|
// 提交
|
submit() {
|
|
console.log(uni.getSystemInfoSync());
|
if(!this.protocolChecked[0]){
|
uni.showToast({icon: 'none', title: '请先阅读并同意《用户隐私协议》'})
|
return
|
}
|
|
if(!this.userInfo.education){
|
uni.showToast({icon: 'none', title: '请选择学历'})
|
return;
|
}
|
if(!this.userInfo.maritalStatus){
|
uni.showToast({icon: 'none', title: '请选择婚姻状况'})
|
return;
|
}
|
if (!this.userInfo.relation){
|
uni.showToast({icon: 'none', title: '请选择亲属关系'})
|
return;
|
}
|
if (!this.userInfo.relationName){
|
uni.showToast({icon: 'none', title: '请输入亲属姓名'})
|
return;
|
}
|
if (!this.userInfo.relationPhone){
|
uni.showToast({icon: 'none', title: '请输入亲属手机号'})
|
return;
|
}
|
if(!mobile(this.userInfo.relationPhone)){
|
uni.showToast({icon: 'none', title: '请输入正确的亲属手机号'})
|
return;
|
}
|
if (!this.userInfo.certNo && this.userInfo.relation=='01'){
|
uni.showToast({icon: 'none', title: '请输入配偶身份证'})
|
return;
|
}
|
if (!idCard(this.userInfo.certNo) && this.userInfo.relation=='01'){
|
uni.showToast({icon: 'none', title: '请输入正确的配偶身份证'})
|
return;
|
}
|
|
|
if (!this.userInfo.contactCompany && this.userInfo.relation=='01'){
|
uni.showToast({icon: 'none', title: '请输入配偶公司'})
|
return;
|
}
|
|
|
if (!this.userInfo.contactName){
|
uni.showToast({icon: 'none', title: '请输入联系人姓名'})
|
return;
|
};
|
if (!this.userInfo.contactPhone){
|
uni.showToast({icon: 'none', title: '请输入联系人手机号'})
|
return;
|
}
|
if(!mobile(this.userInfo.contactPhone)){
|
uni.showToast({icon: 'none', title: '请输入正确的联系人手机号'})
|
return;
|
}
|
if(this.userInfo.contactPhone==this.userInfo.relationPhone){
|
uni.showToast({icon: 'none', title: '联系人手机号不能与亲属手机号相同'})
|
return;
|
}
|
|
|
this.loading = true
|
debounce(()=>{
|
|
appFourAddRelationInfo({
|
phone: uni.getStorageSync('phone'),
|
id: uni.getStorageSync('customerId'),
|
|
education: this.userInfo.education, // 学历
|
maritalStatus: this.userInfo.maritalStatus, // 婚姻状况
|
|
|
relationship: this.userInfo.relation, // 亲属关系
|
relationshipPhone: this.userInfo.relationPhone, // 亲属手机号码
|
relationshipName: this.userInfo.relationName, // 亲属姓名
|
certNo: this.userInfo.certNo, // 配偶身份证
|
contactCompany: this.userInfo.contactCompany, // 配偶公司名称
|
|
|
contactName: this.userInfo.contactName, // 配偶公司名称
|
contactPhone: this.userInfo.contactPhone, // 配偶公司名称
|
|
loanAmount: 180000, loanTerm: 36,
|
|
|
|
}).then(res=>{
|
uni.navigateTo({
|
url: '/pages/apply/steps-c'
|
})
|
|
}).catch(err=>{
|
this.loading = false
|
})
|
})
|
|
|
},
|
|
|
|
// 打开Picker
|
openPicker(dom){
|
this.$refs[dom].open()
|
},
|
|
|
},
|
|
}
|
</script>
|
<style scoped lang="scss">
|
.content{
|
margin: 30rpx;
|
.info{
|
background: #fff;
|
border-radius: 16rpx;
|
padding-top: 40rpx;
|
.title{
|
font-size: 34rpx;
|
color: #252938;
|
font-weight: bold;
|
position: relative;
|
padding-left: 36rpx;
|
&:after{
|
content: '';
|
position: absolute;
|
bottom: -10rpx;
|
left: 0;
|
width: 6rpx;
|
height: 100%;
|
background: #2865F2;
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
}
|
}
|
}
|
}
|
|
.protocol{
|
|
font-size: 24rpx;color: #207ef5;
|
}
|
.agreement{
|
display: flex;
|
flex-direction: row;
|
justify-content: center;
|
.protocol{
|
font-size: 24rpx;color: #207ef5;
|
}
|
}
|
</style>
|