Browse Source

用户管理更新,级联地址根据当前语言环境动态获取,认证添加身份证和护照的切换,完善国际化、列表页字段、详情页字段、编辑字段。

main
TonyStark 1 month ago
parent
commit
469d9ae2f2
  1. 14
      src/api/business/userInfo.js
  2. 14
      src/api/business/userRegister.js
  3. 14
      src/api/business/userVerification.js
  4. 8
      src/languages/en.js
  5. 16
      src/languages/zh.js
  6. 54
      src/views/business/userInfo/index.vue
  7. 91
      src/views/business/userRegister/index.vue
  8. 120
      src/views/business/userVerification/index.vue

14
src/api/business/userInfo.js

@ -42,3 +42,17 @@ export function delUserInfo(id) {
method: 'delete' method: 'delete'
}) })
} }
// 获取地址选择
export function getAddress(language) {
const languageMap = {
'zh': 1,
'en': 2,
'la': 3
};
language = languageMap[language] || null;
return request({
url: '/business/administrativeDivisions/getAddress/' + language,
method: 'get'
})
}

14
src/api/business/userRegister.js

@ -104,3 +104,17 @@ export function accountLock(date) {
data: date data: date
}) })
} }
// 获取地址选择
export function getAddress(language) {
const languageMap = {
'zh': 1,
'en': 2,
'la': 3
};
language = languageMap[language] || null;
return request({
url: '/business/administrativeDivisions/getAddress/' + language,
method: 'get'
})
}

14
src/api/business/userVerification.js

@ -51,3 +51,17 @@ export function userVerificationAudit(data) {
data:data data:data
}) })
} }
// 获取地址选择
export function getAddress(language) {
const languageMap = {
'zh': 1,
'en': 2,
'la': 3
};
language = languageMap[language] || null;
return request({
url: '/business/administrativeDivisions/getAddress/' + language,
method: 'get'
})
}

8
src/languages/en.js

@ -720,6 +720,8 @@ export default {
agePlaceholder: 'Please enter the age', agePlaceholder: 'Please enter the age',
addr: 'Address', addr: 'Address',
addrPlaceholder: 'Please enter the address', addrPlaceholder: 'Please enter the address',
email: 'E-mail',
emailPlaceholder: 'Please enter the E-mail address',
status: 'Status', status: 'Status',
statusNormal: 'Normal', statusNormal: 'Normal',
statusDisabled: 'Disabled', statusDisabled: 'Disabled',
@ -736,6 +738,7 @@ export default {
phoneRequired: 'The contact phone can only be a number', phoneRequired: 'The contact phone can only be a number',
ageRequired: 'The age can only be a number', ageRequired: 'The age can only be a number',
addrRequired: 'The address cannot be empty', addrRequired: 'The address cannot be empty',
emailRequired: 'The e-mail address cannot be empty',
addTitle: 'Add User Information', addTitle: 'Add User Information',
editTitle: 'Edit User Information' editTitle: 'Edit User Information'
}, },
@ -753,7 +756,12 @@ export default {
biometrics: 'Biometric Identification', biometrics: 'Biometric Identification',
biometricsUnverified: 'Unverified', biometricsUnverified: 'Unverified',
biometricsVerified: 'Verified', biometricsVerified: 'Verified',
verifiedType: 'Certification type',
idCardVerification: 'ID Card Authentication', idCardVerification: 'ID Card Authentication',
passPortdVerification: 'Passport authentication',
certificateStartDate: 'Certificate start date',
certificateEndDate: 'Certificate end date',
contactAddress: 'Contact Address',
status: 'Authentication Status', status: 'Authentication Status',
statusUnverified: 'Unverified', statusUnverified: 'Unverified',
statusVerified: 'Verified', statusVerified: 'Verified',

16
src/languages/zh.js

@ -651,7 +651,7 @@ export default {
normalUser: '普通用户', normalUser: '普通用户',
businessUser: '商户用户', businessUser: '商户用户',
vipUser: 'VIP用户', vipUser: 'VIP用户',
address: '地址信息', address: '户籍地址',
contactAddress: '联系地址', contactAddress: '联系地址',
contactAddressPlaceholder: '请输入联系地址', contactAddressPlaceholder: '请输入联系地址',
supplement: '补充信息', supplement: '补充信息',
@ -718,8 +718,10 @@ export default {
gender: '性别', gender: '性别',
age: '年龄', age: '年龄',
agePlaceholder: '请输入年龄', agePlaceholder: '请输入年龄',
addr: '地址', addr: '户籍地址',
addrPlaceholder: '请输入地址', addrPlaceholder: '请输入地址',
email: '电子邮箱',
emailPlaceholder: '请输入邮箱地址',
status: '状态', status: '状态',
statusNormal: '正常', statusNormal: '正常',
statusDisabled: '禁用', statusDisabled: '禁用',
@ -729,13 +731,14 @@ export default {
detailIdCard: '身份证号', detailIdCard: '身份证号',
detailPhone: '联系电话', detailPhone: '联系电话',
detailAge: '年龄', detailAge: '年龄',
detailAddr: '地址', detailAddr: '详细地址',
nameRequired: '姓名不能为空', nameRequired: '姓名不能为空',
genderRequired: '性别不能为空', genderRequired: '性别不能为空',
idCardRequired: '身份证号只能为数字', idCardRequired: '身份证号只能为数字',
phoneRequired: '联系电话只能为数字', phoneRequired: '联系电话只能为数字',
ageRequired: '年龄只能为数字', ageRequired: '年龄只能为数字',
addrRequired: '地址不能为空', addrRequired: '地址不能为空',
emailRequired: '邮箱地址不能为空',
addTitle: '添加用户信息', addTitle: '添加用户信息',
editTitle: '修改用户信息' editTitle: '修改用户信息'
}, },
@ -753,7 +756,12 @@ export default {
biometrics: '生物识别', biometrics: '生物识别',
biometricsUnverified: '未验证', biometricsUnverified: '未验证',
biometricsVerified: '已验证', biometricsVerified: '已验证',
verifiedType: '认证类型',
idCardVerification: '身份证认证', idCardVerification: '身份证认证',
passPortdVerification: '护照认证',
certificateStartDate: '证件签发日期',
certificateEndDate: '证件失效日期',
contactAddress: '联系地址',
status: '认证状态', status: '认证状态',
statusUnverified: '未认证', statusUnverified: '未认证',
statusVerified: '已认证', statusVerified: '已认证',
@ -788,6 +796,8 @@ export default {
idCardDigitOnly: '身份证号只能包含数字', idCardDigitOnly: '身份证号只能包含数字',
nameRequired: '请输入姓名', nameRequired: '请输入姓名',
birthDateRequired: '请选择出生日期', birthDateRequired: '请选择出生日期',
dateOfIssueRequired: '请选择证件签发日期',
expirationTimeRequired: '请选择证件失效日期',
nationalityRequired: '请输入国籍', nationalityRequired: '请输入国籍',
idCardFrontRequired: '请上传身份证正面照片', idCardFrontRequired: '请上传身份证正面照片',
idCardBackRequired: '请上传身份证背面照片', idCardBackRequired: '请上传身份证背面照片',

54
src/views/business/userInfo/index.vue

@ -40,8 +40,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('business.userManager.userInfo.idCard')" align="center" prop="idCard" /> <el-table-column :label="$t('business.userManager.userInfo.idCard')" align="center" prop="idCard" />
<el-table-column :label="$t('business.userManager.userInfo.phone')" align="center" prop="phone" /> <el-table-column :label="$t('business.userManager.userInfo.phone')" align="center" prop="phone" />
<el-table-column :label="$t('business.agent.userInfoAgent.contactAddress')" align="center" prop="contactAddress" /> <el-table-column :label="$t('business.userManager.userRegister.contactAddress')" align="center" prop="contactAddress" />
<el-table-column :label="$t('business.userManager.userInfo.age')" align="center" prop="age" /> <el-table-column :label="$t('business.userManager.userInfo.email')" align="center" prop="email" />
<el-table-column :label="$t('business.userManager.userInfo.addr')" align="center" prop="addr" /> <el-table-column :label="$t('business.userManager.userInfo.addr')" align="center" prop="addr" />
<el-table-column :label="$t('business.userManager.userInfo.status')" align="center" prop="status"> <el-table-column :label="$t('business.userManager.userInfo.status')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
@ -63,13 +63,16 @@
<!-- 添加或修改用户信息对话框 --> <!-- 添加或修改用户信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="auto"> <el-form ref="form" :model="form" :rules="rules" label-width="auto">
<el-form-item :label="$t('business.userManager.userInfo.email')" prop="email">
<el-input v-model="form.email" :placeholder="$t('business.userManager.userInfo.emailPlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.userManager.userInfo.name')" prop="name"> <el-form-item :label="$t('business.userManager.userInfo.name')" prop="name">
<el-input v-model="form.name" :placeholder="$t('business.userManager.userInfo.namePlaceholder')" /> <el-input v-model="form.name" :placeholder="$t('business.userManager.userInfo.namePlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userInfo.gender')" prop="gender"> <el-form-item :label="$t('business.userManager.userInfo.gender')" prop="gender">
<el-radio-group v-model="form.gender"> <el-radio-group v-model="form.gender">
<el-radio :label="1">{{ $t('common.dict.male') }}</el-radio> <el-radio label="1">{{ $t('common.dict.male') }}</el-radio>
<el-radio :label="0">{{ $t('common.dict.female') }}</el-radio> <el-radio label="0">{{ $t('common.dict.female') }}</el-radio>
</el-radio-group> </el-radio-group>
<!-- <el-input v-model="form.gender" :placeholder="$t('business.userManager.userInfo.genderPlaceholder')" />--> <!-- <el-input v-model="form.gender" :placeholder="$t('business.userManager.userInfo.genderPlaceholder')" />-->
</el-form-item> </el-form-item>
@ -79,14 +82,14 @@
<el-form-item :label="$t('business.userManager.userInfo.phone')" prop="phone"> <el-form-item :label="$t('business.userManager.userInfo.phone')" prop="phone">
<el-input v-model="form.phone" :placeholder="$t('business.userManager.userInfo.phonePlaceholder')" /> <el-input v-model="form.phone" :placeholder="$t('business.userManager.userInfo.phonePlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.agent.userInfoAgent.contactAddress')" prop="contactAddress">
<el-input v-model="form.contactAddress" :placeholder="$t('business.agent.userInfoAgent.placeholder.contactAddress')" />
</el-form-item>
<el-form-item :label="$t('business.userManager.userInfo.age')" prop="age">
<el-input v-model="form.age" :placeholder="$t('business.userManager.userInfo.agePlaceholder')" />
</el-form-item>
<el-form-item :label="$t('business.userManager.userInfo.addr')" prop="addr"> <el-form-item :label="$t('business.userManager.userInfo.addr')" prop="addr">
<el-input v-model="form.addr" :placeholder="$t('business.userManager.userInfo.addrPlaceholder')" /> <el-cascader
:v-model="form.addr"
:options="options_addr"
@change="handleChange"></el-cascader>
</el-form-item>
<el-form-item :label="$t('business.userManager.userInfo.detailAddr')" prop="addrDetail">
<el-input v-model="form.addrDetail" :placeholder="$t('business.userManager.userInfo.addrPlaceholder')" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -136,7 +139,8 @@
getUserInfo, getUserInfo,
delUserInfo, delUserInfo,
addUserInfo, addUserInfo,
updateUserInfo updateUserInfo,
getAddress
} from "@/api/business/userInfo"; } from "@/api/business/userInfo";
export default { export default {
@ -159,6 +163,8 @@
total: 0, total: 0,
// //
userInfoList: [], userInfoList: [],
//
options_addr:[],
// //
title: "", title: "",
// //
@ -183,6 +189,7 @@
status: undefined, status: undefined,
delFlag: undefined, delFlag: undefined,
createTime: undefined, createTime: undefined,
language: undefined,
}, },
// //
form: {}, form: {},
@ -200,8 +207,8 @@
phone: [ phone: [
{ required: true,pattern: /^\d+$/, message: this.$t('business.userManager.userInfo.phoneRequired') , trigger: "blur" } { required: true,pattern: /^\d+$/, message: this.$t('business.userManager.userInfo.phoneRequired') , trigger: "blur" }
], ],
age: [ email: [
{ required: true,pattern: /^\d+$/, message: this.$t('business.userManager.userInfo.ageRequired') , trigger: "blur" } { required: true, pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}(?:\.[a-zA-Z]{2,})?$/, message: this.$t('business.userManager.userInfo.emailRequired'), trigger: "blur" }
], ],
addr: [ addr: [
{ required: true, message: this.$t('business.userManager.userInfo.addrRequired'), trigger: "change" } { required: true, message: this.$t('business.userManager.userInfo.addrRequired'), trigger: "change" }
@ -214,6 +221,7 @@
}, },
created() { created() {
this.getList(); this.getList();
this.getAddress();
}, },
methods: { methods: {
/** 查询用户信息列表 */ /** 查询用户信息列表 */
@ -224,6 +232,12 @@
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0]; this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1]; this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
} }
const languageMap = {
'zh': 1,
'en': 2,
'la': 3
};
this.queryParams.language = languageMap[this.$i18n.locale] || null;
listUserInfo(this.queryParams).then(response => { listUserInfo(this.queryParams).then(response => {
this.userInfoList = response.rows; this.userInfoList = response.rows;
this.total = response.total; this.total = response.total;
@ -296,6 +310,7 @@
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.form.addr = this.form.addr + "," + this.form.addrDetail;
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.id != null) { if (this.form.id != null) {
updateUserInfo(this.form).then(response => { updateUserInfo(this.form).then(response => {
@ -336,6 +351,17 @@
this.download('business/userInfo/export', { this.download('business/userInfo/export', {
...this.queryParams ...this.queryParams
}, `userInfo_${new Date().getTime()}.xlsx`) }, `userInfo_${new Date().getTime()}.xlsx`)
},
/** 获取地址列表 */
getAddress() {
this.loading = true;
getAddress(this.$i18n.locale).then(response => {
this.options_addr = response.data;
});
},
/** 地址联动事件 **/
handleChange(value) {
this.form.addr = value;
} }
} }
}; };

91
src/views/business/userRegister/index.vue

@ -236,30 +236,33 @@
<!--添加用户注册信息弹窗--> <!--添加用户注册信息弹窗-->
<el-dialog :title="title" :visible.sync="openInfo" width="700px" append-to-body> <el-dialog :title="title" :visible.sync="openInfo" width="700px" append-to-body>
<el-form ref="formInfo" :model="formInfo" :rules="rules" label-width="auto"> <el-form ref="formInfo" :model="formInfo" :rules="rules" label-width="auto">
<el-form-item :label="$t('business.userManager.userRegister.name')" prop="name"> <el-form-item :label="$t('business.userManager.userInfo.email')" prop="email">
<el-input v-model="formInfo.name" :placeholder="$t('business.userManager.userRegister.namePlaceholder')"/> <el-input v-model="formInfo.email" :placeholder="$t('business.userManager.userInfo.emailPlaceholder')"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.gender')" prop="gender"> <el-form-item :label="$t('business.userManager.userInfo.name')" prop="name">
<el-input v-model="formInfo.name" :placeholder="$t('business.userManager.userInfo.namePlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.userManager.userInfo.gender')" prop="gender">
<el-radio-group v-model="formInfo.gender"> <el-radio-group v-model="formInfo.gender">
<el-radio :label="1">{{ $t('business.userManager.userRegister.male') }}</el-radio> <el-radio :label="1">{{ $t('business.userManager.userRegister.male') }}</el-radio>
<el-radio :label="0">{{ $t('business.userManager.userRegister.female') }}</el-radio> <el-radio :label="0">{{ $t('business.userManager.userRegister.female') }}</el-radio>
</el-radio-group> </el-radio-group>
<!-- <el-input v-model="form.gender" :placeholder="$t('business.userManager.userRegister.genderPlaceholder')" />--> <!-- <el-input v-model="form.gender" :placeholder="$t('business.userManager.userRegister.genderPlaceholder')" />-->
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.idCard')" prop="idCard"> <el-form-item :label="$t('business.userManager.userInfo.idCard')" prop="idCard">
<el-input v-model="formInfo.idCard" :placeholder="$t('business.userManager.userRegister.idCardPlaceholder')"/> <el-input v-model="formInfo.idCard" :placeholder="$t('business.userManager.userInfo.idCardPlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.phone')" prop="phone">
<el-input v-model="formInfo.phone" :placeholder="$t('business.userManager.userRegister.phonePlaceholder')"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.contactAddress')" prop="contactAddress"> <el-form-item :label="$t('business.userManager.userInfo.phone')" prop="phone">
<el-input v-model="formInfo.contactAddress" :placeholder="$t('business.userManager.userRegister.contactAddressPlaceholder')" /> <el-input v-model="formInfo.phone" :placeholder="$t('business.userManager.userInfo.phonePlaceholder')"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.age')" prop="age"> <el-form-item :label="$t('business.userManager.userInfo.addr')" prop="addr">
<el-input v-model="formInfo.age" :placeholder="$t('business.userManager.userRegister.agePlaceholder')"/> <el-cascader
v-model="formInfo.addr"
:options="options_addr"
@change="handleChange"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.addr')" prop="addr"> <el-form-item :label="$t('business.userManager.userInfo.detailAddr')" prop="contactAddress">
<el-input v-model="formInfo.addr" :placeholder="$t('business.userManager.userRegister.addrPlaceholder')"/> <el-input v-model="formInfo.contactAddress" :placeholder="$t('business.userManager.userInfo.addrPlaceholder')" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -284,13 +287,10 @@
<span v-if="formDetail.userInfoVo.gender == '1'">{{ $t('business.userManager.userRegister.male') }}</span> <span v-if="formDetail.userInfoVo.gender == '1'">{{ $t('business.userManager.userRegister.male') }}</span>
<span v-if="formDetail.userInfoVo.gender == '0'">{{ $t('business.userManager.userRegister.female') }}</span> <span v-if="formDetail.userInfoVo.gender == '0'">{{ $t('business.userManager.userRegister.female') }}</span>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.userAge')">
{{ formDetail.userInfoVo.age }}
</el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.idCard')"> <el-form-item :label="$t('business.userManager.userRegister.idCard')">
{{ formDetail.userInfoVo.idCard }} {{ formDetail.userInfoVo.idCard }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.userAddress')"> <el-form-item :label="$t('business.userManager.userRegister.address')">
{{ formDetail.userInfoVo.addr }} {{ formDetail.userInfoVo.addr }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userRegister.contactPhone')"> <el-form-item :label="$t('business.userManager.userRegister.contactPhone')">
@ -329,9 +329,9 @@ import {
addUserRegister, addUserRegister,
updateUserRegister, updateUserRegister,
addUserInfo, addUserInfo,
addUserInfoBus,
resetUserPassword, resetUserPassword,
accountLock accountLock,
getAddress
} from "@/api/business/userRegister"; } from "@/api/business/userRegister";
export default { export default {
@ -366,6 +366,8 @@ export default {
openInfo: false, openInfo: false,
// - // -
openInfoBus: false, openInfoBus: false,
//
options_addr:[],
options_operateStatus: [{ options_operateStatus: [{
value: '存续', value: '存续',
label: this.$t('business.userManager.userRegister.operateStatusOptions.active') label: this.$t('business.userManager.userRegister.operateStatusOptions.active')
@ -384,6 +386,7 @@ export default {
status: undefined, status: undefined,
userType: undefined, userType: undefined,
userLevel: undefined, userLevel: undefined,
language: undefined,
}, },
// //
form: { form: {
@ -434,8 +437,8 @@ export default {
phone: [ phone: [
{ required: true, pattern: /^\d+$/, message: this.$t('business.userManager.userRegister.phoneNumberDigitOnly'), trigger: "blur"} { required: true, pattern: /^\d+$/, message: this.$t('business.userManager.userRegister.phoneNumberDigitOnly'), trigger: "blur"}
], ],
age: [ email: [
{ required: true, pattern: /^\d+$/, message: this.$t('business.userManager.userRegister.ageNumberOnly'), trigger: "blur" } { required: true, pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}(?:\.[a-zA-Z]{2,})?$/, message: this.$t('business.userManager.userInfo.emailRequired'), trigger: "blur" }
], ],
contactAddress: [ contactAddress: [
{required: true, message: this.$t('business.userManager.userRegister.contactAddressRequired'), trigger: "blur"} {required: true, message: this.$t('business.userManager.userRegister.contactAddressRequired'), trigger: "blur"}
@ -462,11 +465,18 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getAddress();
}, },
methods: { methods: {
/** 查询用户注册列表 */ /** 查询用户注册列表 */
getList() { getList() {
this.loading = true; this.loading = true;
const languageMap = {
'zh': 1,
'en': 2,
'la': 3
};
this.queryParams.language = languageMap[this.$i18n.locale] || null;
listUserRegister(this.queryParams).then(response => { listUserRegister(this.queryParams).then(response => {
this.userRegisterList = response.rows; this.userRegisterList = response.rows;
this.total = response.total; this.total = response.total;
@ -581,6 +591,8 @@ export default {
submitFormInfo() { submitFormInfo() {
this.$refs["formInfo"].validate(valid => { this.$refs["formInfo"].validate(valid => {
if (valid) { if (valid) {
this.formInfo.addr = this.formInfo.addr + "," + this.formInfo.contactAddress;
this.formInfo.contactAddress = null;
addUserInfo(this.formInfo).then(response => { addUserInfo(this.formInfo).then(response => {
this.$modal.msgSuccess(this.$t('common.promptMsg.addSuccess')); this.$modal.msgSuccess(this.$t('common.promptMsg.addSuccess'));
this.openInfo = false; this.openInfo = false;
@ -591,20 +603,6 @@ export default {
} }
}); });
}, },
/** 用户信息-提交按钮-商企 */
submitFormInfoBus() {
this.$refs["formInfoBus"].validate(valid => {
if (valid) {
addUserInfoBus(this.formInfoBus).then(response => {
this.$modal.msgSuccess(this.$t('common.promptMsg.addSuccess'));
this.openInfoBus = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const account = row.account; const account = row.account;
@ -634,14 +632,8 @@ export default {
}, },
handleAddInfo(row) { handleAddInfo(row) {
this.reset(); this.reset();
if (row.userType == "0") { this.formInfo = row;
this.formInfo = row; this.openInfo = true;
this.openInfo = true;
}
if (row.userType == "1") {
this.formInfoBus = row;
this.openInfoBus = true;
}
this.title = this.$t('business.userManager.userRegister.addTitle'); this.title = this.$t('business.userManager.userRegister.addTitle');
}, },
@ -696,6 +688,17 @@ export default {
}).finally(() => { }).finally(() => {
this.loading = false; this.loading = false;
}); });
},
/** 获取地址列表 */
getAddress() {
this.loading = true;
getAddress(this.$i18n.locale).then(response => {
this.options_addr = response.data;
});
},
/** 地址联动事件 **/
handleChange(value) {
this.formInfo.addr = value;
} }
} }
}; };

120
src/views/business/userVerification/index.vue

@ -54,8 +54,6 @@
<el-table-column :label="$t('business.userManager.userVerification.account')" align="center" prop="userAccount"/> <el-table-column :label="$t('business.userManager.userVerification.account')" align="center" prop="userAccount"/>
<el-table-column :label="$t('business.userManager.userVerification.name')" align="center" prop="userInfoName"/> <el-table-column :label="$t('business.userManager.userVerification.name')" align="center" prop="userInfoName"/>
<el-table-column :label="$t('business.userManager.userVerification.idCard')" align="center" prop="idCard"/> <el-table-column :label="$t('business.userManager.userVerification.idCard')" align="center" prop="idCard"/>
<el-table-column :label="$t('business.userManager.userVerification.nationality')" align="center"
prop="nationality"/>
<el-table-column :label="$t('business.userManager.userVerification.biometrics')" align="center" prop="status"> <el-table-column :label="$t('business.userManager.userVerification.biometrics')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="danger" v-if="scope.row.biometrics == '0'"> <el-tag type="danger" v-if="scope.row.biometrics == '0'">
@ -137,20 +135,40 @@
<el-input v-model="form.idCardNumber" <el-input v-model="form.idCardNumber"
:placeholder="$t('business.userManager.userVerification.idCardPlaceholder')"/> :placeholder="$t('business.userManager.userVerification.idCardPlaceholder')"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.nationality')" prop="nationality"> <el-form-item :label="$t('business.userManager.userVerification.certificateStartDate')" prop="dateOfIssue">
<el-input v-model="form.nationality" <el-date-picker clearable
:placeholder="$t('business.userManager.userVerification.nationalityPlaceholder')"/> v-model="form.dateOfIssue"
type="date"
format="dd/MM/yyyy"
value-format="dd/MM/yyyy"
:placeholder="$t('business.userManager.userVerification.birthDatePlaceholder')">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.birthDate')" prop="birthDate"> <el-form-item :label="$t('business.userManager.userVerification.certificateEndDate')" prop="expirationTime">
<el-date-picker clearable <el-date-picker clearable
v-model="form.birthDate" v-model="form.expirationTime"
type="date" type="date"
format="dd/MM/yyyy" format="dd/MM/yyyy"
value-format="dd/MM/yyyy" value-format="dd/MM/yyyy"
:placeholder="$t('business.userManager.userVerification.birthDatePlaceholder')"> :placeholder="$t('business.userManager.userVerification.birthDatePlaceholder')">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.idCardFront')" prop="idCardFrontImagePath"> <el-form-item :label="$t('business.userManager.userVerification.contactAddress')" prop="commonContactAddress">
<el-cascader
v-model="form.commonContactAddress"
:options="options_addr"
@change="handleChange"></el-cascader>
</el-form-item>
<el-form-item :label="$t('business.userManager.userInfo.detailAddr')" prop="addrDetail">
<el-input v-model="form.addrDetail" :placeholder="$t('business.userManager.userInfo.addrPlaceholder')" />
</el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.verifiedType')" prop="gender">
<el-radio-group v-model="form.licenseType">
<el-radio :label="1">{{ $t('business.userManager.userVerification.idCardVerification') }}</el-radio>
<el-radio :label="0">{{ $t('business.userManager.userVerification.license') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-show="form.licenseType == '1'" :label="$t('business.userManager.userVerification.idCardFront')" prop="idCardFrontImagePath">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
:action="uploadUrl" :action="uploadUrl"
@ -163,7 +181,7 @@
<div slot="tip" class="el-upload__tip">只能上传JPG/PNG文件且不超过5M</div> <div slot="tip" class="el-upload__tip">只能上传JPG/PNG文件且不超过5M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.idCardBack')" prop="idCardBackImagePath"> <el-form-item v-show="form.licenseType == '1'" :label="$t('business.userManager.userVerification.idCardBack')" prop="idCardBackImagePath">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
:action="uploadUrl" :action="uploadUrl"
@ -176,7 +194,7 @@
<div slot="tip" class="el-upload__tip">只能上传JPG/PNG文件且不超过5M</div> <div slot="tip" class="el-upload__tip">只能上传JPG/PNG文件且不超过5M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.idCardHolding')" prop="userWithIdCardImagePath"> <el-form-item v-show="form.licenseType == '1'" :label="$t('business.userManager.userVerification.idCardHolding')" prop="userWithIdCardImagePath">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
:action="uploadUrl" :action="uploadUrl"
@ -189,6 +207,19 @@
<div slot="tip" class="el-upload__tip">只能上传JPG/PNG文件且不超过5M</div> <div slot="tip" class="el-upload__tip">只能上传JPG/PNG文件且不超过5M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item v-show="form.licenseType == '0'" :label="$t('business.userManager.userVerification.license')" prop="passportImagePath">
<el-upload
class="upload-demo"
:action="uploadUrl"
:on-success="handleSuccess_passportImagePath"
:limit="1"
:accept="'image/jpg,image/png'"
:file-list="fileList"
list-type="picture">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传JPG/PNG文件且不超过5M</div>
</el-upload>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">{{ <el-button :loading="buttonLoading" type="primary" @click="submitForm">{{
@ -202,23 +233,20 @@
<!-- 实名审核 --> <!-- 实名审核 -->
<el-dialog :title="title" :visible.sync="auditOpen" width="700px" append-to-body> <el-dialog :title="title" :visible.sync="auditOpen" width="700px" append-to-body>
<el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="auto"> <el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="auto">
<el-form-item :label="$t('business.userManager.userVerification.registerName')">
{{ auditForm.userInfoName }}
</el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.verifyName')"> <el-form-item :label="$t('business.userManager.userVerification.verifyName')">
{{ auditForm.fullName }} {{ auditForm.fullName }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.registerIdCard')">
{{ auditForm.idCardShow }}
</el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.verifyIdCard')"> <el-form-item :label="$t('business.userManager.userVerification.verifyIdCard')">
{{ auditForm.idCardNumber }} {{ auditForm.idCardNumber }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.nationality')"> <el-form-item :label="$t('business.userManager.userVerification.certificateStartDate')">
{{ auditForm.nationality }} {{ auditForm.dateOfIssue }}
</el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.certificateEndDate')">
{{ auditForm.expirationTime }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.birthDate')"> <el-form-item :label="$t('business.userManager.userVerification.contactAddress')">
{{ auditForm.birthDate }} {{ auditForm.commonContactAddress }}
</el-form-item> </el-form-item>
<el-form-item v-if="auditForm.licenseType ==1" :label="$t('business.userManager.userVerification.idCardFront')"> <el-form-item v-if="auditForm.licenseType ==1" :label="$t('business.userManager.userVerification.idCardFront')">
<el-image style="width: 90px; height: 30px" :src="auditForm.idCardFrontImagePath" <el-image style="width: 90px; height: 30px" :src="auditForm.idCardFrontImagePath"
@ -260,11 +288,14 @@
<el-form-item :label="$t('business.userManager.userVerification.idCard')"> <el-form-item :label="$t('business.userManager.userVerification.idCard')">
{{ form.idCard }} {{ form.idCard }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.nationality')"> <el-form-item :label="$t('business.userManager.userVerification.certificateStartDate')">
{{ form.nationality }} {{ form.dateOfIssue }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.birthDate')"> <el-form-item :label="$t('business.userManager.userVerification.certificateEndDate')">
{{ form.birthDate }} {{ form.expirationTime }}
</el-form-item>
<el-form-item :label="$t('business.userManager.userVerification.contactAddress')">
{{ form.commonContactAddress }}
</el-form-item> </el-form-item>
<el-form-item v-if="form.licenseType == 1" :label="$t('business.userManager.userVerification.idCardFront')"> <el-form-item v-if="form.licenseType == 1" :label="$t('business.userManager.userVerification.idCardFront')">
<el-image style="width: 90px; height: 30px" :src="form.idCardFrontImagePath" <el-image style="width: 90px; height: 30px" :src="form.idCardFrontImagePath"
@ -308,9 +339,9 @@ import {
delUserVerification, delUserVerification,
addUserVerification, addUserVerification,
updateUserVerification, updateUserVerification,
userVerificationAudit userVerificationAudit,
getAddress
} from "@/api/business/userVerification"; } from "@/api/business/userVerification";
import {merchantAudit} from "@/api/business/merchantVerification";
export default { export default {
name: "UserVerification", name: "UserVerification",
@ -322,6 +353,8 @@ export default {
loading: true, loading: true,
// //
ids: [], ids: [],
//
options_addr:[],
// //
single: true, single: true,
// //
@ -377,8 +410,11 @@ export default {
fullName: [ fullName: [
{required: true, message: this.$t('business.userManager.userVerification.nameRequired'), trigger: "blur"} {required: true, message: this.$t('business.userManager.userVerification.nameRequired'), trigger: "blur"}
], ],
birthDate: [ expirationTime: [
{required: true, message: this.$t('business.userManager.userVerification.birthDateRequired'), trigger: "blur"} {required: true, message: this.$t('business.userManager.userVerification.expirationTimeRequired'), trigger: "blur"}
],
dateOfIssue: [
{required: true, message: this.$t('business.userManager.userVerification.dateOfIssueRequired'), trigger: "blur"}
], ],
nationality: [ nationality: [
{ {
@ -420,6 +456,7 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getAddress();
}, },
computed: { computed: {
// URL // URL
@ -434,6 +471,12 @@ export default {
/** 查询实名认证列表 */ /** 查询实名认证列表 */
getList() { getList() {
this.loading = true; this.loading = true;
const languageMap = {
'zh': 1,
'en': 2,
'la': 3
};
this.queryParams.language = languageMap[this.$i18n.locale] || null;
listUserVerification(this.queryParams).then(response => { listUserVerification(this.queryParams).then(response => {
this.userVerificationList = response.rows; this.userVerificationList = response.rows;
this.total = response.total; this.total = response.total;
@ -468,7 +511,8 @@ export default {
updateTime: undefined, updateTime: undefined,
createBy: undefined, createBy: undefined,
updateBy: undefined, updateBy: undefined,
delFlag: undefined delFlag: undefined,
licenseType: 1
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -533,6 +577,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.form.commonContactAddress = this.form.commonContactAddress + "," + this.form.addrDetail;
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.id != null) { if (this.form.id != null) {
updateUserVerification(this.form).then(response => { updateUserVerification(this.form).then(response => {
@ -632,6 +677,23 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.form.userWithIdCardImagePath = this.getImgUrl + response.data; // URL this.form.userWithIdCardImagePath = this.getImgUrl + response.data; // URL
} }
},
//
handleSuccess_passportImagePath(response) {
if (response.code === 200) {
this.form.passportImagePath = this.getImgUrl + response.data; // URL
}
},
/** 获取地址列表 */
getAddress() {
this.loading = true;
getAddress(this.$i18n.locale).then(response => {
this.options_addr = response.data;
});
},
/** 地址联动事件 **/
handleChange(value) {
this.form.addr = value;
} }
} }
}; };

Loading…
Cancel
Save