فهرست منبع

人员管理-新增人员输入问题

lihongxiao 3 سال پیش
والد
کامیت
3b5fd8fa70

+ 17 - 15
src/views/PeopleManage/Agent/AgentManage.vue

@@ -461,8 +461,8 @@ export default {
       this.pageData.deptId = this.currentTreeNode.id;
       this.pageData.pageNum =1;
       this.findPage();
-      this.formData.deptId = [];
-      this.platform(treeId);
+      // this.formData.deptId = [];
+      // this.platform(treeId);
     },
     platform(array) {
       if (!array.parent) {
@@ -473,7 +473,9 @@ export default {
     },
     //联级选择器触发事件
     handleChange(val) {
+      this.formData.deptId=val
       if (val.length !== 0) {
+        // this.formData.deptId=val
         this.formData.deptId = val.at(-1);
       }
      
@@ -553,10 +555,10 @@ export default {
         this.$message.info("请选择所属公司或部门");
         return;
       }
-      if(this.formData.deptId){
-        this.formData.deptId = this.formData.deptId.at(-1);
+      this.formData={
+        roleId:'20',
+        deptId:this.pageData.deptId
       }
-      this.formData.roleId='20'
       this.dialogTitle = "新增代理人";
       this.dialogVisible = true;
     },
@@ -588,16 +590,16 @@ export default {
       // for (let key in this.formData) {
       //   this.formData[key] = "";
       // }
-      this.formData={
-        roleId:'20',
-        id:'',
-        mobile:'',
-        email:'',
-        name:'',
-        password:'',
-        sex:'',
-        status:''
-      }
+      // this.formData={
+      //   roleId:'20',
+      //   id:'',
+      //   mobile:'',
+      //   email:'',
+      //   name:'',
+      //   password:'',
+      //   sex:'',
+      //   status:''
+      // }
       this.dialogVisible = false;
     },
     // 提交

+ 18 - 14
src/views/PeopleManage/Staff/StaffManage.vue

@@ -439,8 +439,8 @@ export default {
       this.pageData.deptId = this.currentTreeNode.id;
       this.pageData.pageNum =1;
       this.findPage();
-      this.formData.deptId = [];
-      this.platform(treeId);
+      // this.formData.deptId = [];
+      // this.platform(treeId);
       
     },
     platform(array) {
@@ -531,8 +531,12 @@ export default {
         this.$message.info("请选择所属公司或部门");
         return;
       }
-      if(this.formData.deptId){
-        this.formData.deptId = this.formData.deptId.at(-1);
+      // let deptId=''
+      // if(this.formData.deptId){
+      //    deptId = this.formData.deptId.at(-1);
+      // }
+      this.formData={
+        deptId:this.pageData.deptId
       }
       this.dialogTitle = "新增后线人员";
       this.dialogVisible = true;
@@ -564,16 +568,16 @@ export default {
       // for (let key in this.formData) {
       //   this.formData[key] = "";
       // }
-      this.formData={
-        roleId:'',
-        id:'',
-        mobile:'',
-        email:'',
-        name:'',
-        password:'',
-        sex:'',
-        status:''
-      }
+      // this.formData={
+      //   roleId:'',
+      //   id:'',
+      //   mobile:'',
+      //   email:'',
+      //   name:'',
+      //   password:'',
+      //   sex:'',
+      //   status:''
+      // }
       this.dialogVisible = false;
     },
     // 提交

+ 19 - 15
src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue

@@ -436,8 +436,8 @@ export default {
       this.pageData.deptId = this.currentTreeNode.id;
       this.pageData.pageNum =1;
       this.findPage();
-      this.formData.deptId = [];
-      this.platform(treeId);
+      // this.formData.deptId = [];
+      // this.platform(treeId);
       
     },
     platform(array) {
@@ -528,10 +528,14 @@ export default {
         this.$message.info("请选择所属公司或部门");
         return;
       }
-      if(this.formData.deptId){
-        this.formData.deptId = this.formData.deptId.at(-1);
+      // let deptId=''
+      // if(this.formData.deptId){
+      //    deptId = this.formData.deptId.at(-1);
+      // }
+      this.formData={
+        roleId:'21',
+        deptId:this.pageData.deptId
       }
-      this.formData.roleId='21'
       this.dialogTitle = "新增后线人员";
       this.dialogVisible = true;
     },
@@ -563,16 +567,16 @@ export default {
       // for (let key in this.formData) {
       //   this.formData[key] = "";
       // }
-      this.formData={
-        roleId:'21',
-        id:'',
-        mobile:'',
-        email:'',
-        name:'',
-        password:'',
-        sex:'',
-        status:''
-      }
+      // this.formData={
+      //   roleId:'21',
+      //   id:'',
+      //   mobile:'',
+      //   email:'',
+      //   name:'',
+      //   password:'',
+      //   sex:'',
+      //   status:''
+      // }
       this.dialogVisible = false;
     },
     // 提交