|
@@ -4,8 +4,8 @@
|
|
<div class="title">个人信息认证</div>
|
|
<div class="title">个人信息认证</div>
|
|
<el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
|
|
<el-form :model="authentication" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
|
|
<el-form-item label="姓名" prop="name">
|
|
<el-form-item label="姓名" prop="name">
|
|
- <el-input v-if="isModifyMode" v-model="authentication.name"></el-input>
|
|
|
|
- <span v-if="!isModifyMode">{{authentication.name}}</span>
|
|
|
|
|
|
+ <el-input v-if="isModifyMode" v-model="authentication.realName"></el-input>
|
|
|
|
+ <span v-if="!isModifyMode">{{authentication.realName}}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item prop="file" label="手持身份证照片">
|
|
<el-form-item prop="file" label="手持身份证照片">
|
|
<el-upload
|
|
<el-upload
|
|
@@ -15,19 +15,19 @@
|
|
:show-file-list="false"
|
|
:show-file-list="false"
|
|
:http-request="uploadFile"
|
|
:http-request="uploadFile"
|
|
:before-upload="beforeFileUpload">
|
|
:before-upload="beforeFileUpload">
|
|
- <img v-if="authentication.photoUrl" :src="authentication.photoUrl" class="avatar">
|
|
|
|
|
|
+ <img v-if="authentication.IDCardPhoto" :src="authentication.IDCardPhoto" class="avatar">
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
</el-upload>
|
|
</el-upload>
|
|
<span v-if="!isModifyMode">
|
|
<span v-if="!isModifyMode">
|
|
<el-image
|
|
<el-image
|
|
style="width: 100px;"
|
|
style="width: 100px;"
|
|
- :src="authentication.photoUrl"
|
|
|
|
|
|
+ :src="authentication.IDCardPhoto"
|
|
fit="scale-down"></el-image>
|
|
fit="scale-down"></el-image>
|
|
</span>
|
|
</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="身份证号" prop="name">
|
|
<el-form-item label="身份证号" prop="name">
|
|
- <el-input v-if="isModifyMode" v-model="authentication.idNumber"></el-input>
|
|
|
|
- <span v-if="!isModifyMode">{{authentication.idNumber}}</span>
|
|
|
|
|
|
+ <el-input v-if="isModifyMode" v-model="authentication.IDCard"></el-input>
|
|
|
|
+ <span v-if="!isModifyMode">{{authentication.IDCard}}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="银行卡账户" prop="name">
|
|
<el-form-item label="银行卡账户" prop="name">
|
|
@@ -59,7 +59,7 @@ import {
|
|
defaultValue,
|
|
defaultValue,
|
|
getAllAgencyResourceTypes,
|
|
getAllAgencyResourceTypes,
|
|
getAllServiceTypes,
|
|
getAllServiceTypes,
|
|
- getCurrentAuthenInfo,
|
|
|
|
|
|
+ getCurrentIndividualAuthenInfo,
|
|
getProvinceCodeByProvinceName,
|
|
getProvinceCodeByProvinceName,
|
|
getProvinceNameByProvinceCode,
|
|
getProvinceNameByProvinceCode,
|
|
storageGet,
|
|
storageGet,
|
|
@@ -75,10 +75,9 @@ export default {
|
|
loading: false,
|
|
loading: false,
|
|
isModifyMode: false,
|
|
isModifyMode: false,
|
|
authentication: {
|
|
authentication: {
|
|
- photo: [],
|
|
|
|
- photoUrl: defaultValue.image,
|
|
|
|
- name: '',
|
|
|
|
- idNumber: '',
|
|
|
|
|
|
+ IDCardPhoto: defaultValue.image,
|
|
|
|
+ realName: '',
|
|
|
|
+ IDCard: '',
|
|
bankAccount: '',
|
|
bankAccount: '',
|
|
address: '',
|
|
address: '',
|
|
},
|
|
},
|
|
@@ -109,9 +108,9 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- authentication (val) {
|
|
|
|
- this.authentication = val
|
|
|
|
- },
|
|
|
|
|
|
+ // authentication (val) {
|
|
|
|
+ // this.authentication = val
|
|
|
|
+ // },
|
|
deep: true
|
|
deep: true
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -123,19 +122,20 @@ export default {
|
|
//加载数据
|
|
//加载数据
|
|
getAuthInfo () {
|
|
getAuthInfo () {
|
|
this.showLoading()
|
|
this.showLoading()
|
|
- getCurrentAuthenInfo().then((res) => {
|
|
|
|
- this.authentication.photo = []
|
|
|
|
- this.authentication.photoUrl = res.IDCardPhoto == null ? defaultValue.image : res.IDCardPhoto
|
|
|
|
- this.authentication.name = res.realName == null ? '暂未填写' : res.realName
|
|
|
|
- this.authentication.idNumber = res.IDCard == null ? '暂未填写' : res.IDCard
|
|
|
|
- this.authentication.bankAccount = res.bankAccount == null ? '暂未填写' : res.bankAccount
|
|
|
|
- this.authentication.address = res.address == null ? '暂未填写' : res.address
|
|
|
|
- this.hideLoading()
|
|
|
|
- console.log(this.authentication)
|
|
|
|
- }).catch((error) => {
|
|
|
|
- this.hideLoading()
|
|
|
|
- notify('error', '加载认证信息失败:' + error.data)
|
|
|
|
- })
|
|
|
|
|
|
+ getCurrentIndividualAuthenInfo(this.user.userVO.id, this.getAuthInfoSuccess, this.getAuthInfoFail)
|
|
|
|
+ },
|
|
|
|
+ getAuthInfoSuccess (res) {
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ this.authentication.IDCardPhoto = res.idcardPhoto == null ? defaultValue.image : res.idcardPhoto
|
|
|
|
+ this.authentication.realName = res.realName == null ? '暂未填写' : res.realName
|
|
|
|
+ this.authentication.IDCard = res.idcard == null ? '暂未填写' : res.idcard
|
|
|
|
+ this.authentication.bankAccount = res.bankAccount == null ? '暂未填写' : res.bankAccount
|
|
|
|
+ this.authentication.address = res.address == null ? '暂未填写' : res.address
|
|
|
|
+ console.log(this.authentication)
|
|
|
|
+ },
|
|
|
|
+ getAuthInfoFail (error) {
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ notify('error', '加载认证信息失败:' + error.data)
|
|
},
|
|
},
|
|
//表单进入可编辑状态,可修改表单
|
|
//表单进入可编辑状态,可修改表单
|
|
modifyInfo () {
|
|
modifyInfo () {
|
|
@@ -146,21 +146,29 @@ export default {
|
|
//this.isModifyMode = false
|
|
//this.isModifyMode = false
|
|
this.showLoading()
|
|
this.showLoading()
|
|
const newAuthentication = {
|
|
const newAuthentication = {
|
|
- realName: this.authentication.name,
|
|
|
|
|
|
+ userId: this.user.userVO.id,
|
|
|
|
+ realName: this.authentication.realName,
|
|
bankAccount: this.authentication.bankAccount,
|
|
bankAccount: this.authentication.bankAccount,
|
|
address: this.authentication.address,
|
|
address: this.authentication.address,
|
|
- IDCardPhoto: this.authentication.photoUrl,
|
|
|
|
- IDCard: this.authentication.idNumber,
|
|
|
|
|
|
+ IDCardPhoto: this.authentication.IDCardPhoto,
|
|
|
|
+ IDCard: this.authentication.IDCard,
|
|
}
|
|
}
|
|
- updateIndividualAuthInfo(this.user.userVO.id, newAuthentication).then((res) => {
|
|
|
|
- //console.log(res)
|
|
|
|
- this.hideLoading()
|
|
|
|
- this.cancelModify()
|
|
|
|
- notify('success', '认证信息修改成功')
|
|
|
|
- }).catch(error => {
|
|
|
|
- this.hideLoading()
|
|
|
|
- notify('error', error.data.msg)
|
|
|
|
- })
|
|
|
|
|
|
+ //console.log(newAuthentication)
|
|
|
|
+ updateIndividualAuthInfo(this.user.userVO.id, newAuthentication, this.updateAuthInfoSuccess, this.updateAuthInfoFail)
|
|
|
|
+ },
|
|
|
|
+ updateAuthInfoSuccess (res) {
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ this.authentication.IDCardPhoto = res.idcardPhoto == null ? defaultValue.image : res.idcardPhoto
|
|
|
|
+ this.authentication.realName = res.realName == null ? '暂未填写' : res.realName
|
|
|
|
+ this.authentication.IDCard = res.idcard == null ? '暂未填写' : res.idcard
|
|
|
|
+ this.authentication.bankAccount = res.bankAccount == null ? '暂未填写' : res.bankAccount
|
|
|
|
+ this.authentication.address = res.address == null ? '暂未填写' : res.address
|
|
|
|
+ this.cancelModify()
|
|
|
|
+ notify('success', '认证信息修改成功')
|
|
|
|
+ },
|
|
|
|
+ updateAuthInfoFail (error) {
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ notify('error', error.data)
|
|
},
|
|
},
|
|
//取消修改表单,表单进入不可编辑状态,不再使用
|
|
//取消修改表单,表单进入不可编辑状态,不再使用
|
|
cancelModify () {
|
|
cancelModify () {
|