Commit 4ce0d73d authored by wangqinghua's avatar wangqinghua

日历

parent 2bc39c58
...@@ -9,21 +9,21 @@ ...@@ -9,21 +9,21 @@
</div> </div>
<div class="content-box"> <div class="content-box">
<div class="content-box-item {{type == '1'?'bgc-34b4fc':''}} " (click)="noSign()"> <div class="content-box-item {{type == '1'?'bgc-34b4fc':''}} " (click)="signAll()">
<span class="item-title">全部</span> <span class="item-title">全部</span>
<span class="item-count">{{notSign}}人</span> <span class="item-count">{{allPerson}}人</span>
</div> </div>
<div class="content-box-item {{type == '2'?'bgc-34b4fc':''}}" (click)="noSign()"> <div class="content-box-item {{type == '2'?'bgc-34b4fc':''}}" (click)="noSign()">
<span class="item-title">未报名</span> <span class="item-title">未报名</span>
<span class="item-count">{{waitgoOrder}}人</span> <span class="item-count">{{notSign}}人</span>
</div> </div>
<div class="content-box-item {{type == '3'?'bgc-34b4fc':''}}" (click)="sign()"> <div class="content-box-item {{type == '3'?'bgc-34b4fc':''}}" (click)="sign()">
<span class="item-title">已报名</span> <span class="item-title">已报名</span>
<span class="item-count">{{waitSureOrder}}人</span> <span class="item-count">{{signUp}}人</span>
</div> </div>
<div class="content-box-item {{type == '4'?'bgc-34b4fc':''}}" (click)="notJoin()"> <div class="content-box-item {{type == '4'?'bgc-34b4fc':''}}" (click)="notJoin()">
<span class="item-title">不参加</span> <span class="item-title">不参加</span>
<span class="item-count">{{waitSureOrder}}人</span> <span class="item-count">{{noJoin}}人</span>
</div> </div>
</div> </div>
......
...@@ -25,14 +25,12 @@ export class JoinDetailPage { ...@@ -25,14 +25,12 @@ export class JoinDetailPage {
acitivityName: string; acitivityName: string;
type = '1'; type = '1';
//待出行 //全部
waitgoOrder: number; allPerson: number;
//待确认 //已报名
waitSureOrder: number; signUp: number;
//未出行 //不参加
notgoOrder: number; noJoin: number;
//已出行
hasgoOrder: number;
//未报名 //未报名
notSign: number; notSign: number;
...@@ -42,9 +40,7 @@ export class JoinDetailPage { ...@@ -42,9 +40,7 @@ export class JoinDetailPage {
public http: Http, public http: Http,
public appService: AppService, public appService: AppService,
public toast: ToastController, public toast: ToastController,
public activityStatisticService: ActivityStatisticService) { public activityStatisticService: ActivityStatisticService) {}
}
ionViewDidEnter() { ionViewDidEnter() {
/** 订单状态 (1.待出行(已报名)、2.待确认(已报名未确认)、3.报名未出行、4.已完成 (3,4均为确认状态))*/ /** 订单状态 (1.待出行(已报名)、2.待确认(已报名未确认)、3.报名未出行、4.已完成 (3,4均为确认状态))*/
...@@ -52,80 +48,21 @@ export class JoinDetailPage { ...@@ -52,80 +48,21 @@ export class JoinDetailPage {
this.acitivityName = this.navParams.get("name"); //活动名称 this.acitivityName = this.navParams.get("name"); //活动名称
//初始化加载未报备 //初始化加载未报备
this.items = []; this.items = [];
this.signAll();
this.activityStatisticService.activityOrderCount(this.acitivityid, (data) => {
this.waitgoOrder = data["waitgoOrder"];
this.waitSureOrder = data["waitSureOrder"];
this.notgoOrder = data["notgoOrder"];
this.hasgoOrder = data["hasgoOrder"];
});
this.appService.ObserverHttpGetAdd("/wisdomgroup/modules/activity/signAll/", this.acitivityid)
.subscribe((res: Response) => {
let resultback = res.json();
this.items = resultback;
this.notSign = this.items.length;
}, error => {
this.appService.alert('网络异常!');
}
);
} }
//全部
conmon(state_value) { signAll(){
this.type = '1';
this.isNoSignFlag = true; this.appService.ObserverHttpGetAdd("/wisdomgroup/modules/activity/signAll/", this.acitivityid)
this.items = [];
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/orderWaitGoWithActivityid", {
id: this.acitivityid,
state: state_value
})
.subscribe((res: Response) => { .subscribe((res: Response) => {
let resultback = res.json(); let resultback = res.json();
this.items = resultback; this.items = resultback;
this.allPerson = this.items.length;
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
} }
); );
}
//报名待出行
hasSign() {
this.type = '2';
this.conmon(1);
}
//待确认
waitSure() {
this.type = '3';
this.conmon(2);
}
//不参加
notJoin() {
this.isNoSignFlag = true;
this.type = '4';
this.appService.ObserverHttpGet("/wisdomgroup/modules/activityNon", null)
.subscribe((res: Response) => {
this.items = res.json().data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//已确认未出行
notgo() {
this.type = '5';
this.conmon(3);
}
//已确认出行
hasgo() {
this.type = '4';
this.conmon(4);
} }
//未报名 //未报名
...@@ -137,6 +74,7 @@ export class JoinDetailPage { ...@@ -137,6 +74,7 @@ export class JoinDetailPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
let resultback = res.json(); let resultback = res.json();
this.items = resultback; this.items = resultback;
this.notSign = this.items.length;
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
} }
...@@ -152,6 +90,21 @@ export class JoinDetailPage { ...@@ -152,6 +90,21 @@ export class JoinDetailPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
let resultback = res.json(); let resultback = res.json();
this.items = resultback; this.items = resultback;
this.signUp = this.items.length;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//不参加
notJoin() {
this.isNoSignFlag = true;
this.type = '4';
this.appService.ObserverHttpGet("/wisdomgroup/modules/activityNon", null)
.subscribe((res: Response) => {
this.items = res.json().data;
this.noJoin = this.items.length;
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
} }
......
...@@ -13,15 +13,11 @@ ...@@ -13,15 +13,11 @@
<div class="margin-5-0"> <div class="margin-5-0">
<label class="item1-title">{{activity?.activityName}}</label> <label class="item1-title">{{activity?.activityName}}</label>
<div class="item1-content-box"> <div class="item1-content-box">
<ion-icon name="md-contact" class="item1-icon"></ion-icon> <span class="item-type">不想参加</span>
<span class="item-type" *ngIf="activity?.activityType =='1'">体检</span>
<span class="item-type" *ngIf="activity?.activityType =='2'">疗养</span>
<span class="item-type" *ngIf="activity?.activityType =='3'">培训</span>
<span class="item-type" *ngIf="activity?.activityType =='4'">工会活动</span>
</div> </div>
</div> </div>
<div class="item1-introduction"> <div class="item1-introduction">
<!-- {{activity.activityIntro}} -->
{{activity.activityIntro}} {{activity.activityIntro}}
<button class="btn-introduce" (click)="show()">具体介绍</button> <button class="btn-introduce" (click)="show()">具体介绍</button>
</div> </div>
......
This diff is collapsed.
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