Commit ed229cc8 authored by dcy's avatar dcy

注册会员,差状态接口

parent 38af27f0
......@@ -8,12 +8,12 @@
</el-form-item>
<el-form-item label="成交" prop="mobile">
<el-select v-model="queryParams.isDeal">
<el-option v-for="item in [{label:'全部',value:''},{label:'是',value:true},{label:'否',value:false}]" :value="item.value" :label="item.label"></el-option>
<el-option v-for="item in [{label:'全部',value:''},{label:'是',value:true},{label:'否',value:false}]" :value="item.value" :label="item.label" :key="item.value" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="认证" prop="password">
<el-select v-model="queryParams.authType">
<el-option v-for="item in [{label: '全部',value: ''},{label:'营业执照认证',value:1},{label:'身份证认证',value:2},{label:'双认证',value:3}]" :value="item.value" :label="item.label"></el-option>
<el-option v-for="item in [{label: '全部',value: ''},{label:'营业执照认证',value:1},{label:'身份证认证',value:2},{label:'双认证',value:3}]" :key="item.value" :value="item.value" :label="item.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="registerIp">
......@@ -22,6 +22,7 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button :loading="exportLoading" type="primary" @click="exportFn">导 出</el-button>
</el-form-item>
</el-form>
......@@ -38,18 +39,28 @@
<el-table-column label="手机号" show-overflow-tooltip align="center" prop="mobile" >
</el-table-column>
<el-table-column label="成交" align="center" prop="" show-overflow-tooltip />
<el-table-column label="认证" align="center" prop="" />
<el-table-column label="状态" align="center" prop="status" />
<el-table-column label="认证" align="center" :formatter="authentication" />
<el-table-column label="状态" align="center" prop="status" >
<template slot-scope="scope">
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />
</template>
</el-table-column>
<el-table-column label="身份证审核状态" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<div v-if="!scope.row.identityAuditStatus">未提交</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag>
<el-tooltip v-if="scope.row.identityAuditStatus === 3" class="item" effect="dark" :content="scope.identityAuditRemark" placement="bottom">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="营业执照审核状态" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<div v-if="!scope.row.enterpriseAuditStatus">未提交</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag>
<el-tooltip v-if="scope.row.enterpriseAuditStatus === 3" class="item" effect="dark" :content="scope.rowenterpriseAuditRemark" placement="bottom">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
......@@ -115,7 +126,7 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="身份证" name="1" v-if="this.publicObj && this.publicObj.identityAuditStatus !== 0 && this.publicObj.identityAuditStatus !== undefined">
<div style="padding:0 40px;box-sizing: border-box;">
<el-form label-position="left" label-width="100px" :rules="rulesId" ref="formId" :model="IdDetails" >
<el-form ref="formId" label-position="left" label-width="100px" :rules="rulesId" :model="IdDetails" >
<el-form-item label="姓名" prop="name">
<el-input v-model="IdDetails.name"></el-input>
</el-form-item>
......@@ -160,7 +171,7 @@
</el-tab-pane>
<el-tab-pane label="营业执照" name="2" v-if="this.publicObj && this.publicObj.enterpriseAuditStatus !== 0 && this.publicObj.enterpriseAuditStatus !== undefined" >
<div style="width: 500px;padding:0 40px;box-sizing: border-box;">
<el-form :rules="rulesEnterprise" :model="enterpriseFrom" label-position="left" label-width="100px">
<el-form :rules="rulesEnterprise" :model="enterpriseFrom" label-position="left" ref="formEnter" label-width="100px">
<el-form-item label="企业名称" prop="name">
<el-input v-model="enterpriseFrom.name" ></el-input>
</el-form-item>
......@@ -219,6 +230,8 @@ import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import FileUpload from "@/components/FileUpload"
import ImageUpload from "@/components/ImageUpload";
import uploadImage from "@/components/UploadImage";
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user";
let stateId = {
0:'审核中',
......@@ -302,6 +315,29 @@ export default {
this.getList();
},
methods: {
//导出
exportFn(){
this.$modal.confirm('是否确认导出所有用户数据项?').then(() => {
this.exportLoading = true;
return exportUserExcel(this.queryParams);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {});
},
// 用户状态修改
handleStatusChange(row) {
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.nickname + '"用户吗?').then(function() {
// return changeUserStatus(row.id, row.status);
return
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
: CommonStatusEnum.ENABLE;
});
},
/** 查询列表 */
getList() {
this.loading = true;
......@@ -457,34 +493,59 @@ export default {
})
},
setMemberUserUpdateIdCard(){
let p ={
cardNumber:this.IdDetails.cardNumber,
cardType:this.IdDetails.cardType,
img1:this.IdDetails.img1,
img2:this.IdDetails.img2,
name:this.IdDetails.name,
userCardAuthId:this.IdDetails.id,
} ;
memberUserUpdateIdCard(p).then(r => {
if(r.code === 0){
this.$message.success('修改成功');
this.$refs.formId.validate(valid =>{
if(valid){
let p ={
cardNumber:this.IdDetails.cardNumber,
cardType:this.IdDetails.cardType,
img1:this.IdDetails.img1,
img2:this.IdDetails.img2,
name:this.IdDetails.name,
userCardAuthId:this.IdDetails.id,
} ;
memberUserUpdateIdCard(p).then(r => {
if(r.code === 0){
if(this.IdDetails.status === 3){
this.getIdentityDetails()
}
this.$message.success('修改成功');
}
})
}
})
},
setMemberUserUpdateEnterprise(){
let p = {
cardNumber:this.enterpriseFrom.cardNumber,
img1:this.enterpriseFrom.img1,
img2:this.enterpriseFrom.img2,
legalName:this.enterpriseFrom.legalName,
name:this.enterpriseFrom.name,
userEnterpriseAuthId:this.enterpriseFrom.id
}
memberUserUpdateEnterprise(p).then(r =>{
if(r.code === 0){
this.$message.success('修改成功');
this.$refs.formEnter.validate(valid =>{
if(valid){
let p = {
cardNumber:this.enterpriseFrom.cardNumber,
img1:this.enterpriseFrom.img1,
img2:this.enterpriseFrom.img2,
legalName:this.enterpriseFrom.legalName,
name:this.enterpriseFrom.name,
userEnterpriseAuthId:this.enterpriseFrom.id
}
memberUserUpdateEnterprise(p).then(r =>{
if(r.code === 0){
if(this.enterpriseFrom.status === 3){
this.getEnterpriseFn();
}
this.$message.success('修改成功');
}
})
}
})
},
authentication(row){
if(!row.identityAuditStatus && !row.enterpriseAuditRemark){
return ''
}else if(row.identityAuditStatus >= 0 && row.enterpriseAuditRemark >= 0){
return '双认证'
} else if(row.identityAuditStatus >= 0){
return '身份'
}else if(row.enterpriseAuditRemark >= 0){
return '营业'
}
}
},
watch:{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment