Commit 76400ed3 by sunchao

新增日程

parent bfcac251
export class TrackQuery {
constructor(
public practitionerId?:string,
public notice?:string,
public taskType?:number,
//关联商机id
public referLeadsId?:string,
//关联增员id
public referPotentialId?:string,
public taskImportantTag?:any,
public isActive?:any,
public taskTimeFrom?:Array<any>[],
public taskTimeEnd?:Array<any>[],
//任务长期固定
public taskRoutineAtweek7?:number,
public taskRoutineAtweek6?:number,
public taskRoutineAtweek5?:number,
public taskRoutineAtweek4?:number,
public taskRoutineAtweek3?:number,
public taskRoutineAtweek2?:number,
public taskRoutineAtweek1?:number,
//经纪人商机对应的客户id
public customerId?:string,
public mdDropOptionId?:string,
public trackScore?:string,
//日程时间
public trackTime?:string
) {
}
}
......@@ -35,40 +35,69 @@
<div class="task_content_wrapper">
<div class="part_wrapper part1">
<ul class="part1_list">
<li *ngFor="let salesActivityItem of salesActivityList" [ngClass]="{'selected':mdDropOptionId==salesActivityItem.id}" (click)="selectTask(salesActivityItem.id);">
<ng-container *ngFor="let salesActivityItem of salesActivityList">
<li [ngClass]="{'selected':addTrack.mdDropOptionId==salesActivityItem.id}" (click)="selectTask(salesActivityItem.id);"
*ngIf="(addTrack.taskType == 1 && salesActivityItem.id != '102') || (addTrack.taskType == 2 && salesActivityItem.id != '114') || (addTrack.taskType == 3)">
{{salesActivityItem.dropOptionName}}
</li>
</ng-container>
</ul>
<div class="important_mark"> <span [ngClass]="{'circle':taskImportantTag==true}" (click)="taskImportantTag=!taskImportantTag"></span> <div>重要标签</div> </div>
<div class="important_mark"> <span [ngClass]="{'circle':addTrack.taskImportantTag==true}" (click)="addTrack.taskImportantTag=!addTrack.taskImportantTag"></span> <div>重要标签</div> </div>
</div>
<div class="part_wrapper part2">
<div style="font-size: 18px;">选择任务需要的时间</div>
<div class="timeContent">
<div class="picker_list">
<PickerView [data]="seasons" [cascade]="false" [(ngModel)]="taskTimeFrom" (ngModelChange)="onChange($event,1)"></PickerView>
<PickerView [data]="seasons" [cascade]="false" [(ngModel)]="addTrack.taskTimeFrom" (ngModelChange)="onChange($event,1)"></PickerView>
</div>
<div style="color: #d9dadc;width: 10%;text-align: center;"></div>
<div class="picker_list">
<PickerView [data]="seasons" [cascade]="false" [(ngModel)]="taskTimeEnd" (ngModelChange)="onChange($event,2)"></PickerView>
<PickerView [data]="seasons" [cascade]="false" [(ngModel)]="addTrack.taskTimeEnd" (ngModelChange)="onChange($event,2)"></PickerView>
</div>
</div>
</div>
<div class="part_wrapper part3">
<div class="part_wrapper part3" *ngIf="tabType == 'pep_schedule_task_others'">
<div style="margin-bottom: 10px;">任务长期固定在:</div>
<ul class="part3_list">
<li *ngFor="let longTermItem of longTermList" [ngClass]="{'selectedLongTerm':longTermItem.isLongTermTask == true}" (click)="longTermItem.isLongTermTask=!longTermItem.isLongTermTask">
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek1 == 1}" (click)="selectIsLongTermTask(1);">
<span></span>
<div>{{longTermItem.name}}</div>
<div>周一</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek2 == 1}" (click)="selectIsLongTermTask(2);">
<span></span>
<div>周二</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek3 == 1}" (click)="selectIsLongTermTask(3);">
<span></span>
<div>周三</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek4 == 1}" (click)="selectIsLongTermTask(4);">
<span></span>
<div>周四</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek5 == 1}" (click)="selectIsLongTermTask(5);">
<span></span>
<div>周五</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek6 == 1}" (click)="selectIsLongTermTask(6);">
<span></span>
<div>周六</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek7 == 1}" (click)="selectIsLongTermTask(7);">
<span></span>
<div>周天</div>
</li>
</ul>
</div>
<div class="part_wrapper part4" style="margin-bottom: 60px;">
<div class="part_wrapper part4" >
<div style="font-size: 18px;margin-bottom: 10px;">添加备注</div>
<textarea style="border:0;border-radius:5px;background:#f6f6f6;width: 355px;height: 100px;padding: 10px;resize: none;" [(ngModel)]="notice"></textarea>
<textarea style="border:0;border-radius:5px;background:#f6f6f6;width: 100%;height: 100px;padding: 10px;resize: none;" [(ngModel)]="addTrack.notice"></textarea>
</div>
</div>
<div class="footer">添加任务</div>
</div>
<div class="footer" (click)="clickAddTask()">添加任务</div>
<!-- <div class="link_totast_wrapper" *ngIf="linkToastFlag">
<div class="link_mask"></div>
<div class="link_totast_content_wrapper">
......
......@@ -4,6 +4,7 @@ ul,ol{
.todo_wrapper{
background: #fff;
padding-bottom: 60px;
.top{
.head{
display: flex;
......@@ -44,7 +45,7 @@ ul,ol{
.part_wrapper{
margin-top: 20px;
position: relative;
padding: 0 2%;
padding: 0 4%;
ul{
display: flex;
flex-wrap: wrap;
......@@ -116,8 +117,13 @@ ul,ol{
}
}
}
.footer{
}
.footer{
width: 100%;
min-width: 320px;
max-width: 640px;
height: 55px;
line-height: 55px;
background: #1b5b99;
......@@ -127,9 +133,7 @@ ul,ol{
bottom: 0;
font-size: 20px;
font-weight: bold;
}
}
.link_totast_wrapper{
.link_mask{
position: fixed;
......
import { Component, OnInit } from '@angular/core';
import {MyService} from '../my.service';
import { MyService} from '../my.service';
import { ModalService, ToastService } from 'ng-zorro-antd-mobile';
import { Router } from "@angular/router";
import {LifeCommonService} from '../../common/life-common.service';
import { Router,ActivatedRoute } from "@angular/router";
import { LifeCommonService} from '../../common/life-common.service';
import { TrackQuery} from '../../domain/trackQuery';
import * as dayjs from 'dayjs';
@Component({
selector: 'ydlife-add-task',
......@@ -26,22 +28,15 @@ export class AddTaskComponent implements OnInit {
maxDate: new Date(+new Date() + 31536000000),
onSelect: undefined,
}
addTrack:TrackQuery = new TrackQuery()
tabList:Array<any>;
tabType:string;
salesActivityList:Array<any>;
taskImportantTag:boolean = false;
seasons:Array<any>;
taskTimeFrom:Array<any>=[];
taskTimeEnd:Array<any> = [];
longTermList:Array<any>;
taskType:number;
mdDropOptionId:any;
notice:string;
linkToastFlag:boolean = false;
totastTitle:string;
trackTime:any;
constructor(private myService:MyService,private router: Router,private _modal: ModalService, private _toast: ToastService,
public lifeCommonService:LifeCommonService) {
public lifeCommonService:LifeCommonService,private activateRoute:ActivatedRoute) {
this.seasons = [
{label: '8:00',id:1},
{label: '8:30',id:2},
......@@ -73,15 +68,6 @@ export class AddTaskComponent implements OnInit {
{label: '18:00',id:28},
{label: '19:30',id:29},
];
this.longTermList = [
{name:'周一',isLongTermTask:false},
{name:'周二',isLongTermTask:false},
{name:'周三',isLongTermTask:false},
{name:'周四',isLongTermTask:false},
{name:'周五',isLongTermTask:false},
{name:'周六',isLongTermTask:false},
{name:'周日',isLongTermTask:false}
];
// console.log(this.router.getCurrentNavigation().extras.state)
}
......@@ -105,18 +91,29 @@ 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);
//如果有缓存切换到缓存数据
if(JSON.parse(sessionStorage.getItem('pageDwellDtatus'))){
this.tabType = JSON.parse(sessionStorage.getItem('pageDwellDtatus'))['tabType'];
this.dropOptionsQuery(this.tabType);
this.mdDropOptionId = JSON.parse(sessionStorage.getItem('pageDwellDtatus'))['mdDropOptionId'];
this.addTrack.mdDropOptionId = JSON.parse(sessionStorage.getItem('pageDwellDtatus'))['mdDropOptionId'];
}else{
this.tabType = 'bizchance_promotion_action';
this.mdDropOptionId = null;
this.addTrack.mdDropOptionId = null;
}
//如果有日程时间就取缓存没有就默认当天
if(sessionStorage.getItem('trackDate')){
this.addTrack.trackTime = sessionStorage.getItem('trackDate');
}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'];
}
goBack(){
......@@ -129,19 +126,28 @@ export class AddTaskComponent implements OnInit {
if(this.tabType == code){
pageDwellDtatus = {
tabType:this.tabType,
mdDropOptionId:this.mdDropOptionId,
taskType:this.taskType
mdDropOptionId:this.addTrack.mdDropOptionId,
taskType:this.addTrack.taskType
}
sessionStorage.setItem('pageDwellDtatus',JSON.stringify(pageDwellDtatus));
}else{
this.tabType = code;
this.taskType = taskType;
this.mdDropOptionId = null;
this.addTrack.taskType = taskType;
this.addTrack.mdDropOptionId = null;
if(this.addTrack.taskType == 1 || this.addTrack.taskType == 2){
this.addTrack.taskRoutineAtweek1 = undefined;
this.addTrack.taskRoutineAtweek2 = undefined;
this.addTrack.taskRoutineAtweek3 = undefined;
this.addTrack.taskRoutineAtweek4 = undefined;
this.addTrack.taskRoutineAtweek5 = undefined;
this.addTrack.taskRoutineAtweek6 = undefined;
this.addTrack.taskRoutineAtweek7 = undefined;
}
this.dropOptionsQuery(this.tabType);
pageDwellDtatus = {
tabType:this.tabType,
mdDropOptionId:null,
taskType:this.taskType
taskType:this.addTrack.taskType
}
sessionStorage.setItem('pageDwellDtatus',JSON.stringify(pageDwellDtatus));
}
......@@ -157,33 +163,42 @@ export class AddTaskComponent implements OnInit {
onChange(result,type) {
if(type===1){
this.taskTimeFrom = result;
console.log(this.taskTimeFrom);
this.addTrack.taskTimeFrom = result[0]['label'];
}
if(type===2){
console.log(this.taskTimeEnd)
this.taskTimeEnd=result;
this.addTrack.taskTimeEnd = result[0]['label'];
}
}
selectTask(id){
this.mdDropOptionId=id;
this.addTrack.mdDropOptionId=id;
const pageDwellDtatus = {
tabType:this.tabType,
mdDropOptionId:this.mdDropOptionId,
taskType:this.taskType
mdDropOptionId:this.addTrack.mdDropOptionId,
taskType:this.addTrack.taskType
}
sessionStorage.setItem('pageDwellDtatus',JSON.stringify(pageDwellDtatus));
if(this.tabType == 'bizchance_promotion_action' ){
// this.linkToastFlag = true;
this.totastTitle = '商机';
ModalService.alert('是否联系到商机', '', [
{ text: '否', onPress: () =>
this.clearRouterInfo(),
style: {
borderTop:'1px #ddd solid'
}
if(this.tabType == 'team_building_track'){
// this.linkToastFlag = true;
this.totastTitle = '增员';
},
{ text: '是', onPress: () => this.jumpToLink(),
style: {
color: '#f8002e',
background: '',
borderLeft:'1px #ddd solid',
borderTop:'1px #ddd solid'
}
},
]);
}
ModalService.alert(`是否联系到${this.totastTitle}`, '', [
{ text: '否', onPress: () => this.linkToastFlag=false,
if(this.tabType == 'team_building_track'){
ModalService.alert('是否联系到增员', '', [
{ text: '否', onPress: () => this.clearRouterInfo(),
style: {
borderTop:'1px #ddd solid'
}
......@@ -196,18 +211,13 @@ export class AddTaskComponent implements OnInit {
borderTop:'1px #ddd solid'
}
},
]);
}
getValue(result) {
let value = [];
let temp = '';
result.forEach(item => {
value.push(item.label || item);
temp += item.label || item;
});
return value;
}
clearRouterInfo(){
this.linkToastFlag=false,
this.router.navigate(['/addtask'], {replaceUrl: true});
}
clickCalendar(){
......@@ -227,10 +237,9 @@ export class AddTaskComponent implements OnInit {
...{ show: false, startDate, endDate }
};
this.triggerCancel();
this.trackTime = this.lifeCommonService.dateFormat(startDate,"yyyy-MM-dd")
console.log(this.trackTime);
}
this.addTrack.trackTime = dayjs(startDate).format('YYYY-MM-DD');
}
jumpToLink(){
if(this.tabType == 'bizchance_promotion_action'){
......@@ -241,4 +250,64 @@ export class AddTaskComponent implements OnInit {
}
}
//选择长期任务
selectIsLongTermTask(type){
if(type===1){
this.addTrack.taskRoutineAtweek1 == 1?this.addTrack.taskRoutineAtweek1 = 0:this.addTrack.taskRoutineAtweek1 = 1;
}
if(type===2){
this.addTrack.taskRoutineAtweek2 == 1?this.addTrack.taskRoutineAtweek2 = 0:this.addTrack.taskRoutineAtweek2 = 1;
}
if(type===3){
this.addTrack.taskRoutineAtweek3 == 1?this.addTrack.taskRoutineAtweek3 = 0:this.addTrack.taskRoutineAtweek3 = 1;
}
if(type===4){
this.addTrack.taskRoutineAtweek4 == 1?this.addTrack.taskRoutineAtweek4 = 0:this.addTrack.taskRoutineAtweek4 = 1;
}
if(type===5){
this.addTrack.taskRoutineAtweek5 == 1?this.addTrack.taskRoutineAtweek5 = 0:this.addTrack.taskRoutineAtweek5 = 1;
}
if(type===6){
this.addTrack.taskRoutineAtweek6 == 1?this.addTrack.taskRoutineAtweek6 = 0:this.addTrack.taskRoutineAtweek6 = 1;
}
if(type===7){
this.addTrack.taskRoutineAtweek7 == 1?this.addTrack.taskRoutineAtweek7 = 0:this.addTrack.taskRoutineAtweek7 = 1;
}
}
clickAddTask(){
console.log(this.addTrack)
if(!this.addTrack.mdDropOptionId){
const toast = ToastService.show('请选择您要添加的日程分类!', 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
return;
}
if(!this.addTrack.taskTimeFrom ){
const toast = ToastService.show('请选择任务需要的起始时间!', 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
return;
}
if(!this.addTrack.taskTimeEnd){
const toast = ToastService.show('请选择任务需要的结束时间!', 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
return;
}
this.addTrack = {
...this.addTrack,
taskImportantTag:this.addTrack.taskImportantTag?1:0,
isActive:1
}
this.myService.addScheduleTrack(this.addTrack).subscribe((res)=>{
const toast = ToastService.show(`${res['message']}`, 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
})
}
}
......@@ -36,6 +36,7 @@ export class MyBusinessComponent implements OnInit {
this.showBusinessList = res['data']['ownOpportunityInfos'];
} else {
this.businessList = [];
this.showBusinessList = [];
}
})
}
......
......@@ -84,7 +84,7 @@
</div>
<div class="part2">
<div class="part2_item activity_score" routerLink="scoreDeatil">
<div>销售活动量分值</div>
<div>活动量分值</div>
<div style="width: 100%;">
<ul class="activities">
<li class="markPrice">{{this.activities_grade?.scoreDay}}</li>
......@@ -105,7 +105,7 @@
</div>
<div>
<span>数量</span>
<div style="width: 100%;font-size: 20px;font-weight: bold;">3</div>
<div style="width: 100%;font-size: 20px;font-weight: bold;">{{taskLen?.length }}</div>
</div>
</div>
</div>
......
......@@ -6,7 +6,7 @@ import { MyService } from "../my.service";
import { Plans } from '../../domain/plans';
import { User } from '../../domain/user';
import { LocalStorage } from '../../domain/local.storage';
import * as dayjs from 'dayjs';
declare var wx: any;
@Component({
selector: 'ydlife-my-center-home',
......@@ -34,7 +34,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
onlineInfo: any;
offlineInfo: any;
activities_grade: any;
taskLen:Array<any> = [];
constructor(
private router: Router,
public lifeCommonService: LifeCommonService,
......@@ -62,6 +62,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
//判断是否团队长
this.subordinateSystemMemberQuery();
this.opportunityStatistics();
this.queryScheduleTrackList();
}
ngAfterViewInit() {
......@@ -331,4 +332,15 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
return '第四季度';
}
}
//获取今日任务数量
queryScheduleTrackList(){
this.myService.queryScheduleTrackList({practitionerId:this.lifeCustomerInfo.practitionerId,trackDate:dayjs().format('YYYY-MM-DD')}).subscribe((res)=>{
if(res['success']){
this.taskLen = res['data']['dataList'];
}else{
this.taskLen =[];
}
})
}
}
......@@ -345,4 +345,12 @@ export class MyService {
return this.http
.post(url, JSON.stringify(param));
}
//新增日程
addScheduleTrack(param){
const url = this.ydapi + '/practitioner/addScheduleTrack';
return this.http
.post(url, JSON.stringify(param));
}
}
<div class="salesWrapper">
<ul class="tab">
<div class="search_wrapper" *ngIf="pageType=='linkrecruiting'">
<div class="am-demo-page">
<div class="am-demo-bd" >
<SearchBar [placeholder]="'搜索你的增员'" [maxLength]="8"
(onChange)="change($event)"
></SearchBar>
</div>
</div>
</div>
<ul class="tab" *ngIf="this.pageType == 'recruiting'">
<li *ngFor="let titleItem of titleList" (click)="selectTab(titleItem.id)"
[ngClass]="{selected:selectedId===titleItem.id}">
<div style="position: relative;">
......@@ -10,12 +19,15 @@
</ul>
<div class="salesContent">
<div style="text-align: center;margin: 20px auto;font-size: 20px;" *ngIf="businessList?.length==0">暂无商机</div>
<div class="salesItem" *ngFor="let recruitingItem of recruitingList"
[routerLink]="['/recruiting',recruitingItem.potentialId]" [queryParams]="{status:selectedId}">
<div class="icon_bolck"><span class="iconfont icon-tuanduiguanlisvg"></span></div>
<div class="salesItem" *ngFor="let recruitingItem of showRecruitingList" (click)="isJumpToDetail(recruitingItem.potentialId,recruitingItem)">
<div class="icon_bolck" *ngIf="pageType=='recruiting'"><span class="iconfont icon-tuanduiguanlisvg"></span></div>
<div *ngIf="pageType=='linkrecruiting'" class="linkbusinessRadius">
<span class='circlebtn' *ngIf="selectedRecruiting?.potentialId != recruitingItem.potentialId"></span>
<img src="assets/images/gou_icon.png" *ngIf="selectedRecruiting?.potentialId == recruitingItem.potentialId" style="position: absolute;width: 100%;" >
</div>
<div class="line">
<div>姓名:{{recruitingItem.name}}</div>
<span class="iconfont icon-ar-r" style="font-size: 10px;position: relative; right: -2px;"></span>
<span class="iconfont icon-ar-r" style="font-size: 10px;position: relative; right: -2px;" *ngIf="pageType=='recruiting'"></span>
</div>
<div class="line">
......@@ -28,8 +40,11 @@
</div>
</div>
</div>
<div class="add">
<div class="footer" *ngIf="pageType=='linkrecruiting'" (click)="returnAddTask()">
确认
</div>
<div class="add" *ngIf="pageType=='recruiting'">
<i class="iconfont icon-jiahao" (click)="addMember()"></i>
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file
......@@ -49,7 +49,20 @@
top: 1px;
}
}
.linkbusinessRadius{
position: absolute;
top: 35%;
left: 10px;
width: 25px;
height: 25px;
.circlebtn{
display: inline-block;
width: 25px;
height: 25px;
border: 1px #707070 solid;
border-radius: 50%;
}
}
.line{
display: flex;
justify-content: space-between;
......@@ -87,4 +100,15 @@
left: 42%;
}
}
.footer{
width: 100%;
height: 50px;
line-height: 50px;
background: #1b5b99;
color: #fff;
font-size: 18px;
position: fixed;
bottom: 0;
text-align: center;
}
}
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import { Router } from "@angular/router";
import { Router,ActivatedRoute } from "@angular/router";
import { MyService } from '../my.service';
@Component({
......@@ -11,15 +11,28 @@ export class RecruitingComponent implements OnInit {
recruitingList: Array<any>;
titleList: Array<any>;
selectedId: any;
constructor(private router: Router, private myService: MyService) { }
pageType:any;
showRecruitingList:Array<any>;
selectedRecruiting:any;
//控制弹框
toastDialog: boolean;
toastInfo: any;
constructor(private router: Router, private myService: MyService,private activatedRoute: ActivatedRoute) {
this.pageType = this.activatedRoute.snapshot.data[0]['type'];
}
ngOnInit() {
//从日程进来的不显示tab
if(this.pageType == 'recruiting'){
this.titleList = [
{ id: 1, name: '待跟进' },
{ id: 2, name: '跟进中' },
{ id: 3, name: '已报聘' },
]
this.selectTab(1)
this.selectTab(1);
}else{
this.recruitListQuery(null);
}
}
addMember() {
......@@ -38,8 +51,47 @@ export class RecruitingComponent implements OnInit {
}
this.myService.recruitListQuery(listParam).subscribe((res) => {
if (res['success']) {
this.recruitingList = res['data']['practitionerPotentialInfoList']
this.recruitingList = res['data']['practitionerPotentialInfoList'];
this.showRecruitingList = res['data']['practitionerPotentialInfoList'];
}else{
this.recruitingList = [];
this.showRecruitingList = [];
}
})
}
change(event){
this.showRecruitingList = this.recruitingList.filter((item)=>{
return item.name.indexOf(event) !=-1;
})
}
isJumpToDetail(potentialId,recruitingItem?:any){
if(this.pageType == 'recruiting'){
this.router.navigate([`/recruiting/${potentialId}`], { queryParams: { status: this.selectedId} });
}else{
if(!this.selectedRecruiting){
this.selectedRecruiting = recruitingItem;
}else{
this.selectedRecruiting = undefined;
}
return;
}
}
returnAddTask(){
if(this.selectedRecruiting){
const {potentialId}=this.selectedRecruiting;
this.router.navigate(['/addtask/'], { queryParams: { referPotentialId: potentialId },state:this.selectedRecruiting});
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg:'请选择您需要关联的增员对象!',
timeout: 3000,
align: 'center'
};
return;
}
}
}
......@@ -33,8 +33,8 @@
</ul>
</div>
<div class="task_wrapper">
<div class="noTask" *ngIf="taskList?.length==0">
<img src="assets/images/noListBg.png" >
<div class="noTask" >
<img src="assets/images/noListBg.png" *ngIf="!taskList?.length">
</div>
<div class="taskList" *ngIf="taskList?.length>0">
<div class="taskTime">
......@@ -44,19 +44,19 @@
</ul>
</div>
<div class="taskContent">
<div class="title">任务数量({{taskList.length}})</div>
<div class="title">任务数量({{taskList?.length}})</div>
<ul>
<li *ngFor="let taskItem of taskList">
<div class="content_wrapper">
<div class="content_card">
<span>{{taskItem.taskTimeFrom}} - {{taskItem.taskTimeEnd}}</span>
<div class="todo_title">
<span *ngIf="taskItem.taskImportantTag">(重要)</span>
<span *ngIf="taskItem.taskImportantTag==1">(重要)</span>
{{taskItem.mdDropOptionName}}
</div>
<div class="notice">{{taskItem.notice}}</div>
</div>
<div class="red" ></div>
<div class="red" *ngIf="taskItem.taskImportantTag==1"></div>
</div>
</li>
</ul>
......
......@@ -2,6 +2,7 @@ ul,ol{
list-style: none;
}
.todo_wrapper{
padding-bottom: 65px;
.top{
padding-bottom: 20px;
background: #fff;
......@@ -45,12 +46,10 @@ ul,ol{
position: relative;
.noTask{
margin-top: 15%;
font-size: 20px;
color: #9a9fb4;
display: flex;
justify-content: center;
width: 100%;
text-align: center;
img{
max-width: 70%;
max-width: 65%;
}
.addtips{
text-align: center;
......@@ -136,7 +135,7 @@ ul,ol{
border-radius: 50%;
color: #fff;
text-align: center;
line-height: 55px;
line-height: 50px;
bottom: -15%;
right: 8%;
.iconfont{
......
import { Component, OnInit } from '@angular/core';
import { LifeCommonService } from '../../common/life-common.service';
import {MyService} from '../my.service';
import * as dayjs from 'dayjs'
import * as dayjs from 'dayjs';
@Component({
selector: 'ydlife-todo-list',
......@@ -29,6 +29,7 @@ export class TodoListComponent implements OnInit {
maxDate: new Date(+new Date() + 31536000000),
onSelect: undefined,
}
practitionerId:number;
constructor(public lifeCommonService: LifeCommonService,private myService:MyService) {
this.taskTimeList = [
{id:1,time:'8:00'},
......@@ -47,10 +48,13 @@ export class TodoListComponent implements OnInit {
}
ngOnInit() {
//进页面清除上次缓存的时间
sessionStorage.removeItem("trackDate");
this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'];
this.weekArr = this.lifeCommonService.makeDate();
//初始化追踪时间为今天
this.trackDate = dayjs().format('YYYY-MM-DD');
this.queryScheduleTrackList();
console.log(dayjs)
}
goBack(){
......@@ -58,13 +62,9 @@ export class TodoListComponent implements OnInit {
}
selectDay(weekItem){
for(let i=0;i<this.weekArr.length;i++){
this.weekArr[i].selected = false;
if(weekItem.day == this.weekArr[i]['day']){
this.weekArr[i].selected = true;
this.trackDate = this.weekArr[i]['date'];
}
}
this.trackDate = weekItem['date'];
//缓存任务时间
sessionStorage.setItem('trackDate',this.trackDate);
this.queryScheduleTrackList();
}
......@@ -107,16 +107,18 @@ export class TodoListComponent implements OnInit {
};
this.triggerCancel();
this.trackDate =dayjs(startDate).format('YYYY-MM-DD');
console.log(this.trackDate)
//缓存任务时间
sessionStorage.setItem('trackDate',this.trackDate);
this.queryScheduleTrackList();
this.weekArr = this.lifeCommonService.makeDate(startDate);
console.log(this.weekArr)
}
queryScheduleTrackList(){
this.myService.queryScheduleTrackList({practitionerId:'1',trackDate:this.trackDate}).subscribe((res)=>{
this.myService.queryScheduleTrackList({practitionerId:this.practitionerId,trackDate:this.trackDate}).subscribe((res)=>{
if(res['success']){
this.taskList = res['data'];
this.taskList = res['data']['dataList'];
}else{
this.taskList = [];
}
})
}
......
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