linwenxin 5 mesi fa
parent
commit
2a6077e1f8
1 ha cambiato i file con 24 aggiunte e 4 eliminazioni
  1. 24 4
      src/views/setting/departmentManage/index.vue

+ 24 - 4
src/views/setting/departmentManage/index.vue

@@ -172,9 +172,29 @@
               <el-col :span="6">
                 <el-form-item label="保险类型" prop="insureType">
                   <el-checkbox-group v-model="mainForm.insureType">
-                    <el-checkbox label="意外险">意外险</el-checkbox>
-                    <el-checkbox label="雇主险">雇主险</el-checkbox>
-                    <el-checkbox label="工伤险">工伤险</el-checkbox>
+                    <el-checkbox label="意外险" :disabled="mainForm.insureType.includes('意外险')">意外险</el-checkbox>
+                    <el-checkbox
+                      label="雇主险"
+                      @change="
+                        () => {
+                          if (mainForm.insureType.includes('雇主险') && mainForm.insureType.includes('工伤险')) {
+                            mainForm.insureType.splice(mainForm.insureType.indexOf('工伤险'), 1)
+                          }
+                        }
+                      "
+                      >雇主险</el-checkbox
+                    >
+                    <el-checkbox
+                      label="工伤险"
+                      @change="
+                        () => {
+                          if (mainForm.insureType.includes('雇主险') && mainForm.insureType.includes('工伤险')) {
+                            mainForm.insureType.splice(mainForm.insureType.indexOf('雇主险'), 1)
+                          }
+                        }
+                      "
+                      >工伤险</el-checkbox
+                    >
                   </el-checkbox-group>
                 </el-form-item>
               </el-col>
@@ -473,7 +493,7 @@ export default {
         linkMobile: '',
         attr: '',
         level: '',
-        insureType: [],
+        insureType: ['意外险'],
         belongCompanyCode: '',
         belongCompany: '',
         payInsureCodeId: ''