Bladeren bron

增加获取认证详情

guochao 6 jaren geleden
bovenliggende
commit
4ee7a58804
1 gewijzigde bestanden met toevoegingen van 112 en 13 verwijderingen
  1. 112 13
      src/components/authen/AuthenticationManage.vue

+ 112 - 13
src/components/authen/AuthenticationManage.vue

@@ -58,21 +58,53 @@
       </el-table>
       <el-dialog title="认证详情" :visible.sync="showDialog" center width="30%">
         <el-form :model="authInfoDetail">
-          <el-form-item label="userId">
-            <span>{{authInfoDetail.userId}}</span>
-          </el-form-item>
-          <el-form-item label="type">
+          <el-form-item label="类型:">
             <span>{{authInfoDetail.type}}</span>
           </el-form-item>
-          <el-form-item label="日期">
-            <span>{{authInfoDetail.date}}</span>
+          <el-form-item label="姓名:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.realName}}</span>
+          </el-form-item>
+          <el-form-item label="身份证号:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.IDCard}}</span>
+          </el-form-item>
+          <el-form-item label="身份证照:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.IDCardPhoto}}</span>
           </el-form-item>
-          <el-form-item label="姓名">
-            <span>{{authInfoDetail.name}}</span>
+          <el-form-item label="银行账号:">
+            <span>{{authInfoDetail.bankAccount}}</span>
           </el-form-item>
-          <el-form-item label="地址">
+          <el-form-item label="地址">
             <span>{{authInfoDetail.address}}</span>
           </el-form-item>
+          <el-form-item label="申请时间:">
+            <span>{{authInfoDetail.applyTime}}</span>
+          </el-form-item>
+
+          <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'enterprise'">
+            <span>{{authInfoDetail.enterpriseName}}</span>
+          </el-form-item>
+          <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'enterprise'">
+            <span>{{authInfoDetail.legalPersonName}}</span>
+          </el-form-item>
+          <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'enterprise'">
+            <span>{{authInfoDetail.businessLicensePhoto}}</span>
+          </el-form-item>
+          <el-form-item label="统一社会信用代码:" v-if="authInfoDetail.type == 'enterprise'">
+            <span>{{authInfoDetail.unifiedSocialCreditCode}}</span>
+          </el-form-item>
+
+          <el-form-item label="机构名称:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.evaluationAgencyName}}</span>
+          </el-form-item>
+          <el-form-item label="机构能力:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.evaluationAgencyAbilityList}}</span>
+          </el-form-item>
+          <el-form-item label="机构资源:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.evaluationAgencyResourceList}}</span>
+          </el-form-item>
+          <el-form-item label="机构Logo:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.agencyPhoto}}</span>
+          </el-form-item>
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button type="info" size="mini" @click="hideAuthDialog()">返回</el-button>
@@ -102,6 +134,9 @@ import {
   getAllHandledAuthInfo,
   getAllHandlingAuthInfo,
   getFormalTimeFromDate,
+  getCurrentAgencyAuthInfo,
+  getCurrentEnterpriseAuthInfo,
+  getCurrentIndividualAuthenInfo
 } from '@/js/index'
 import {notify} from '@/constants/index'
 
@@ -120,9 +155,24 @@ export default {
       authInfoDetail: {
         userId: '',
         type: '',
-        date: 'ads',
-        name: 'qweqweqwe',
-        address: 'qweqweqwe'
+        realName: '',
+        IDCard: '',
+        IDCardPhoto: '',
+        bankAccount:'',
+        address:'',
+        applyTime:'',
+
+        enterpriseName:'',
+        legalPersonName:'',
+        businessLicensePhoto:'',
+        unifiedSocialCreditCode:'',
+
+        evaluationAgencyName:'',
+        evaluationAgencyAbilityList: [],
+        evaluationAgencyResourceList: [],
+        agencyPhoto:'',
+        updateTime:'',
+        expireTime:''
       }
     }
   },
@@ -206,7 +256,7 @@ export default {
     handleAuthDetail (userId, type) {
       this.authInfoDetail.userId = userId
       this.authInfoDetail.type = type
-      this.showAuthDialog()
+      this.getAuthInfo(userId, type);
     },
     showLoading () {
       this.loading = true
@@ -227,6 +277,55 @@ export default {
     hideAuthDialog () {
       this.showDialog = false
     },
+    getAuthInfo(userId, type){
+        this.showLoading();
+        if(type == 'personal'){
+            getCurrentIndividualAuthenInfo(userId, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail);
+        }else if(type == 'enterprise'){
+            getCurrentEnterpriseAuthInfo(userId, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail);
+        }else if(type == 'agency'){
+            getCurrentAgencyAuthInfo(userId, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail);
+        }
+    },
+    getCurrentIndividualAuthenInfoSuccess(res){
+        this.hideLoading();
+        console.log(res)
+        this.authInfoDetail.realName = res.realName;
+        this.authInfoDetail.IDCard = res.idcard;
+        this.authInfoDetail.IDCardPhoto = res.idcardPhoto;
+        this.authInfoDetail.bankAccount = res.bankAccount;
+        this.authInfoDetail.address = res.address;
+        this.authInfoDetail.applyTime = res.applyTime;
+        this.showAuthDialog()
+        console.log(res)
+
+    },
+    getCurrentIndividualAuthenInfoFail(error){
+        this.hideLoading();
+        notify('error','获取个人认证信息出错:' + error.data);
+    },
+    getCurrentEnterpriseAuthInfoSuccess(){
+        this.hideLoading();
+        this.authInfoDetail.enterpriseName = res.enterpriseName;
+        this.authInfoDetail.legalPersonName = res.legalPersonName;
+        this.authInfoDetail.businessLicensePhoto = res.businessLicensePhoto;
+    },
+    getCurrentEnterpriseAuthInfoFail(){
+        this.hideLoading();
+        notify('error','获取企业认证信息出错:' + error.data);
+    },
+    getCurrentAgencyAuthInfoSuccess(){
+        this.hideLoading();
+        this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName;
+        this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList;
+        this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList;
+        this.authInfoDetail.agencyPhoto = res.agencyPhoto;
+        this.authInfoDetail.updateTime = res.updateTime;
+    },
+    getCurrentAgencyAuthInfoFail(){
+        this.hideLoading();
+        notify('error','获取机构认证信息出错:' + error.data);
+    }
   }
 }
 </script>