Parcourir la source

选择雇主险,不用显示工伤险代买单位字段

linwenxin il y a 5 mois
Parent
commit
c60d2aa6b1
1 fichiers modifiés avec 18 ajouts et 14 suppressions
  1. 18 14
      src/views/setting/departmentManage/index.vue

+ 18 - 14
src/views/setting/departmentManage/index.vue

@@ -511,7 +511,19 @@ export default {
         payInsureCodeId: '',
         insureSteadUnit: ''
       },
-      mainFormRules: {
+      indexs: [0],
+      BELONG_COMPANY: [],
+      INSURE_STEAD_UNIT: []
+    }
+  },
+
+  created() {
+    this.getList()
+  },
+
+  computed: {
+    mainFormRules() {
+      return {
         name: [{ required: true, message: '请填写网点名称', trigger: 'blur' }],
         linkName: [{ required: true, message: '请填写联系人名称', trigger: 'blur' }],
         websitId: [{ required: true, message: '请填写网点编号', trigger: 'blur' }],
@@ -530,19 +542,11 @@ export default {
         insureType: [{ required: true, message: '请输入', trigger: 'blur' }],
         belongCompanyCode: [{ required: true, message: '请输入', trigger: 'blur' }],
         payInsureCodeId: [{ required: true, message: '请输入', trigger: 'blur' }],
-        insureSteadUnit: [{ required: true, message: '请输入', trigger: 'blur' }]
-      },
-      indexs: [0],
-      BELONG_COMPANY: [],
-      INSURE_STEAD_UNIT: []
-    }
-  },
-
-  created() {
-    this.getList()
-  },
-
-  computed: {
+        insureSteadUnit: this.mainForm.insureType.includes('工伤险')
+          ? [{ required: true, message: '请输入', trigger: 'blur' }]
+          : []
+      }
+    },
     showList() {
       return [...this.dataList]
         .filter(item => {