<ion-header>
	<ion-toolbar>
		<div class="searchToolBar">
			<button ion-button clear small navPop style="padding: 0;">
				<img class="back-btn" src="./assets/imgs/back.png" />
			</button>
			<ion-title text-center>活动报名</ion-title>
		</div>
	</ion-toolbar>
</ion-header>
<ion-content class="content">

	<!-- <ion-refresher (ionRefresh)="doRefresh($event)">
				<ion-refresher-content
					pullingIcon="arrow-dropdown" pullingText="Pull to refresh"
					refreshingSpinner="circles"refreshingText="Refreshing...">
				</ion-refresher-content>
		</ion-refresher> -->

	<div class="item1">
		<div class="img-box" *ngIf="isLoad">
			<img class="item1-image" src="{{picture}}">
		</div>
		<div class="item1-content">
			<div class="item1-content-header">
				<div class="item1-title" *ngIf="activity?.activityFbObject==1">{{activity.activityName}}</div>
				<!-- <div class="item1-title" *ngIf="activity?.activityFbObject==2">{{activity.activityName}}（用户组）</div>
				<div class="item1-title" *ngIf="activity?.activityFbObject==3">{{activity.activityName}}（处事部门）</div> -->
				<div class="item1-content-box">
					<ion-icon name="md-contact" class="item1-icon"></ion-icon>
					<span class="item-type">{{activityType[activity.activityType]}}</span>
				</div>
			</div>
			<div class="item1-introduction">
				{{introduce}}
				<button class="btn-introduce" (click)="show()">具体介绍</button>
			</div>
		</div>
	</div>
	<div class="item2 item-margin">
		<ion-list class="item-list">
			<ion-item>
				<label class="item-label">
					<span class="item-title">
						可选批次
					</span>
				</label>
			</ion-item>
			<ion-item class="item2-content">
				<div *ngFor="let batch of batches" (click)="batch.noRegistrationFalg ? '': showBatchDetails(batch)" class="item2-box {{batch.noRegistrationFalg ?'zero':''}} {{isSelected == batch.id?'selected':''}}">
					<span class="time">{{batch.batchName|slice:0:6}}</span>
					<!--{{"2017-01-20 15:16:30"|limitTo:10}}-->

					<span *ngIf="!batch.hasOverdueflag" class="quantity">剩余{{batch.onebatchSurplusQuota}}名</span>
					<span *ngIf="batch.hasOverdueflag" class="quantity">报名已截止</span>
				</div>
			</ion-item>
		</ion-list>
	</div>

	<div class="item3 item-margin">
		<ion-list class="item-list">
			<ion-item>
				<label class="item-label">
					<span class="item-title">
						附加信息
					</span>
				</label>
			</ion-item>

			<ion-item *ngIf=" onebatch!=null && onebatch?.batchPerNumber != 0">
				<div class="item3-box">
					<div class="item3-1">
						<label class="little-title-box">
							<span class="little-title">携带人数</span>
						</label>
						<div class="change" id="next" (click)="next()">-</div>
						<input class="number" readonly="readonly" id="text" type="number" size="1" [(ngModel)]="order.Personnumber">
						<div class="change" id="add" (click)="add()">+</div>

					</div>
					<!-- <div class="item3-box-count">
						最多{{onebatch?.batchPerNumber == null?0:onebatch?.batchPerNumber}}人 
					</div> -->
				</div>
			</ion-item>

			<ion-item>
				<div class="item3-2">
					<label class="little-title-box">
						<span class="little-title">报名备注</span>
					</label>
					<div>
						<textarea class="remark" rows="4" [(ngModel)]="order.orderbz_end">
			
						</textarea>
					</div>
				</div>

			</ion-item>
		</ion-list>
	</div>
	<div class="item4 item-margin">
		<ion-list class="item-list">
			<ion-item>
				<label class="item-label">
					<span class="item-title">
						活动说明
					</span>
				</label>
			</ion-item>
			<div *ngIf="onebatch!=null">
				<ion-item>
					<label class="little-title-box">
						<span class="little-title">活动日期</span>
					</label>
					<label class="item4-content">{{onebatch.batchGoDate}}</label>
				</ion-item>
				<ion-item>
					<label class="little-title-box">
						<span class="little-title">集合地点</span>
					</label>
					<label class="item4-content">{{onebatch.batchSetAddress}}</label>
				</ion-item>
				<ion-item>
					<label class="little-title-box">
						<span class="little-title">集合时间</span>
					</label>
					<label class="item4-content">{{onebatch.batchSetTime}}</label>
				</ion-item>
				<ion-item>
					<label class="little-title-box">
						<span class="little-title">报名截止</span>
					</label>
					<label class="item4-content">{{onebatch.batchEndDate}}</label>
				</ion-item>
			</div>

		</ion-list>
	</div>
	<div class="item5 item-margin">
		<ion-list class="item-list">
			<ion-item>
				<label class="item-label">
					<span class="item-title">
						活动须知
					</span>
				</label>
			</ion-item>
			<ion-item class="item5-content" *ngFor="let notice of noticeArry">
				<!-- {{onebatch.batchNotice}} -->
				<p>{{notice}}</p>

			</ion-item>
		</ion-list>
	</div>
	<button class="confirmBtn" ion-button block (click)="confirmOrder(order.Orderid)" *ngIf="!pageflag">确认报名</button>

	<button class="confirmBtn" ion-button block (click)="confirmOrder(order.Orderid)" *ngIf="pageflag">确认修改</button>


</ion-content>

<div class="cover" *ngIf="isCover">
	<div class="cover-content">
		<div class="cover-content-box">
			<h4 class="cover-content-title">具体介绍</h4>
			<div class="cover-content-info">
				<p>
					{{activity.activityIntro}}
				</p>
			</div>
			<button ion-button block (click)="hidden()">
				关闭
			</button>
		</div>
	</div>
</div>

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

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