Commit 107cbb69 authored by lanbaoming's avatar lanbaoming

2024-05-16修改BUG

parent 06a7e772
<template> <template>
<div style="padding: 20px"> <div style="padding: 20px">
<header style="display: flex;justify-content: space-between;align-items: center;"> <header
<h1 style="font-weight: 600;font-size: 20px">{{$t('会员详情')}}</h1> style="display: flex; justify-content: space-between; align-items: center"
>
<h1 style="font-weight: 600; font-size: 20px">{{ $t("会员详情") }}</h1>
<div> <div>
<el-button type="primary" v-has-permi="['member:certificate']" @click="guarantee(details)">{{ $t('保函证书') }}</el-button> <el-button
<el-button type="primary" v-has-permi="['member:log']" @click="operationLogFn(details)">{{ $t('操作日志') }}</el-button> type="primary"
<el-button type="primary" v-has-permi="['member:id-card']" @click="identityFn(details , '1')">{{ $t('身份证') }}</el-button> v-has-permi="['member:certificate']"
<el-button type="primary" v-has-permi="['member:business-license']" @click="identityFn(details, '2')">{{ $t('营业执照') }}</el-button> @click="guarantee(details)"
<el-button type="danger" v-has-permi="['member:delete']" @click="deleteFn(details)">{{ $t('删除') }}</el-button> >{{ $t("保函证书") }}</el-button
>
<el-button
type="primary"
v-has-permi="['member:log']"
@click="operationLogFn(details)"
>{{ $t("操作日志") }}</el-button
>
<el-button
type="primary"
v-has-permi="['member:id-card']"
@click="identityFn(details, '1')"
>{{ $t("身份证") }}</el-button
>
<el-button
type="primary"
v-has-permi="['member:business-license']"
@click="identityFn(details, '2')"
>{{ $t("营业执照") }}</el-button
>
<el-button
type="danger"
v-has-permi="['member:delete']"
@click="deleteFn(details)"
>{{ $t("删除") }}</el-button
>
</div> </div>
</header> </header>
<el-descriptions :title="$t('公司信息')" :column="4" border> <!--lanbm 2024-05-15 修改信息显示BUG-->
<el-descriptions-item :label="$t('会员编号')">{{ details.id }}</el-descriptions-item> <el-descriptions :title="$t('基础信息')" :column="4" border>
<el-descriptions-item :label="$t('会员昵称')">{{ details.nickname }}</el-descriptions-item> <el-descriptions-item :label="$t('会员编号')">{{
<el-descriptions-item :label="$t('英文名称')">{{ details.englishName }}</el-descriptions-item> details.id
<el-descriptions-item :label="$t('真实姓名')">{{ details.identityName || '-' }}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系方式')"><span <el-descriptions-item :label="$t('会员昵称')">{{
style="margin-right: 10px;">+{{ details.areaCode }}</span><span>{{ details.mobile }}</span> details.nickname
}}</el-descriptions-item>
<el-descriptions-item :label="$t('英文名称')">{{
details.englishName
}}</el-descriptions-item>
<el-descriptions-item :label="$t('真实姓名')">{{
details.identityName || "-"
}}</el-descriptions-item>
<el-descriptions-item :label="$t('联系方式')"
><span style="margin-right: 10px">+{{ details.areaCode }}</span
><span>{{ details.mobile }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('绑定邮箱')">{{ details.email }}</el-descriptions-item> <el-descriptions-item :label="$t('绑定邮箱')">{{
<el-descriptions-item :label="$t('生日')">{{ details.birthday }}</el-descriptions-item> details.email
<el-descriptions-item :label="$t('性别')">{{ }}</el-descriptions-item>
details.gender === 0 ? '' : details.gender === 1 ? '' : '保密' <el-descriptions-item :label="$t('生日')">{{
details.birthday
}}</el-descriptions-item>
<el-descriptions-item :label="$t('性别')"
>{{
details.gender === 0 ? "" : details.gender === 1 ? "" : "保密"
}} }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('地址')">{{ details.address }}</el-descriptions-item> <el-descriptions-item :label="$t('地址')">{{
<el-descriptions-item :label="$t('部门')">{{details.department}}</el-descriptions-item> details.address
<el-descriptions-item :label="$t('职位')">{{details.jobPosition}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{details.createTime}}</el-descriptions-item> <el-descriptions-item :label="$t('部门')">{{
<el-descriptions-item :label="$t('上次登录')">{{details.loginDate}}</el-descriptions-item> details.department
}}</el-descriptions-item>
<el-descriptions-item :label="$t('职位')">{{
details.jobPosition
}}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{
details.createTime
}}</el-descriptions-item>
<el-descriptions-item :label="$t('上次登录')">{{
details.loginDate
}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions style="margin-top: 20px" :title="$t('基础信息')" :column="4" border> <!--lanbm 2024-05-15 修改信息显示BUG-->
<el-descriptions-item :label="$t('公司名称')">{{details.enterpriseName}}</el-descriptions-item> <el-descriptions
<el-descriptions-item :label="$t('公司英文名称')">{{details.enterpriseNameEn}}</el-descriptions-item> style="margin-top: 20px"
<el-descriptions-item :label="$t('档口')">{{details.enterpriseStall}}</el-descriptions-item> :title="$t('公司信息')"
<el-descriptions-item :label="$t('品牌')">{{details.enterpriseBrand}}</el-descriptions-item> :column="4"
<el-descriptions-item :label="$t('公司地址')">{{details.enterpriseAddress}}</el-descriptions-item> border
<el-descriptions-item :label="$t('公司简介')">{{details.enterpriseDesc}}</el-descriptions-item> >
<el-descriptions-item :label="$t('公司名称')">{{
details.enterpriseName
}}</el-descriptions-item>
<el-descriptions-item :label="$t('公司英文名称')">{{
details.enterpriseNameEn
}}</el-descriptions-item>
<el-descriptions-item :label="$t('档口')">{{
details.enterpriseStall
}}</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">{{
details.enterpriseBrand
}}</el-descriptions-item>
<el-descriptions-item :label="$t('公司地址')">{{
details.enterpriseAddress
}}</el-descriptions-item>
<el-descriptions-item :label="$t('公司简介')">{{
details.enterpriseDesc
}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions style="margin-top: 20px" :title="$t('认证信息')" :column="4" border> <el-descriptions
<el-descriptions-item :label="$t('成交')">{{details.customerStatus === 3 ? '成交' : '未成交' }}</el-descriptions-item> style="margin-top: 20px"
:title="$t('认证信息')"
:column="4"
border
>
<el-descriptions-item :label="$t('成交')">{{
details.customerStatus === 3 ? "成交" : "未成交"
}}</el-descriptions-item>
<el-descriptions-item :label="$t('认证')"> <el-descriptions-item :label="$t('认证')">
<span v-if="details.identityAuditStatus === 2 && details.enterpriseAuditStatus === 2" >{{ $t('双认证') }}</span> <span
<span v-else-if="details.identityAuditStatus === 2 && details.enterpriseAuditStatus !== 2 " >{{ $t('身份证') }}</span> v-if="
<span v-else-if="details.identityAuditStatus !== 2 && details.enterpriseAuditStatus === 2 " >{{ $t('企业') }}</span> details.identityAuditStatus === 2 &&
<span v-else-if="details.identityAuditStatus !== 2 && details.enterpriseAuditStatus !== 2 " >{{ $t('') }}</span> details.enterpriseAuditStatus === 2
"
>{{ $t("双认证") }}</span
>
<span
v-else-if="
details.identityAuditStatus === 2 &&
details.enterpriseAuditStatus !== 2
"
>{{ $t("身份证") }}</span
>
<span
v-else-if="
details.identityAuditStatus !== 2 &&
details.enterpriseAuditStatus === 2
"
>{{ $t("企业") }}</span
>
<span
v-else-if="
details.identityAuditStatus !== 2 &&
details.enterpriseAuditStatus !== 2
"
>{{ $t("") }}</span
>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('身份证认证状态')">{{ details.identityAuditStatus !== null ? $l(getDictDatas(this.DICT_TYPE.AUDIT_STATUS).find(i => i.value == details.identityAuditStatus),'label') : ''}}</el-descriptions-item> <el-descriptions-item :label="$t('身份证认证状态')">{{
<el-descriptions-item :label="$t('身份证认证状态')">{{details.enterpriseAuditStatus !== null ? $l(getDictDatas(this.DICT_TYPE.AUDIT_STATUS).find(i => i.value == details.enterpriseAuditStatus),'label' ) : '' }}</el-descriptions-item> details.identityAuditStatus !== null
? $l(
getDictDatas(this.DICT_TYPE.AUDIT_STATUS).find(
(i) => i.value == details.identityAuditStatus
),
"label"
)
: ""
}}</el-descriptions-item>
<el-descriptions-item :label="$t('营业执照认证状态')">{{
details.enterpriseAuditStatus !== null
? $l(
getDictDatas(this.DICT_TYPE.AUDIT_STATUS).find(
(i) => i.value == details.enterpriseAuditStatus
),
"label"
)
: ""
}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-dialog <el-dialog
title="保函/证书" title="保函/证书"
:visible.sync="guaranteeShow" :visible.sync="guaranteeShow"
:before-close="()=>{guaranteeUrl = ''; guaranteeShow = false;}" :before-close="
width="50%"> () => {
guaranteeUrl = '';
guaranteeShow = false;
}
"
width="50%"
>
<el-form> <el-form>
<el-form-item :label="$t('保函/证书')"> <el-form-item :label="$t('保函/证书')">
<el-row :gutter="20" type="flex" justify="center"> <el-row :gutter="20" type="flex" justify="center">
...@@ -62,30 +186,38 @@ ...@@ -62,30 +186,38 @@
<el-input v-model="guaranteeUrl"></el-input> <el-input v-model="guaranteeUrl"></el-input>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<div style="height: 45px;overflow: hidden;"> <div style="height: 45px; overflow: hidden">
<file-upload v-model="guaranteeUrl" :fileType="['png', 'jpg', 'jpeg','pdf']" :limit="1" <file-upload
:isShowTip="false"></file-upload> v-model="guaranteeUrl"
:fileType="['png', 'jpg', 'jpeg', 'pdf']"
:limit="1"
:isShowTip="false"
></file-upload>
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div>{{ $t('可上传图片,pdf文档') }}</div> <div>{{ $t("可上传图片,pdf文档") }}</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: center;"> <div style="text-align: center">
<el-button @click="setGuarantee">{{ $t('保 存') }}</el-button> <el-button @click="setGuarantee">{{ $t("保 存") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="$t('操作日志')" :title="$t('操作日志')"
:visible.sync="operationLogShow" :visible.sync="operationLogShow"
width="50%"> width="50%"
>
<el-table :data="operationLogList"> <el-table :data="operationLogList">
<el-table-column :label="$t('标题')" prop="title"></el-table-column> <el-table-column :label="$t('标题')" prop="title"></el-table-column>
<el-table-column :label="$t('操作内容')" prop="content"></el-table-column> <el-table-column
:label="$t('操作内容')"
prop="content"
></el-table-column>
<el-table-column :label="$t('操作人')" prop="userId"> <el-table-column :label="$t('操作人')" prop="userId">
<template v-slot="{row}"> <template v-slot="{ row }">
{{ details.identityName }} {{ details.identityName }}
</template> </template>
</el-table-column> </el-table-column>
...@@ -96,75 +228,154 @@ ...@@ -96,75 +228,154 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作ip')" prop="ip"></el-table-column> <el-table-column :label="$t('操作ip')" prop="ip"></el-table-column>
</el-table> </el-table>
<pagination v-show="totalLog > 0" :total="totalLog" :page.sync="operationLogFrom.page" <pagination
v-show="totalLog > 0"
:total="totalLog"
:page.sync="operationLogFrom.page"
:limit.sync="operationLogFrom.row" :limit.sync="operationLogFrom.row"
@pagination="getOperationLogList"/> @pagination="getOperationLogList"
/>
</el-dialog> </el-dialog>
<el-dialog <el-dialog :title="$t('认证')" :visible.sync="attestationShow" width="80%">
:title="$t('认证')"
:visible.sync="attestationShow"
width="80%">
<div class="details"> <div class="details">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :label="$t('身份证')" name="1"> <el-tab-pane :label="$t('身份证')" name="1">
<div style="padding:0 40px;box-sizing: border-box;"> <div style="padding: 0 40px; box-sizing: border-box">
<el-form :disabled="[2,3].includes(IdDetails.status) && modifyIdCard" ref="formId" label-position="left" <el-form
label-width="100px" :rules="rulesId" :model="IdDetails"> :disabled="[2, 3].includes(IdDetails.status) && modifyIdCard"
ref="formId"
label-position="left"
label-width="100px"
:rules="rulesId"
:model="IdDetails"
>
<el-form-item :label="$t('姓名')" prop="name"> <el-form-item :label="$t('姓名')" prop="name">
<el-input v-model="IdDetails.name"></el-input> <el-input v-model="IdDetails.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件类型')" prop="cardType"> <el-form-item :label="$t('证件类型')" prop="cardType">
<dict-selector v-model="IdDetails.cardType" :type="DICT_TYPE.CERTIFICATE_TYPE"></dict-selector> <dict-selector
v-model="IdDetails.cardType"
:type="DICT_TYPE.CERTIFICATE_TYPE"
></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件号码')" prop="cardNumber"> <el-form-item :label="$t('证件号码')" prop="cardNumber">
<el-input v-model="IdDetails.cardNumber"></el-input> <el-input v-model="IdDetails.cardNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件正面照')" prop="img1"> <el-form-item :label="$t('证件正面照')" prop="img1">
<div> <div>
<el-input readonly style="margin-bottom: 20px" v-model="IdDetails.img1"></el-input> <el-input
<ImageUpload :isShowTip="false" v-model="IdDetails.img1" :limit="1"></ImageUpload> readonly
style="margin-bottom: 20px"
v-model="IdDetails.img1"
></el-input>
<ImageUpload
:isShowTip="false"
v-model="IdDetails.img1"
:limit="1"
></ImageUpload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件背面照')" prop="img2"> <el-form-item :label="$t('证件背面照')" prop="img2">
<div> <div>
<el-input readonly style="margin-bottom: 20px" v-model="IdDetails.img2"></el-input> <el-input
<ImageUpload :isShowTip="false" :limit="1" v-model="IdDetails.img2"></ImageUpload> readonly
style="margin-bottom: 20px"
v-model="IdDetails.img2"
></el-input>
<ImageUpload
:isShowTip="false"
:limit="1"
v-model="IdDetails.img2"
></ImageUpload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('审核状态')" v-if="modifyIdCard && IdDetails.status !== 0 "> <el-form-item
:label="$t('审核状态')"
v-if="modifyIdCard && IdDetails.status !== 0"
>
{{ {{
getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status] ? getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status].label : '' getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status]
? getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status]
.label
: ""
}} }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('审核时间')" v-if="[2,3].includes(IdDetails.status) && modifyIdCard"> <el-form-item
:label="$t('审核时间')"
v-if="[2, 3].includes(IdDetails.status) && modifyIdCard"
>
{{ parseTime(IdDetails.auditTime) }} {{ parseTime(IdDetails.auditTime) }}
</el-form-item> </el-form-item>
<el-form-item v-if="modifyIdCard && IdDetails.status !== 0" :label="$t('审核备注')"> <el-form-item
<el-input v-model="IdDetails.auditRemark" :disabled="IdDetails.status === 3" v-if="modifyIdCard && IdDetails.status !== 0"
type="textarea"></el-input> :label="$t('审核备注')"
>
<el-input
v-model="IdDetails.auditRemark"
:disabled="IdDetails.status === 3"
type="textarea"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div v-if="IdDetails.status === 1" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" @click="idCardAuditFn(2)">{{ $t('审核通过') }}</el-button> v-if="IdDetails.status === 1"
<el-button type="primary" @click="idCardAuditFn(3)">{{ $t('审核不通过') }}</el-button> style="text-align: center; margin-top: 20px"
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> >
<el-button type="primary" @click="idCardAuditFn(2)">{{
$t("审核通过")
}}</el-button>
<el-button type="primary" @click="idCardAuditFn(3)">{{
$t("审核不通过")
}}</el-button>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
<div v-if="IdDetails.status === 2 || IdDetails.status === 3" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" v-if="modifyIdCard" @click="modifyIdCard = false;">{{ $t('修 改') }} v-if="IdDetails.status === 2 || IdDetails.status === 3"
style="text-align: center; margin-top: 20px"
>
<el-button
type="primary"
v-if="modifyIdCard"
@click="modifyIdCard = false"
>{{ $t("修 改") }}
</el-button> </el-button>
<el-button type="primary" v-else @click="setMemberUserUpdateIdCard">{{ $t('提交审核') }}</el-button> <el-button
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> type="primary"
v-else
@click="setMemberUserUpdateIdCard"
>{{ $t("提交审核") }}</el-button
>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
<div v-if="IdDetails.status === 0" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" @click="submitId">{{ $t('上 传') }}</el-button> v-if="IdDetails.status === 0"
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> style="text-align: center; margin-top: 20px"
>
<el-button type="primary" @click="submitId">{{
$t("上 传")
}}</el-button>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('营业执照')" name="2"> <el-tab-pane :label="$t('营业执照')" name="2">
<div style="width: 500px;padding:0 40px;box-sizing: border-box;"> <div style="width: 500px; padding: 0 40px; box-sizing: border-box">
<el-form :disabled="modifyLicense && [2,3].includes(enterpriseFrom.status)" :rules="rulesEnterprise" <el-form
:model="enterpriseFrom" label-position="left" ref="formEnter" label-width="100px"> :disabled="
modifyLicense && [2, 3].includes(enterpriseFrom.status)
"
:rules="rulesEnterprise"
:model="enterpriseFrom"
label-position="left"
ref="formEnter"
label-width="100px"
>
<el-form-item :label="$t('企业名称')" prop="name"> <el-form-item :label="$t('企业名称')" prop="name">
<el-input v-model="enterpriseFrom.name"></el-input> <el-input v-model="enterpriseFrom.name"></el-input>
</el-form-item> </el-form-item>
...@@ -176,40 +387,102 @@ ...@@ -176,40 +387,102 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件照')" prop="img1"> <el-form-item :label="$t('证件照')" prop="img1">
<div> <div>
<el-input readonly style="margin-bottom: 20px" v-model="enterpriseFrom.img1"></el-input> <el-input
<ImageUpload :isShowTip="false" :limit="1" v-model="enterpriseFrom.img1"></ImageUpload> readonly
style="margin-bottom: 20px"
v-model="enterpriseFrom.img1"
></el-input>
<ImageUpload
:isShowTip="false"
:limit="1"
v-model="enterpriseFrom.img1"
></ImageUpload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('附件')"> <el-form-item :label="$t('附件')">
<el-input readonly v-model="enterpriseFrom.img2"></el-input> <el-input readonly v-model="enterpriseFrom.img2"></el-input>
<ImageUpload :isShowTip="false" :limit="1" v-model="enterpriseFrom.img2"></ImageUpload> <ImageUpload
:isShowTip="false"
:limit="1"
v-model="enterpriseFrom.img2"
></ImageUpload>
</el-form-item> </el-form-item>
<el-form-item v-if="modifyLicense && enterpriseFrom.status !== 0 " :label="$t('审核状态')"> <el-form-item
{{ getDictDatas(DICT_TYPE.AUDIT_STATUS)[enterpriseFrom.status].label }} v-if="modifyLicense && enterpriseFrom.status !== 0"
:label="$t('审核状态')"
>
{{
getDictDatas(DICT_TYPE.AUDIT_STATUS)[enterpriseFrom.status]
.label
}}
</el-form-item> </el-form-item>
<el-form-item v-if="[2,3].includes(enterpriseFrom.status) && modifyLicense " :label="$t('审核时间')"> <el-form-item
v-if="[2, 3].includes(enterpriseFrom.status) && modifyLicense"
:label="$t('审核时间')"
>
{{ parseTime(enterpriseFrom.auditTime) }} {{ parseTime(enterpriseFrom.auditTime) }}
</el-form-item> </el-form-item>
<el-form-item v-if="modifyLicense && enterpriseFrom.status !== 0" :label="$t('审核备注')"> <el-form-item
<el-input v-model="enterpriseFrom.auditRemark" :disabled="enterpriseFrom.status === 3" v-if="modifyLicense && enterpriseFrom.status !== 0"
type="textarea"></el-input> :label="$t('审核备注')"
>
<el-input
v-model="enterpriseFrom.auditRemark"
:disabled="enterpriseFrom.status === 3"
type="textarea"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div v-if="enterpriseFrom.status === 1" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" @click="certificateVerificationFn(2)">{{ $t('审核通过') }}</el-button> v-if="enterpriseFrom.status === 1"
<el-button type="primary" @click="certificateVerificationFn(3)">{{ $t('审核不通过') }}</el-button> style="text-align: center; margin-top: 20px"
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> >
<el-button
type="primary"
@click="certificateVerificationFn(2)"
>{{ $t("审核通过") }}</el-button
>
<el-button
type="primary"
@click="certificateVerificationFn(3)"
>{{ $t("审核不通过") }}</el-button
>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
<div v-if="enterpriseFrom.status === 2 || enterpriseFrom.status === 3" <div
style="text-align: center;margin-top: 20px;"> v-if="
<el-button type="primary" v-if="modifyLicense" @click="modifyLicense = false">{{ $t('修 改') }} enterpriseFrom.status === 2 || enterpriseFrom.status === 3
"
style="text-align: center; margin-top: 20px"
>
<el-button
type="primary"
v-if="modifyLicense"
@click="modifyLicense = false"
>{{ $t("修 改") }}
</el-button> </el-button>
<el-button type="primary" v-else @click="setMemberUserUpdateEnterprise">{{ $t('提交审核') }}</el-button> <el-button
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> type="primary"
v-else
@click="setMemberUserUpdateEnterprise"
>{{ $t("提交审核") }}</el-button
>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
<div v-if="enterpriseFrom.status === 0" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" @click="submit">{{ $t('上 传') }}</el-button> v-if="enterpriseFrom.status === 0"
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> style="text-align: center; margin-top: 20px"
>
<el-button type="primary" @click="submit">{{
$t("上 传")
}}</el-button>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
...@@ -220,122 +493,185 @@ ...@@ -220,122 +493,185 @@
</template> </template>
<script> <script>
import { import {
createAuditIdCard, deleteUser, createAuditIdCard,
deleteUser,
memberGetAuthEnterpriseInfo, memberGetAuthEnterpriseInfo,
memberGetAuthIdcardInfo, memberGetAuthIdcardInfo,
memberUserAuditEnterprise, memberUserAuditEnterprise,
memberUserAuditIdCard, memberUserAuditIdCard,
memberUserGet, memberUserUpdateEnterprise, memberUserGet,
memberUserUpdateEnterprise,
memberUserUpdateIdCard, memberUserUpdateIdCard,
operationLogApi, seTupdateBackletter, userCreateAuditEnterprise operationLogApi,
seTupdateBackletter,
userCreateAuditEnterprise,
} from "@/api/member/user"; } from "@/api/member/user";
import FileUpload from "@/components/FileUpload/index.vue"; import FileUpload from "@/components/FileUpload/index.vue";
import ImageUpload from "@/components/ImageUpload/index.vue"; import ImageUpload from "@/components/ImageUpload/index.vue";
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import { DICT_TYPE, getDictDatas } from "@/utils/dict";
export default { export default {
name: "memberDetails", name: "memberDetails",
components: {ImageUpload, FileUpload}, components: { ImageUpload, FileUpload },
data() { data() {
return { return {
// 表单校验 // 表单校验
rulesId: { rulesId: {
name: [{required: true, message: this.$t('用户昵称不能为空'), trigger: "blur"}], name: [
cardType: [{required: true, message: this.$t('证件类型不能为空'), trigger: "blur"}], {
cardNumber: [{required: true, message: this.$t('证件号码不能为空'), trigger: "blur"}], required: true,
img1: [{required: true, message: this.$t('身份正面照不能为空'), trigger: ['blur', 'change']}], message: this.$t("用户昵称不能为空"),
img2: [{required: true, message: this.$t('身份正面照不能为空'), trigger: ['blur', 'change']}], trigger: "blur",
},
],
cardType: [
{
required: true,
message: this.$t("证件类型不能为空"),
trigger: "blur",
},
],
cardNumber: [
{
required: true,
message: this.$t("证件号码不能为空"),
trigger: "blur",
},
],
img1: [
{
required: true,
message: this.$t("身份正面照不能为空"),
trigger: ["blur", "change"],
},
],
img2: [
{
required: true,
message: this.$t("身份正面照不能为空"),
trigger: ["blur", "change"],
},
],
}, },
rulesEnterprise: { rulesEnterprise: {
name: [{required: true, message: this.$t('企业名称不能为空'), trigger: "blur"}], name: [
legalName: [{required: true, message: this.$t('企业法人不能为空'), trigger: "blur"}], {
cardNumber: [{required: true, message: this.$t('证件号码不能为空'), trigger: "blur"}], required: true,
img1: [{required: true, message: this.$t('证件照不能为空'), trigger: ['blur', 'change']}], message: this.$t("企业名称不能为空"),
trigger: "blur",
},
],
legalName: [
{
required: true,
message: this.$t("企业法人不能为空"),
trigger: "blur",
},
],
cardNumber: [
{
required: true,
message: this.$t("证件号码不能为空"),
trigger: "blur",
},
],
img1: [
{
required: true,
message: this.$t("证件照不能为空"),
trigger: ["blur", "change"],
},
],
}, },
getDictDatas, getDictDatas,
DICT_TYPE, DICT_TYPE,
details: { details: {
"address": "", address: "",
"areaCode": "", areaCode: "",
"avatar": "", avatar: "",
"backLetterImg": "", backLetterImg: "",
"birthday": "", birthday: "",
"createTime": "", createTime: "",
"customerStatus": "", customerStatus: "",
"department": "", department: "",
"email": "", email: "",
"englishName": "", englishName: "",
"enterpriseAddress": "", enterpriseAddress: "",
"enterpriseAuditCreateTime": "", enterpriseAuditCreateTime: "",
"enterpriseAuditRemark": "", enterpriseAuditRemark: "",
"enterpriseAuditStatus": "", enterpriseAuditStatus: "",
"enterpriseAuditTime": "", enterpriseAuditTime: "",
"enterpriseBrand": "", enterpriseBrand: "",
"enterpriseDesc": "", enterpriseDesc: "",
"enterpriseName": "", enterpriseName: "",
"enterpriseNameEn": "", enterpriseNameEn: "",
"enterpriseStall": "", enterpriseStall: "",
"enterpriseWebsite": "", enterpriseWebsite: "",
"gender": "", gender: "",
"groupCount": "", groupCount: "",
"id": "", id: "",
"identityAuditCreateTime": "", identityAuditCreateTime: "",
"identityAuditRemark": "", identityAuditRemark: "",
"identityAuditStatus": "", identityAuditStatus: "",
"identityAuditTime": "", identityAuditTime: "",
"identityName": "", identityName: "",
"isDeal": "", isDeal: "",
"isSimplePassword": "", isSimplePassword: "",
"jobPosition": "", jobPosition: "",
"loginDate": "", loginDate: "",
"loginIp": "", loginIp: "",
"mobile": "", mobile: "",
"nickname": "", nickname: "",
"password": "", password: "",
"registDate": "", registDate: "",
"registerIp": "", registerIp: "",
"status": "" status: "",
}, },
publicObj: {}, publicObj: {},
guaranteeShow: false, guaranteeShow: false,
guaranteeUrl: '', guaranteeUrl: "",
operationLogFrom: { operationLogFrom: {
page: 1, page: 1,
row: 10, row: 10,
userId: undefined userId: undefined,
}, },
attestationShow: false, attestationShow: false,
modifyLicense: false, modifyLicense: false,
modifyIdCard: true,//修改身份证 modifyIdCard: true, //修改身份证
IdDetails: {}, IdDetails: {},
enterpriseFrom: {}, enterpriseFrom: {},
operationLogShow: false, operationLogShow: false,
activeName: "1", activeName: "1",
operationLogList: [], operationLogList: [],
totalLog: 0, totalLog: 0,
} };
}, },
created() { created() {
this.getDetails() this.getDetails();
}, },
methods: { methods: {
deleteFn(row) { deleteFn(row) {
const nickname = row.nickname; const nickname = row.nickname;
this.$modal.confirm(`${this.$t('是否确认删除昵称为{nickname}的会员?', {nickname})}`).then(function () { this.$modal
return deleteUser(row.id) .confirm(
}).then(res => { `${this.$t("是否确认删除昵称为{nickname}的会员?", { nickname })}`
this.$message.success(this.$t('删除成功'))
this.$router.back()
}).catch(() => {
// this.$message.success(this.$t('删除失败'))
}
) )
.then(function () {
return deleteUser(row.id);
})
.then((res) => {
this.$message.success(this.$t("删除成功"));
this.$router.back();
})
.catch(() => {
// this.$message.success(this.$t('删除失败'))
});
}, },
getDetails() { getDetails() {
memberUserGet({id: this.$route.params.id}).then(r => { memberUserGet({ id: this.$route.params.id }).then((r) => {
console.log(r, 'rrrr') console.log(r, "rrrr");
this.details = r.data this.details = r.data;
}) });
}, },
// 保函证书 // 保函证书
guarantee(row) { guarantee(row) {
...@@ -347,19 +683,18 @@ export default { ...@@ -347,19 +683,18 @@ export default {
operationLogFn(row) { operationLogFn(row) {
this.publicObj = row; this.publicObj = row;
this.operationLogFrom.page = 1; this.operationLogFrom.page = 1;
this.operationLogFrom.userId = row.id this.operationLogFrom.userId = row.id;
this.operationLogShow = true; this.operationLogShow = true;
this.operationLogList = []; this.operationLogList = [];
this.getOperationLogList(); this.getOperationLogList();
}, },
getOperationLogList() { getOperationLogList() {
operationLogApi(this.operationLogFrom).then(r => { operationLogApi(this.operationLogFrom).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.operationLogList = r.data.list this.operationLogList = r.data.list;
this.totalLog = r.data.total this.totalLog = r.data.total;
} }
}) });
}, },
identityFn(row, val) { identityFn(row, val) {
this.attestationShow = true; this.attestationShow = true;
...@@ -380,51 +715,51 @@ export default { ...@@ -380,51 +715,51 @@ export default {
}, },
getIdentityDetails() { getIdentityDetails() {
this.resetId(); this.resetId();
memberGetAuthIdcardInfo({userId: this.publicObj.id}).then(r => { memberGetAuthIdcardInfo({ userId: this.publicObj.id }).then((r) => {
if (r.code === 0 && !!r.data) { if (r.code === 0 && !!r.data) {
this.IdDetails = r.data this.IdDetails = r.data;
} }
}) });
}, },
getEnterpriseFn() { getEnterpriseFn() {
this.resetEnterprise(); this.resetEnterprise();
memberGetAuthEnterpriseInfo({userId: this.publicObj.id}).then(r => { memberGetAuthEnterpriseInfo({ userId: this.publicObj.id }).then((r) => {
if (r.code === 0 && !!r.data) { if (r.code === 0 && !!r.data) {
this.enterpriseFrom = r.data this.enterpriseFrom = r.data;
} }
}) });
}, },
//身份证审核 //身份证审核
idCardAuditFn(val) { idCardAuditFn(val) {
let p = { let p = {
auditStatus: val, auditStatus: val,
userCardAuthId: this.IdDetails.id, userCardAuthId: this.IdDetails.id,
auditRemark: this.IdDetails.auditRemark auditRemark: this.IdDetails.auditRemark,
} };
memberUserAuditIdCard(p).then(r => { memberUserAuditIdCard(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.$message.success(this.$t('修改成功')); this.$message.success(this.$t("修改成功"));
this.getList() this.getList();
this.getIdentityDetails() this.getIdentityDetails();
} }
}) });
}, },
// 企业证书审核 // 企业证书审核
certificateVerificationFn(val) { certificateVerificationFn(val) {
let p = { let p = {
auditStatus: val, auditStatus: val,
userEnterpriseAuthId: this.enterpriseFrom.id, userEnterpriseAuthId: this.enterpriseFrom.id,
auditRemark: this.enterpriseFrom.auditRemark auditRemark: this.enterpriseFrom.auditRemark,
} };
memberUserAuditEnterprise(p).then(r => { memberUserAuditEnterprise(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.getList() this.getList();
this.getEnterpriseFn(); this.getEnterpriseFn();
} }
}) });
}, },
setMemberUserUpdateIdCard() { setMemberUserUpdateIdCard() {
this.$refs.formId.validate(async valid => { this.$refs.formId.validate(async (valid) => {
if (valid) { if (valid) {
let p = { let p = {
cardNumber: this.IdDetails.cardNumber, cardNumber: this.IdDetails.cardNumber,
...@@ -435,21 +770,21 @@ export default { ...@@ -435,21 +770,21 @@ export default {
userCardAuthId: this.IdDetails.id, userCardAuthId: this.IdDetails.id,
auditPass: true, auditPass: true,
}; };
memberUserUpdateIdCard(p).then(r => { memberUserUpdateIdCard(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.$message.success(this.$t('修改成功')) this.$message.success(this.$t("修改成功"));
if (p.auditPass === true) { if (p.auditPass === true) {
this.getIdentityDetails() this.getIdentityDetails();
} }
this.getList() this.getList();
this.modifyIdCard = true; this.modifyIdCard = true;
} }
}) });
} }
}) });
}, },
setMemberUserUpdateEnterprise() { setMemberUserUpdateEnterprise() {
this.$refs.formEnter.validate(async valid => { this.$refs.formEnter.validate(async (valid) => {
if (valid) { if (valid) {
let p = { let p = {
cardNumber: this.enterpriseFrom.cardNumber, cardNumber: this.enterpriseFrom.cardNumber,
...@@ -459,19 +794,19 @@ export default { ...@@ -459,19 +794,19 @@ export default {
name: this.enterpriseFrom.name, name: this.enterpriseFrom.name,
userEnterpriseAuthId: this.enterpriseFrom.id, userEnterpriseAuthId: this.enterpriseFrom.id,
auditPass: true, auditPass: true,
} };
memberUserUpdateEnterprise(p).then(r => { memberUserUpdateEnterprise(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
if (p.auditPass === true) { if (p.auditPass === true) {
this.getEnterpriseFn(); this.getEnterpriseFn();
} }
this.getList() this.getList();
this.modifyLicense = true; this.modifyLicense = true;
this.$message.success(this.$t('修改成功')); this.$message.success(this.$t("修改成功"));
} }
}) });
} }
}) });
}, },
submit() { submit() {
let p = { let p = {
...@@ -481,20 +816,20 @@ export default { ...@@ -481,20 +816,20 @@ export default {
legalName: this.enterpriseFrom.legalName, legalName: this.enterpriseFrom.legalName,
name: this.enterpriseFrom.name, name: this.enterpriseFrom.name,
userEnterpriseAuthId: this.enterpriseFrom.id, userEnterpriseAuthId: this.enterpriseFrom.id,
userId: this.publicObj.id userId: this.publicObj.id,
} };
userCreateAuditEnterprise(p).then(r => { userCreateAuditEnterprise(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.$message.success(this.$t('添加成功!')); this.$message.success(this.$t("添加成功!"));
this.enterpriseFrom.status = 2 this.enterpriseFrom.status = 2;
this.enterpriseFrom.auditTime = new Date().getTime() this.enterpriseFrom.auditTime = new Date().getTime();
this.getEnterpriseFn(); this.getEnterpriseFn();
this.getList() this.getList();
} }
}) });
}, },
submitId() { submitId() {
this.$refs.formId.validate(async valid => { this.$refs.formId.validate(async (valid) => {
if (valid) { if (valid) {
let p = { let p = {
cardNumber: this.IdDetails.cardNumber, cardNumber: this.IdDetails.cardNumber,
...@@ -503,19 +838,19 @@ export default { ...@@ -503,19 +838,19 @@ export default {
img2: this.IdDetails.img2, img2: this.IdDetails.img2,
name: this.IdDetails.name, name: this.IdDetails.name,
status: 2, status: 2,
userId: this.publicObj.id userId: this.publicObj.id,
}; };
createAuditIdCard(p).then(r => { createAuditIdCard(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.$message.success(this.$t('添加成功!')); this.$message.success(this.$t("添加成功!"));
this.IdDetails.status = 2 this.IdDetails.status = 2;
this.IdDetails.auditTime = new Date().getTime() this.IdDetails.auditTime = new Date().getTime();
this.getIdentityDetails(); this.getIdentityDetails();
this.getList() this.getList();
} }
}) });
} }
}) });
}, },
/** 表单重置 */ /** 表单重置 */
resetId() { resetId() {
...@@ -528,11 +863,11 @@ export default { ...@@ -528,11 +863,11 @@ export default {
id: 0, id: 0,
img1: undefined, img1: undefined,
img2: undefined, img2: undefined,
name: '', name: "",
status: 0, status: 0,
userId: 0 userId: 0,
} };
},//清空身份证 }, //清空身份证
resetEnterprise() { resetEnterprise() {
this.enterpriseFrom = { this.enterpriseFrom = {
auditRemark: undefined, auditRemark: undefined,
...@@ -545,21 +880,23 @@ export default { ...@@ -545,21 +880,23 @@ export default {
legalName: undefined, legalName: undefined,
name: undefined, name: undefined,
status: 0, status: 0,
userId: undefined userId: undefined,
} };
},//清空企业 }, //清空企业
setGuarantee() { setGuarantee() {
seTupdateBackletter({userId: this.publicObj.id, backLetter: this.guaranteeUrl}).then(r => { seTupdateBackletter({
userId: this.publicObj.id,
backLetter: this.guaranteeUrl,
}).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.publicObj.backLetterImg = this.guaranteeUrl; this.publicObj.backLetterImg = this.guaranteeUrl;
this.guaranteeShow = false; this.guaranteeShow = false;
this.$message.success(this.$t('保存成功')); this.$message.success(this.$t("保存成功"));
} }
}) });
}, },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>
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