<ion-header>
	<ion-navbar>
		<ion-title>我的活动</ion-title>
	</ion-navbar>
	<div class="pageMenuSlides">
		<div class="swiper-container">
			<div class="swiper-wrapper">
				<!-- {{i==0?'bottomLine':''}}是初始化的时候默认选择第一个菜单 -->
				<div class="swiper-slide {{i==0?'bottomLine':''}}" *ngFor="let item of menus;let i=index;" tappable (click)="selectPageMenu(i)">{{item}}
					<span *ngIf="i == 1" class="menu-index" style="line-height:15px;">
						{{waitgoOrderCount}}
					</span>
					<span *ngIf="i == 2" class="menu-index" style="line-height:15px;">
						{{waitsureOrderCount}}
					</span>
				</div>
			</div>
		</div>
	</div>
</ion-header>
<ion-content>
	<ion-slides #contentSlides (ionSlideDidChange)="slideChanged()">
		<ion-slide>
			<ion-content direction="y" scrollbar-y="true">
				<ion-list>
					<ion-item *ngFor="let item of allOrder">
						<div class="item" (click)="goConfirmActivity(item)">
							<div class="item-header">
								<div class="item-header-style">
									<!-- <ion-icon name="md-contact" class="icon"></ion-icon> -->
									<img src="./assets/imgs/icon-tj.png" class="icon" *ngIf="item.activity.activityType==1">
									<img src="./assets/imgs/icon-ly.png" class="icon" *ngIf="item.activity.activityType==2">
									<img src="./assets/imgs/icon-px.png" class="icon" *ngIf="item.activity.activityType==3">
									<img src="./assets/imgs/icon-gh.png" class="icon" *ngIf="item.activity.activityType==4">
									<span class="item-title">{{item.activity.activityName}}</span>
								</div>

								<button ion-button round class="btn color1" *ngIf="item.orderstate == 1">待进行</button>
								<button ion-button round class="btn color2" *ngIf="item.orderstate == 2">待确认</button>
								<button ion-button round class="btn color3" *ngIf="item.orderstate == 3">报名未出行</button>
								<button ion-button round class="btn color3" *ngIf="item.orderstate == 4">已完成</button>
							</div>

							<div class="content-box">
								<div class="content-item-box">
									<label class="left-title">选择批次：</label>
									<div class="data">{{item.batch?.batchName}}</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">截止日期：</label>
									<div class="data">
										{{item.batch?.batchEndDate}}
									</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">联络人员：</label>
									<div class="data">
										{{item.batch?.liamand}}
									</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">联络电话：</label>
									<div class="data">
										{{item.batch?.liamantel}}
									</div>
								</div>
							</div>
							<div class="right">
								<button class="cancel" *ngIf="item.orderstate == 1  && !item.showParticipantBtn" (click)="sureCancelOrder(item.orderid);$event.stopPropagation();">取消报名</button>
								<button class="reselection" *ngIf="item.orderstate == 1 && !item.showParticipantBtn" (click)="reelectBatch(item);$event.stopPropagation();">重选批次</button>
								<button class="cancel" *ngIf="item.orderstate == 1 && item.showParticipantBtn" (click)="joinPeople(item);$event.stopPropagation();">参与人员</button>

								<button class="cancel" *ngIf="item.orderstate == 2" (click)="joinPeople(item);$event.stopPropagation();">参与人员</button>
								<button class="reselection" *ngIf="item.orderstate == 2" (click)="evaluation(item);$event.stopPropagation();">确认评价</button>

								<button class="reselection" *ngIf="item.orderstate == 3||item.orderstate == 4">查看详情</button>
							</div>
						</div>
					</ion-item>
				</ion-list>
			</ion-content>
		</ion-slide>

		<ion-slide>
			<ion-content direction="y" scrollbar-y="true">
				<ion-list>
					<ion-item *ngFor="let item of waitGoOrder">
						<div class="item" (click)="goConfirmActivity(item)">

							<div class="item-header">
								<div class="item-header-style">
									<!-- <ion-icon name="md-contact" class="icon"></ion-icon> -->
									<img src="./assets/imgs/icon-tj.png" class="icon" *ngIf="item.activity.activityType==1">
									<img src="./assets/imgs/icon-ly.png" class="icon" *ngIf="item.activity.activityType==2">
									<img src="./assets/imgs/icon-px.png" class="icon" *ngIf="item.activity.activityType==3">
									<img src="./assets/imgs/icon-gh.png" class="icon" *ngIf="item.activity.activityType==4">
									<span class="item-title">{{item.activity.activityName}}</span>
								</div>
								<button ion-button round class="btn color1">待进行</button>
							</div>

							<div class="content-box">
								<div class="content-item-box">
									<label class="left-title">选择批次：</label>
									<div class="data">{{item.batch?.batchName}}</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">截止日期：</label>
									<div class="data">
										{{item.batch?.batchEndDate}}
									</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">联络人员：</label>
									<div class="data">
										{{item.batch?.liamand}}
									</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">联络电话：</label>
									<div class="data">
										{{item.batch?.liamantel}}
									</div>
								</div>
							</div>
							<div class="right">

								<button class="cancel" *ngIf="item.orderstate == 1  && !item.showParticipantBtn" (click)="sureCancelOrder(item.orderid);$event.stopPropagation();">取消报名</button>
								<button class="reselection" *ngIf="item.orderstate == 1 && !item.showParticipantBtn" (click)="reelectBatch(item);$event.stopPropagation();">重选批次</button>
								<button class="cancel" *ngIf="item.orderstate == 1 && item.showParticipantBtn" (click)="joinPeople(item);$event.stopPropagation();">参与人员</button>

							</div>
						</div>
					</ion-item>
				</ion-list>
			</ion-content>
		</ion-slide>

		<ion-slide>
			<ion-content direction="y" scrollbar-y="true">
				<ion-list>
					<ion-item *ngFor="let item of waitSureOrder">
						<div class="item" (click)="goConfirmActivity(item)">

							<div class="item-header">
								<div class="item-header-style">
									<!-- <ion-icon name="md-contact" class="icon"></ion-icon> -->
									<img src="./assets/imgs/icon-tj.png" class="icon" *ngIf="item.activity.activityType==1">
									<img src="./assets/imgs/icon-ly.png" class="icon" *ngIf="item.activity.activityType==2">
									<img src="./assets/imgs/icon-px.png" class="icon" *ngIf="item.activity.activityType==3">
									<img src="./assets/imgs/icon-gh.png" class="icon" *ngIf="item.activity.activityType==4">
									<span class="item-title">{{item.activity.activityName}}</span>
								</div>
								<button ion-button round class="btn color2">待确认</button>
							</div>
							<div class="content-box">
								<div class="content-item-box">
									<label class="left-title">选择批次：</label>
									<div class="data">{{item.batch?.batchName}}</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">截止日期：</label>
									<div class="data">
										{{item.batch?.batchEndDate}}
									</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">联络人员：</label>
									<div class="data">
										{{item.batch?.liamand}}
									</div>
								</div>
								<div class="content-item-box">
									<label class="left-title">联络电话：</label>
									<div class="data">
										{{item.batch?.liamantel}}
									</div>
								</div>
							</div>
							<div class="right">
								<button class="cancel" (click)="joinPeople(item);$event.stopPropagation();">参与人员</button>
								<button class="reselection" (click)="evaluation(item);$event.stopPropagation();">确认评价</button>
							</div>
						</div>
					</ion-item>
				</ion-list>
			</ion-content>
		</ion-slide>
	</ion-slides>
