소스 검색

no message

linwenxin 5 달 전
부모
커밋
bfb2e1ace4
1개의 변경된 파일15개의 추가작업 그리고 3개의 파일을 삭제
  1. 15 3
      src/views/setting/departmentManage/index.vue

+ 15 - 3
src/views/setting/departmentManage/index.vue

@@ -102,7 +102,19 @@
 
               <el-col :span="6">
                 <el-form-item label="所属公司" prop="belongCompanyCode">
-                  <el-select v-model="mainForm.belongCompanyCode" placeholder="请选择">
+                  <el-select
+                    v-model="mainForm.belongCompanyCode"
+                    placeholder="请选择"
+                    @change="
+                      V => {
+                        if (v) {
+                          belongCompany = BELONG_COMPANY.find(v).label
+                        } else {
+                          belongCompany = ''
+                        }
+                      }
+                    "
+                  >
                     <el-option v-for="item in BELONG_COMPANY" :key="item.value" :label="item.label" :value="item.value">
                     </el-option>
                   </el-select>
@@ -460,8 +472,8 @@ export default {
         attr: '',
         level: '',
         insureType: [],
-        belongCompanyCode: JSON.parse(localStorage.getItem('greemall_user'))?.companyWechatId || '',
-        belongCompany: JSON.parse(localStorage.getItem('greemall_user'))?.companyName || '',
+        belongCompanyCode: '',
+        belongCompany: '',
         payInsureCodeId: ''
       },
       mainFormRules: {