Browse Source

添加代理商管理模块,同步修改用户账户和银行卡相关

main
daimenglei 1 month ago
parent
commit
6806668b35
  1. 53
      src/api/business/agentVerification.js
  2. 2
      src/api/business/merchantVerification.js
  3. 44
      src/api/business/userInfoAgent.js
  4. 17
      src/api/business/userRegister.js
  5. 458
      src/views/business/agentVerification/index.vue
  6. 187
      src/views/business/merchantVerification/index.vue
  7. 91
      src/views/business/userAccount/index.vue
  8. 71
      src/views/business/userCard/index.vue
  9. 296
      src/views/business/userInfoAgent/index.vue
  10. 634
      src/views/business/userRegister/indexAgent.vue
  11. 2
      vue.config.js

53
src/api/business/agentVerification.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询代理商认证列表
export function listAgentVerification(query) {
return request({
url: '/business/agentVerification/list',
method: 'get',
params: query
})
}
// 查询代理商认证详细
export function getAgentVerification(id) {
return request({
url: '/business/agentVerification/' + id,
method: 'get'
})
}
// 新增代理商认证
export function addAgentVerification(data) {
return request({
url: '/business/agentVerification',
method: 'post',
data: data
})
}
// 修改代理商认证
export function updateAgentVerification(data) {
return request({
url: '/business/agentVerification',
method: 'put',
data: data
})
}
// 删除代理商认证
export function delAgentVerification(id) {
return request({
url: '/business/agentVerification/' + id,
method: 'delete'
})
}
// 代理商实名认证
export function agentAudit(data) {
return request({
url: '/business/agentVerification/agentVerificationAudit' ,
method: 'post',
data:data
})
}

2
src/api/business/merchantVerification.js

@ -43,7 +43,7 @@ export function delMerchantVerification(id) {
})
}
// 实名认证不通过
// 实名认证
export function merchantAudit(data) {
return request({
url: '/business/merchantVerification/merchantVerificationAudit' ,

44
src/api/business/userInfoAgent.js

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询代理商信息列表
export function listUserInfoAgent(query) {
return request({
url: '/business/userInfoAgent/list',
method: 'get',
params: query
})
}
// 查询代理商信息详细
export function getUserInfoAgent(id) {
return request({
url: '/business/userInfoAgent/' + id,
method: 'get'
})
}
// 新增代理商信息
export function addUserInfoAgent(data) {
return request({
url: '/business/userInfoAgent',
method: 'post',
data: data
})
}
// 修改代理商信息
export function updateUserInfoAgent(data) {
return request({
url: '/business/userInfoAgent',
method: 'put',
data: data
})
}
// 删除代理商信息
export function delUserInfoAgent(id) {
return request({
url: '/business/userInfoAgent/' + id,
method: 'delete'
})
}

17
src/api/business/userRegister.js

@ -18,6 +18,15 @@ export function listUserRegisterBus(query) {
})
}
// 查询用户注册列表-代理商
export function listUserRegisterAgent(query) {
return request({
url: '/business/userRegister/listAgent',
method: 'get',
params: query
})
}
// 查询用户注册详细
export function getUserRegister(id) {
return request({
@ -63,6 +72,14 @@ export function addUserInfo(data) {
// 新增用户信息-商户扩展
export function addUserInfoBus(data) {
return request({
url: '/business/userInfoAgent',
method: 'post',
data: data
})
}
// 新增用户信息-代理商扩展
export function addUserInfoAgen(data) {
return request({
url: '/business/userInfoBus',
method: 'post',

458
src/views/business/agentVerification/index.vue

@ -0,0 +1,458 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="登录账号" prop="userAccount">
<el-input
v-model="queryParams.userAccount"
placeholder="请输入登录账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="代理名称" prop="agentName">
<el-input
v-model="queryParams.agentName"
placeholder="请输入代理商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="身份证号" prop="legalPersonIdCard">
<el-input
v-model="queryParams.legalPersonIdCard"
placeholder="请输入法人身份证号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.button.search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.button.reset') }}</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['business:agentVerification:export']"
>{{ $t('common.button.export') }}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="merchantVerificationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="登录账号" align="center" prop="userAccount"/>
<el-table-column label="代理商名称" align="center" prop="agentName"/>
<el-table-column label="营业执照" align="center" prop="businessLicenseNumber"/>
<el-table-column label="法人姓名" align="center" prop="legalPersonInfoName"/>
<el-table-column label="法人身份证" align="center" prop="legalPersonIdCard"/>
<el-table-column label="认证状态" align="center" prop="status">
<template slot-scope="scope">
<el-tag type="primary" v-if="scope.row.status == '0' || scope.row.status == null">未认证</el-tag>
<el-tag type="success" v-if="scope.row.status == '1'">认证通过</el-tag>
<el-tag type="danger" v-if="scope.row.status == '2'">认证失败</el-tag>
<el-tag type="warning" v-if="scope.row.status == '3'">待审核</el-tag>
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" prop="authenticationDate" width="180"/>
<el-table-column label="失败原因" align="center" prop="failureReason"/>
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="(scope.row.status == null || scope.row.status == '2')"
size="mini"
type="text"
icon="el-icon-document-add"
@click="handleAdd(scope.row)"
>认证</el-button>
<el-button v-if="(scope.row.status == 1)"
size="mini"
type="text"
icon="el-icon-view"
@click="handleDetail(scope.row)"
>详情</el-button>
<el-button v-if="(scope.row.status == 3)"
size="mini"
type="text"
icon="el-icon-view"
@click="handleAudit(scope.row)"
>审核</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改商户认证信息对话框 -->
<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-item label="代理商名称" prop="agentName">
<el-input v-model="form.agentName" placeholder="请输入商户名称"/>
</el-form-item>
<el-form-item label="营业执照" prop="businessLicenseNumber">
<el-input v-model="form.businessLicenseNumber" placeholder="请输入营业执照号"/>
</el-form-item>
<el-form-item label="法人姓名" prop="legalPersonName">
<el-input v-model="form.legalPersonName" placeholder="请输入法人姓名"/>
</el-form-item>
<el-form-item label="身份证" prop="legalPersonIdCard">
<el-input v-model="form.legalPersonIdCard" placeholder="请输入法人身份证"/>
</el-form-item>
<el-form-item label="电子合同" prop="electronicContract">
<el-input v-model="form.electronicContract" placeholder="请上传电子合同"/>
</el-form-item>
<el-form-item label="保证金缴纳证明" prop="earnestMoney">
<el-input v-model="form.earnestMoney" placeholder="请上传保证金缴纳证明"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">{{ $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="auditOpen" width="700px" append-to-body>
<el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="auto">
<el-form-item label="注册代理商名称:">
{{auditForm.agentInfoName}}
</el-form-item>
<el-form-item label="认证代理名称:">
{{auditForm.agentName}}
</el-form-item>
<el-form-item label="注册法人名称:">
{{auditForm.legalPersonInfoName}}
</el-form-item>
<el-form-item label="认证法人名称:">
{{auditForm.legalPersonName}}
</el-form-item>
<el-form-item label="法人身份证号:">
{{auditForm.legalPersonIdCardShow}}
</el-form-item>
<el-form-item label="营业执照:">
{{auditForm.businessLicenseNumber}}
</el-form-item>
<el-form-item label="认证失败原因:" prop="failureReason">
<el-input v-model="auditForm.failureReason" placeholder="请输入认证失败原因" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="success" @click="submitPass"> </el-button>
<el-button :loading="buttonLoading" type="danger" @click="submitRefuse"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 商户认证信息详情 -->
<el-dialog :title="title" :visible.sync="detailOpen" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="auto">
<el-form-item label="代理商名称:">
{{ form.agentName }}
</el-form-item>
<el-form-item label="营业执照号:">
{{ form.businessLicenseNumber }}
</el-form-item>
<el-form-item label="法人姓名:">
{{ form.legalPersonName }}
</el-form-item>
<el-form-item label="法人身份证:">
{{ form.legalPersonIdCard }}
</el-form-item>
<el-form-item label="电子合同:">
{{ form.electronicContract }}
</el-form-item>
<el-form-item label="保证金缴纳证明:">
{{ form.earnestMoney }}
</el-form-item>
<el-form-item label="审核时间:" prop="authenticationDate">
{{ form.authenticationDate }}
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">{{$t('common.button.cancel')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listAgentVerification,
getAgentVerification,
delAgentVerification,
addAgentVerification,
updateAgentVerification,
agentAudit
} from "@/api/business/agentVerification";
export default {
name: "AgentVerification",
data() {
return {
// loading
buttonLoading: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
merchantVerificationList: [],
//
title: "",
//
open: false,
//
detailOpen: false,
//
auditOpen: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
merchantName: undefined,
businessLicenseNumber: undefined,
legalPersonName: undefined,
legalPersonIdCard: undefined,
contactPersonName: undefined,
contactPersonPhone: undefined,
contactPersonEmail: undefined,
businessLicenseImage: undefined,
legalPersonIdCardImage: undefined,
bankAccountNumber: undefined,
bankName: undefined,
status: undefined,
authenticationDate: undefined,
failureReason: undefined,
},
//
form: {},
//
auditForm: {},
//
rules: {
agentName: [
{ required: true, message: "代理商名称不能为空", trigger: "blur" }
],
legalPersonName: [
{ required: true, message: "法人姓名不能为空", trigger: "blur" }
],
electronicContract: [
{ required: true, message: "电子合同不能为空", trigger: "blur" }
],
earnestMoney: [
{ required: true, message: "保证金缴纳证明不能为空", trigger: "blur" }
],
legalPersonIdCard: [
{ required: true,pattern: /^\d+$/, message: "身份证号只能为数字", trigger: "blur" }
],
failureReason: [
{ }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询商户认证信息列表 */
getList() {
this.loading = true;
listAgentVerification(this.queryParams).then(response => {
this.merchantVerificationList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.detailOpen = false;
this.auditOpen = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
merchantName: undefined,
businessLicenseNumber: undefined,
legalPersonName: undefined,
legalPersonIdCard: undefined,
contactPersonName: undefined,
contactPersonPhone: undefined,
contactPersonEmail: undefined,
businessLicenseImage: undefined,
legalPersonIdCardImage: undefined,
bankAccountNumber: undefined,
bankName: undefined,
status: undefined,
authenticationDate: undefined,
failureReason: undefined,
createTime: undefined,
updateTime: undefined,
createBy: undefined,
updateBy: undefined,
delFlag: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd(row) {
if (row.id != null){
this.form = row;
this.open = true;
this.title = "商户认证";
}else {
this.form.userId = row.userId;
this.open = true;
this.title = "商户认证";
}
},
/** 详情按钮操作 */
handleDetail(row) {
this.reset();
this.form = row;
this.detailOpen = true;
this.title = "商户认证信息";
},
/** 审核按钮操作 */
handleAudit(row){
this.reset();
this.auditForm = row;
this.auditOpen = true;
this.title = "商户认证审核";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getAgentVerification(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改商户认证信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateAgentVerification(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addAgentVerification(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除商户认证信息编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delAgentVerification(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('business/agentVerification/export', {
...this.queryParams
}, `merchantVerification_${new Date().getTime()}.xlsx`)
},
/** 审核拒绝*/
submitRefuse() {
this.rules.failureReason = [
{ required: true, message: '拒绝原因不能为空!', trigger: 'blur' }
];
this.$refs["auditForm"].validate(valid => {
if (valid) {
this.$modal.confirm('是否【拒绝】商户"' + this.auditForm.agentName + '"的认证申请?').then(() => {
this.buttonLoading = true;
this.auditForm.status = "2";
agentAudit(this.auditForm).then(response => {
this.$modal.msgSuccess("审核结果:拒绝");
this.auditOpen = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
})
}
});
},
/** 审核通过*/
submitPass() {
this.buttonLoading = true;
this.auditForm.status = "1";
this.$refs["auditForm"].clearValidate("failureReason");
this.$modal.confirm('是否【通过】商户"' + this.auditForm.agentName + '"的认证申请?').then(() => {
agentAudit(this.auditForm).then(response => {
this.$modal.msgSuccess("审核结果:通过");
this.auditOpen = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
})
}
}
};
</script>

187
src/views/business/merchantVerification/index.vue

@ -1,26 +1,26 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('business.merchant.merchantVerification.loginAccount')" prop="account">
<el-form-item label="登录账号" prop="account">
<el-input
v-model="queryParams.account"
:placeholder="$t('business.merchant.merchantVerification.inputLoginAccount')"
placeholder="请输入登录账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.merchantName')" prop="merchantName">
<el-form-item label="商户名称" prop="merchantName">
<el-input
v-model="queryParams.merchantName"
:placeholder="$t('business.merchant.merchantVerification.inputMerchantName')"
placeholder="请输入商户名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.idCard')" prop="legalPersonIdCard">
<el-form-item label="身份证号" prop="legalPersonIdCard">
<el-input
v-model="queryParams.legalPersonIdCard"
:placeholder="$t('business.merchant.merchantVerification.inputLegalPersonIdCard')"
placeholder="请输入法人身份证号"
clearable
@keyup.enter.native="handleQuery"
/>
@ -48,41 +48,41 @@
<el-table v-loading="loading" :data="merchantVerificationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column :label="$t('business.merchant.merchantVerification.loginAccount')" align="center" prop="userAccount"/>
<el-table-column :label="$t('business.merchant.merchantVerification.merchantName')" align="center" prop="merchantInfoName"/>
<el-table-column :label="$t('business.merchant.merchantVerification.businessLicense')" align="center" prop="businessLicenseNumber"/>
<el-table-column :label="$t('business.merchant.merchantVerification.legalPersonName')" align="center" prop="legalPersonInfoName"/>
<el-table-column :label="$t('business.merchant.merchantVerification.legalPersonIdCard')" align="center" prop="legalPersonIdCard"/>
<el-table-column :label="$t('business.merchant.merchantVerification.authStatus')" align="center" prop="status">
<el-table-column label="登录账号" align="center" prop="userAccount"/>
<el-table-column label="商户名称" align="center" prop="merchantInfoName"/>
<el-table-column label="营业执照" align="center" prop="businessLicenseNumber"/>
<el-table-column label="法人姓名" align="center" prop="legalPersonInfoName"/>
<el-table-column label="法人身份证" align="center" prop="legalPersonIdCard"/>
<el-table-column label="认证状态" align="center" prop="status">
<template slot-scope="scope">
<el-tag type="primary" v-if="scope.row.status == '0' || scope.row.status == null">{{$t('business.merchant.merchantVerification.unauth')}}</el-tag>
<el-tag type="success" v-if="scope.row.status == '1'">{{$t('business.merchant.merchantVerification.authPass')}}</el-tag>
<el-tag type="danger" v-if="scope.row.status == '2'">{{$t('business.merchant.merchantVerification.authFail')}}</el-tag>
<el-tag type="warning" v-if="scope.row.status == '3'">{{$t('business.merchant.merchantVerification.authPending')}}</el-tag>
<el-tag type="primary" v-if="scope.row.status == '0' || scope.row.status == null">未认证</el-tag>
<el-tag type="success" v-if="scope.row.status == '1'">认证通过</el-tag>
<el-tag type="danger" v-if="scope.row.status == '2'">认证失败</el-tag>
<el-tag type="warning" v-if="scope.row.status == '3'">待审核</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('business.merchant.merchantVerification.authTime')" align="center" prop="authenticationDate" width="180"/>
<el-table-column :label="$t('business.merchant.merchantVerification.failReason')" align="center" prop="failureReason"/>
<el-table-column :label="$t('common.operation')" align="center" width="200" class-name="small-padding fixed-width">
<el-table-column label="审核时间" align="center" prop="authenticationDate" width="180"/>
<el-table-column label="失败原因" align="center" prop="failureReason"/>
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="(scope.row.status == null || scope.row.status == '2')"
size="mini"
type="text"
icon="el-icon-document-add"
@click="handleAdd(scope.row)"
>{{$t('business.merchant.merchantVerification.auth')}}</el-button>
>认证</el-button>
<el-button v-if="(scope.row.status == 1)"
size="mini"
type="text"
icon="el-icon-view"
@click="handleDetail(scope.row)"
>{{$t('common.button.detail')}}</el-button>
>详情</el-button>
<el-button v-if="(scope.row.status == 3)"
size="mini"
type="text"
icon="el-icon-view"
@click="handleAudit(scope.row)"
>{{$t('business.merchant.merchantVerification.audit')}}</el-button>
>审核</el-button>
</template>
</el-table-column>
</el-table>
@ -98,99 +98,74 @@
<!-- 添加或修改商户认证信息对话框 -->
<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-item :label="$t('business.merchant.merchantVerification.merchantName')" prop="merchantName">
<el-input v-model="form.merchantName" :placeholder="$t('business.merchant.merchantVerification.inputMerchantName')"/>
<el-form-item label="商户名称" prop="merchantName">
<el-input v-model="form.merchantName" placeholder="请输入商户名称"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.businessLicense')" prop="businessLicenseNumber">
<el-input v-model="form.businessLicenseNumber" :placeholder="$t('business.merchant.merchantVerification.inputBusinessLicenseNumber')"/>
<el-form-item label="营业执照" prop="businessLicenseNumber">
<el-input v-model="form.businessLicenseNumber" placeholder="请输入营业执照号"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.legalPersonName')" prop="legalPersonName">
<el-input v-model="form.legalPersonName" :placeholder="$t('business.merchant.merchantVerification.inputLegalPersonName')"/>
<el-form-item label="法人姓名" prop="legalPersonName">
<el-input v-model="form.legalPersonName" placeholder="请输入法人姓名"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.legalPersonIdCard')" prop="legalPersonIdCard">
<el-input v-model="form.legalPersonIdCard" :placeholder="$t('business.merchant.merchantVerification.inputLegalPersonIdCard')"/>
<el-form-item label="身份证" prop="legalPersonIdCard">
<el-input v-model="form.legalPersonIdCard" placeholder="请输入法人身份证"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">{{ $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="auditOpen" width="700px" append-to-body>
<el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="auto">
<el-form-item :label="$t('business.merchant.merchantVerification.registeredMerchantName') + ':'">
<el-form-item label="注册商企名称:">
{{auditForm.merchantInfoName}}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.authMerchantName') + ':'">
<el-form-item label="认证商企名称:">
{{auditForm.merchantName}}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.registeredLegalPersonName') + ':'">
<el-form-item label="注册法人名称:">
{{auditForm.legalPersonInfoName}}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.authLegalPersonName') + ':'">
<el-form-item label="认证法人名称:">
{{auditForm.legalPersonName}}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.legalPersonIdCard') + ':'">
<el-form-item label="法人身份证号:">
{{auditForm.legalPersonIdCardShow}}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.businessLicense') + ':'">
<el-form-item label="营业执照:">
{{auditForm.businessLicenseNumber}}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.failReason') + ':'" prop="failureReason">
<el-input v-model="auditForm.failureReason" :placeholder="$t('business.merchant.merchantVerification.inputFailReason')" />
<el-form-item label="认证失败原因:" prop="failureReason">
<el-input v-model="auditForm.failureReason" placeholder="请输入认证失败原因" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="success" @click="submitPass">{{$t('business.merchant.merchantVerification.pass')}}</el-button>
<el-button :loading="buttonLoading" type="danger" @click="submitRefuse">{{$t('business.merchant.merchantVerification.refuse')}}</el-button>
<el-button @click="cancel">{{$t('common.button.cancel')}}</el-button>
<el-button :loading="buttonLoading" type="success" @click="submitPass"> </el-button>
<el-button :loading="buttonLoading" type="danger" @click="submitRefuse"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 商户认证信息详情 -->
<el-dialog :title="title" :visible.sync="detailOpen" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="auto">
<el-form-item :label="$t('business.merchant.merchantVerification.merchantName') + ':'">
<el-form-item label="商户名称:">
{{ form.merchantName }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.businessLicenseNumber') + ':'">
<el-form-item label="营业执照号:">
{{ form.businessLicenseNumber }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.legalPersonName') + ':'">
<el-form-item label="法人姓名:">
{{ form.legalPersonName }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.legalPersonIdCard') + ':'">
<el-form-item label="法人身份证:">
{{ form.legalPersonIdCard }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.contactPersonName') + ':'">
{{ form.contactPersonName }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.contactPersonPhone') + ':'">
{{ form.contactPersonPhone }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.contactPersonEmail') + ':'">
{{ form.contactPersonEmail }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.businessLicenseImage')" prop="businessLicenseImage">
<image-upload v-model="form.businessLicenseImage"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.legalPersonIdCardImage')" prop="legalPersonIdCardImage">
<image-upload v-model="form.legalPersonIdCardImage"/>
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.bankAccountNumber') + ':'">
{{ form.bankAccountNumber }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.bankName') + ':'">
{{ form.bankName }}
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.authTime')" prop="authenticationDate">
<el-date-picker clearable
v-model="form.authenticationDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:placeholder="$t('business.merchant.merchantVerification.selectAuthTime')">
</el-date-picker>
</el-form-item>
<el-form-item :label="$t('business.merchant.merchantVerification.failReason') + ':'">
{{ form.failureReason }}
<el-form-item label="审核时间:" prop="authenticationDate">
{{ form.authenticationDate }}
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -264,16 +239,16 @@ export default {
//
rules: {
merchantName: [
{ required: true, message: this.$t('business.merchant.merchantVerification.merchantNameRequired'), trigger: "blur" }
{ required: true, message: "商户名称不能为空", trigger: "blur" }
],
legalPersonName: [
{ required: true, message: this.$t('business.merchant.merchantVerification.legalPersonNameRequired'), trigger: "blur" }
{ required: true, message: "法人姓名不能为空", trigger: "blur" }
],
legalPersonIdCard: [
{ required: true, pattern: /^\d+$/, message: this.$t('business.merchant.merchantVerification.idCardNumberOnly'), trigger: "blur" }
{ required: true,pattern: /^\d+$/, message: "身份证号只能为数字", trigger: "blur" }
],
failureReason: [
{ }
{ }
],
}
};
@ -345,11 +320,11 @@ export default {
if (row.id != null){
this.form = row;
this.open = true;
this.title = this.$t('business.merchant.merchantVerification.merchantAuth');
this.title = "商户认证";
}else {
this.form.userId = row.userId;
this.open = true;
this.title = this.$t('business.merchant.merchantVerification.merchantAuth');
this.title = "商户认证";
}
},
/** 详情按钮操作 */
@ -357,14 +332,14 @@ export default {
this.reset();
this.form = row;
this.detailOpen = true;
this.title = this.$t('business.merchant.merchantVerification.merchantAuthInfo');
this.title = "商户认证信息";
},
/** 审核按钮操作 */
handleAudit(row){
this.reset();
this.auditForm = row;
this.auditOpen = true;
this.title = this.$t('business.merchant.merchantVerification.merchantAuthAudit');
this.title = "商户认证审核";
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -406,13 +381,13 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm(this.$t('business.merchant.merchantVerification.confirmDelete', { ids: ids })).then(() => {
this.$modal.confirm('是否确认删除商户认证信息编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delMerchantVerification(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess(this.$t('common.deleteSuccess'));
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
@ -427,20 +402,20 @@ export default {
/** 审核拒绝*/
submitRefuse() {
this.rules.failureReason = [
{ required: true, message: this.$t('business.merchant.merchantVerification.failReasonRequired'), trigger: 'blur' }
];
{ required: true, message: '拒绝原因不能为空!', trigger: 'blur' }
];
this.$refs["auditForm"].validate(valid => {
if (valid) {
this.$modal.confirm(this.$t('business.merchant.merchantVerification.confirmRefuse', { merchantName: this.auditForm.merchantName })).then(() => {
this.buttonLoading = true;
this.auditForm.status = "2";
merchantAudit(this.auditForm).then(response => {
this.$modal.msgSuccess(this.$t('business.merchant.merchantVerification.auditResultRefuse'));
this.auditOpen = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
this.$modal.confirm('是否【拒绝】商户"' + this.auditForm.merchantName + '"的认证申请?').then(() => {
this.buttonLoading = true;
this.auditForm.status = "2";
merchantAudit(this.auditForm).then(response => {
this.$modal.msgSuccess("审核结果:拒绝");
this.auditOpen = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
})
}
});
@ -450,14 +425,14 @@ export default {
this.buttonLoading = true;
this.auditForm.status = "1";
this.$refs["auditForm"].clearValidate("failureReason");
this.$modal.confirm(this.$t('business.merchant.merchantVerification.confirmPass', { merchantName: this.auditForm.merchantName })).then(() => {
merchantAudit(this.auditForm).then(response => {
this.$modal.msgSuccess(this.$t('business.merchant.merchantVerification.auditResultPass'));
this.auditOpen = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
this.$modal.confirm('是否【通过】商户"' + this.auditForm.merchantName + '"的认证申请?').then(() => {
merchantAudit(this.auditForm).then(response => {
this.$modal.msgSuccess("审核结果:通过");
this.auditOpen = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
})
}
}

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

@ -1,12 +1,12 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('business.supplementaryInfo.userAccount.accountCode')" prop="accountCode">
<el-input v-model="queryParams.accountCode" :placeholder="$t('business.supplementaryInfo.userAccount.inputAccountCode')"
<el-form-item :label="$t('business.userAccount.accountCode')" prop="accountCode">
<el-input v-model="queryParams.accountCode" :placeholder="$t('business.userAccount.inputAccountCode')"
clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userAccount.accountType')" prop="accountType">
<el-select v-model="queryParams.accountType" size="medium" :placeholder="$t('business.supplementaryInfo.userAccount.selectAccountType')">
<el-form-item label="账户类型" prop="accountType">
<el-select v-model="queryParams.accountType" size="medium" placeholder="请选择账户类型">
<el-option
v-for="item in options_accountType"
:key="item.value"
@ -15,8 +15,8 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userAccount.accountStatus')" prop="status">
<el-select v-model="queryParams.status" size="medium" :placeholder="$t('business.supplementaryInfo.userAccount.selectAccountStatus')">
<el-form-item label="账户状态" prop="status">
<el-select v-model="queryParams.status" size="medium" placeholder="请选择账户状态">
<el-option
v-for="item in options_accountStatus"
:key="item.value"
@ -50,43 +50,45 @@
<el-table v-loading="loading" :data="userAccountList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column :label="$t('business.supplementaryInfo.userAccount.userName')" align="center">
<el-table-column label="用户名称" align="center">
<template #default="scope">
<span v-if="scope.row.userType == 0">{{ scope.row.userInfoName }}</span>
<span v-if="scope.row.userType == 1">{{ scope.row.merchantName }}</span>
<span v-if="scope.row.userType == 2">{{ scope.row.agentName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('business.supplementaryInfo.userAccount.accountCode')" align="center" prop="accountCode"/>
<el-table-column :label="$t('business.supplementaryInfo.userAccount.accountName')" align="center" prop="accountName"/>
<el-table-column :label="$t('business.userAccount.accountCode')" align="center" prop="accountCode"/>
<el-table-column :label="$t('business.userAccount.accountName')" align="center" prop="accountName"/>
<el-table-column
:label="$t('business.supplementaryInfo.userAccount.accountAmount')"
:label="$t('business.userAccount.accountAmount')"
prop="accountAmount"
:formatter="formatCurrency">
</el-table-column>
<el-table-column :label="$t('business.supplementaryInfo.userAccount.accountType')" align="center" prop="accountType">
<el-table-column label="账户类型" align="center" prop="accountType">
<template slot-scope="scope">
<el-tag v-if="scope.row.accountType == 0">{{ $t('business.supplementaryInfo.userAccount.accountTypeNormal') }}</el-tag>
<el-tag type="warning" v-if="scope.row.accountType == 1">{{ $t('business.supplementaryInfo.userAccount.accountTypeEnterprise') }}</el-tag>
<el-tag v-if="scope.row.accountType == 0">普通账户</el-tag>
<el-tag type="warning" v-if="scope.row.accountType == 1">商企账户</el-tag>
<el-tag type="success" v-if="scope.row.accountType == 2">代理账户</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('business.supplementaryInfo.userAccount.accountLevel')" align="center" prop="isPrimary">
<el-table-column label="账户级别" align="center" prop="isPrimary">
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.isPrimary == 0">{{ $t('business.supplementaryInfo.userAccount.accountLevelPrimary') }}</el-tag>
<el-tag v-if="scope.row.isPrimary == 1">{{ $t('business.supplementaryInfo.userAccount.accountLevelSub') }}</el-tag>
<el-tag type="warning" v-if="scope.row.isPrimary == 0">主账户</el-tag>
<el-tag v-if="scope.row.isPrimary == 1">子账户</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('business.supplementaryInfo.userAccount.status')" align="center" prop="status">
<el-table-column :label="$t('business.userAccount.status')" align="center" prop="status">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status == 0">{{ $t('business.supplementaryInfo.userAccount.statusNormal') }}</el-tag>
<el-tag type="danger" v-if="scope.row.status == 1">{{ $t('business.supplementaryInfo.userAccount.statusFrozen') }}</el-tag>
<el-tag type="success" v-if="scope.row.status == 0">{{ $t('business.userAccount.statusNormal') }}</el-tag>
<el-tag type="danger" v-if="scope.row.status == 1">{{ $t('business.userAccount.statusFrozen') }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('common.tableMsg.operation')" align="center" width="200"
<el-table-column :label="$t('common.button.operation')" align="center" width="200"
class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)"
v-if="(scope.row.id == null)"
v-hasPermi="['business:userAccount:edit']">{{ $t('common.button.create') }}
v-hasPermi="['business:userAccount:edit']">创建
</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-if="(scope.row.id != null)"
@ -94,11 +96,11 @@
</el-button>
<el-button size="mini" type="text" icon="el-icon-lock" @click="accountLock(scope.row)"
v-if="(scope.row.id != null && scope.row.status == 0)"
v-hasPermi="['business:userAccount:remove']">{{ $t('business.common.accountFreezing') }}
v-hasPermi="['business:userAccount:remove']">冻结
</el-button>
<el-button size="mini" type="text" icon="el-icon-lock" @click="accountUnlock(scope.row)"
v-if="(scope.row.id != null && scope.row.status == 1)"
v-hasPermi="['business:userAccount:remove']">{{ $t('business.common.accountUnfreezing') }}
v-hasPermi="['business:userAccount:remove']">解冻
</el-button>
</template>
</el-table-column>
@ -107,13 +109,14 @@
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 添加或修改用户账户对话框 -->
<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-item :label="$t('business.supplementaryInfo.userAccount.detailAccountName')" prop="accountName">
<el-input v-model="form.accountName" :placeholder="$t('business.supplementaryInfo.userAccount.inputAccountName')"/>
<el-form-item :label="$t('business.userAccount.detailAccountName')" prop="accountName">
<el-input v-model="form.accountName" :placeholder="$t('business.userAccount.inputAccountName')"/>
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userAccount.accountLevel')" prop="isPrimary">
<el-select v-model="form.isPrimary" :placeholder="$t('business.supplementaryInfo.userAccount.selectAccountLevel')">
<el-form-item label="账户级别" prop="isPrimary">
<el-select v-model="form.isPrimary" placeholder="请选择账户级别">
<el-option
v-for="item in options_accountLevel"
:key="item.value"
@ -132,16 +135,16 @@
</div>
</el-dialog>
<!-- {{ $t('business.supplementaryInfo.userAccount.detailDialogTitle') }} -->
<!-- 用户账户详情显示框 -->
<el-dialog :title="title" :visible.sync="detailOpen" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="auto">
<el-form-item :label="$t('business.supplementaryInfo.userAccount.detailAccountCodeLabel')">
<el-form-item :label="$t('business.userAccount.detailAccountCodeLabel')">
{{ form.accountCode }}
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userAccount.detailAccountNameLabel')">
<el-form-item :label="$t('business.userAccount.detailAccountNameLabel')">
{{ form.accountName }}
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userAccount.detailAccountAmountLabel')">
<el-form-item :label="$t('business.userAccount.detailAccountAmountLabel')">
{{ form.accountAmount }}
</el-form-item>
</el-form>
@ -211,24 +214,24 @@ export default {
rules: {},
options_accountLevel: [{
value: "0",
label: this.$t('business.supplementaryInfo.userAccount.accountLevelPrimary')
label: '主账户'
}, {
value: "1",
label: this.$t('business.supplementaryInfo.userAccount.accountLevelSub')
label: '子账户'
}],
options_accountType: [{
value: 0,
label: this.$t('business.supplementaryInfo.userAccount.accountTypeNormal')
label: '普通账户'
}, {
value: 1,
label: this.$t('business.supplementaryInfo.userAccount.accountTypeEnterprise')
label: '企业账户'
}],
options_accountStatus: [{
value: 0,
label: this.$t('business.supplementaryInfo.userAccount.statusNormal')
label: '正常'
}, {
value: 1,
label: this.$t('business.supplementaryInfo.userAccount.statusFrozen')
label: '冻结'
}],
};
},
@ -301,14 +304,14 @@ export default {
this.reset();
this.form = row;
this.open = true;
this.title = this.$t('business.supplementaryInfo.userAccount.addTitle');
this.title = this.$t('business.userAccount.addTitle');
},
/** 详情按钮操作 */
handleDetail(row) {
this.reset();
this.form = row;
this.detailOpen = true;
this.title = this.$t('business.supplementaryInfo.userAccount.detailTitle');
this.title = this.$t('business.userAccount.detailTitle');
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -319,7 +322,7 @@ export default {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = this.$t('business.supplementaryInfo.userAccount.editTitle');
this.title = this.$t('business.userAccount.editTitle');
});
},
/** 提交按钮 */
@ -349,14 +352,14 @@ export default {
},
/** 冻结按钮操作 */
accountLock(row) {
this.$modal.confirm(this.$t('business.supplementaryInfo.userAccount.confirmLockAccount', { accountName: row.accountName })).then(() => {
this.$modal.confirm('是否要对账户”' + row.accountName + '“进行冻结?').then(() => {
this.loading = true;
row.status = 1;
return lockAccount(row);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess(this.$t('business.supplementaryInfo.userAccount.accountLocked', { accountName: row.accountName }));
this.$modal.msgSuccess('账户“' + row.accountName + '”已冻结!');
}).catch(() => {
}).finally(() => {
this.loading = false;
@ -364,14 +367,14 @@ export default {
},
/**解冻按钮操作**/
accountUnlock(row) {
this.$modal.confirm(this.$t('business.supplementaryInfo.userAccount.confirmUnlockAccount', { accountName: row.accountName })).then(() => {
this.$modal.confirm('是否解除账户”' + row.accountName + '“的冻结状态?').then(() => {
this.loading = true;
row.status = 0;
return lockAccount(row);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess(this.$t('business.supplementaryInfo.userAccount.accountUnlocked', { accountName: row.accountName }));
this.$modal.msgSuccess('已解除对账户“' + row.accountName + '”的冻结状态!');
}).catch(() => {
}).finally(() => {
this.loading = false;

71
src/views/business/userCard/index.vue

@ -1,18 +1,18 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('business.supplementaryInfo.userCard.cardNum')" prop="cardNum">
<el-form-item label="银行卡号" prop="cardNum">
<el-input
v-model="queryParams.cardNum"
:placeholder="$t('business.supplementaryInfo.userCard.cardNumPlaceholder')"
placeholder="请输入银行卡号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userCard.userAccount')" prop="userAccount">
<el-form-item label="登录账号" prop="userAccount">
<el-input
v-model="queryParams.userAccount"
:placeholder="$t('business.supplementaryInfo.userCard.userAccountPlaceholder')"
placeholder="请输入登录账号"
clearable
@keyup.enter.native="handleQuery"
/>
@ -71,29 +71,32 @@
<el-table v-loading="loading" :data="userCardList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('business.supplementaryInfo.userCard.userAccount')" align="center" prop="userAccount" />
<el-table-column :label="$t('business.supplementaryInfo.userCard.userName')" align="center">
<el-table-column label="登录账号" align="center" prop="userAccount" />
<el-table-column label="用户名称" align="center">
<template #default="scope">
<span v-if="scope.row.userType == 0">{{ scope.row.userInfoName }}</span>
<span v-if="scope.row.userType == 1">{{ scope.row.merchantName }}</span>
<span v-if="scope.row.userType == 2">{{ scope.row.agentName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('business.supplementaryInfo.userCard.idCard')" align="center">
<el-table-column label="身份证号" align="center">
<template #default="scope">
<span v-if="scope.row.userType == 0">{{ scope.row.idCard }}</span>
<span v-if="scope.row.userType == 1">{{ scope.row.lpIdCard }}</span>
<span v-if="scope.row.userType == 2">{{ scope.row.agentIdCard }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('business.supplementaryInfo.userCard.userType')" align="center" prop="userType" >
<el-table-column label="用户类型" align="center" prop="userType" >
<template slot-scope="scope">
<el-tag v-if="scope.row.userType == 0">{{ $t('business.supplementaryInfo.userCard.userTypeNormal') }}</el-tag>
<el-tag type="warning" v-if="scope.row.userType == 1">{{ $t('business.supplementaryInfo.userCard.userTypeMerchant') }}</el-tag>
<el-tag v-if="scope.row.userType == 0">普通账户</el-tag>
<el-tag type="warning" v-if="scope.row.userType == 1">商企账户</el-tag>
<el-tag type="success" v-if="scope.row.userType == 2">代理账户</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('business.supplementaryInfo.userCard.cardNum')" align="center" prop="cardNum" />
<el-table-column :label="$t('business.supplementaryInfo.userCard.bankName')" align="center" prop="bankName" />
<el-table-column :label="$t('business.supplementaryInfo.userCard.deptName')" align="center" prop="deptName" />
<el-table-column :label="$t('business.supplementaryInfo.userCard.operations')" align="center" width="200" class-name="small-padding fixed-width">
<el-table-column label="银行卡号" align="center" prop="cardNum" />
<el-table-column label="银行名称" align="center" prop="bankName" />
<el-table-column label="具体分行" align="center" prop="deptName" />
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -121,20 +124,20 @@
@pagination="getList"
/>
<!-- {{ $t('business.supplementaryInfo.userCard.dialogTitle') }} -->
<!-- 添加或修改用户银行卡对话框 -->
<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-item :label="$t('business.supplementaryInfo.userCard.account')" prop="userAccount">
<el-input v-model="form.userAccount" :placeholder="$t('business.supplementaryInfo.userCard.accountPlaceholder')" />
<el-form-item label="所属账号" prop="userAccount">
<el-input v-model="form.userAccount" placeholder="请输入银行卡所属账号" />
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userCard.cardNum')" prop="cardNum">
<el-input v-model="form.cardNum" :placeholder="$t('business.supplementaryInfo.userCard.cardNumPlaceholder')" />
<el-form-item label="银行卡号" prop="cardNum">
<el-input v-model="form.cardNum" placeholder="请输入银行卡号" />
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userCard.bankName')" prop="bankName">
<el-input v-model="form.bankName" :placeholder="$t('business.supplementaryInfo.userCard.bankNamePlaceholder')" />
<el-form-item label="银行名称" prop="bankName">
<el-input v-model="form.bankName" placeholder="请输入银行名称" />
</el-form-item>
<el-form-item :label="$t('business.supplementaryInfo.userCard.deptName')" prop="deptName">
<el-input v-model="form.deptName" :placeholder="$t('business.supplementaryInfo.userCard.deptNamePlaceholder')" />
<el-form-item label="具体分行" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入具体分行" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -191,16 +194,16 @@ export default {
//
rules: {
userAccount: [
{ required: true, message: this.$t('business.supplementaryInfo.userCard.accountRequired'), trigger: "blur" }
{ required: true, message: "银行卡所属账号不能为空", trigger: "blur" }
],
cardNum: [
{ required: true,pattern: /^\d+$/, message: this.$t('business.supplementaryInfo.userCard.cardNumPattern'), trigger: "blur" }
{ required: true,pattern: /^\d+$/, message: "银行卡号只能为数字", trigger: "blur" }
],
bankName: [
{ required: true, message: this.$t('business.supplementaryInfo.userCard.bankNameRequired'), trigger: "blur" }
{ required: true, message: "银行名称不能为空", trigger: "blur" }
],
deptName: [
{ required: true, message: this.$t('business.supplementaryInfo.userCard.deptNameRequired'), trigger: "blur" }
{ required: true, message: "分行名称不能为空", trigger: "blur" }
],
}
};
@ -263,14 +266,14 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = this.$t('business.supplementaryInfo.userCard.addTitle');
this.title = "添加用户银行卡";
},
/** 详情按钮操作 */
handleDetail(row){
this.reset();
this.form = row;
this.detailOpen = true;
this.title = this.$t('business.supplementaryInfo.userCard.detailTitle');
this.title = "用户银行卡";
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -282,7 +285,7 @@ export default {
this.form = response.data;
this.form.userAccount = row.userAccount;
this.open = true;
this.title = this.$t('business.supplementaryInfo.userCard.editTitle');
this.title = "修改用户银行卡";
});
},
/** 提交按钮 */
@ -292,7 +295,7 @@ export default {
this.buttonLoading = true;
if (this.form.id != null) {
updateUserCard(this.form).then(response => {
this.$modal.msgSuccess(this.$t('common.promptMsg.editSuccess'));
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
@ -300,7 +303,7 @@ export default {
});
} else {
addUserCard(this.form).then(response => {
this.$modal.msgSuccess(this.$t('common.promptMsg.addSuccess'));
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
@ -313,13 +316,13 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm(this.$t('common.promptMsg.deleteConfirm', { ids: ids })).then(() => {
this.$modal.confirm('是否确认删除用户银行卡编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUserCard(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess(this.$t('common.promptMsg.deleteSuccess'));
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;

296
src/views/business/userInfoAgent/index.vue

@ -0,0 +1,296 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="代理名称" prop="agentName">
<el-input
v-model="queryParams.agentName"
placeholder="请输入代理商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="登录账号" prop="account">
<el-input
v-model="queryParams.account"
placeholder="请输入登录账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['business:userInfoAgent:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userInfoAgentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="登录账号" align="center" prop="account" />
<el-table-column label="代理名称" align="center" prop="agentName" />
<el-table-column label="营业执照" align="center" prop="license" />
<el-table-column label="其它证照信息" align="center" prop="licenseOther" />
<el-table-column label="法人姓名" align="center" prop="legalPerson" />
<el-table-column label="经营状态" align="center" prop="operateStatus" />
<el-table-column label="联系地址" align="center" prop="contactAddress" />
<el-table-column label="经营地址" align="center" prop="operateAddr" />
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['business:userInfoAgent:edit']"
>修改</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改代理商信息对话框 -->
<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-item label="代理名称" prop="agentName">
<el-input v-model="form.agentName" placeholder="请输入代理名称" />
</el-form-item>
<el-form-item label="营业执照" prop="license">
<el-input v-model="form.license" placeholder="请输入营业执照" />
</el-form-item>
<el-form-item label="其它证照信息" prop="licenseOther">
<el-input v-model="form.licenseOther" placeholder="请输入其它证照信息" />
</el-form-item>
<el-form-item label="法人姓名" prop="legalPerson">
<el-input v-model="form.legalPerson" placeholder="请输入法人姓名" />
</el-form-item>
<el-form-item label="联系地址" prop="contactAddress">
<el-input v-model="form.contactAddress" placeholder="请输入联系地址" />
</el-form-item>
<el-form-item label="经营地址" prop="operateAddr">
<el-input v-model="form.operateAddr" placeholder="请输入经营地址" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listUserInfoAgent, getUserInfoAgent, delUserInfoAgent, addUserInfoAgent, updateUserInfoAgent } from "@/api/business/userInfoAgent";
export default {
name: "UserInfoAgent",
data() {
return {
// loading
buttonLoading: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
userInfoAgentList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
userId: undefined,
agentName: undefined,
license: undefined,
licenseOther: undefined,
legalPerson: undefined,
operateStatus: undefined,
contactAddress: undefined,
operateAddr: undefined,
},
//
form: {},
//
rules: {
id: [
{ required: true, message: "唯一ID不能为空", trigger: "blur" }
],
userId: [
{ required: true, message: "用户ID不能为空", trigger: "blur" }
],
agentName: [
{ required: true, message: "代理名称不能为空", trigger: "blur" }
],
license: [
{ required: true, message: "营业执照不能为空", trigger: "blur" }
],
licenseOther: [
{ required: true, message: "其它证照信息不能为空", trigger: "blur" }
],
legalPerson: [
{ required: true, message: "法人姓名不能为空", trigger: "blur" }
],
operateStatus: [
{ required: true, message: "经营状态不能为空", trigger: "change" }
],
contactAddress: [
{ required: true, message: "联系地址不能为空", trigger: "blur" }
],
operateAddr: [
{ required: true, message: "经营地址不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询代理商信息列表 */
getList() {
this.loading = true;
listUserInfoAgent(this.queryParams).then(response => {
this.userInfoAgentList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
userId: undefined,
agentName: undefined,
license: undefined,
licenseOther: undefined,
legalPerson: undefined,
operateStatus: undefined,
contactAddress: undefined,
operateAddr: undefined,
delFlag: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加代理商信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getUserInfoAgent(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改代理商信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateUserInfoAgent(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addUserInfoAgent(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除代理商信息编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUserInfoAgent(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('business/userInfoAgent/export', {
...this.queryParams
}, `userInfoAgent_${new Date().getTime()}.xlsx`)
}
}
};
</script>

634
src/views/business/userRegister/indexAgent.vue

@ -0,0 +1,634 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="登录账号" prop="account">
<el-input
v-model="queryParams.account"
placeholder="请输入登录账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入电话"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户级别" prop="userLevel">
<el-select v-model="queryParams.userLevel" size="medium" placeholder="请选择用户级别" >
<el-option
v-for="item in options_userLevel"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['business:userRegister:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['business:userRegister:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['business:userRegister:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['business:userRegister:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userRegisterList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="登录账号" align="center" prop="account" />
<el-table-column label="代理商名称" align="center" prop="agentName" />
<el-table-column label="用户状态" align="center" prop="status" >
<template slot-scope="scope">
<el-tag type="primary" v-if="scope.row.status == '0'">发起</el-tag>
<el-tag type="warning" v-if="scope.row.status == '1'">拒绝</el-tag>
<el-tag type="success" v-if="scope.row.status == '2'">通过</el-tag>
<el-tag type="danger" v-if="scope.row.status == '3'">冻结</el-tag>
</template>
</el-table-column>
<el-table-column label="用户类型" align="center" prop="userType" >
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.userType == '0'">普通用户</el-tag>
<el-tag type="warning" v-if="scope.row.userType == '1'">商企用户</el-tag>
<el-tag type="warning" v-if="scope.row.userType == '2'">代理用户</el-tag>
</template>
</el-table-column>
<el-table-column label="用户级别" align="center" prop="userLevel" >
<template slot-scope="scope">
<span v-if="scope.row.userLevel == '0'">普通用户</span>
<span v-if="scope.row.userLevel == '1'">VIP用户</span>
<span v-if="scope.row.userLevel == '2'">商企用户</span>
</template>
</el-table-column>
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="联系地址" align="center" prop="contactAddress" />
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="(scope.row.agentName == null)"
size="mini"
type="text"
icon="el-icon-document-add"
@click="handleAddInfo(scope.row)"
>补充</el-button>
<el-button v-if="(scope.row.agentName != null)"
size="mini"
type="text"
icon="el-icon-view"
@click="handleDetail(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['business:userRegister:edit']"
>修改</el-button>
<el-dropdown>
<span class="el-dropdown-link">
更多<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
<el-button
size="mini"
type="text"
icon="el-icon-refresh"
@click="passwordReset(scope.row)"
v-hasPermi="['business:userRegister:edit']"
>密码重置</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button v-if="(scope.row.status != '3')"
size="mini"
type="text"
icon="el-icon-lock"
@click="accountLock(scope.row)"
v-hasPermi="['business:userRegister:edit']"
>账号冻结</el-button>
<el-button v-if="(scope.row.status == '3')"
size="mini"
type="text"
icon="el-icon-unlock"
@click="accountUnlock(scope.row)"
v-hasPermi="['business:userRegister:edit']"
>账号解冻</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['business:userRegister:remove']"
>删除</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改用户注册对话框 -->
<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-item label="登录账号" prop="account">
<el-input v-model="form.account" placeholder="请输入名字" />
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入电话" />
</el-form-item>
<el-form-item label="用户类型" prop="userType">
<el-select v-model="form.userType" placeholder="请选择用户类型" >
<el-option
v-for="item in options_userType"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="用户级别" prop="userLevel">
<el-select v-model="form.userLevel" size="medium" placeholder="请选择用户级别" >
<el-option
v-for="item in options_userLevel"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 添加或修改用户信息-商户扩展对话框 -->
<el-dialog :title="title" :visible.sync="openInfoAgent" width="700px" append-to-body>
<el-form ref="formInfoAgent" :model="formInfoAgent" :rules="rules" label-width="auto">
<el-form-item label="代理商名称" prop="agentName">
<el-input v-model="formInfoAgent.agentName" placeholder="请输入代理商名称" />
</el-form-item>
<el-form-item label="营业执照" prop="license">
<el-input v-model="formInfoAgent.license" placeholder="请输入营业执照" />
</el-form-item>
<el-form-item label="其它证照信息" prop="licenseOther">
<el-input v-model="formInfoAgent.licenseOther" placeholder="请输入其它证照信息" />
</el-form-item>
<el-form-item label="法人姓名" prop="legalPerson">
<el-input v-model="formInfoAgent.legalPerson" placeholder="请输入法人姓名" />
</el-form-item>
<el-form-item label="营业状态" prop="operateStatus">
<el-select v-model="formInfoAgent.operateStatus" placeholder="请选择营业状态" >
<el-option
v-for="item in options_operateStatus"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="经营地址" prop="operateAddr">
<el-input v-model="formInfoAgent.operateAddr" placeholder="请输入经营地址" />
</el-form-item>
<el-form-item label="联系地址" prop="contactAddress">
<el-input v-model="formInfoAgent.contactAddress" placeholder="请输入经营地址" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitFormInfoAgent"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 用户注册详情-代理商-->
<el-dialog :title="title" :visible.sync="detailOpenAgent" width="700px" append-to-body>
<el-form ref="formDetailAgent" :model="formDetailAgent" label-width="auto">
<el-form-item label="登录账号:">
{{formDetailAgent.account}}
</el-form-item>
<el-form-item label="商企名称:">
{{formDetailAgent.userInfoAgentVo.agentName}}
</el-form-item>
<el-form-item label="营业执照:">
{{formDetailAgent.userInfoAgentVo.license}}
</el-form-item>
<el-form-item label="其它证照:">
{{formDetailAgent.userInfoAgentVo.licenseOther}}
</el-form-item>
<el-form-item label="法人姓名:">
{{formDetailAgent.userInfoAgentVo.legalPerson}}
</el-form-item>
<el-form-item label="营业状态:">
{{formDetailAgent.userInfoAgentVo.operateStatus}}
</el-form-item>
<el-form-item label="经营地址:">
{{formDetailAgent.userInfoAgentVo.operateAddr}}
</el-form-item>
<el-form-item label="联系地址:">
{{formDetailAgent.userInfoAgentVo.contactAddress}}
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getUserRegister,
delUserRegister,
addUserRegister,
updateUserRegister,
addUserInfo,
addUserInfoBus,
resetUserPassword,
accountLock,
listUserRegisterBus,
listUserRegisterAgent
} from "@/api/business/userRegister";
export default {
name: "UserRegister",
data() {
return {
// loading
buttonLoading: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
userRegisterList: [],
//
title: "",
//
open: false,
// -
detailOpenAgent: false,
// -
openInfoAgent: false,
// -
openInfoBus: false,
options_operateStatus: [{
value: '存续',
label: '存续'
}, {
value: '注销',
label: '注销'
}],
//
queryParams: {
pageNum: 1,
pageSize: 10,
userId: undefined,
account: undefined,
phone: undefined,
passwd: undefined,
status: undefined,
userType: undefined,
userLevel: undefined,
},
//
form: {
userInfoVo:{},
userInfoBusVo:{}
},
// -
formDetailAgent: {
userInfoAgentVo:{}
},
// -
formInfoAgent: {},
//
rules: {
legalPerson: [
{ required: true, message: "法人姓名不能为空", trigger: "blur" }
],
operateStatus: [
{ required: true, message: "经营状态不能为空", trigger: "change" }
],
operateAddr: [
{ required: true, message: "经营地址不能为空", trigger: "blur" }
],
agentName: [
{ required: true, message: "代理商名称不能为空", trigger: "blur" }
],
idCard: [
{ required: true,pattern: /^\d+$/, message: "身份证号只能为数字", trigger: "blur" }
],
phone: [
{ required: true,pattern: /^\d+$/, message: "手机号码只能为数字", trigger: "blur"}
],
age: [
{ required: true,pattern: /^\d+$/, message: "年龄只能为数字", trigger: "blur"}
],
contactAddress: [
{ required: true, message: "联系地址不能为空", trigger: "blur" }
],
merchantName: [
{ required: true, message: "商企名称不能为空", trigger: "blur" }
],
},
options_userType: [{
value: '2',
label: '代理用户'
}],
options_userLevel: [{
value: '0',
label: '普通用户'
}, {
value: '1',
label: 'VIP用户'
}, {
value: '2',
label: '商企用户'
}]
};
},
created() {
this.getList();
},
methods: {
/** 查询用户注册列表 */
getList() {
this.loading = true;
listUserRegisterAgent(this.queryParams).then(response => {
this.userRegisterList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.detailOpenAgent = false;
this.openInfoAgent = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
userId: undefined,
account: undefined,
phone: undefined,
passwd: undefined,
status: undefined,
delFlag: undefined,
userType: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加用户注册";
},
/** 详情按钮操作 */
handleDetail(row){
this.loading = true;
this.reset();
const id = row.id || this.ids
getUserRegister(id).then(response => {
this.loading = false;
this.formDetailAgent = response.data;
this.detailOpenAgent = true;
this.title = "代理商详情信息";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getUserRegister(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改用户注册";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateUserRegister(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addUserRegister(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 用户信息-提交按钮-代理商 */
submitFormInfoAgent() {
this.$refs["formInfoAgent"].validate(valid => {
if (valid) {
addUserInfoBus(this.formInfoAgent).then(response => {
this.$modal.msgSuccess(this.$t('common.addSuccess'));
this.openInfoAgent = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const account = row.account;
const ids = row.id || this.ids;
var msg = "";
if(null != account)
msg = '是否确认删除登录账号为"' + account + '"的数据项?';
else
msg = "是否要批量删除?";
this.$modal.confirm(msg).then(() => {
this.loading = true;
return delUserRegister(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('business/userRegister/export', {
...this.queryParams
}, `userRegister_${new Date().getTime()}.xlsx`)
},
handleAddInfo(row) {
this.reset();
this.formInfoAgent = row;
this.openInfoAgent = true;
this.title = "代理商信息补充";
},
/**
* 密码重置
* @param row
*/
passwordReset(row) {
this.$modal.confirm('是否确认重置登录密码?').then(() => {
this.loading = true;
return resetUserPassword(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("重置成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/**
* 账号冻结
* @param row
*/
accountLock(row) {
this.$modal.confirm('是否确认对账号"' + row.account + '"进行冻结?').then(() => {
this.loading = true;
return accountLock(row);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("冻结成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/**
* 账号解冻
* @param row
*/
accountUnlock(row) {
this.$modal.confirm('是否确认解除账号"' + row.account + '"的冻结?').then(() => {
this.loading = true;
return accountLock(row);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("解除冻结成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
}
}
};
</script>
<style>
.el-dropdown-link {
cursor: pointer;
color: #409EFF;
}
.el-icon-arrow-down {
font-size: 12px;
}
</style>

2
vue.config.js

@ -36,7 +36,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://8.137.52.68:8081`,
target: `http://127.0.0.1:8081`,
target: `http://43.252.245.60:90`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save