Browse Source

机构扩展信息bug修改

jingyuanchao 1 năm trước cách đây
mục cha
commit
12f0679370
1 tập tin đã thay đổi với 11 bổ sung8 xóa
  1. 11 8
      src/views/system/dept/extend.vue

+ 11 - 8
src/views/system/dept/extend.vue

@@ -252,8 +252,8 @@
                   :value="dict.value"
                 ></el-option>
               </el-select>
-            </el-descriptions-item> 
-    
+            </el-descriptions-item>
+
             <el-descriptions-item v-if="type === org_type.yewd" labelClassName="gx_info_label" label="是否配备保安人员">
               <el-radio-group v-model="askari">
                 <el-radio :label="1">是</el-radio>
@@ -492,7 +492,7 @@
     uploadFile,
   } from "@/api/system/extend";
 
-  import { 
+  import {
     listDept,
     getDept,
     delDept,
@@ -558,7 +558,7 @@ export default {
       rules: {
         type: [{required: true, message: "请选择机构类型", trigger: "change"}],
         standard: [{required: true, message: "请选择标准", trigger: "change"}],
-        certificate: [{required: true, message: "请选择上传证书", trigger: "change"}],
+      //  certificate: [{required: true, message: "请选择上传证书", trigger: "change"}],
       },
       remoteCountoptions: [
         {label: "0", value: 0},
@@ -1309,7 +1309,6 @@ export default {
     orgcancel() {
       console.log(this.orgform.certificate,123123);
       console.log(  this.orgimgs,'123123');
-      debugger
       this.orgopen = false;
       this.orgform.certificate=null;
       this.orgimgs=null;
@@ -1339,8 +1338,8 @@ export default {
     },
     /** 提交按钮 */
     submitOrgForm() {
-        
-      console.log(this.orgform.certificate,'this.orgform.certificate')
+
+      console.log(this.orgform.certificate, 'this.orgform.certificate')
       if (this.orgform.certificate > 0) {
         //this.orgform.certificate = this.orgimgs[this.orgimgs.length - 1].toString(",");
       }
@@ -1351,6 +1350,10 @@ export default {
       //certificate
       this.$refs.orgform.validate((valid) => {
         if (valid) {
+          if (this.orgform.standard !== '3' && (this.orgform.certificate == null||this.orgform.certificate == 0)) {
+            this.$modal.alertError("请上传证书");
+            return;
+          }
           // 表单验证通过,提交数据或执行其他操作
           this.orgform.orgId = this.$route.params.id;
           // this.orgform.type = 1;
@@ -1556,4 +1559,4 @@ export default {
   }
 
 
-</style>
+</style>