Browse Source

1、接包-发包权限 修改->发包企业、测评机构;2、企业注册时,法人性别、身份证到期时间、家庭或单位地址改为选填项。

JunboXu 2 years ago
parent
commit
53e6ac73a2
1 changed files with 13 additions and 8 deletions
  1. 13 8
      src/pages/UserCenter/EnterpriseAuth.vue

+ 13 - 8
src/pages/UserCenter/EnterpriseAuth.vue

@@ -117,9 +117,9 @@
           <el-input :disabled="!canEdit" v-model="enterpriseForm.address"></el-input>
         </el-form-item>
         <el-form-item label="认证权限" prop="roleList">
-          <el-checkbox-group v-model="enterpriseForm.roleList" :disabled="!canEdit">
-            <el-checkbox :label="1">发包</el-checkbox>
-            <el-checkbox :label="0">接包</el-checkbox>
+          <el-checkbox-group v-model="enterpriseForm.roleList" :disabled="!canEdit" :min="1" :max="1">
+            <el-checkbox :label="1">发包企业</el-checkbox>
+            <el-checkbox :label="0">测评机构</el-checkbox>
           </el-checkbox-group>
         </el-form-item>
       </el-form>
@@ -245,16 +245,16 @@
             {required: false, message: '请输入身份证号码', trigger: 'blur'},
           ],
           address: [
-            {required: true, message: '请输入家庭或单位地址', trigger: 'blur'},
+            {required: false, message: '请输入家庭或单位地址', trigger: 'blur'},
           ],
           gender: [
-            {required: true, message: '请选择性别', trigger: 'blur'}
+            {required: false, message: '请选择性别', trigger: 'blur'}
           ],
           roleList: [
-            {type: 'array', required: true, message: '请至少选择一个认证权限', trigger: 'change'}
+            {type: 'array', required: true, message: '请选择认证权限', trigger: 'change'}
           ],
           idCardDeadTime: [
-            {required: true, message: '请选择身份证过期时间', trigger: 'change'}
+            {required: false, message: '请选择身份证过期时间', trigger: 'change'}
           ]
         }
 
@@ -292,6 +292,9 @@
            //return false;
          //}
         let firstSubmit = this.$route.query.type;
+        if (this.enterpriseForm.roleList[0]=="0") {
+          this.enterpriseForm.roleList.push("1")
+        }
         let data = {...this.enterpriseForm, ...this.enterpriseForm1};
         this.showLoading();
         if (firstSubmit == 1) {
@@ -334,7 +337,9 @@
       },
       setFormInfo(detail) {
         //回显认证信息
-        this.enterpriseForm.roleList = detail.roleList,
+        console.log("回显认证信息", detail.roleList);
+        this.enterpriseForm.roleList = detail.roleList.length>1?[0]:[1],
+        console.log(this.enterpriseForm.roleList,"this.enterpriseForm.roleList");
           this.enterpriseForm.legalPersonName = detail.legalPersonName,
           this.enterpriseForm.gender = detail.gender,
           this.enterpriseForm.idCardNum = detail.idCardNum,