|
@@ -4,7 +4,7 @@
|
|
|
<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" @click="canEdit = true">编辑</el-button>
|
|
|
+<!-- <el-button type="primary" class="pull-right" size="small" v-if="canEdit" @click="canEdit = true">编辑</el-button>-->
|
|
|
</div>
|
|
|
<el-steps :active="active" process-status="finish" style="width: 400px;margin: 0 auto;margin-bottom: 20px;">
|
|
|
<el-step title="上传企业信息"></el-step>
|
|
@@ -186,6 +186,7 @@
|
|
|
user: {},
|
|
|
canEdit:false,
|
|
|
authType:-1,
|
|
|
+ authStatus:{},
|
|
|
enterpriseForm: {
|
|
|
roleList: [],//0是发包 1是接包 如果两个都有那么权限都有。
|
|
|
legalPersonName: "", //法人姓名
|
|
@@ -205,21 +206,31 @@
|
|
|
},
|
|
|
methods: {
|
|
|
submitEnterpriseAuth() {
|
|
|
- Http.put(`/api/user/${this.user.id}/agency`, this.enterpriseForm).then(res => {
|
|
|
- if (res) {
|
|
|
- notify('success', '提交成功');
|
|
|
- this.$router.push('/personal/authentication')
|
|
|
- }
|
|
|
- })
|
|
|
+ let firstSubmit = this.$route.query.type;
|
|
|
+ if(firstSubmit==1){
|
|
|
+ Http.post(`/api/user/${this.user.id}/agency`, this.enterpriseForm).then(res => {
|
|
|
+ if (res) {
|
|
|
+ notify('success', '提交成功');
|
|
|
+ this.$router.push('/personal/authentication')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ Http.put(`/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 = res.agencyVO.authStatus ? res.agencyVO.authStatus : {}
|
|
|
//成功和审核中状态不可编辑,认证失败状态可编辑
|
|
|
- this.authStatus.style !== 'info' ? this.canEdit = true : null
|
|
|
+ this.authStatus.style === 'info' ? this.canEdit = true : null
|
|
|
this.failureReason = res.agencyVO.explain
|
|
|
this.setFormInfo(res.agencyVO);
|
|
|
} else {
|
|
@@ -294,7 +305,8 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.setUserInfo();
|
|
|
- this.getAuthStatus()
|
|
|
+ this.getAuthStatus();
|
|
|
+ console.log(this.$route.params.type)
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -322,15 +334,20 @@
|
|
|
width: 270px;
|
|
|
height: 170px;
|
|
|
}
|
|
|
+ .avatar-uploader .el-upload{
|
|
|
+ width: 170px;
|
|
|
+ height: 170px;
|
|
|
+ }
|
|
|
.avatar-uploader .el-upload:hover {
|
|
|
border-color: #409EFF;
|
|
|
}
|
|
|
+
|
|
|
.avatar-uploader-icon {
|
|
|
font-size: 28px;
|
|
|
color: #8c939d;
|
|
|
width: 100%;
|
|
|
height:170px;
|
|
|
- line-height: 178px;
|
|
|
+ line-height: 170px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.avatar {
|