|
|
@@ -2,59 +2,92 @@
|
|
|
<div class="right-modifyPsw">
|
|
|
<div class="right-modifyPsw-title">
|
|
|
<span style="font-size: 18px;font-weight: bold">企业认证</span>
|
|
|
+ <el-tag :type="authStatus.style" v-if="authType===1">{{authStatus.text}}</el-tag>
|
|
|
+ <el-tag type="danger" v-if="authType===0">未认证</el-tag>
|
|
|
+ <el-button type="primary" class="pull-right" size="small" v-if="canEdit">编辑</el-button>
|
|
|
</div>
|
|
|
<el-steps :active="active" process-status="finish" style="margin-bottom: 20px">
|
|
|
<el-step title="上传企业信息"></el-step>
|
|
|
<el-step title="上传法人信息"></el-step>
|
|
|
- <el-step title="确认信息"></el-step>
|
|
|
+<!-- <el-step title="确认信息"></el-step>-->
|
|
|
<!-- <el-step title="认证结果"></el-step>-->
|
|
|
</el-steps>
|
|
|
<div class="upload-wrapper" v-if="active===0">
|
|
|
- <div>
|
|
|
- <el-upload
|
|
|
- class="avatar-uploader idcard-uploader"
|
|
|
- action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
- :before-upload="beforeFileUpload"
|
|
|
- :http-request="uploadFile"
|
|
|
- :data="{type:2}"
|
|
|
- >
|
|
|
- <img v-if="enterpriseForm.businessLicensePhoto" :src="enterpriseForm.businessLicensePhoto" class="avatar">
|
|
|
- </el-upload>
|
|
|
+ <el-row class="agency-form-item">
|
|
|
+ <el-col :span="3">企业logo:</el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-upload
|
|
|
+ class="avatar-uploader idcard-uploader"
|
|
|
+ action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
+ :before-upload="beforeFileUpload"
|
|
|
+ :http-request="uploadFile"
|
|
|
+ :data="{type:3}"
|
|
|
+ :disabled="!canEdit"
|
|
|
+ >
|
|
|
+ <img v-if="enterpriseForm.agencyPhoto" :src="enterpriseForm.agencyPhoto" class="avatar">
|
|
|
+ </el-upload>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
- <div><span style="color: red">*</span>营业执照:(仅支持三证合一)</div>
|
|
|
- </div>
|
|
|
- <div class="authentication-detail">
|
|
|
- <div class="authentication-detail-title">证件要求</div>
|
|
|
- <ul class="authentication-detail-list">
|
|
|
- <li>必须为清晰、完整的彩色原件扫描件或数码照</li>
|
|
|
- <li>仅支持.jpg .bmp .png .gif的图片格式,图片大小不超过4M</li>
|
|
|
- <li>必须在有效期内且年检章齐全(当年成立的公司可无年检章)</li>
|
|
|
- <li>必须为中国大陆工商局颁发</li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
+ <el-row class="agency-form-item">
|
|
|
+ <el-col :span="3">企业名称:</el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input :disabled="!canEdit" v-model="enterpriseForm.evaluationAgencyName" placeholder="企业名称"></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row class="agency-form-item">
|
|
|
+ <div>营业执照:</div>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="uploader-businessLicensePhoto">
|
|
|
+ <el-upload
|
|
|
+ class="avatar-uploader idcard-uploader"
|
|
|
+ action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
+ :before-upload="beforeFileUpload"
|
|
|
+ :http-request="uploadFile"
|
|
|
+ :data="{type:2}"
|
|
|
+ :disabled="!canEdit"
|
|
|
+ >
|
|
|
+ <img v-if="enterpriseForm.businessLicensePhoto" :src="enterpriseForm.businessLicensePhoto" class="avatar">
|
|
|
+ </el-upload>
|
|
|
+ <div><span style="color: red">*</span>营业执照:(仅支持三证合一)</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="16">
|
|
|
+ <div class="authentication-detail">
|
|
|
+ <div class="authentication-detail-title">证件要求</div>
|
|
|
+ <ul class="authentication-detail-list">
|
|
|
+ <li>必须为清晰、完整的彩色原件扫描件或数码照</li>
|
|
|
+ <li>仅支持.jpg .bmp .png .gif的图片格式,图片大小不超过4M</li>
|
|
|
+ <li>必须在有效期内且年检章齐全(当年成立的公司可无年检章)</li>
|
|
|
+ <li>必须为中国大陆工商局颁发</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
<div class="legal-person-wrapper" v-if="active===1">
|
|
|
<el-form ref="enterpriseForm" :model="enterpriseForm" label-width="120px" style="width: 70%">
|
|
|
<el-form-item label="法人姓名">
|
|
|
- <el-input v-model="enterpriseForm.legalPersonName" placeholder="请输入您的姓名,需与身份证保持一致"></el-input>
|
|
|
+ <el-input :disabled="!canEdit" v-model="enterpriseForm.legalPersonName" placeholder="请输入您的姓名,需与身份证保持一致"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证号码">
|
|
|
- <el-input v-model="enterpriseForm.idCardNum" placeholder="身份证前后不能有空格"></el-input>
|
|
|
+ <el-input :disabled="!canEdit" v-model="enterpriseForm.idCardNum" placeholder="身份证前后不能有空格"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="性别">
|
|
|
- <el-radio-group v-model="enterpriseForm.sex">
|
|
|
+ <el-radio-group v-model="enterpriseForm.gender" :disabled="!canEdit">
|
|
|
<el-radio label="男"></el-radio>
|
|
|
<el-radio label="女"></el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证到期时间">
|
|
|
- <el-input v-model="enterpriseForm.idCardDeadTime" placeholder="请按身份证背面“有效期限”如实填写"></el-input>
|
|
|
+ <el-input :disabled="!canEdit" v-model="enterpriseForm.idCardDeadTime" placeholder="请按身份证背面“有效期限”如实填写"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="家庭或单位地址">
|
|
|
- <el-input v-model="enterpriseForm.address"></el-input>
|
|
|
+ <el-input :disabled="!canEdit" v-model="enterpriseForm.address"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="认证权限">
|
|
|
- <el-checkbox-group v-model="enterpriseForm.roleList">
|
|
|
+ <el-checkbox-group v-model="enterpriseForm.roleList" :disabled="!canEdit">
|
|
|
<el-checkbox :label="0">发任务</el-checkbox>
|
|
|
<el-checkbox :label="1">接任务</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
@@ -70,6 +103,7 @@
|
|
|
:before-upload="beforeFileUpload"
|
|
|
:http-request="uploadFile"
|
|
|
:data="{type:0}"
|
|
|
+ :disabled="!canEdit"
|
|
|
>
|
|
|
<img v-if="enterpriseForm.idCardPositivePhoto" :src="enterpriseForm.idCardPositivePhoto" class="avatar">
|
|
|
</el-upload>
|
|
|
@@ -82,6 +116,7 @@
|
|
|
:before-upload="beforeFileUpload"
|
|
|
:http-request="uploadFile"
|
|
|
:data="{type:1}"
|
|
|
+ :disabled="!canEdit"
|
|
|
>
|
|
|
<img v-if="enterpriseForm.idCardBackPhoto" :src="enterpriseForm.idCardBackPhoto" class="avatar">
|
|
|
</el-upload>
|
|
|
@@ -124,38 +159,69 @@
|
|
|
import Http from '@/js/http'
|
|
|
import {notify} from '@/constants/index'
|
|
|
import {storageGet} from '@/js/index'
|
|
|
-
|
|
|
+ import idcardPositive from '../../assets/img/idcard-positive.png'
|
|
|
+ import idcardBack from '../../assets/img/idcard-back.png'
|
|
|
export default {
|
|
|
name: "EnterpriseAuth",
|
|
|
data() {
|
|
|
return {
|
|
|
active: 0,
|
|
|
user: {},
|
|
|
+ canEdit:false,
|
|
|
enterpriseForm: {
|
|
|
- roleList: [
|
|
|
- 0, 1
|
|
|
- ],//0是发包 1是接包 如果两个都有那么权限都有。
|
|
|
- legalPersonName: "徐璇", //法人姓名
|
|
|
+ roleList: [],//0是发包 1是接包 如果两个都有那么权限都有。
|
|
|
+ legalPersonName: "", //法人姓名
|
|
|
businessLicensePhoto: require('../../assets/img/business-license.png'),//企业执照
|
|
|
- idCardNum: "223025199806053322",//身份证号码
|
|
|
- address: "南京市沛县徐园",//地址
|
|
|
- sex: "男",
|
|
|
- idCardPositivePhoto: "000001.png",//身份证正面照
|
|
|
- idCardBackPhoto: "00002.png",//身份证反面照片
|
|
|
- idCardDeadTime: "2022-08-09"//身份证过期时间
|
|
|
+ idCardNum: "",//身份证号码
|
|
|
+ address: "",//地址
|
|
|
+ gender: "",
|
|
|
+ idCardPositivePhoto: idcardPositive,//身份证正面照
|
|
|
+ idCardBackPhoto: idcardBack,//身份证反面照片
|
|
|
+ idCardDeadTime: "",//身份证过期时间
|
|
|
+ evaluationAgencyName:"", //企业名称
|
|
|
+ agencyPhoto:"", //企业logo
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
submitEnterpriseAuth() {
|
|
|
- Http.post(`/api/user/${this.user.id}/enterpriseAuth`, this.enterpriseForm).then(res => {
|
|
|
+ Http.post(`/api/user/${this.user.id}/agency`, this.enterpriseForm).then(res => {
|
|
|
if (res) {
|
|
|
notify('success', '认证成功');
|
|
|
this.$router.push('/personal/authentication')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //获取当前认证状态
|
|
|
+ getAuthStatus() {
|
|
|
+ Http.get(`/api/user/${this.user.id}`).then(res => {
|
|
|
+ if (res.agencyVO) {
|
|
|
+ this.authType = 1 //个人已参与认证
|
|
|
+ this.authStatus = res.agencyVO.authStatus
|
|
|
+ //成功和审核中状态不可编辑,认证失败状态可编辑
|
|
|
+ this.authStatus.style === 'info' ? this.canEdit = true : null
|
|
|
+ this.setFormInfo(res.agencyVO);
|
|
|
+ } else {
|
|
|
+ this.authType = 0 //未参与个人认证
|
|
|
+ this.canEdit = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setFormInfo(detail) {
|
|
|
+ //回显认证信息
|
|
|
+ this.enterpriseForm.roleList = detail.roleList,
|
|
|
+ this.enterpriseForm.legalPersonName = detail.legalPersonName,
|
|
|
+ this.enterpriseForm.gender = detail.gender,
|
|
|
+ this.enterpriseForm.idCardNum = detail.idCardNum,
|
|
|
+ this.enterpriseForm.address = detail.address,
|
|
|
+ this.enterpriseForm.idCardPositivePhoto = detail.idCardPositivePhoto,
|
|
|
+ this.enterpriseForm.idCardBackPhoto = detail.idCardBackPhoto,
|
|
|
+ this.enterpriseForm.idCardDeadTime = detail.idCardDeadTime
|
|
|
+ this.enterpriseForm.businessLicensePhoto = detail.businessLicensePhoto
|
|
|
+ this.enterpriseForm.evaluationAgencyName = detail.evaluationAgencyName
|
|
|
+ this.enterpriseForm.agencyPhoto = detail.agencyPhoto
|
|
|
+ },
|
|
|
setUserInfo() {
|
|
|
this.user = storageGet('user') && storageGet('user').userVO;
|
|
|
},
|
|
|
@@ -194,8 +260,10 @@
|
|
|
this.enterpriseForm.businessLicensePhoto = res.data;
|
|
|
}else if(param.data.type == 1){
|
|
|
this.enterpriseForm.IDCardBackPhoto = res.data
|
|
|
- }else{
|
|
|
+ }else if(param.data.type == 0){
|
|
|
this.enterpriseForm.IDCardPositivePhoto = res.data
|
|
|
+ }else if(param.data.type == 3){
|
|
|
+ this.enterpriseForm.agencyPhoto = res.data
|
|
|
|
|
|
}
|
|
|
notify('success', '上传成功')
|
|
|
@@ -206,7 +274,8 @@
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.setUserInfo()
|
|
|
+ this.setUserInfo();
|
|
|
+ this.getAuthStatus()
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -225,9 +294,11 @@
|
|
|
}
|
|
|
|
|
|
.upload-wrapper {
|
|
|
- display: flex;
|
|
|
padding: 0 30px;
|
|
|
|
|
|
+ .agency-form-item {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
.authentication-detail {
|
|
|
padding: 0 30px;
|
|
|
border-left: 1px solid rgba(220, 220, 220, 1);
|