</ion-content>

<div class="cover" *ngIf="isCover">
	<div class="cover-content c1" *ngIf="first">
		<div class="cover-content-box">
			<h5 class="cover-content-title">您是否确认已参加本次活动？</h5>
			<button class="cover-btn btn-yes" (click)="yes()">
				是，我已参加
			</button>
			<button class="cover-btn btn-no" (click)="no()">
				否，我未参加
			</button>
		</div>
	</div>

	<div class="cover-content c2" *ngIf="second">
		<div class="cover-content-box">
			<h5 class="cover-content-title">您对本次活动是否满意？</h5>
			<button class="cover-btn btn1" (click)="next(1)">
				非常满意
			</button>
			<button class="cover-btn btn2" (click)="next(2)">
				满意
			</button>
			<button class="cover-btn btn3" (click)="next(3)">
				一般
			</button>
			<button class="cover-btn btn4" (click)="next(4)">
				不满意
			</button>
		</div>
	</div>

	<div class="cover-content c3" *ngIf="third">
		<div class="cover-content-box">
			<h5 class="cover-content-title">是否确认未出行</h5>
			<div class="third-btn-box">
				<button class="third-btn third-btn-left" (click)="sure()">
					是
				</button>
				<button class="third-btn third-btn-right" (click)="not()">
					否
				</button>
			</div>
		</div>
	</div>

	<div class="cover-content c4" *ngIf="fourth">
		<div class="cover-content-box">
			<h4 class="cover-content-title">您对本次活动的意见和建议</h4>
			<textarea class="suggest" rows="12" [(ngModel)]="order.orderfgconent">
					
			</textarea>
			<button class="commit" ion-button block (click)="commit()">
				提交
			</button>
		</div>
	</div>

	<div class="cover-content cover-content-result c5" *ngIf="isSuccess">
		<div class="cover-content-box">
			<img class="result-img" src="./assets/imgs/success.png">
			<h4 class="result-msg">提交成功</h4>
		</div>
	</div>

	<div class="cover-content cover-content-result c5" *ngIf="isError">
		<div class="cover-content-box">
			<img class="result-img" src="./assets/imgs/error.png">
			<h4 class="result-msg">提交失败</h4>
		</div>
	</div>
</div>