Commit 5b8afa93 by sunchao

关联商机页面

parent 27ed7020
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
"styles": [ // 引入全局样式,构建时会打包进来,常用于第三方库引入的样式 "styles": [ // 引入全局样式,构建时会打包进来,常用于第三方库引入的样式
"src/assets/font/iconfont.css", "src/assets/font/iconfont.css",
"src/assets/weui/weui.css", "src/assets/weui/weui.css",
"node_modules/ng-zorro-antd-mobile/src/ng-zorro-antd-mobile.min.css",
"src/styles.scss" "src/styles.scss"
], ],
"scripts": [], // 引入全局脚步,构建时会打包进来,常用于第三方库引入的脚本 "scripts": [], // 引入全局脚步,构建时会打包进来,常用于第三方库引入的脚本
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
"buffer": "^5.4.3", "buffer": "^5.4.3",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"html2canvas": "^1.0.0-rc.5", "html2canvas": "^1.0.0-rc.5",
"ng-zorro-antd-mobile": "^0.12.5",
"rxjs": "~6.3.3", "rxjs": "~6.3.3",
"tslib": "^1.9.0", "tslib": "^1.9.0",
"uuid": "^3.3.3", "uuid": "^3.3.3",
......
...@@ -6,7 +6,7 @@ import { Router } from "@angular/router"; ...@@ -6,7 +6,7 @@ import { Router } from "@angular/router";
templateUrl: './toast.component.html', templateUrl: './toast.component.html',
styleUrls: ['./toast.component.scss'] styleUrls: ['./toast.component.scss']
}) })
export class ToastComponent implements OnInit { export class MyToastComponent implements OnInit {
@Input() toastInfo: any; @Input() toastInfo: any;
@Input() routerLink: any; @Input() routerLink: any;
toastHidden: boolean; toastHidden: boolean;
......
...@@ -3,33 +3,100 @@ ...@@ -3,33 +3,100 @@
<div class="head"> <div class="head">
<h3 (click)="goBack()">&lt;</h3> <h3 (click)="goBack()">&lt;</h3>
<h3>新建日程</h3> <h3>新建日程</h3>
<div>日历</div> <div class="am-demo-page">
<List className="calendar-list" style="backgroundColor: 'white'">
<ListItem [arrow]="'horizontal'" (onClick)="onClick_0()">
{{this.state.en ? '日历' : '日历'}}
</ListItem>
<ListItem *ngIf="this.state.startDate">
Time1: {{this.state.startDate.toLocaleString()}}
</ListItem>
<ListItem *ngIf="this.state.endDate">
Time2: {{this.state.endDate.toLocaleString()}}
</ListItem>
</List>
<ng-template #_switch>
<Switch className="right" [checked]="!this.state.en" (onChange)="this.changeLanguage()"></Switch>
</ng-template>
<Calendar [(ngModel)]="this.state.date"
[locale]="this.state.en ? 'enUS' : 'zhCN'"
[enterDirection]="this.state.enterDirection"
[visible]="this.state.show"
[getDateExtra]="this.state.getDateExtra"
[defaultDate]="this.state.now"
[minDate]="this.state.minDate"
[maxDate]="this.state.maxDate"
[pickTime]="this.state.pickTime"
[type]="this.state.type"
[rowSize]="this.state.rowSize"
[showShortcut]="this.state.showShortcut"
[infinite]="this.state.infinite"
[defaultValue]="this.state.defaultValue"
[onSelect]="this.state.onSelect"
(onCancel)="triggerCancel()"
(onConfirm)="triggerConfirm($event)"
(onSelectHasDisableDate)="triggerSelectHasDisableDate($event)"
></Calendar>
</div>
</div> </div>
<ul class="nav"> <ul class="nav">
<li *ngFor="let tabItem of tabList;index as i;" [ngClass]="{'selected':tabItem.code === tabType}" (click)="selectTab(tabItem.code)"> <li *ngFor="let tabItem of tabList;index as i;" [ngClass]="{'selected':tabItem.code === tabType}" (click)="selectTab(tabItem.code,tabItem.taskType)">
<span> {{tabItem.name}} </span> <span> {{tabItem.name}} </span>
</li> </li>
</ul> </ul>
</div> </div>
<div class="task_content_wrapper"> <div class="task_content_wrapper">
<div class="part1_wrapper"> <div class="part_wrapper part1">
<ul> <ul class="part1_list">
<li *ngFor="let salesActivityItem of salesActivityList"> <li *ngFor="let salesActivityItem of salesActivityList" [ngClass]="{'selected':mdDropOptionId==salesActivityItem.id}" (click)="selectTask(salesActivityItem.id);">
{{salesActivityItem.dropOptionName}} {{salesActivityItem.dropOptionName}}
</li> </li>
</ul> </ul>
<div class="important_mark"> <span [ngClass]="{'circle':taskImportantTag==true}" (click)="taskImportantTag=!taskImportantTag"></span> <div>重要标签</div> </div> <div class="important_mark"> <span [ngClass]="{'circle':taskImportantTag==true}" (click)="taskImportantTag=!taskImportantTag"></span> <div>重要标签</div> </div>
</div> </div>
<div class="part1_wrapper"> <div class="part_wrapper part2">
<div>选择任务需要的时间</div> <div style="font-size: 18px;">选择任务需要的时间</div>
<div class="timeContent"> <div class="timeContent">
<div class="picker_list"> <div class="picker_list">
<PickerView [data]="seasons" [cascade]="false" [(ngModel)]="taskTimeFrom" (ngModelChange)="onChange($event,1)"></PickerView>
</div> </div>
<div style="color: #d9dadc;"></div> <div style="color: #d9dadc;width: 10%;text-align: center;"></div>
<div class="picker_list"> <div class="picker_list">
<PickerView [data]="seasons" [cascade]="false" [(ngModel)]="taskTimeEnd" (ngModelChange)="onChange($event,2)"></PickerView>
</div> </div>
</div> </div>
</div> </div>
<div class="part_wrapper part3">
<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">
<span></span>
<div>{{longTermItem.name}}</div>
</li>
</ul>
</div>
<div class="part_wrapper part4" style="margin-bottom: 60px;">
<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>
</div>
</div>
<div class="footer">添加任务</div>
</div>
<div class="link_totast_wrapper" *ngIf="linkToastFlag">
<div class="link_mask"></div>
<div class="link_totast_content_wrapper">
<div class="link_content">
<div class="close" (click)="linkToastFlag=false;">X</div>
<div class="link_body">
<div class="title">
是否联系到{{totastTitle}}
</div>
<div class="sub_title"></div>
</div>
<div class="link_footer">
<div style="border-right: 1px #d1d1d1 solid;" (click)="linkToastFlag=false;"></div>
<div style="color: #f8002e;" (click)="jumpToLink()"></div>
</div>
</div>
</div> </div>
</div> </div>
...@@ -5,7 +5,6 @@ ul,ol{ ...@@ -5,7 +5,6 @@ ul,ol{
.todo_wrapper{ .todo_wrapper{
background: #fff; background: #fff;
.top{ .top{
margin-bottom: 20px;
.head{ .head{
display: flex; display: flex;
height: 50px; height: 50px;
...@@ -41,13 +40,16 @@ ul,ol{ ...@@ -41,13 +40,16 @@ ul,ol{
} }
} }
.task_content_wrapper{ .task_content_wrapper{
.part1_wrapper{ .part_wrapper{
margin-top: 20px;
position: relative; position: relative;
padding: 0 2%; padding: 0 2%;
ul{ ul{
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
}
ul.part1_list{
li{ li{
width: 31%; width: 31%;
text-align: center; text-align: center;
...@@ -62,6 +64,7 @@ ul,ol{ ...@@ -62,6 +64,7 @@ ul,ol{
color: #fff; color: #fff;
} }
} }
.important_mark{ .important_mark{
position: absolute; position: absolute;
right: 3%; right: 3%;
...@@ -83,6 +86,114 @@ ul,ol{ ...@@ -83,6 +86,114 @@ ul,ol{
border: none; border: none;
} }
} }
.timeContent{
display: flex;
justify-content: space-evenly;
align-items: center;
.picker_list{
width: 35%;
}
}
ul.part3_list{
li{
width: 25%;
text-align: center;
display: flex;
align-items: center;
span{
width: 15px;
height: 15px;
border: 1px #787e9e solid;
margin-right: 10%;
}
}
li.selectedLongTerm{
span{
background: #1b5b99;
}
}
}
}
}
.footer{
width: 100%;
height: 55px;
line-height: 55px;
background: #1b5b99;
color: #fff;
text-align: center;
position: fixed;
bottom: 0;
font-size: 20px;
font-weight: bold;
}
}
.link_totast_wrapper{
.link_mask{
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
height: 100%;
z-index: 2001;
background-color: rgba(0,0,0,.4);
}
.link_totast_content_wrapper{
position: fixed;
overflow: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
z-index: 2001;
-webkit-overflow-scrolling: touch;
outline: 0;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-transform: translateZ(1px);
transform: translateZ(1px);
.link_content{
width: 270px;
position: relative;
background-color: #fff;
border: 0;
background-clip: padding-box;
text-align: center;
height: auto;
overflow: hidden;
border-radius: 7px;
padding-top: 15px;
.close{
background: transparent;
filter: alpha(opacity=100);
opacity: 1;
top: -15px;
right: 5px;
position: relative;
}
.link_body{
.title{
padding: 10px 15px 20px 15px;
}
}
.link_footer{
display: flex;
height: 50px;
line-height: 50px;
border-top: 1px #d1d1d1 solid;
justify-content: space-around;
div{
font-size: 14px;
width: 50%;
}
}
} }
} }
} }
\ No newline at end of file
import { Component, OnInit } from '@angular/core'; 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";
const extra = {
'2017/07/15': { info: 'Disable', disable: true }
};
const now = new Date();
extra[+new Date(now.getFullYear(), now.getMonth(), now.getDate() + 5)] = { info: 'Disable', disable: true };
extra[+new Date(now.getFullYear(), now.getMonth(), now.getDate() + 6)] = { info: 'Disable', disable: true };
extra[+new Date(now.getFullYear(), now.getMonth(), now.getDate() + 7)] = { info: 'Disable', disable: true };
extra[+new Date(now.getFullYear(), now.getMonth(), now.getDate() + 8)] = { info: 'Disable', disable: true };
for (let key in extra) {
if (extra.hasOwnProperty(key)) {
let info = extra[key];
const date = new Date(key);
if (!Number.isNaN(+date) && !extra[+date]) {
extra[+date] = info;
}
}
}
@Component({ @Component({
selector: 'ydlife-add-task', selector: 'ydlife-add-task',
templateUrl: './add-task.component.html', templateUrl: './add-task.component.html',
styleUrls: ['./add-task.component.scss'] styleUrls: ['./add-task.component.scss'],
}) })
export class AddTaskComponent implements OnInit { export class AddTaskComponent implements OnInit {
state: any = {
en: false,
date: null,
show: false,
pickTime: false,
now: new Date(),
type: 'range',
enterDirection: '',
rowSize: 'normal',
showShortcut: false,
infinite: true,
defaultValue: undefined,
minDate: new Date(+now - 5184000000),
maxDate: new Date(+now + 31536000000),
onSelect: undefined,
getDateExtra: date => {
return extra[+date];
}
}
tabList:Array<any>; tabList:Array<any>;
tabType:string; tabType:string;
salesActivityList:Array<any>; salesActivityList:Array<any>;
taskImportantTag:boolean = false; taskImportantTag:boolean = false;
constructor(private myService:MyService) { } seasons:Array<any>;
taskTimeFrom:Array<any>=[];
taskTimeEnd:Array<any> = [];
longTermList:Array<any>;
taskType:number;
mdDropOptionId:any;
notice:string;
linkToastFlag:boolean = false;
totastTitle:string;
constructor(private myService:MyService,private router: Router) {
this.seasons = [
{label: '8:00',id:1},
{label: '8:30',id:2},
{label: '9:00',id:3},
{label: '9:30', id:4},
{label: '10:00',id:5},
{label: '10:30',id:6},
{label: '11:00',id:7},
{label: '11:30',id:8},
{label: '12:00',id:9},
{label: '12:30',id:10},
{label: '13:00',id:11},
{label: '13:30',id:12},
{label: '14:00',id:13},
{label: '14:30',id:14},
{label: '15:00',id:15},
{label: '15:30',id:16},
{label: '16:00',id:17},
{label: '16:30',id:18},
{label: '17:00',id:19},
{label: '17:30',id:20},
{label: '18:00',id:21},
{label: '18:30',id:22},
{label: '18:00',id:23},
{label: '19:30',id:24},
{label: '17:30',id:25},
{label: '18:00',id:26},
{label: '18:30',id:27},
{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}
];
}
initPara() {
this.state = {
...this.state,
...{
show: false,
date: null,
pickTime: false,
now: new Date(),
type: 'range',
rowSize: 'normal',
infinite: true,
enterDirection: '',
onSelect: undefined,
showShortcut: false,
defaultValue: undefined,
minDate: new Date(+now - 5184000000),
maxDate: new Date(+now + 31536000000),
getDateExtra: date => {
return extra[+date];
}
}
};
}
ngOnInit() { ngOnInit() {
this.tabList = [{code:'bizchance_promotion_action',name:'营销'},{code:'team_building_source',name:'增员'},{code:'pep_schedule_task_others',name:'其他'}]; 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.tabType = 'bizchance_promotion_action';
this.dropOptionsQuery(this.tabType) this.dropOptionsQuery(this.tabType)
} }
...@@ -22,16 +138,65 @@ export class AddTaskComponent implements OnInit { ...@@ -22,16 +138,65 @@ export class AddTaskComponent implements OnInit {
history.go(-1); history.go(-1);
} }
selectTab(code){ selectTab(code,taskType){
this.tabType = code; this.tabType = code;
this.taskType = taskType;
this.dropOptionsQuery(this.tabType);
} }
dropOptionsQuery(code){ dropOptionsQuery(code){
this.myService.dropOptionsQuery({code:code}).subscribe((res)=>{ this.myService.dropOptionsQuery({code:code}).subscribe((res)=>{
if(res['success']){ if(res['success']){
this.salesActivityList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList']; this.salesActivityList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'];
console.log(this.salesActivityList)
} }
}) })
} }
onChange(result,type) {
if(type===1){
this.taskTimeFrom = result;
console.log(this.taskTimeFrom);
}
if(type===2){
console.log(this.taskTimeEnd)
this.taskTimeEnd=result;
}
}
selectTask(id){
this.mdDropOptionId=id;
if(this.tabType == 'bizchance_promotion_action' ){
this.linkToastFlag = true;
this.totastTitle = '商机';
}
if(this.tabType == 'team_building_track'){
this.linkToastFlag = true;
this.totastTitle = '增员';
}
}
getValue(result) {
let value = [];
let temp = '';
result.forEach(item => {
value.push(item.label || item);
temp += item.label || item;
});
return value;
}
onClick_0() {
this.initPara();
this.state.show = true;
this.state.type = 'one';
this.state.date = new Date();
}
triggerCancel() {
this.state.show = false;
}
jumpToLink(){
if(this.tabType == 'bizchance_promotion_action'){
this.router.navigate(['/linkbusiness'])
}
}
} }
<div class="salesWrapper"> <div class="salesWrapper">
<div class="salesContent"> <div class="search_wrapper" *ngIf="pageType=='linkbusiness'">
<div class="am-demo-page">
<div class="am-demo-bd" >
<SearchBar [placeholder]="'搜索你的商机'" [maxLength]="8"
(onChange)="change($event)"
></SearchBar>
</div>
</div>
</div>
<div class="salesContent" [ngStyle]="{'padding-bottom':pageType=='business'?'0px':'50px'}">
<div style="text-align: center;margin: 20px auto;font-size: 20px;" *ngIf="businessList?.length==0">暂无商机</div> <div style="text-align: center;margin: 20px auto;font-size: 20px;" *ngIf="businessList?.length==0">暂无商机</div>
<!-- <div class="line" *ngFor="let businessItem of businessList" [queryParams]="{orderId:businessItem.orderId}"> <!-- <div class="line" *ngFor="let businessItem of businessList" [queryParams]="{orderId:businessItem.orderId}">
<div></div> <div></div>
...@@ -7,13 +16,15 @@ ...@@ -7,13 +16,15 @@
<div>商机来源:{{businessItem.opportunityFrom}}</div> <div>商机来源:{{businessItem.opportunityFrom}}</div>
<div></div> <div></div>
</div> --> </div> -->
<div class="salesItem" *ngFor="let businessItem of businessList" <div class="salesItem" *ngFor="let businessItem of showBusinessList"
[routerLink]="['/business',businessItem.opportunityId]" (click)="isJumpToDetail(businessItem.opportunityId,businessItem.orderId,businessItem.leadsAssignedId)">
[queryParams]="{orderId:businessItem.orderId,leadsAssignedId:businessItem.leadsAssignedId}"> <div *ngIf="pageType=='business'" class="icon_bolck" [ngStyle]="{'background':businessItem.expertType=='1'? '#ddd' : 'none'}">
<div class="icon_bolck" [ngStyle]="{'background':businessItem.expertType=='1'? '#ddd' : 'none'}">
<span class="iconfont icon-xiansuo1" *ngIf="businessItem.expertType=='0'"></span> <span class="iconfont icon-xiansuo1" *ngIf="businessItem.expertType=='0'"></span>
<span class="iconfont icon-zhuanjia" style="color: #093d9b;" *ngIf="businessItem.expertType=='1'"></span> <span class="iconfont icon-zhuanjia" style="color: #093d9b;" *ngIf="businessItem.expertType=='1'"></span>
</div> </div>
<div *ngIf="pageType=='linkbusiness'" class="linkbusinessRadius">
<span class='circlebtn'></span>
</div>
<div class="line"> <div class="line">
<div>姓名:{{businessItem.name}}</div> <div>姓名:{{businessItem.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;"></span>
...@@ -28,7 +39,10 @@ ...@@ -28,7 +39,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="add"> <div class="footer">
确认
</div>
<div class="add" *ngIf="pageType=='business'">
<i class="iconfont icon-jiahao" (click)="addBussiness()"></i> <i class="iconfont icon-jiahao" (click)="addBussiness()"></i>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -2,7 +2,15 @@ ...@@ -2,7 +2,15 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
// background:#f7f7f2; background:#fff;
.search_wrapper{
.am-demo-page .am-demo-bd .am-search{
background: #fff;
.am-search-input .am-search-synthetic-ph{
height: 35px;
}
}
}
.salesContent{ .salesContent{
.salesItem{ .salesItem{
border-bottom: 1px #dcdcdc solid; border-bottom: 1px #dcdcdc solid;
...@@ -27,7 +35,20 @@ ...@@ -27,7 +35,20 @@
top: 1px; 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{ .line{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -65,4 +86,15 @@ ...@@ -65,4 +86,15 @@
left: 42%; 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 { Component, OnInit } from '@angular/core';
import { MyService } from '../my.service'; import { MyService } from '../my.service';
import { LifeCommonService } from '../../common/life-common.service'; import { LifeCommonService } from '../../common/life-common.service';
import { Router } from "@angular/router"; import { Router , ActivatedRoute} from "@angular/router";
@Component({ @Component({
selector: 'ydlife-my-business', selector: 'ydlife-my-business',
templateUrl: './my-business.component.html', templateUrl: './my-business.component.html',
styleUrls: ['./my-business.component.scss'] styleUrls: ['./my-business.component.scss'],
styles: [
`.am-demo-bd div{
border-bottom: none;
}
`]
}) })
export class MyBusinessComponent implements OnInit { export class MyBusinessComponent implements OnInit {
businessList: Array<any>; businessList: Array<any>;
constructor(private myService: MyService, public lifeCommonService: LifeCommonService, private router: Router) { } isTaskCome:boolean = false;
pageType:any;
showBusinessList: Array<any>;
isSelectFlag:boolean;
constructor(private myService: MyService, public lifeCommonService: LifeCommonService, private router: Router,private activatedRoute: ActivatedRoute) {
this.pageType = this.activatedRoute.snapshot.data[0]['type'];
}
ngOnInit() { ngOnInit() {
this.ownOpportunityQuery() this.ownOpportunityQuery();
} }
ownOpportunityQuery() { ownOpportunityQuery() {
...@@ -21,8 +32,9 @@ export class MyBusinessComponent implements OnInit { ...@@ -21,8 +32,9 @@ export class MyBusinessComponent implements OnInit {
this.myService.ownOpportunityQuery({ customerId: brokerCustomerId, practitionerId: brokerPractitionerId }).subscribe((res) => { this.myService.ownOpportunityQuery({ customerId: brokerCustomerId, practitionerId: brokerPractitionerId }).subscribe((res) => {
if (res['data']['ownOpportunityInfos']) { if (res['data']['ownOpportunityInfos']) {
this.businessList = res['data']['ownOpportunityInfos']; this.businessList = res['data']['ownOpportunityInfos'];
this.showBusinessList = res['data']['ownOpportunityInfos'];
} else { } else {
this.businessList = [] this.businessList = [];
} }
}) })
} }
...@@ -30,4 +42,18 @@ export class MyBusinessComponent implements OnInit { ...@@ -30,4 +42,18 @@ export class MyBusinessComponent implements OnInit {
addBussiness() { addBussiness() {
this.router.navigate(['/business/0']); this.router.navigate(['/business/0']);
} }
isJumpToDetail(opportunityId,orderId,leadsAssignedId){
if(this.pageType == 'business'){
this.router.navigate([`/business/${opportunityId}`], { queryParams: { orderId: orderId, leadsAssignedId: leadsAssignedId } });
}else{
return;
}
}
change(event){
this.showBusinessList = this.businessList.filter((item)=>{
return item.name.indexOf(event) !=-1;
})
}
} }
...@@ -37,7 +37,8 @@ const myRoutes: Routes = [ ...@@ -37,7 +37,8 @@ const myRoutes: Routes = [
{ path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard] }, { path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard] },
{ path: 'salesDetail', component: SalesDetailComponent, canActivate: [AuthGuard] }, { path: 'salesDetail', component: SalesDetailComponent, canActivate: [AuthGuard] },
{ path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] }, { path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] },
{ path: 'business', component: MyBusinessComponent, canActivate: [AuthGuard] }, { path: 'business', component: MyBusinessComponent, canActivate: [AuthGuard],data:[{type:'business'}] },
{ path: 'linkbusiness', component: MyBusinessComponent, canActivate: [AuthGuard],data:[{type:'linkbusiness'}] },
{ path: 'business/:id', component: MyBusinessDetailComponent, canActivate: [AuthGuard] }, { path: 'business/:id', component: MyBusinessDetailComponent, canActivate: [AuthGuard] },
{ path: 'rank', component: SalesRankComponent, canActivate: [AuthGuard] }, { path: 'rank', component: SalesRankComponent, canActivate: [AuthGuard] },
{ path: 'teamRank', component: TeamRankComponent, canActivate: [AuthGuard] }, { path: 'teamRank', component: TeamRankComponent, canActivate: [AuthGuard] },
......
...@@ -13,7 +13,7 @@ import { AnnouncementDetailComponent } from './announcement-detail/announcement- ...@@ -13,7 +13,7 @@ import { AnnouncementDetailComponent } from './announcement-detail/announcement-
import { MyBusinessComponent } from './my-business/my-business.component'; import { MyBusinessComponent } from './my-business/my-business.component';
import { MyBusinessDetailComponent } from './my-business-detail/my-business-detail.component'; import { MyBusinessDetailComponent } from './my-business-detail/my-business-detail.component';
import { PickerComponent } from '../common/picker/picker.component'; import { PickerComponent } from '../common/picker/picker.component';
import { ToastComponent } from '../common/toast/toast.component'; import { MyToastComponent } from '../common/toast/toast.component';
import { SalesRankComponent } from './sales-rank/sales-rank.component'; import { SalesRankComponent } from './sales-rank/sales-rank.component';
import { TeamRankComponent } from './team-rank/team-rank.component'; import { TeamRankComponent } from './team-rank/team-rank.component';
import { RecruitingComponent } from './recruiting/recruiting.component'; import { RecruitingComponent } from './recruiting/recruiting.component';
...@@ -32,14 +32,17 @@ import { OrderDetailComponent } from './order-detail/order-detail.component'; ...@@ -32,14 +32,17 @@ import { OrderDetailComponent } from './order-detail/order-detail.component';
import { SalaryComponent } from './salary/salary.component'; import { SalaryComponent } from './salary/salary.component';
import { TodoListComponent } from './todo-list/todo-list.component'; import { TodoListComponent } from './todo-list/todo-list.component';
import { AddTaskComponent } from './add-task/add-task.component'; import { AddTaskComponent } from './add-task/add-task.component';
import { NgZorroAntdMobileModule, ModalServiceComponent, ToastComponent } from 'ng-zorro-antd-mobile';
@NgModule({ @NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, ToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent], declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent],
imports: [ imports: [
CommonModule, CommonModule,
LifeCommonModule, LifeCommonModule,
MyRoutingModule, MyRoutingModule,
NgZorroAntdMobileModule
], ],
entryComponents: [ModalServiceComponent, ToastComponent],
providers: [ providers: [
DatePipe DatePipe
] ]
......
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { environment } from '../../environments/environment'; import { environment } from '../../environments/environment';
import { parse } from 'querystring';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -337,4 +338,11 @@ export class MyService { ...@@ -337,4 +338,11 @@ export class MyService {
return this.http return this.http
.post(url, JSON.stringify(param)); .post(url, JSON.stringify(param));
} }
//日程跟进查询
queryScheduleTrackList(param){
const url = this.ydapi + '/practitioner/queryScheduleTrackList';
return this.http
.post(url, JSON.stringify(param));
}
} }
...@@ -24,12 +24,15 @@ ...@@ -24,12 +24,15 @@
</ul> </ul>
</div> </div>
<div class="taskContent"> <div class="taskContent">
<div class="title">任务数量(3</div> <div class="title">任务数量({{taskList.length}}</div>
<ul> <ul>
<li *ngFor="let taskItem of taskList"> <li *ngFor="let taskItem of taskList">
<span>{{taskItem.time}}</span> <span>{{taskItem.taskTimeFrom}} - {{taskItem.taskTimeEnd}}</span>
<div>(重要){{taskItem.taskTitle}}</div> <div class="todo_title">
<div>{{taskItem.taskContent}}</div> <span *ngIf="taskItem.taskImportantTag">(重要)</span>
{{taskItem.mdDropOptionName}}
</div>
<div class="notice">{{taskItem.notice}}</div>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -73,8 +73,8 @@ ul,ol{ ...@@ -73,8 +73,8 @@ ul,ol{
margin-top: 15px; margin-top: 15px;
li{ li{
color: #8a8a8a; color: #8a8a8a;
height: 35px; height: 40px;
line-height: 35px; line-height: 40px;
text-align: center; text-align: center;
} }
...@@ -94,9 +94,18 @@ ul,ol{ ...@@ -94,9 +94,18 @@ ul,ol{
margin-top: 15px; margin-top: 15px;
li{ li{
background: #fff; background: #fff;
padding: 10px 18px; padding: 8px 12px;
border-radius: 10px; border-radius: 10px;
margin-bottom: 10px; margin-bottom: 10px;
.todo_title{
font-size: 16px;
color: #000;
font-weight: bold;
margin: 3px auto;
}
.notice{
color: #a0a0a0;
}
} }
} }
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { LifeCommonService } from '../../common/life-common.service'; import { LifeCommonService } from '../../common/life-common.service';
const extra = { import {MyService} from '../my.service';
'2017/07/15': { info: 'Disable', disable: true }
};
const now = new Date();
extra[+new Date(now.getFullYear(), now.getMonth(), now.getDate() + 5)] = { info: 'Disable', disable: true };
extra[+new Date(now.getFullYear(), now.getMonth(), now.getDate() + 6)] = { info: 'Disable', disable: true };
extra[+new Date(now.getFullYear(), now.getMonth(), now.getDate() + 7)] = { info: 'Disable', disable: true };
extra[+new Date(now.getFullYear(), now.getMonth(), now.getDate() + 8)] = { info: 'Disable', disable: true };
for (let key in extra) {
if (extra.hasOwnProperty(key)) {
let info = extra[key];
const date = new Date(key);
if (!Number.isNaN(+date) && !extra[+date]) {
extra[+date] = info;
}
}
}
@Component({ @Component({
selector: 'ydlife-todo-list', selector: 'ydlife-todo-list',
templateUrl: './todo-list.component.html', templateUrl: './todo-list.component.html',
...@@ -28,23 +11,7 @@ export class TodoListComponent implements OnInit { ...@@ -28,23 +11,7 @@ export class TodoListComponent implements OnInit {
weekArr: Array<any>; weekArr: Array<any>;
taskList:Array<any> = []; taskList:Array<any> = [];
taskTimeList:Array<any> = []; taskTimeList:Array<any> = [];
state: any = { constructor(public lifeCommonService: LifeCommonService,private myService:MyService) {
en: false,
date: null,
show: false,
pickTime: false,
now: new Date(),
type: 'range',
enterDirection: '',
rowSize: 'normal',
showShortcut: false,
infinite: true,
defaultValue: undefined,
minDate: new Date(+now - 5184000000),
maxDate: new Date(+now + 31536000000),
onSelect: undefined,
}
constructor(private lifeCommonService: LifeCommonService) {
this.taskTimeList = [ this.taskTimeList = [
{id:1,time:'8:00'}, {id:1,time:'8:00'},
{id:2,time:'9:00'}, {id:2,time:'9:00'},
...@@ -63,6 +30,7 @@ export class TodoListComponent implements OnInit { ...@@ -63,6 +30,7 @@ export class TodoListComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.weekArr = this.lifeCommonService.makeDate(); this.weekArr = this.lifeCommonService.makeDate();
this.queryScheduleTrackList();
} }
goBack(){ goBack(){
...@@ -79,6 +47,15 @@ export class TodoListComponent implements OnInit { ...@@ -79,6 +47,15 @@ export class TodoListComponent implements OnInit {
} }
addTask(){ addTask(){
this.taskList.push({time:'8:00-9:00',isImportant:true,taskTitle:'今天要完成的计划1',taskContent:'app界面和网页界面的设计'}); // this.taskList.push({time:'8:00-9:00',isImportant:true,taskTitle:'今天要完成的计划1',taskContent:'app界面和网页界面的设计'});
}
queryScheduleTrackList(){
this.myService.queryScheduleTrackList({practitionerId:'1',trackDate:'2020-09-11'}).subscribe((res)=>{
console.log(res)
if(res['success']){
this.taskList = res['data'];
}
})
} }
} }
...@@ -107,13 +107,31 @@ input::placeholder { ...@@ -107,13 +107,31 @@ input::placeholder {
top: -8px; top: -8px;
} }
.timeContent{
// .am-picker-col{
// height: 102px;
// .am-picker-col-mask{
// background-size: 100% 34px!important;
// }
// }
}
.search_wrapper{
.am-demo-page .am-demo-bd .am-search{
background: #fff;
.am-search-input{
background: #F1F1F1FF;
border-radius: 30px;
}
}
}
@keyframes slowUp { @keyframes slowUp {
0% { 0% {
-webkit-transform: translateY(100%); -webkit-transform: translateY(100%);
transform: translateY(100%) transform: translateY(100%)
} }
100% { 100% {
-webkit-transform: translateY(0); -webkit-transform: translateY(0);
transform: translateY(0) transform: translateY(0)
......
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