Commit c6d8e3ff by zeyang

1.优化邀请报聘中dropOptionsQuery接口及参数dropOptionCode的问题

parent 49ca2275
......@@ -22,6 +22,7 @@ export class EmployQuery {
public s2TeamLeaderName?:string,
public s1SubordinateSystemName?:string,
public s1TeamLeaderName?:string,
public dropOptionCode?:string,
) {
}
}
\ No newline at end of file
......@@ -439,8 +439,11 @@ export class RecruitingDetailComponent implements OnInit {
//查询经纪人职级
practitionerTypeAndLevelQuery(){
this.myService.practitionerTypeAndLevelQuery({}).subscribe((res)=>{
this.practitionerLevelInfos = res['data']['practitionerTypeInfos'][1]['practitionerLevelInfos'];
// this.myService.practitionerTypeAndLevelQuery({}).subscribe((res)=>{
// this.practitionerLevelInfos = res['data']['practitionerTypeInfos'][1]['practitionerLevelInfos'];
// })
this.myService.dropOptionsQuery({code:'practitioner_level_2024'}).subscribe((res)=>{
this.practitionerLevelInfos = res['data']['dropMasterInfoList']['0']['dropOptionsInfoList'];
})
}
......@@ -478,7 +481,7 @@ export class RecruitingDetailComponent implements OnInit {
this.openPopInfo('报聘职级不能为空!');
return;
}
if(this.employQuery.mdDropOptionId != 30){
if(this.employQuery.dropOptionCode != 'S2'){
// if(!this.employQuery.mentorPractitionerId || !this.employQuery.mentor){
// this.openPopInfo('S2级别以下,辅导人不可以为空!')
// return;
......@@ -528,20 +531,23 @@ export class RecruitingDetailComponent implements OnInit {
* 2.分公司
*/
getName(type,e){
if(e == 'null'){
e = null;
}
switch (type) {
case 1:
this.employQuery.mdDropOptionId = e;
if(e){
this.employQuery.dropOptionCode = this.practitionerLevelInfos.filter(item=> item.id==e)[0].dropOptionCode;
for(const level of this.practitionerLevelInfos){
if(e == level.id){
this.employQuery.mdDropOptionName = level.dropOptionCode + '-' + level.dropOptionName;
}
}
//如果报聘职级是s2,清空辅导人、体系、体系负责人
if(e == 30){
if(this.employQuery.dropOptionCode == 'S2'){
this.employQuery.mentorPractitionerId =
this.employQuery.mentor =
this.employQuery.subsystemId =
......@@ -556,6 +562,7 @@ export class RecruitingDetailComponent implements OnInit {
}
}else{
this.employQuery.mdDropOptionName = null;
this.employQuery.dropOptionCode = null;
}
return;
case 2:
......@@ -627,6 +634,7 @@ export class RecruitingDetailComponent implements OnInit {
this.myService.queryWholeInfo({hiringBasicInfoId:this.hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){
const membership = res['data']['hiringMemberShip'];
membership.dropOptionCode = membership.mdDropOptionName.split('-')[0];
this.employQuery = membership;
this.employQuery.name = this.editRecruiting.name;
this.employQuery.practitionerPotentialId = this.potentialId;
......@@ -635,7 +643,7 @@ export class RecruitingDetailComponent implements OnInit {
this.defalutMentor = membership.mentor;
}else{
if(this.approveStatus == null){
if(membership.mdDropOptionId != '30'){
if(membership.dropOptionCode != 'S2'){
this.defalutMentor = '请选择辅导人';
}else{
this.defalutMentor = '/';
......@@ -672,8 +680,9 @@ export class RecruitingDetailComponent implements OnInit {
* 介绍人:2
* **/
vagueSearch(type){
console.log(this.employQuery.dropOptionCode);
this.totastType = type;
if(type ==1 && this.employQuery.mdDropOptionId == 30){
if(type ==1 && this.employQuery.dropOptionCode == 'S2'){
this.openPopInfo('S2级别不需要选择辅导人!')
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment