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
98df0791
Commit
98df0791
authored
Sep 21, 2020
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日程成功跳回列表页&编辑日程
parent
e3079b4b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
96 additions
and
43 deletions
+96
-43
src/app/domain/trackQuery.ts
+2
-2
src/app/my/add-task/add-task.component.ts
+47
-17
src/app/my/my-business/my-business.component.ts
+2
-1
src/app/my/my-center-home/my-center-home.component.html
+0
-2
src/app/my/recruiting/recruiting.component.ts
+2
-1
src/app/my/score-details/score-details.component.ts
+5
-7
src/app/my/team-sales-score/team-sales-score.component.html
+2
-2
src/app/my/todo-list/todo-list.component.html
+4
-2
src/app/my/todo-list/todo-list.component.scss
+7
-0
src/app/my/todo-list/todo-list.component.ts
+25
-9
No files found.
src/app/domain/trackQuery.ts
View file @
98df0791
...
...
@@ -9,8 +9,8 @@ export class TrackQuery {
public
referPotentialId
?:
string
,
public
taskImportantTag
?:
any
,
public
isActive
?:
any
,
public
taskTimeFrom
?:
Array
<
any
>
[]
,
public
taskTimeEnd
?:
Array
<
any
>
[]
,
public
taskTimeFrom
?:
Array
<
any
>
,
public
taskTimeEnd
?:
Array
<
any
>
,
//任务长期固定
public
taskRoutineAtweek7
?:
number
,
public
taskRoutineAtweek6
?:
number
,
...
...
src/app/my/add-task/add-task.component.ts
View file @
98df0791
...
...
@@ -35,11 +35,12 @@ export class AddTaskComponent implements OnInit {
seasons
:
Array
<
any
>
;
longTermList
:
Array
<
any
>
;
linkToastFlag
:
boolean
=
false
;
taskInfo
:
any
;
constructor
(
private
myService
:
MyService
,
private
router
:
Router
,
private
_modal
:
ModalService
,
private
_toast
:
ToastService
,
public
lifeCommonService
:
LifeCommonService
,
private
activateRoute
:
ActivatedRoute
)
{
this
.
seasons
=
[
{
label
:
'
8:00'
,
value
:
1
},{
label
:
'
8:30'
,
value
:
2
},
{
label
:
'
9:00'
,
value
:
3
},{
label
:
'
9:30'
,
value
:
4
},
{
label
:
'
08:00'
,
value
:
1
},{
label
:
'0
8:30'
,
value
:
2
},
{
label
:
'
09:00'
,
value
:
3
},{
label
:
'0
9:30'
,
value
:
4
},
{
label
:
'10:00'
,
value
:
5
},{
label
:
'10:30'
,
value
:
6
},
{
label
:
'11:00'
,
value
:
7
},{
label
:
'11:30'
,
value
:
8
},
{
label
:
'12:00'
,
value
:
9
},{
label
:
'12:30'
,
value
:
10
},
...
...
@@ -55,6 +56,7 @@ export class AddTaskComponent implements OnInit {
{
label
:
'22:00'
,
value
:
29
},{
label
:
'22:30'
,
value
:
30
}
];
// console.log(this.router.getCurrentNavigation().extras.state)
this
.
taskInfo
=
this
.
router
.
getCurrentNavigation
().
extras
.
state
;
}
initPara
()
{
...
...
@@ -79,21 +81,38 @@ export class AddTaskComponent implements OnInit {
ngOnInit
()
{
this
.
addTrack
.
practitionerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
];
this
.
tabList
=
[{
code
:
'bizchance_promotion_action'
,
name
:
'营销'
,
taskType
:
1
},{
code
:
'team_building_track'
,
name
:
'增员'
,
taskType
:
2
},{
code
:
'pep_schedule_task_others'
,
name
:
'其他'
,
taskType
:
3
}];
this
.
tabType
=
'bizchance_promotion_action'
;
this
.
addTrack
.
taskType
=
1
;
this
.
dropOptionsQuery
(
this
.
tabType
);
//如果有缓存切换到缓存数据
this
.
addTrack
.
referLeadsId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'referLeadsId'
];
this
.
addTrack
.
referPotentialId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'referPotentialId'
];
this
.
addTrack
.
customerId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'customerId'
];
//查询
if
(
this
.
taskInfo
){
for
(
let
i
=
0
;
i
<
this
.
tabList
.
length
;
i
++
){
if
(
this
.
taskInfo
.
taskType
==
this
.
tabList
[
i
][
'taskType'
]){
this
.
tabType
=
this
.
tabList
[
i
][
'code'
];
this
.
addTrack
.
taskType
=
this
.
tabList
[
i
][
'taskType'
];
this
.
dropOptionsQuery
(
this
.
tabType
);
}
}
this
.
addTrack
=
{
...
this
.
taskInfo
,
taskTimeFrom
:[
this
.
taskInfo
.
taskTimeFrom
],
taskTimeEnd
:
[
this
.
taskInfo
.
taskTimeEnd
]
};
}
else
{
//商机页或者增员页跳转过来如果有缓存切换到缓存数据
if
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))){
this
.
tabType
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'tabType'
];
this
.
addTrack
.
taskType
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'taskType'
];
setTimeout
(()
=>
{
this
.
dropOptionsQuery
(
this
.
tabType
);
this
.
addTrack
.
mdDropOptionId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'mdDropOptionId'
];
this
.
addTrack
.
mdDropOptionId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'mdDropOptionId'
];
},
300
);
}
else
{
//新增
this
.
addTrack
.
mdDropOptionId
=
null
;
this
.
tabType
=
'bizchance_promotion_action'
;
this
.
addTrack
.
taskType
=
1
;
this
.
addTrack
.
mdDropOptionId
=
null
;
this
.
dropOptionsQuery
(
this
.
tabType
)
;
}
//如果有日程时间就取缓存没有就默认当天
if
(
sessionStorage
.
getItem
(
'trackTime'
)){
...
...
@@ -101,13 +120,14 @@ export class AddTaskComponent implements OnInit {
}
else
{
this
.
addTrack
.
trackTime
=
dayjs
().
format
(
'YYYY-MM-DD'
);
}
this
.
addTrack
.
referLeadsId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'referLeadsId
'
];
this
.
addTrack
.
referPotentialId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'referPotentialId
'
];
this
.
addTrack
.
customerId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'customerId'
];
this
.
addTrack
.
taskTimeFrom
=
[
'08:30
'
];
this
.
addTrack
.
taskTimeEnd
=
[
'08:30
'
];
}
}
goBack
(){
history
.
go
(
-
1
);
// history.go(-1);
this
.
router
.
navigate
([
'/todo'
])
}
//判断是否选择同一个tab
...
...
@@ -158,7 +178,6 @@ export class AddTaskComponent implements OnInit {
if
(
type
===
2
){
this
.
addTrack
.
taskTimeEnd
=
result
;
}
console
.
log
(
this
.
addTrack
.
taskTimeFrom
,
this
.
addTrack
.
taskTimeEnd
);
}
selectTask
(
id
){
...
...
@@ -267,7 +286,6 @@ export class AddTaskComponent implements OnInit {
}
clickAddTask
(){
console
.
log
(
this
.
addTrack
)
if
(
!
this
.
addTrack
.
mdDropOptionId
){
const
toast
=
ToastService
.
show
(
'请选择您要添加的日程分类!'
,
0
);
setTimeout
(()
=>
{
...
...
@@ -293,14 +311,26 @@ export class AddTaskComponent implements OnInit {
...
this
.
addTrack
,
taskImportantTag
:
this
.
addTrack
.
taskImportantTag
?
1
:
0
,
isActive
:
1
,
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
],
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]
}
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
]?
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
]:
this
.
addTrack
.
taskTimeFrom
[
0
],
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]?
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]:
this
.
addTrack
.
taskTimeEnd
[
0
]
}
if
(
trackAdded
.
taskTimeFrom
==
trackAdded
.
taskTimeEnd
){
const
toast
=
ToastService
.
show
(
'任务起始时间不能等于结束时间!'
,
0
);
setTimeout
(()
=>
{
ToastService
.
hide
();
},
3000
);
return
;
}
this
.
myService
.
addScheduleTrack
(
trackAdded
).
subscribe
((
res
)
=>
{
const
toast
=
ToastService
.
show
(
`
${
res
[
'message'
]}
`
,
0
);
setTimeout
(()
=>
{
ToastService
.
hide
();
},
3000
);
setTimeout
(()
=>
{
if
(
res
[
'success'
]){
this
.
router
.
navigate
([
'/todo'
])
}
},
3000
)
})
}
}
src/app/my/my-business/my-business.component.ts
View file @
98df0791
...
...
@@ -67,7 +67,8 @@ export class MyBusinessComponent implements OnInit {
returnAddTask
(){
if
(
this
.
selectedBusiness
){
const
{
leadsAssignedId
,
opportunityId
}
=
this
.
selectedBusiness
;
this
.
router
.
navigate
([
'/addtask/'
],
{
queryParams
:
{
customerId
:
opportunityId
,
referLeadsId
:
leadsAssignedId
},
state
:
this
.
selectedBusiness
});
// this.router.navigate(['/addtask/'], { queryParams: { customerId:opportunityId , referLeadsId: leadsAssignedId },state:this.selectedBusiness});
this
.
router
.
navigate
([
'/addtask/'
],
{
queryParams
:
{
customerId
:
opportunityId
,
referLeadsId
:
leadsAssignedId
}});
}
else
{
this
.
toastDialog
=
true
;
this
.
toastInfo
=
{
...
...
src/app/my/my-center-home/my-center-home.component.html
View file @
98df0791
...
...
@@ -173,9 +173,7 @@
<img
style=
"border-radius: 10px;width: 48%;margin-right: 10px;"
src=
"assets/images/yindunvipmember.jpg"
(
click
)="
jumpUrl
()"
>
<!-- <img style="border-radius: 10px;width: 48%;" src="assets/images/yindunvipmember.jpg" (click)="jumpUrl()"> -->
</div>
<div
class=
"health_wrapper"
style=
"padding: 12px 10px 12px 10px;"
>
<h3
style=
"margin-bottom: 0;"
>
我的设置
<span
i
class=
"iconfont icon-ar-r"
style=
"font-size:18px;float: right;"
routerLink=
"setting"
></span>
...
...
src/app/my/recruiting/recruiting.component.ts
View file @
98df0791
...
...
@@ -82,7 +82,8 @@ export class RecruitingComponent implements OnInit {
returnAddTask
(){
if
(
this
.
selectedRecruiting
){
const
{
potentialId
}
=
this
.
selectedRecruiting
;
this
.
router
.
navigate
([
'/addtask/'
],
{
queryParams
:
{
referPotentialId
:
potentialId
},
state
:
this
.
selectedRecruiting
});
// this.router.navigate(['/addtask/'], { queryParams: { referPotentialId: potentialId },state:this.selectedRecruiting});
this
.
router
.
navigate
([
'/addtask/'
],
{
queryParams
:
{
referPotentialId
:
potentialId
}});
}
else
{
this
.
toastDialog
=
true
;
this
.
toastInfo
=
{
...
...
src/app/my/score-details/score-details.component.ts
View file @
98df0791
...
...
@@ -17,20 +17,18 @@ export class ScoreDetailsComponent implements OnInit {
ngOnInit
()
{
this
.
selectedTime
=
'D'
;
this
.
queryPEPScoreDetail
(
'D'
);
if
(
this
.
activateRoute
.
snapshot
.
paramMap
.
get
(
'practitionerId'
)){
this
.
practitionerId
=
Number
(
this
.
activateRoute
.
snapshot
.
paramMap
.
get
(
'practitionerId'
));
}
else
{
this
.
practitionerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
];
}
this
.
queryPEPScoreDetail
(
'D'
);
}
//销售活动量详情D-天 W-周 M-月
queryPEPScoreDetail
(
time
)
{
this
.
selectedTime
=
time
;
const
practitionerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
];
this
.
myService
.
queryPEPScoreDetail
({
practitionerId
:
practitionerId
,
time
:
this
.
selectedTime
}).
subscribe
((
res
)
=>
{
this
.
myService
.
queryPEPScoreDetail
({
practitionerId
:
this
.
practitionerId
,
time
:
this
.
selectedTime
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
])
{
this
.
salesScoreDetails
=
res
[
'data'
][
'detail'
];
this
.
chartOption
=
{
...
...
@@ -49,18 +47,18 @@ export class ScoreDetailsComponent implements OnInit {
{
name
:
'PEP得分'
,
type
:
'pie'
,
radius
:
[
'2
0%'
,
'40
%'
],
radius
:
[
'2
5%'
,
'45
%'
],
avoidLabelOverlap
:
true
,
label
:
{
show
:
true
,
position
:
'outside'
,
//显示的标签的内容
formatter
:
"{b}:{c}分"
,
formatter
:
"{b}:{c}分
({d}%)
"
,
},
emphasis
:
{
label
:
{
show
:
true
,
fontSize
:
'1
8
'
,
fontSize
:
'1
4
'
,
fontWeight
:
'bold'
}
},
...
...
src/app/my/team-sales-score/team-sales-score.component.html
View file @
98df0791
...
...
@@ -24,14 +24,14 @@
*
ngIf=
"personalList?.length <=0"
>
暂无战队成员,努力去增员吧
</div>
<ul
*
ngFor=
"let personalItem of personalList;index as i;"
>
<ul
*
ngFor=
"let personalItem of personalList;index as i;"
[
routerLink
]="['/
scoreDeatil
',
personalItem
.
practitionerId
]"
>
<li><span>
{{i + 1}}
</span>
{{personalItem.name}}
</li>
<li
class=
"day"
>
{{personalItem.dayScore}}
</li>
<li>
{{personalItem.weekScore}}
</li>
<li>
{{personalItem.monthScore}}
</li>
<li>
{{personalItem.rate}}
</li>
<li><i
class=
"iconfont icon-ar-r"
style=
"color: #A4A4A4FF;font-size: 12px;"
[
routerLink
]="['/
scoreDeatil
',
personalItem
.
practitionerId
]"
></i></li>
<li><i
class=
"iconfont icon-ar-r"
style=
"color: #A4A4A4FF;font-size: 12px;"
></i></li>
</ul>
</div>
...
...
src/app/my/todo-list/todo-list.component.html
View file @
98df0791
...
...
@@ -47,9 +47,9 @@
<div
class=
"taskContent"
>
<div
class=
"title"
>
任务数量({{taskList?.length}})
</div>
<ul>
<li
*
ngFor=
"let taskItem of taskList"
(
click
)="
deleteScheduleTrackById
(
taskItem
.
id
)"
>
<li
*
ngFor=
"let taskItem of taskList"
>
<div
class=
"content_wrapper"
>
<div
class=
"content_card"
>
<div
class=
"content_card"
(
click
)="
editeTask
(
taskItem
,'
edit
')"
>
<span>
{{taskItem.taskTimeFrom}} - {{taskItem.taskTimeEnd}}
</span>
<div
class=
"todo_title"
>
<span
*
ngIf=
"taskItem.taskImportantTag==1"
>
(重要)
</span>
...
...
@@ -58,7 +58,9 @@
<div
class=
"notice"
>
{{taskItem.notice}}
</div>
</div>
<div
class=
"red"
*
ngIf=
"taskItem.taskImportantTag==1"
></div>
<div
class=
"iconfont icon-shanchu1"
(
click
)="
editeTask
(
taskItem
,'
delete
')"
></div>
</div>
</li>
</ul>
</div>
...
...
src/app/my/todo-list/todo-list.component.scss
View file @
98df0791
...
...
@@ -122,6 +122,13 @@ ul,ol{
z-index
:
9
;
border-radius
:
8px
;
}
.iconfont
{
position
:
absolute
;
right
:
5px
;
z-index
:
20
;
font-size
:
24px
;
top
:
35%
;
}
}
}
...
...
src/app/my/todo-list/todo-list.component.ts
View file @
98df0791
...
...
@@ -3,6 +3,7 @@ import { LifeCommonService } from '../../common/life-common.service';
import
{
MyService
}
from
'../my.service'
;
import
*
as
dayjs
from
'dayjs'
;
import
{
ModalService
,
ToastService
}
from
'ng-zorro-antd-mobile'
;
import
{
Router
,
ActivatedRoute
}
from
"@angular/router"
;
@
Component
({
selector
:
'ydlife-todo-list'
,
...
...
@@ -31,7 +32,8 @@ export class TodoListComponent implements OnInit {
onSelect
:
undefined
,
}
practitionerId
:
number
;
constructor
(
public
lifeCommonService
:
LifeCommonService
,
private
myService
:
MyService
,
private
_modal
:
ModalService
,
private
_toast
:
ToastService
)
{
constructor
(
public
lifeCommonService
:
LifeCommonService
,
private
myService
:
MyService
,
private
_modal
:
ModalService
,
private
_toast
:
ToastService
,
private
router
:
Router
)
{
this
.
taskTimeList
=
[
{
id
:
1
,
time
:
'8:00'
},
{
id
:
2
,
time
:
'9:00'
},
...
...
@@ -53,17 +55,23 @@ export class TodoListComponent implements OnInit {
}
ngOnInit
()
{
//进页面清除上次缓存的时间
sessionStorage
.
removeItem
(
"trackTime"
);
this
.
practitionerId
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))[
'practitionerId'
];
this
.
weekArr
=
this
.
lifeCommonService
.
makeDate
();
//初始化追踪时间为今天
this
.
trackTime
=
dayjs
().
format
(
'YYYY-MM-DD'
);
if
(
sessionStorage
.
getItem
(
'trackTime'
)){
this
.
trackTime
=
sessionStorage
.
getItem
(
'trackTime'
);
this
.
weekArr
=
this
.
lifeCommonService
.
makeDate
(
this
.
trackTime
);
}
else
{
//初始化追踪时间为今天
this
.
trackTime
=
dayjs
().
format
(
'YYYY-MM-DD'
);
}
this
.
queryScheduleTrackList
();
}
goBack
(){
history
.
go
(
-
1
)
// history.go(-1)
//离开页面清除上次缓存的时间
sessionStorage
.
removeItem
(
"trackTime"
);
this
.
router
.
navigate
([
'/my'
]);
}
selectDay
(
weekItem
){
...
...
@@ -123,17 +131,17 @@ export class TodoListComponent implements OnInit {
if
(
res
[
'success'
]){
this
.
taskList
=
res
[
'data'
][
'dataList'
];
}
else
{
this
.
taskList
=
[];
this
.
taskList
=
[];
}
})
}
//删除日程
deleteScheduleTrackById
(
scheduleTrackId
){
deleteScheduleTrackById
(
taskItem
){
ModalService
.
alert
(
'删除该项日程'
,
''
,
[
{
text
:
'取消'
,
onPress
:
()
=>
console
.
log
(
'取消'
)
},
{
text
:
'确定'
,
onPress
:
()
=>
this
.
myService
.
deleteScheduleTrackById
({
scheduleTrackId
:
scheduleTrackId
}).
subscribe
((
res
)
=>
{
this
.
myService
.
deleteScheduleTrackById
({
scheduleTrackId
:
taskItem
.
id
,
taskType
:
taskItem
.
taskType
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
queryScheduleTrackList
();
}
else
{
...
...
@@ -146,4 +154,12 @@ export class TodoListComponent implements OnInit {
}
]);
}
editeTask
(
taskInfo
,
type
){
if
(
type
==
'edit'
){
this
.
router
.
navigate
([
'/addtask'
],
{
state
:
taskInfo
})
}
else
{
this
.
deleteScheduleTrackById
(
taskInfo
);
}
}
}
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