Просмотр исходного кода

后线人员管理新增领导人字段

lihongxiao 2 лет назад
Родитель
Сommit
7e36bd4492

+ 2 - 2
config/dev.env.js

@@ -6,14 +6,14 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
   // BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
-  BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
+  // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
   // BASE_URL: '"http:///192.168.0.106:8080/"',//屈晨
   // BASE_URL: '"http:///192.168.0.253:8080/"',//田智
   // BASE_URL: '"http:///192.168.0.42:8080/"',//武鸿鹏
   // BASE_URL: '"http://192.168.1.101:8080/"',
-  // BASE_URL: '"http:///192.168.0.22:8080/"',//郝宇
+  BASE_URL: '"http:///192.168.0.22:8080/"',//郝宇
 })
 
 

+ 17 - 0
src/http/moudules/user.js

@@ -305,6 +305,15 @@ export const updateUserInfo = (userId,data) => {
       data
   })
 }
+// 领导人列表
+export const findListByDeptId = (data) => {
+  return axios({
+      url: '/user/findListByDeptId',
+      method: 'post',
+      data
+  })
+}
+
 //获取闪电增员用户权限
 export const recruitinQqueryType= (params) => {
   return axios({
@@ -321,6 +330,14 @@ export const findUserList = (data) => {
     data
   })
 }
+// 后弦人员管理列表
+export const findBackUserList = (data) => {
+  return axios({
+    url: '/user/findBackUserList',
+    method: 'post',
+    data
+  })
+}
 // 渠道数据统计
 export const quTeamNum = (data) => {
   return axios({

+ 0 - 1
src/views/Letter/Orderlist.vue

@@ -1325,7 +1325,6 @@ export default {
         if (res.code == 200) {
           this.licenseNo = res.data.licenseno; //车牌号
           this.inscompany = res.data.inscompany; //保险公司
-          res.data.carinfo.carnature='8A'
           res.data.carinfo.carnature= this.natureOfVehicleUseCap(res.data.carinfo.carnature)
           if (res.data.accidentInfo) {
             res.data.accidentInfo.constructor === Object

+ 45 - 2
src/views/PeopleManage/Staff/StaffManage.vue

@@ -184,6 +184,27 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="领导人" prop="leaderId">
+                  <el-select
+                    style="width: 200px"
+                    v-model="formData.leaderId"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="val in leaderOptions"
+                      :label="val.name"
+                      :value="val.id"
+                      :key="val.id"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="领导人工号" prop="leaderName">
+                  <el-input v-model="formData.leaderId" disabled></el-input>
+                </el-form-item>
+              </el-col>
               <el-col :span="8">
                 <el-form-item label="离职时间" prop="logoutTime">
                   <el-date-picker value-format="yyyy-MM-dd" style="width:200px" v-model="formData.logoutTime" type="date" placeholder="选择日期">
@@ -488,6 +509,7 @@ export default {
       //影像上传列表
       imagesIdList:[],
       dialogPassword:false, //密码是否显示明文
+      leaderOptions:[]
     };
   },
   created() {
@@ -567,8 +589,14 @@ export default {
     },
     //联级选择器触发事件
     handleChange(val) {
-      if (val.length !== 0) {
+      if (val && val.length !== 0) {
+        this.formData.leaderId = "";
         this.formData.deptId = val.at(-1);
+        this.$api.user
+          .findListByDeptId({ deptId: this.formData.deptId, })
+          .then((res) => {
+            this.leaderOptions = res.data;
+          });
       }
     },
   
@@ -617,7 +645,7 @@ export default {
       //     dto: { ...data, roleId: "20", deptId: this.deptId,agentFlag: "2", },
       //   })
       this.$api.user
-        .findUserList({dto,pageNum:this.pageData.pageNum,pageSize:this.pageData.pageSize})
+        .findBackUserList({dto,pageNum:this.pageData.pageNum,pageSize:this.pageData.pageSize})
         .then((res) => {
           res.data.records.forEach(val=>{
             if(val.sex&& val.sex!==''&& val.sex!==null){
@@ -664,6 +692,11 @@ 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 })
+          .then((res) => {
+            this.leaderOptions = res.data;
+          });
         res.data.sysUser.status += ''
         this.formData = res.data.sysUser
         if(this.formData.status==0){
@@ -709,6 +742,7 @@ export default {
         })
         .catch(() => {});
     },
+    
     //添加人员
     handleAddButton() {
       // console.log(this.currentTreeNode.managementSource)
@@ -716,6 +750,11 @@ export default {
       //   this.$message.info("请选择所属公司或部门");
       //   return;
       // }
+      this.$api.user
+      .findListByDeptId({ deptId: this.formData.deptId })
+      .then((res) => {
+        this.leaderOptions = res.data;
+      });
       if (this.currentTreeNode == null) {
         this.$message.info("请选择所属公司或部门");
         return;
@@ -727,6 +766,7 @@ export default {
       this.formData = {
         roleId: '22',
         status: '',
+        leaderId: "",
         deptId: this.deptId
       }
       this.formDataDetail = {}
@@ -790,6 +830,9 @@ export default {
               if(this.formData.positionId){
                 this.formData.positionName=this.postOption.find(val=>val.postId==this.formData.positionId).postName
               }
+              if(this.formData.leaderId){
+                this.formData.leaderName=this.leaderOptions.find(val=>val.id==this.formData.leaderId).name
+              }
               if (this.dialogTitle == '新增后线人员') {
                 this.$api.user.saveUserInfo({esmUserImageVo:this.imagesIdList, sysUser: this.formData, sysUserInfo: this.formDataDetail }).then((res) => {
                   if (res.code == 200) {