Commit c6d8e3ff by zeyang

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

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