<!-- include 'header' -->
<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css">
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
<script src="<?= WEB_SITE_GLOBAL ?>js/invoice.validator.js"></script>
<script src="<?= WEB_SITE_GLOBAL ?>js/invoice.js"></script>
<body>
	<div class="mainLayout">
		<div class="mainMenu">
			<div class="menuItem">
				<a href="#" class="mLogo">CLD</a>
				<ul>
					<!-- include 'menuReceipt' -->
				</ul>
			</div>
			
		</div>
		<div class="warpContent">
			<div class="subMenu fL">
				<div class="menuItem">
					<!-- include 'invoiceMenu' -->
				</div>
			</div>
			<div class="adminContent autoHeight">
				<div class="saea-borad">
					<div class="borad-menu">
						<a data-toggle="modal" href="#add-batch" class="invoice">创建培训班</a>
					</div>
					<div class="borad-news">
						<div class="saeaList">
							<div class="clearfix">
								<table class="table table-bordered table-condensed">
									<tbody>
									<tr><th class="taC">累计培训班</th><td>{{trainCount}}</td><th class="taC">累计完成</th><td>{{countArray(itedList)}}</td></tr>
									<tr><th class="taC">累计开票金额</th><td>￥{{itStatist.invoicePrice}}</td><th class="taC">累计入账金额</th><td>￥{{itStatist.receivablesPrice}}</td></tr>
									<tr><th class="taC">累计未入账发票</th><td colspan="3">￥{{itStatist.rPrice}}</td></tr>
									</tbody>
								</table>
							</div>
							
							<div class="clearfix">
								<!-- if !empty({{itTodoList}}) -->
								<legend>待完成入账培训班</legend>
								<table class="table table-bordered table-condensed">
									<tbody>
									<tr><th class="taC">培训班名称</th><th class="taC">办事处</th><th class="taC">创建</th><th class="taC">开班时间</th><th class="taC" width="90">包含发票</th><th class="taC">开票金额合计</th><th class="taC">入账金额合计</th><th class="taC" width="90">入账完成度</th><th class="taC" width="100">操作</th></tr>
									<!-- loop itTodoList -->
									<tr>
										<td><a href="/invoiceTrainingDetail/{{itList' value.trainingKey}}.html">{{itList' value.trainName}}</a></td>
										<td>{{itList' value.category.0.title}}</td>
										<td>{{itList' value.staff.username}}</td>
										<td>{{itList' value.trainDate}}</td>
										<td>{{itList' value.invoiceTotal}}</td>
										<td>￥{{itList' value.invoiceTotalAmount}}</td>
										<td>￥{{itList' value.invoiceArriveAmount}}</td>
										<td>{{itList' value.arriveSchedule}}%</td>
										<td>
										<!-- if {{itList' value.invoiceTotalAmount}}==0&&{{itList' value.submitStatus}}==0 -->
										<a data-toggle="modal" data-key="{{itList' value.trainingKey}}" node-training="del" href="#invalid">删除</a>
										<!-- endif -->
										</td>
									</tr>
									<!-- endloop -->
									
									</tbody>
								</table>
								<!-- else -->
								<blockquote><p class="colGray">暂时没有培训班</p></blockquote>
								<!-- endif -->
							</div>
							
							<div class="clearfix">
							<!-- if !empty({{itedList}}) -->
								<legend>已完成入账培训班</legend>
								<table class="table table-bordered table-condensed">
									<tbody>
									<tr><th class="taC">培训班名称</th><th class="taC">办事处</th><th class="taC">创建</th><th class="taC">开班时间</th><th class="taC" width="90">包含发票</th><th class="taC">开票金额合计</th><th class="taC">入账金额合计</th><th class="taC" width="90">入账完成度</th></tr>
									<!-- loop itedList -->
									<tr>
										<td><a href="/invoiceTrainingDetail/{{itList' value.trainingKey}}.html">{{itList' value.trainName}}</a></td>
										<td>{{itList' value.category.0.title}}</td>
										<td>{{itList' value.staff.username}}</td>
										<td>{{itList' value.trainDate}}</td>
										<td>{{itList' value.invoiceTotal}}</td>
										<td>￥{{itList' value.invoiceTotalAmount}}</td>
										<td>￥{{itList' value.invoiceArriveAmount}}</td>
										<td>{{itList' value.arriveSchedule}}%</td>
										
									</tr>
									<!-- endloop -->
									</tbody>
								</table>
								<!-- else -->
								<blockquote><p class="colGray">暂时没有已完成入账培训班</p></blockquote>
								<!-- endif -->
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<!--创建培训班-->
<div class="modal hide fade" id="add-batch">

<form action="/invoiceTrainingAdd" method="post" name="invoiceTraining">

	<div class="modal-dialog">
		<div class="modal-content">
		<div class="modal-header">
		<h3>创建培训班</h3>
		</div>
		<div class="modal-body saeaList">
			<table class="table table-bordered table-condensed">
				<tr><th class="taC" width="150">培训班名称</th>
				<td><input type="text" name="trainName" value=""></td>
				</tr>
				<tr><th class="taC" width="150">所在办事处</th>
				<td>
				<select name="cid" >
					<!-- loop category -->
					<option <!-- if {{category' value.cid}} == {{staff.0.cid}}  --> selected <!-- endif --> post-data="{{category' value.cid}}" value="{{category' value.cid}}" >{{category' value.title}}</option>
					<!-- endloop -->
				</select>
				</td></tr>
				<tr><th class="taC" width="150">开班时间</th>
				<td><input type="date" name="trainDate"></td>
				</tr>
			</table>
		</div>
	<div class="modal-footer">
		<input type="submit" class="button" value="确认创建">	
			
			<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">取消</a>
	</div>
</div>
</div>
</form>
</div>
<!--创建培训班-->
<div class="modal hide fade" id="invalid">
<form action="invoiceTrainingDelDo"  method="post">
<input type="hidden" id='trainingKey' name="trainingKey" value="">
		<div class="modal-dialog ">
			<div class="modal-content">
				<div class="modal-header">
					<h3>是否删除培训班</h3>
				</div>
				
				<div class="modal-footer">
				<input type="submit" class="button" value="是的">
				<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
				</div>
			</div></div>
			</form>
</div>		
		
<script type="text/javascript">autoFlashHeight();</script>
</body>
