Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
3dbcd5f9
Commit
3dbcd5f9
authored
Jan 26, 2021
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模糊查询优化
parent
fdc27da4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
22 deletions
+87
-22
src/app/my/recruiting-detail/recruiting-detail.component.html
+5
-19
src/app/my/recruiting-detail/recruiting-detail.component.ts
+82
-3
No files found.
src/app/my/recruiting-detail/recruiting-detail.component.html
View file @
3dbcd5f9
...
...
@@ -151,24 +151,11 @@
</div>
<div
class=
"contentItem"
>
<span>
辅导人
</span>
<!-- <select [(ngModel)]="employQuery.mentorPractitionerId" class="form-control" (ngModelChange)="getName(2,employQuery.mentorPractitionerId);getPractitionerDetails(employQuery.mentorPractitionerId)"
[disabled]="approveStatus!=null">
<option value=null>请选择</option>
<option [value]='practitionerInfo.id' *ngFor="let practitionerInfo of practitionerList">
{{practitionerInfo.name}}
</option>
</select> -->
<div
(
click
)="
vagueSearch
()"
>
请选择辅导人
</div>
<div
(
click
)="
vagueSearch
(
1
)"
>
{{defalutMentor}}
</div>
</div>
<div
class=
"contentItem"
>
<span>
介绍人
</span>
<select
[(
ngModel
)]="
employQuery
.
introducerPractitionerId
"
class=
"form-control"
(
ngModelChange
)="
getName
(
3
,
employQuery
.
introducerPractitionerId
);"
[
disabled
]="
approveStatus
!=
null
"
>
<option
value=
null
>
请选择
</option>
<option
[
value
]='
practitionerInfo
.
id
'
*
ngFor=
"let practitionerInfo of practitionerList"
>
{{practitionerInfo.name}}
</option>
</select>
<div
(
click
)="
vagueSearch
(
2
)"
>
{{defalutIntroducer}}
</div>
</div>
<div
class=
"contentItem"
>
<span>
体系名
</span>
...
...
@@ -222,16 +209,15 @@
</ul>
</div>
<div
class=
"toastWrapper toast"
*
ngIf=
"
selectedId===4
;"
>
<div
class=
"toastWrapper toast"
*
ngIf=
"
toastFlag"
(
click
)="
toastFlag =
false
;"
>
</div>
<!--辅导人介绍人选择框-->
<div
class=
"editContainer"
style=
"background: #efeff4;padding: 0;"
*
ngIf=
"
selectedId===4;
"
>
<div
class=
"editContainer"
style=
"background: #efeff4;padding: 0;"
*
ngIf=
"
toastFlag
"
>
<SearchBar
[
placeholder
]="'搜索你的增员'"
[
maxLength
]="
8
"
(
onChange
)="
change
($
event
)"
></SearchBar>
<ul
class=
"practitioner_con"
>
<li
*
ngFor=
"let practitionerItem of practitionerListShow"
>
<li
*
ngFor=
"let practitionerItem of practitionerListShow"
(
click
)="
getNameParam
(
this
.
totastType
,
practitionerItem
)"
>
{{practitionerItem.name}}
</li>
</ul>
...
...
src/app/my/recruiting-detail/recruiting-detail.component.ts
View file @
3dbcd5f9
...
...
@@ -49,6 +49,10 @@ export class RecruitingDetailComponent implements OnInit {
//-2已填完,null未填完,-1拒绝0通过
approveStatus
:
any
;
practitionerListShow
:
Array
<
any
>
;
defalutMentor
:
string
=
'请选择辅导人'
;
defalutIntroducer
:
string
=
'请选择介绍人'
;
totastType
:
any
;
toastFlag
:
boolean
=
false
;
constructor
(
private
activateRoute
:
ActivatedRoute
,
public
lifeCommonService
:
LifeCommonService
,
...
...
@@ -454,7 +458,7 @@ export class RecruitingDetailComponent implements OnInit {
this
.
toastDialog
=
true
;
this
.
toastInfo
=
{
status
:
1
,
msg
:
'S2级别
一
下,辅导人不可以为空!'
,
msg
:
'S2级别
以
下,辅导人不可以为空!'
,
timeout
:
3000
,
align
:
'center'
};
...
...
@@ -539,6 +543,52 @@ export class RecruitingDetailComponent implements OnInit {
}
}
/**
* 辅导人介绍人模糊查询
* 1.辅导人
* 2.介绍人
* @param e
*/
getNameParam
(
type
,
e
){
switch
(
type
)
{
case
1
:
this
.
employQuery
.
mentorPractitionerId
=
e
.
id
;
if
(
e
){
for
(
const
mentorInfo
of
this
.
practitionerList
)
{
if
(
e
.
id
==
mentorInfo
.
id
)
{
this
.
employQuery
.
mentor
=
mentorInfo
.
name
;
this
.
defalutMentor
=
mentorInfo
.
name
;
}
}
}
else
{
this
.
employQuery
.
mentor
=
this
.
employQuery
.
subsystemId
=
this
.
employQuery
.
subsystem
=
this
.
employQuery
.
subsystemOwnerId
=
this
.
employQuery
.
subsystemOwner
=
this
.
employQuery
.
branchId
=
this
.
employQuery
.
branch
=
null
;
}
this
.
getPractitionerDetails
(
this
.
employQuery
.
mentorPractitionerId
);
this
.
toastFlag
=
false
;
return
;
case
2
:
this
.
employQuery
.
introducerPractitionerId
=
e
.
id
;
if
(
e
){
for
(
const
introducer
of
this
.
practitionerList
)
{
if
(
e
.
id
==
introducer
.
id
)
{
this
.
employQuery
.
introducer
=
introducer
.
name
;
this
.
defalutIntroducer
=
introducer
.
name
;
}
}
}
else
{
this
.
employQuery
.
introducer
=
null
;
}
this
.
toastFlag
=
false
;
return
;
}
}
queryWholeInfo
(){
this
.
myService
.
queryWholeInfo
({
hiringBasicInfoId
:
this
.
hiringBasicInfoId
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
...
...
@@ -547,6 +597,24 @@ export class RecruitingDetailComponent implements OnInit {
this
.
employQuery
.
name
=
this
.
editRecruiting
.
name
;
this
.
employQuery
.
practitionerPotentialId
=
this
.
potentialId
;
this
.
approveStatus
=
res
[
'data'
][
'hiringBasicInfo'
][
'approveStatus'
];
if
(
membership
.
mentor
){
this
.
defalutMentor
=
membership
.
mentor
;
}
else
{
if
(
this
.
approveStatus
==
null
){
this
.
defalutMentor
=
'请选择辅导人'
;
}
else
{
this
.
defalutMentor
=
'/'
;
}
}
if
(
membership
.
introducer
){
this
.
defalutIntroducer
=
membership
.
introducer
;
}
else
{
if
(
this
.
approveStatus
==
null
){
this
.
defalutIntroducer
=
'请选择介绍人'
;
}
else
{
this
.
defalutIntroducer
=
'/'
;
}
}
}
else
{
this
.
toastDialog
=
true
;
this
.
toastInfo
=
{
...
...
@@ -565,11 +633,22 @@ export class RecruitingDetailComponent implements OnInit {
* 介绍人:2
* **/
vagueSearch
(
type
){
if
(
this
.
approveStatus
!=
null
){
this
.
toastDialog
=
true
;
this
.
toastInfo
=
{
status
:
1
,
msg
:
'被邀请人已填完所有信息,不能更改邀请内容!'
,
timeout
:
3000
,
align
:
'center'
};
return
;
}
this
.
totastType
=
type
;
this
.
toastFlag
=
true
;
this
.
practitionerListShow
=
this
.
practitionerList
;
}
change
(
event
){
console
.
log
(
event
)
this
.
practitionerListShow
=
this
.
practitionerList
.
filter
((
item
)
=>
{
if
(
item
.
name
){
return
item
.
name
.
indexOf
(
event
)
!==-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment