Browse Source

国际化

商户和用户注册
main
niefei 4 weeks ago
parent
commit
41ae0b25e2
  1. 27
      src/languages/en.js
  2. 37
      src/languages/zh.js
  3. 154
      src/views/business/userInfoBus/index.vue
  4. 186
      src/views/business/userRegister/indexBus.vue

27
src/languages/en.js

@ -58,6 +58,26 @@ export default {
yes: 'Yes',
no: 'No',
},
operateType: {
type0: 'General Retail',
type1: 'Food, Beverage and Tobacco Retail',
type2: 'Textile, Apparel and Daily Necessities Retail',
type3: 'Cultural, Sports Supplies and Equipment Retail',
type4: 'Pharmaceutical and Medical Equipment Retail',
type5: 'Automotive, Motorcycle, Fuel and Parts Retail',
type6: 'Home Appliances and Electronics Retail',
type7: 'Accommodation',
type8: 'Catering',
type9: 'Leisure and Entertainment',
type10: 'Real Estate',
type11: 'Finance',
type12: 'Residential Services',
type13: 'Commercial Services',
type14: 'Education',
type15: 'Healthcare',
type16: 'Social Welfare',
type17: 'Government Agencies and Public Services',
},
},
menus: {
'首页': 'Homepage',
@ -846,6 +866,7 @@ export default {
userLevelRequired: 'The user level cannot be empty',
legalPersonRequired: 'The legal person cannot be empty',
operateStatusRequired: 'The business status cannot be empty',
operateTypeRequired: 'The business type cannot be empty',
operateStatusExist: 'Active',
operateStatusCancel: 'Cancelled',
operateAddrRequired: 'The business address cannot be empty',
@ -876,7 +897,9 @@ export default {
legalPersonLabel: 'Legal Person',
legalPersonPlaceholder: 'Please enter the legal person',
operateStatusLabel: 'Business Status',
operateTypeLabel: 'Business Type',
operateStatusPlaceholder: 'Please select the business status',
operateTypePlaceholder: 'Please select the business type',
operateAddrLabel: 'Business Address',
operateAddrPlaceholder: 'Please enter the business address'
},
@ -915,6 +938,8 @@ export default {
businessLicenseNumber: 'Business License Number',
legalPersonInfoName: 'Registered Legal Person Name',
legalPersonName: 'Legal Person Name',
legalPersonPhone: 'Legal Person Phone',
legalPersonEmail: 'Legal Person Email',
status: 'Authentication Status',
authenticationDate: 'Authentication Date',
certificateExpirationDate: 'Certificate expiration date',
@ -925,6 +950,8 @@ export default {
authenticatedLegalPersonName: 'Authenticated Legal Person Name',
legalPersonIdCardNumber: 'Legal Person ID Card Number',
businessLicense: 'Business License',
yes: 'Yes',
no: 'No',
authenticationFailureReason: 'Authentication Failure Reason',
authenticate: 'Authenticate',
audit: 'Review',

37
src/languages/zh.js

@ -58,6 +58,26 @@ export default {
yes: '是',
no: '否',
},
operateType: {
type0: '综合零售',
type1: '食品、饮料及烟草制品专门零售',
type2: '纺织、服装及日用品专门零售店',
type3: '文化、体育用品及器材专门零售',
type4: '医药和医疗器材专门零售',
type5: '汽车、摩托车、燃料及配件专门零售',
type6: '家用电器及电子产品专门零售',
type7: '住宿业',
type8: '餐饮业',
type9: '休闲娱乐业',
type10: '房地产业',
type11: '金融业',
type12: '居民服务业',
type13: '商业服务业',
type14: '教育',
type15: '卫生',
type16: '社会保障与福利',
type17: '政府机关及其他公共服务',
},
},
menus: {
'首页': '首页',
@ -832,10 +852,10 @@ export default {
contactAddress: '联系地址',
contactAddressPlaceholder: '请输入联系地址',
contactAddressRequired: '联系地址不能为空',
addTitle: '添加用户注册',
editTitle: '编辑用户注册',
detailTitle: '用户注册详情',
deleteConfirmAccount: '确定要删除用户账户吗?',
addTitle: '商户信息注册',
editTitle: '商户信息编辑',
detailTitle: '商户信息详情',
deleteConfirmAccount: '确定要删除商户用户吗?',
deleteConfirmBatch: '确定要删除选中的用户吗?',
passwordResetConfirm: '确定要重置密码吗?',
passwordResetSuccess: '密码重置成功',
@ -848,6 +868,7 @@ export default {
userLevelRequired: '用户等级不能为空',
legalPersonRequired: '法人不能为空',
operateStatusRequired: '经营状态不能为空',
operateTypeRequired: '经营类别不能为空',
operateStatusExist: '存续',
operateStatusCancel: '注销',
operateAddrRequired: '经营地址不能为空',
@ -865,7 +886,7 @@ export default {
age: '年龄',
agePlaceholder: '请输入年龄',
ageNumberOnly: '年龄只能为数字',
addr: '地址',
addr: '联系地址',
addrPlaceholder: '请输入地址',
addrRequired: '地址不能为空',
merchantNameLabel: '商户名称',
@ -878,7 +899,9 @@ export default {
legalPersonLabel: '法人',
legalPersonPlaceholder: '请输入法人',
operateStatusLabel: '经营状态',
operateTypeLabel: '经营类别',
operateStatusPlaceholder: '请选择经营状态',
operateTypePlaceholder: '请选择经营类别',
operateAddrLabel: '经营地址',
operateAddrPlaceholder: '请输入经营地址'
},
@ -917,6 +940,8 @@ export default {
businessLicenseNumber: '营业执照号',
legalPersonInfoName: '注册法人姓名',
legalPersonName: '法人姓名',
legalPersonPhone: '法人电话',
legalPersonEmail: '法人邮箱',
status: '认证状态',
authenticationDate: '认证日期',
certificateExpirationDate: '证件有效期',
@ -927,6 +952,8 @@ export default {
authenticatedLegalPersonName: '认证法人姓名',
legalPersonIdCardNumber: '法人身份证号码',
businessLicense: '营业执照',
yes: '有',
no: '无',
authenticationFailureReason: '认证失败原因',
authenticate: '认证',
audit: '审核',

154
src/views/business/userInfoBus/index.vue

@ -66,11 +66,12 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('business.merchant.userInfoBus.loginAccount')" align="center" prop="account" />
<el-table-column :label="$t('business.merchant.userInfoBus.merchantName')" align="center" prop="merchantName" />
<el-table-column :label="$t('business.merchant.userInfoBus.businessLicense')" align="center" prop="license" />
<el-table-column :label="$t('business.merchant.userInfoBus.otherLicenseInfo')" align="center" prop="licenseOther" />
<el-table-column :label="$t('business.merchant.userInfoBus.legalPersonName')" align="center" prop="legalPerson" />
<el-table-column :label="$t('business.merchant.userInfoBus.operatingStatus')" align="center" prop="operateStatus" />
<el-table-column :label="$t('business.merchant.userInfoBus.operatingAddress')" align="center" prop="operateAddr" />
<el-table-column :label="$t('business.userManager.userInfo.email')" align="center" prop="email" />
<el-table-column :label="$t('business.merchant.indexBus.operateTypeLabel')" align="center">
<template slot-scope="scope">
{{getOperateType(scope.row.operateType)}}
</template>
</el-table-column>
<el-table-column :label="$t('business.merchant.indexBus.contactAddress')" align="center" prop="contactAddress" />
<el-table-column :label="$t('common.tableMsg.operation')" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -99,30 +100,28 @@
<el-form-item :label="$t('business.merchant.userInfoBus.merchantName')" prop="merchantName">
<el-input v-model="form.merchantName" :placeholder="$t('business.merchant.userInfoBus.inputMerchantName')" />
</el-form-item>
<el-form-item :label="$t('business.merchant.userInfoBus.businessLicense')" prop="license">
<el-input v-model="form.license" :placeholder="$t('business.merchant.userInfoBus.inputBusinessLicense')" />
</el-form-item>
<el-form-item :label="$t('business.merchant.userInfoBus.otherLicenseInfo')" prop="licenseOther">
<el-input v-model="form.licenseOther" :placeholder="$t('business.merchant.userInfoBus.inputOtherLicenseInfo')" />
<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.merchant.userInfoBus.legalPersonName')" prop="legalPerson">
<el-input v-model="form.legalPerson" :placeholder="$t('business.merchant.userInfoBus.inputLegalPersonName')" />
</el-form-item>
<el-form-item :label="$t('business.merchant.userInfoBus.operatingStatus')" prop="operateStatus">
<el-select v-model="form.operateStatus" :placeholder="$t('business.merchant.userInfoBus.selectOperatingStatus')" >
<el-form-item :label="$t('business.merchant.indexBus.operateTypeLabel')" prop="operateType">
<el-select v-model="form.operateType"
:placeholder="$t('business.merchant.indexBus.operateTypePlaceholder')">
<el-option
v-for="item in options_operateStatus"
v-for="item in options_operateType"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('business.merchant.userInfoBus.operatingAddress')" prop="operateAddr">
<el-input v-model="form.operateAddr" :placeholder="$t('business.merchant.userInfoBus.inputOperatingAddress')" />
<el-form-item :label="$t('business.merchant.indexBus.addr')" prop="contactAddress">
<el-cascader
v-model="form.contactAddress"
:options="options_addr"
@change="handleChange"></el-cascader>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.contactAddress')" prop="contactAddress">
<el-input v-model="form.contactAddress" :placeholder="$t('business.merchant.userInfoBus.inputOperatingAddress')" />
<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>
<div slot="footer" class="dialog-footer">
@ -162,6 +161,7 @@
<script>
import { listUserInfoBus, getUserInfoBus, delUserInfoBus, addUserInfoBus, updateUserInfoBus } from "@/api/business/userInfoBus";
import {getAddress} from "@/api/business/userRegister";
export default {
name: "UserInfoBus",
@ -201,29 +201,85 @@ export default {
operateAddr: undefined,
merchantName: undefined,
},
options_operateStatus: [{
value: '存续',
label: this.$t('business.merchant.userInfoBus.operateStatusExist')
options_operateType: [{
value: '0',
label: this.$t('common.operateType.type0')
}, {
value: '注销',
label: this.$t('business.merchant.userInfoBus.operateStatusCancel')
}],
value: '1',
label: this.$t('common.operateType.type1')
},{
value: '2',
label: this.$t('common.operateType.type2')
},{
value: '3',
label: this.$t('common.operateType.type3')
},{
value: '4',
label: this.$t('common.operateType.type4')
},{
value: '5',
label: this.$t('common.operateType.type5')
},{
value: '6',
label: this.$t('common.operateType.type6')
},{
value: '7',
label: this.$t('common.operateType.type7')
},{
value: '8',
label: this.$t('common.operateType.type8')
},{
value: '9',
label: this.$t('common.operateType.type9')
},{
value: '10',
label: this.$t('common.operateType.type10')
},{
value: '11',
label: this.$t('common.operateType.type11')
},{
value: '12',
label: this.$t('common.operateType.type12')
},{
value: '13',
label: this.$t('common.operateType.type13')
},{
value: '14',
label: this.$t('common.operateType.type14')
},{
value: '15',
label: this.$t('common.operateType.type15')
},{
value: '16',
label: this.$t('common.operateType.type16')
},{
value: '17',
label: this.$t('common.operateType.type17')
},],
//
form: {},
//
options_addr:[],
//
rules: {
merchantName: [
{ required: true, message: this.$t('business.merchant.userInfoBus.merchantNameRequired'), trigger: "blur" }
],
email: [
{ 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" }
],
legalPerson: [
{ required: true, message: this.$t('business.merchant.userInfoBus.legalPersonRequired'), trigger: "blur" }
],
operateStatus: [
{ required: true, message: this.$t('business.merchant.userInfoBus.operateStatusRequired'), trigger: "change" }
operateType: [
{required: true, message: this.$t('business.merchant.indexBus.operateTypeRequired'), trigger: "change"}
],
operateAddr: [
{ required: true, message: this.$t('business.merchant.userInfoBus.operateAddrRequired'), trigger: "blur" }
],
addrDetail: [
{required: true, message: this.$t('business.merchant.indexBus.contactAddressRequired'), trigger: "blur"}
],
contactAddress: [
{ required: true, message: this.$t('business.merchant.userInfoBus.operateAddrRequired'), trigger: "blur" }
],
@ -232,11 +288,18 @@ export default {
},
created() {
this.getList();
this.getAddress();
},
methods: {
/** 查询用户信息-商户扩展列表 */
getList() {
this.loading = true;
const languageMap = {
'zh': 1,
'en': 2,
'la': 3
};
this.queryParams.language = languageMap[this.$i18n.locale] || null;
listUserInfoBus(this.queryParams).then(response => {
this.userInfoBusList = response.rows;
this.total = response.total;
@ -313,6 +376,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.contactAddress = this.form.contactAddress + "," + this.form.addrDetail;
this.buttonLoading = true;
if (this.form.id != null) {
updateUserInfoBus(this.form).then(response => {
@ -349,11 +413,45 @@ export default {
this.loading = false;
});
},
/** 获取地址列表 */
getAddress() {
this.loading = true;
getAddress(this.$i18n.locale).then(response => {
this.options_addr = response.data;
});
},
/** 地址联动事件 **/
handleChange(value) {
this.form.contactAddress = value;
},
/** 导出按钮操作 */
handleExport() {
this.download('business/userInfoBus/export', {
...this.queryParams
}, `${this.$t('business.merchant.userInfoBus.userInfoBus')}_${new Date().getTime()}.xlsx`)
},
getOperateType(type){
const typeMap = {
'0': this.$t('common.operateType.type0'),
'1': this.$t('common.operateType.type1'),
'2': this.$t('common.operateType.type2'),
'3': this.$t('common.operateType.type3'),
'4': this.$t('common.operateType.type4'),
'5': this.$t('common.operateType.type5'),
'6': this.$t('common.operateType.type6'),
'7': this.$t('common.operateType.type7'),
'8': this.$t('common.operateType.type8'),
'9': this.$t('common.operateType.type9'),
'10': this.$t('common.operateType.type10'),
'11': this.$t('common.operateType.type11'),
'12': this.$t('common.operateType.type12'),
'13': this.$t('common.operateType.type13'),
'14': this.$t('common.operateType.type14'),
'15': this.$t('common.operateType.type15'),
'16': this.$t('common.operateType.type16'),
'17': this.$t('common.operateType.type17')
};
return typeMap[type] || null;
}
}
};

186
src/views/business/userRegister/indexBus.vue

@ -258,40 +258,6 @@
</div>
</el-dialog>
<!--添加商户注册信息弹窗-->
<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-item :label="$t('business.merchant.indexBus.name')" prop="name">
<el-input v-model="formInfo.name" :placeholder="$t('business.merchant.indexBus.namePlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.gender')" prop="gender">
<el-select v-model="formInfo.gender" :placeholder="$t('business.merchant.indexBus.genderPlaceholder')">
<el-option :label="$t('business.merchant.indexBus.genderMale')" value="1"></el-option>
<el-option :label="$t('business.merchant.indexBus.genderFemale')" value="0"></el-option>
</el-select>
<!-- <el-input v-model="form.gender" :placeholder="$t('business.merchant.indexBus.genderPlaceholder')" />-->
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.idCard')" prop="idCard">
<el-input v-model="formInfo.idCard" :placeholder="$t('business.merchant.indexBus.idCardPlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.phone')" prop="phone">
<el-input v-model="formInfo.phone" :placeholder="$t('business.merchant.indexBus.phonePlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.age')" prop="age">
<el-input v-model="formInfo.age" :placeholder="$t('business.merchant.indexBus.agePlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.addr')" prop="addr">
<el-input v-model="formInfo.addr" :placeholder="$t('business.merchant.indexBus.addrPlaceholder')"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitFormInfo">{{
$t('common.button.confirm')
}}
</el-button>
<el-button @click="cancel">{{ $t('common.button.cancel') }}</el-button>
</div>
</el-dialog>
<!-- 添加或修改用户信息-商户扩展对话框 -->
<el-dialog :title="title" :visible.sync="openInfoBus" width="700px" append-to-body>
@ -300,35 +266,28 @@
<el-input v-model="formInfoBus.merchantName"
:placeholder="$t('business.merchant.indexBus.merchantNamePlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.licenseLabel')" prop="license">
<el-input v-model="formInfoBus.license" :placeholder="$t('business.merchant.indexBus.licensePlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.licenseOtherLabel')" prop="licenseOther">
<el-input v-model="formInfoBus.licenseOther"
:placeholder="$t('business.merchant.indexBus.licenseOtherPlaceholder')"/>
<el-form-item :label="$t('business.userManager.userInfo.email')" prop="email">
<el-input v-model="formInfoBus.email" :placeholder="$t('business.userManager.userInfo.emailPlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.legalPersonLabel')" prop="legalPerson">
<el-input v-model="formInfoBus.legalPerson"
:placeholder="$t('business.merchant.indexBus.legalPersonPlaceholder')"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.operateStatusLabel')" prop="operateStatus">
<el-select v-model="formInfoBus.operateStatus"
:placeholder="$t('business.merchant.indexBus.operateStatusPlaceholder')">
<el-form-item :label="$t('business.merchant.indexBus.operateTypeLabel')" prop="operateType">
<el-select v-model="formInfoBus.operateType"
:placeholder="$t('business.merchant.indexBus.operateTypePlaceholder')">
<el-option
v-for="item in options_operateStatus"
v-for="item in options_operateType"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.operateAddrLabel')" prop="operateAddr">
<el-input v-model="formInfoBus.operateAddr"
:placeholder="$t('business.merchant.indexBus.operateAddrPlaceholder')"/>
<el-form-item :label="$t('business.merchant.indexBus.addr')" prop="contactAddress">
<el-cascader
v-model="formInfoBus.contactAddress"
:options="options_addr"
@change="handleChange"></el-cascader>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.contactAddress')" prop="contactAddress">
<el-input v-model="formInfoBus.contactAddress"
:placeholder="$t('business.userManager.userRegister.contactAddressPlaceholder')"/>
<el-form-item :label="$t('business.userManager.userInfo.detailAddr')" prop="detail">
<el-input v-model="formInfoBus.detail" :placeholder="$t('business.userManager.userInfo.addrPlaceholder')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -349,20 +308,18 @@
<el-form-item :label="$t('business.merchant.indexBus.merchantNameLabel')">
{{ formDetailBus.userInfoBusVo.merchantName }}
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.licenseLabel')">
{{ formDetailBus.userInfoBusVo.license }}
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.licenseOtherLabel')">
{{ formDetailBus.userInfoBusVo.licenseOther }}
<el-form-item :label="$t('business.userManager.userInfo.email')">
{{ formDetailBus.userInfoBusVo.email}}
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.legalPersonLabel')">
{{ formDetailBus.userInfoBusVo.legalPerson }}
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.operateStatusLabel')">
{{ formDetailBus.userInfoBusVo.operateStatus }}
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.operateAddrLabel')">
{{ formDetailBus.userInfoBusVo.operateAddr }}
<el-form-item :label="$t('business.merchant.indexBus.operateTypeLabel')">
<el-select v-model="formDetailBus.userInfoBusVo.operateType" disabled="disabled">
<el-option
v-for="item in options_operateType"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('business.merchant.indexBus.contactAddress')">
{{ formDetailBus.userInfoBusVo.contactAddress }}
@ -385,7 +342,8 @@ import {
addUserInfoBus,
resetUserPassword,
accountLock,
listUserRegisterBus
listUserRegisterBus,
getAddress
} from "@/api/business/userRegister";
export default {
@ -408,6 +366,8 @@ export default {
total: 0,
//
userRegisterList: [],
//
options_addr:[],
//
title: "",
//
@ -420,13 +380,61 @@ export default {
openInfo: false,
// -
openInfoBus: false,
options_operateStatus: [{
value: '存续',
label: this.$t('business.merchant.indexBus.operateStatusExist')
options_operateType: [{
value: '0',
label: this.$t('common.operateType.type0')
}, {
value: '注销',
label: this.$t('business.merchant.indexBus.operateStatusCancel')
}],
value: '1',
label: this.$t('common.operateType.type1')
},{
value: '2',
label: this.$t('common.operateType.type2')
},{
value: '3',
label: this.$t('common.operateType.type3')
},{
value: '4',
label: this.$t('common.operateType.type4')
},{
value: '5',
label: this.$t('common.operateType.type5')
},{
value: '6',
label: this.$t('common.operateType.type6')
},{
value: '7',
label: this.$t('common.operateType.type7')
},{
value: '8',
label: this.$t('common.operateType.type8')
},{
value: '9',
label: this.$t('common.operateType.type9')
},{
value: '10',
label: this.$t('common.operateType.type10')
},{
value: '11',
label: this.$t('common.operateType.type11')
},{
value: '12',
label: this.$t('common.operateType.type12')
},{
value: '13',
label: this.$t('common.operateType.type13')
},{
value: '14',
label: this.$t('common.operateType.type14')
},{
value: '15',
label: this.$t('common.operateType.type15')
},{
value: '16',
label: this.$t('common.operateType.type16')
},{
value: '17',
label: this.$t('common.operateType.type17')
},],
//
queryParams: {
pageNum: 1,
@ -467,11 +475,11 @@ export default {
userLevel: [
{required: true, message: this.$t('business.merchant.indexBus.userLevelRequired'), trigger: "change"}
],
legalPerson: [
{required: true, message: this.$t('business.merchant.indexBus.legalPersonRequired'), trigger: "blur"}
operateType: [
{required: true, message: this.$t('business.merchant.indexBus.operateTypeRequired'), trigger: "change"}
],
operateStatus: [
{required: true, message: this.$t('business.merchant.indexBus.operateStatusRequired'), trigger: "change"}
email: [
{ 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" }
],
operateAddr: [
{required: true, message: this.$t('business.merchant.indexBus.operateAddrRequired'), trigger: "blur"}
@ -512,6 +520,9 @@ export default {
contactAddress: [
{required: true, message: this.$t('business.merchant.indexBus.contactAddressRequired'), trigger: "blur"}
],
detail: [
{required: true, message: this.$t('business.merchant.indexBus.contactAddressRequired'), trigger: "blur"}
],
merchantName: [
{required: true, message: this.$t('business.merchant.indexBus.merchantNameRequired'), trigger: "blur"}
],
@ -534,11 +545,18 @@ export default {
},
created() {
this.getList();
this.getAddress();
},
methods: {
/** 查询用户注册列表 */
getList() {
this.loading = true;
const languageMap = {
'zh': 1,
'en': 2,
'la': 3
};
this.queryParams.language = languageMap[this.$i18n.locale] || null;
listUserRegisterBus(this.queryParams).then(response => {
this.userRegisterList = response.rows;
this.total = response.total;
@ -667,6 +685,7 @@ export default {
submitFormInfoBus() {
this.$refs["formInfoBus"].validate(valid => {
if (valid) {
this.formInfoBus.contactAddress = this.formInfoBus.contactAddress + "," + this.formInfoBus.detail;
addUserInfoBus(this.formInfoBus).then(response => {
this.$modal.msgSuccess(this.$t('common.promptMsg.addSuccess'));
this.openInfoBus = false;
@ -768,6 +787,17 @@ export default {
}).finally(() => {
this.loading = false;
});
},
/** 获取地址列表 */
getAddress() {
this.loading = true;
getAddress(this.$i18n.locale).then(response => {
this.options_addr = response.data;
});
},
/** 地址联动事件 **/
handleChange(value) {
this.formInfo.addr = value;
}
}
};

Loading…
Cancel
Save