|
|
@@ -160,6 +160,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
|
|
|
@@ -395,6 +416,7 @@ export default {
|
|
|
mixins: [mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
+ leaderOptions:[],
|
|
|
activeName: "1", //弹框tab索引
|
|
|
isShow: true, //密码是否显示
|
|
|
formList: [
|
|
|
@@ -604,9 +626,9 @@ export default {
|
|
|
this.formData.referrerId = "";
|
|
|
this.formData.deptId = val.at(-1);
|
|
|
this.$api.user
|
|
|
- .selectfindByreferrerId({ deptId: this.formData.deptId })
|
|
|
+ .findListByDeptId({ deptId: this.formData.deptId, })
|
|
|
.then((res) => {
|
|
|
- this.recommenderOptions = res.data;
|
|
|
+ this.leaderOptions = res.data;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
@@ -661,9 +683,9 @@ export default {
|
|
|
let res = await this.$api.user.getUserDatail(params.userId);
|
|
|
if (res.code == 200) {
|
|
|
this.$api.user
|
|
|
- .selectfindByreferrerId({ deptId: res.data.sysUser.deptId })
|
|
|
+ .findListByDeptId({ deptId: res.data.sysUser.deptId })
|
|
|
.then((res) => {
|
|
|
- this.recommenderOptions = res.data;
|
|
|
+ this.leaderOptions = res.data;
|
|
|
});
|
|
|
res.data.sysUser.status += "";
|
|
|
this.formData = res.data.sysUser;
|
|
|
@@ -678,15 +700,14 @@ export default {
|
|
|
handleAddButton() {
|
|
|
//级联渲染部门列表
|
|
|
this.$api.user
|
|
|
- .selectfindByreferrerId({ deptId: this.deptId })
|
|
|
- .then((res) => {
|
|
|
- this.recommenderOptions = res.data;
|
|
|
- });
|
|
|
+ .findListByDeptId({ deptId: this.formData.deptId })
|
|
|
+ .then((res) => {
|
|
|
+ this.leaderOptions = res.data;
|
|
|
+ });
|
|
|
if (this.currentTreeNode == null) {
|
|
|
this.$message.info("请选择所属公司或部门");
|
|
|
return;
|
|
|
}
|
|
|
- console.log(this.currentTreeNode.comlevel,this.currentTreeNode.managementSource)
|
|
|
if((this.currentTreeNode.comlevel!=null&&this.currentTreeNode.comlevel!='')||this.currentTreeNode.managementSource!=1){ //团队代理人managementSource为2 渠道为1 后线为空
|
|
|
this.$message.info("请选择第六级机构");
|
|
|
return;
|