Ver Fonte

fix:人员管理领导人接口变更

test há 2 anos atrás
pai
commit
9b046721a7

+ 121 - 112
src/http/moudules/user.js

@@ -23,19 +23,19 @@ export const findById = (data) => {
 
 // 管理页面实现人员的存储
 export const saveUser = (data) => {
-    return axios({
-        url: '/user/saveEditUserInternal',
-        method: 'post',
-        data
-    })
+  return axios({
+    url: '/user/saveEditUserInternal',
+    method: 'post',
+    data
+  })
 }
 
 // 管理页面提交审核
 export const checkUser = (data) => {
-    return axios({
-        url: '/user/approval?userId='+data.userId+'&status='+data.status,
-        method: 'get'
-    })
+  return axios({
+    url: '/user/approval?userId=' + data.userId + '&status=' + data.status,
+    method: 'get'
+  })
 }
 
 // 审核页面分页查询
@@ -90,7 +90,7 @@ export const savePersonImage = (data) => {
 //查询人员影像信息
 export const findPersonImage = (data) => {
   return axios({
-    url: '/insTaskImage/findById?imgtype='+data.imgtype+'&taskid='+data.taskid,
+    url: '/insTaskImage/findById?imgtype=' + data.imgtype + '&taskid=' + data.taskid,
     method: 'get'
   })
 }
@@ -98,7 +98,7 @@ export const findPersonImage = (data) => {
 //通过部门Id查询团队长
 export const selectByDeptId = (data) => {
   return axios({
-    url: '/user/selectByDeptId?deptId='+data,
+    url: '/user/selectByDeptId?deptId=' + data,
     method: 'get'
   })
 }
@@ -125,40 +125,40 @@ export const newQueryTeamNum = (data) => {
 
 // 管理页面暂时存储
 export const shortTimeSave = (data) => {
-    return axios({
-        url: '/esmUserInternal/saveUser',
-        method: 'post',
-        data
-    })
+  return axios({
+    url: '/esmUserInternal/saveUser',
+    method: 'post',
+    data
+  })
 }
 
 // 管理页面提交审核
 export const save = (data) => {
-    return axios({
-        url: '/esmUserInternalcheck/saveUser',
-        method: 'post',
-        data
-    })
+  return axios({
+    url: '/esmUserInternalcheck/saveUser',
+    method: 'post',
+    data
+  })
 }
 
 
 // 审核页面人员审批
 export const userCheckExamine = (params) => {
-    return axios({
-        url: '/esmUserInternalcheck/check?id='+params.id+"&status="+params.status,
-        method: 'get'
-    })
+  return axios({
+    url: '/esmUserInternalcheck/check?id=' + params.id + "&status=" + params.status,
+    method: 'get'
+  })
 }
 
 
 
 // 删除  ->这个放在esmUserInternal下,需要删除关联表
 export const batchDelete = (data) => {
-    return axios({
-        url: '/esmUserInternal/delete',
-        method: 'post',
-        data
-    })
+  return axios({
+    url: '/esmUserInternal/delete',
+    method: 'post',
+    data
+  })
 }
 
 // 离司   ->这个放在user下,只要更新下标志就可以
@@ -174,162 +174,162 @@ export const deleteFlag = (data) => {
 
 // 查找用户的菜单权限标识集合
 export const findPermissions = (params) => {
-    return axios({
-        url: '/user/findPermissions',
-        method: 'get',
-        params
-    })
+  return axios({
+    url: '/user/findPermissions',
+    method: 'get',
+    params
+  })
 }
 // 后线人员审核
 export const userExamine = (params) => {
-    return axios({
-        url: '/esmUserInternal/check?id='+params.id+"&staus="+params.status,
-        method: 'get'
-    })
+  return axios({
+    url: '/esmUserInternal/check?id=' + params.id + "&staus=" + params.status,
+    method: 'get'
+  })
 }
 
 //用户角色分页查询
 export const userQueryPage = (data) => {
-	return axios({
-		url: '/user/queryPage',
-		method: 'post',
-		data
-	})
+  return axios({
+    url: '/user/queryPage',
+    method: 'post',
+    data
+  })
 }
 
 // 配置用户角色
 export const saveUserRole = (data) => {
-    return axios({
-        url: '/user/saveUserRole',
-        method: 'post',
-        data
-    })
+  return axios({
+    url: '/user/saveUserRole',
+    method: 'post',
+    data
+  })
 }
 
 // 修改用户密码
 export const updatePwd = (params) => {
-    return axios({
-        url: '/user/updatePwd?id='+params.id+'&password='+params.password,
-        method: 'post'
-    })
+  return axios({
+    url: '/user/updatePwd?id=' + params.id + '&password=' + params.password,
+    method: 'post'
+  })
 }
 //获取用户综合信息
 export const gainUserSynthesisInfo = (params) => {
-    return axios({
-        url: '/user/gainUserSynthesisInfo/'+params,
-        method: 'post'
-    })
+  return axios({
+    url: '/user/gainUserSynthesisInfo/' + params,
+    method: 'post'
+  })
 }
 // 保存用户信息接口
 export const saveOrUpdate = (data) => {
   return axios({
-      url: '/user/saveOrUpdate',
-      method: 'post',
-      data
+    url: '/user/saveOrUpdate',
+    method: 'post',
+    data
   })
 }
 // 保存用户信息接口详细信息
 export const saveUserInfo = (data) => {
   return axios({
-      url: '/user/saveUserInfo',
-      method: 'post',
-      data
+    url: '/user/saveUserInfo',
+    method: 'post',
+    data
   })
 }
 // 详情回显接口详细信息
 export const findUserInfoDetail = (params) => {
   return axios({
-      url: '/user/findUserInfo/'+params,
-      method: 'get',
+    url: '/user/findUserInfo/' + params,
+    method: 'get',
   })
 }
 // 详情回显接口
 export const getUserDatail = (params) => {
   return axios({
-      url: '/user/'+params,
-      method: 'get',
+    url: '/user/' + params,
+    method: 'get',
   })
 }
 // 删除后线人员接口
 export const getDeleteBatch = (data) => {
   return axios({
-      url: '/user/logicDeleteBatch',
-      method: 'post',
-      data
+    url: '/user/logicDeleteBatch',
+    method: 'post',
+    data
   })
 }
 
 // 获取登陆用户信息
-export const getLoginUser= () => {
+export const getLoginUser = () => {
   return axios({
-      url: '/user/loginUser',
-      method: 'get',
+    url: '/user/loginUser',
+    method: 'get',
   })
 }
 
 // 获取可选业务员列表
-export const getAllUserInfo= (userId) => {
+export const getAllUserInfo = (userId) => {
   return axios({
-    url: '/user/getAllUsers?userId='+userId,
+    url: '/user/getAllUsers?userId=' + userId,
     method: 'get',
   })
 }
 
 //用户审核通过接口
-export const getApprovalPass= (id) => {
+export const getApprovalPass = (id) => {
   return axios({
-      url: '/user/approvalPass?userId='+id,
-      method: 'get',
+    url: '/user/approvalPass?userId=' + id,
+    method: 'get',
   })
 }
-export const getApprovalNotPass= (params) => {
+export const getApprovalNotPass = (params) => {
   return axios({
-      url: '/user/approvalNotPass',
-      method: 'get',
-      params
+    url: '/user/approvalNotPass',
+    method: 'get',
+    params
   })
 }
 
 //获取推荐人
-export const selectfindByreferrerId= (params) => {
+export const selectfindByreferrerId = (params) => {
   return axios({
-      url: '/user/selectfindByreferrerId',
-      method: 'get',
-      params
+    url: '/user/selectfindByreferrerId',
+    method: 'get',
+    params
   })
 }
 //获取后线领导人
-export const findBackListByDeptId= (params) => {
+export const findBackListByDeptId = (params) => {
   return axios({
-      url: '/user/findBackListByDeptId',
-      method: 'get',
-      params
+    url: '/user/findBackListByDeptId',
+    method: 'get',
+    params
   })
 }
 
 // 编辑保存用户信息
-export const updateUserInfo = (userId,data) => {
+export const updateUserInfo = (userId, data) => {
   return axios({
-      url: '/user/updateUserInfo/'+userId,
-      method: 'post',
-      data
+    url: '/user/updateUserInfo/' + userId,
+    method: 'post',
+    data
   })
 }
 // 领导人列表
 export const findListByDeptId = (data) => {
   return axios({
-      url: '/user/findListByDeptId',
-      method: 'post',
-      data
+    url: '/user/findListByDeptId',
+    method: 'post',
+    data
   })
 }
 
 //获取闪电增员用户权限
-export const recruitinQqueryType= (params) => {
+export const recruitinQqueryType = (params) => {
   return axios({
-      url: '/recruiting/queryType',
-      method: 'get',
-      params
+    url: '/recruiting/queryType',
+    method: 'get',
+    params
   })
 }
 // 查询渠道管理列表
@@ -348,6 +348,15 @@ export const findBackUserList = (data) => {
     data
   })
 }
+// 后线领导人
+export const findHxUserList = () => {
+  return axios({
+    url: '/user/findHxUserList',
+    method: 'get',
+
+  })
+}
+
 
 // 后弦人员管理列表1
 export const findBackUserList1 = (data) => {
@@ -383,11 +392,11 @@ export const quTeamNumDetail = (data) => {
 }
 
 // 获取人员树结构
-export const personnelFindTree= (params) => {
+export const personnelFindTree = (params) => {
   return axios({
-      url: '/user/findTree',
-      method: 'get',
-      params
+    url: '/user/findTree',
+    method: 'get',
+    params
   })
 }
 // 区域业绩管理列表接口
@@ -450,7 +459,7 @@ export const addOrUpdate = (data) => {
 }
 export const findAreaListByUserId = (userId) => {
   return axios({
-    url: '/sysUserLinkArea/findAreaListByUserId/'+userId,
+    url: '/sysUserLinkArea/findAreaListByUserId/' + userId,
     method: 'get',
   })
 }
@@ -464,11 +473,11 @@ export const addOrDelete = (data) => {
 
 
 // 获取前线机构树
-export const sysUserLinkFrontLineDeptQueryQxOrgTree= (params) => {
+export const sysUserLinkFrontLineDeptQueryQxOrgTree = (params) => {
   return axios({
-      url: '/sysUserLinkFrontLineDept/queryQxOrgTree',
-      method: 'get',
-      params
+    url: '/sysUserLinkFrontLineDept/queryQxOrgTree',
+    method: 'get',
+    params
   })
 }
 
@@ -492,7 +501,7 @@ export const sysUserLinkFrontLineDeptDelete = (data) => {
 }
 
 // 后线人员配置前线机构添加修改
-export const sysUserLinkFrontLineDeptAddOrUpdate= (data) => {
+export const sysUserLinkFrontLineDeptAddOrUpdate = (data) => {
   return axios({
     url: '/sysUserLinkFrontLineDept/addOrUpdate',
     method: 'post',
@@ -500,7 +509,7 @@ export const sysUserLinkFrontLineDeptAddOrUpdate= (data) => {
   })
 }
 // 查询所有的后线人员列表+分页+标红显示
-export const sysUserLinkFrontLineDeptFindAllUserList= (data) => {
+export const sysUserLinkFrontLineDeptFindAllUserList = (data) => {
   return axios({
     url: '/sysUserLinkFrontLineDept/findAllUserList',
     method: 'post',

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

@@ -218,8 +218,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.userId"
-                      :key="val.userId"
+                      :value="val.id"
+                      :key="val.id"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -703,8 +703,11 @@ export default {
     this.searchLeaderFun();
   },
   methods: {
-    searchLeaderFun() {
-      this.$api.user
+    async searchLeaderFun() {
+      await this.$api.user.findHxUserList().then((res) => {
+        this.leaderOptions = res.data;
+      });
+      await this.$api.user
         .findBackListByDeptId({ deptId: this.deptId })
         .then((res) => {
           res.data.forEach((e) => {
@@ -857,9 +860,9 @@ export default {
       this.activeName = "1";
       let res = await this.$api.user.getUserDatail(params.userId);
       if (res.code == 200) {
-        this.$api.user.findBackUserList1({ agentFlag: 0 }).then((res) => {
-          this.leaderOptions = res.data;
-        });
+        // this.$api.user.findBackUserList1({ agentFlag: 0 }).then((res) => {
+        //   this.leaderOptions = res.data;
+        // });
         this.$api.user
           .selectfindByreferrerId({ deptId: res.data.sysUser.deptId })
           .then((res) => {
@@ -912,20 +915,11 @@ export default {
     //添加人员
     handleAddButton() {
       //级联渲染部门列表
-      this.$api.user
-        .selectfindByreferrerId({ deptId: this.deptId })
-        .then((res) => {
-          this.leaderOptions = res.data.map((val) => {
-            return {
-              userId: val.id,
-              name: val.name,
-            };
-          });
-        });
+
       // formData
-      this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {
-        this.leaderOptions = res.data;
-      });
+      // this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {
+      //   this.leaderOptions = res.data;
+      // });
       if (this.currentTreeNode == null) {
         this.$message.info("请选择所属公司或部门");
         return;
@@ -982,7 +976,7 @@ export default {
             }
             if (this.formData.leaderId) {
               this.formData.leaderName = this.leaderOptions.find(
-                (val) => val.userId == this.formData.leaderId
+                (val) => val.id == this.formData.leaderId
               ).name;
             }
             if (this.dialogTitle == "新增代理人") {

+ 9 - 6
src/views/PeopleManage/Player/PlayerManage.vue

@@ -196,8 +196,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.userId"
-                      :key="val.userId"
+                      :value="val.id"
+                      :key="val.id"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -410,6 +410,9 @@ export default {
   },
   methods: {
     searchLeaderFun() {
+      this.$api.user.findHxUserList().then((res) => {
+        this.leaderOptions = res.data;
+      });
       this.$api.user
         .findBackListByDeptId({ deptId: this.deptId })
         .then((res) => {
@@ -521,9 +524,9 @@ export default {
           .then((res) => {
             this.recommenderOptions = res.data;
           });
-        this.$api.user.findBackUserList1({ agentFlag: 0 }).then((res) => {
-          this.leaderOptions = res.data;
-        });
+        // this.$api.user.findBackUserList1({ agentFlag: 0 }).then((res) => {
+        //   this.leaderOptions = res.data;
+        // });
         res.data.sysUser.status += "";
         this.formData = res.data.sysUser;
         this.dialogTitle = "编辑渠道信息";
@@ -597,7 +600,7 @@ export default {
             }
             if (this.formData.leaderId) {
               this.formData.leaderName = this.leaderOptions.find(
-                (val) => val.userId == this.formData.leaderId
+                (val) => val.id == this.formData.leaderId
               ).name;
             }
             if (this.dialogTitle == "新增渠道信息") {

+ 6 - 3
src/views/PeopleManage/Player/PlayerManageteam.vue

@@ -204,8 +204,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.userId"
-                      :key="val.userId"
+                      :value="val.id"
+                      :key="val.id"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -643,6 +643,9 @@ export default {
   },
   methods: {
     searchLeaderFun() {
+      this.$api.user.findHxUserList().then((res) => {
+        this.leaderOptions = res.data;
+      });
       this.$api.user
         .findBackListByDeptId({ deptId: this.deptId })
         .then((res) => {
@@ -889,7 +892,7 @@ export default {
             }
             if (this.formData.leaderId) {
               this.formData.leaderName = this.leaderOptions.find(
-                (val) => val.userId == this.formData.leaderId
+                (val) => val.id == this.formData.leaderId
               ).name;
             }
             if (this.dialogTitle == "新增渠道信息") {

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

@@ -278,8 +278,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.userId"
-                      :key="val.userId"
+                      :value="val.id"
+                      :key="val.id"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -759,6 +759,9 @@ export default {
   },
   methods: {
     searchLeaderFun() {
+      this.$api.user.findHxUserList().then((res) => {
+        this.leaderOptions = res.data;
+      });
       this.$api.user
         .findBackListByDeptId({ deptId: this.deptId })
         .then((res) => {
@@ -935,9 +938,9 @@ export default {
       this.activeName = "1";
       let res = await this.$api.user.getUserDatail(params.row.userId);
       if (res.code == 200) {
-        this.$api.user.findBackUserList1({ agentFlag: 0 }).then((res) => {
-          this.leaderOptions = res.data;
-        });
+        // this.$api.user.findBackUserList1({ agentFlag: 0 }).then((res) => {
+        //   this.leaderOptions = res.data;
+        // });
         res.data.sysUser.status += "";
         this.formData = res.data.sysUser;
         if (this.formData.status == 0) {
@@ -991,14 +994,14 @@ export default {
       //   return;
       // }
       // formData
-      this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {
-        this.leaderOptions = res.data.map((val) => {
-          return {
-            userId: val.id,
-            name: val.name,
-          };
-        });
-      });
+      // this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {
+      //   this.leaderOptions = res.data.map((val) => {
+      //     return {
+      //       userId: val.id,
+      //       name: val.name,
+      //     };
+      //   });
+      // });
       if (this.currentTreeNode == null) {
         this.$message.info("请选择所属公司或部门");
         return;
@@ -1081,7 +1084,7 @@ export default {
             }
             if (this.formData.leaderId) {
               this.formData.leaderName = this.leaderOptions.find(
-                (val) => val.userId == this.formData.leaderId
+                (val) => val.id == this.formData.leaderId
               ).name;
             }
             if (this.dialogTitle == "新增后线人员") {

+ 20 - 17
src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue

@@ -281,8 +281,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.userId"
-                      :key="val.userId"
+                      :value="val.id"
+                      :key="val.id"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -707,6 +707,9 @@ export default {
   },
   methods: {
     searchLeaderFun() {
+      this.$api.user.findHxUserList().then((res) => {
+        this.leaderOptions = res.data;
+      });
       this.$api.user
         .findBackListByDeptId({ deptId: this.deptId })
         .then((res) => {
@@ -875,12 +878,12 @@ export default {
       this.activeName = "1";
       let res = await this.$api.user.getUserDatail(params.row.userId);
       if (res.code == 200) {
-        this.$api.user
-          // .findListByDeptId({ deptId: res.data.sysUser.deptId, id: params.row.userId })
-          .findBackUserList1({ agentFlag: 0 })
-          .then((res) => {
-            this.leaderOptions = res.data;
-          });
+        // this.$api.user
+        //   // .findListByDeptId({ deptId: res.data.sysUser.deptId, id: params.row.userId })
+        //   .findBackUserList1({ agentFlag: 0 })
+        //   .then((res) => {
+        //     this.leaderOptions = res.data;
+        //   });
         res.data.sysUser.status += "";
         this.formData = res.data.sysUser;
         if (this.formData.status == 0) {
@@ -945,14 +948,14 @@ export default {
       this.dialogTitle = "新增团队长";
       this.dialogVisible = true;
       this.dialogPassword = true;
-      this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {
-        this.leaderOptions = res.data.map((val) => {
-          return {
-            userId: val.id,
-            name: val.name,
-          };
-        });
-      });
+      // this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {
+      //   this.leaderOptions = res.data.map((val) => {
+      //     return {
+      //       userId: val.id,
+      //       name: val.name,
+      //     };
+      //   });
+      // });
     },
     // 新增或修改的弹出框Start
     getDictItems(typeName) {
@@ -1013,7 +1016,7 @@ export default {
             }
             if (this.formData.leaderId) {
               this.formData.leaderName = this.leaderOptions.find(
-                (val) => val.userId == this.formData.leaderId
+                (val) => val.id == this.formData.leaderId
               ).name;
             }
             if (this.dialogTitle == "新增团队长") {