<!-- include '../header' -->

<link href="<?= WEB_SITE_GLOBAL ?>css/datepicker.min.css" rel="stylesheet" type="text/css">
<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.min.js"></script>
<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.zh.js"></script>

<script >
	$(function() {
		$('select[cidKey]').change(function(){

			var form = $('#RTR');
			// $('#year').val($('#Y').val());
			// $('#month').val($('#M').val());
			// $('#day').val($('#D').val());
			// $('#sop').val($('#S').val());
			form.submit();
		});



	})
</script>
<body>
	<div class="mainLayout">
		<div class="mainMenu">
			<div class="menuItem">
				<a href="#" class="mLogo">CLD</a>
				<ul>
					<!-- include '../admin/menuReceipt' -->
				</ul>
			</div>
		</div>
		<div class="warpContent">
			<div class="subMenu fL">
				<div class="menuItem">
					<!-- include '../admin/receipt_menu' -->
				</div>
			</div>
			<div class="adminContent autoHeight">
				<legend>
					所有培训班
				</legend>
				<div class="demandCate">
					<form action="/receiptTrainRevenueAchieve/{{onpage}}/{{paid}}" id="RTR" method="get">

					<ul class="cateList">
						<li>
							<a <!-- if {{paid}}=='ALL' --> class="now" <!-- endif --> href="/receiptTrainRevenueAchieve/1/ALL">所有</a>
							<a <!-- if {{paid}}=='UNPAID' --> class="now" <!-- endif --> href="/receiptTrainRevenueAchieve/1/UNPAID" title="未完成收款">未完成收款</a>
							<a <!-- if {{paid}}=='PAID' --> class="now" <!-- endif --> href="/receiptTrainRevenueAchieve/1/PAID" title="收款完成">收款完成</a>
						</li>
						<!--收入-->
						<li>
							<select name="cidKey" cidKey >
								<option value="">所有办事处</option>
								<!-- loop categoryList -->
								<option  <!-- if {{{categoryList' value.cidKey}}=={{cidKey}} --> selected <!-- endif --> value="{{categoryList' value.cidKey}}">{{categoryList' value.title}}</option>
								<!-- endloop -->
							</select>
						</li>
						<li>
							<div class="search">
								<div class="input-append">
									<input class="datepicker-here span3" name="trainEndDate" value="{{dateString}}" placeholder="按结算时间筛选" type="text" data-range="true"
							    data-multiple-dates-separator=":"
							    data-language="zh" >
									<button class="btn btn-small" type="submit">查询</button>
								</div>
							</div></li>
							<li>收入合计:￥{{receiptTrainPriceList.invoiceTotalAmount}}&nbsp;
								<span class="colBlue">支出合计:￥{{receiptTrainPriceList.payPrice}}</span>&nbsp;
								利润合计:￥{{receiptTrainPriceList.profit}}
							</li>
							<li class="colRed">未收款:￥{{receiptTrainPriceList.unReceivablesTotalAmount}}</li>
					</ul>

					</form>
				</div>
				<div class="saeaList">
					<table class="table table-hover">
						<tbody>
							<tr class="thead">
								<th width="140">培训班名称</th>
								<th>开班时间</th>
								<th>完成结算时间</th>
								<th >收入（开票金额）</th>
								<th >支出</th>
								<th>办事处利润</th>
								<th>公司利润</th>
								<th>应收款总额</th>
							</tr>

							<!-- loop rtpa -->
							<tr>
								<th><a href="/receiptTrain/approval/{{unpaid' value.ridKey}}.html">{{unpaid' value.trainName}}</a></th>
								<td >{{unpaid' value.trainStartDate}}</td>
								<td >{{unpaid' value.trainEndDate}}</td>
								<td >￥{{unpaid' value.iTrain.invoiceTotalAmount}}</td>
								<td >￥{{unpaid' value.iTrain.expendAmount}}</td>
								<td >￥{{unpaid' value.iTrain.companyProfit}}</td>
								<td >￥{{unpaid' value.iTrain.categoryProfit}}</td>
								<td class="colRed">￥{{unpaid' value.iTrain.receivablesAmount}}</td>
							</tr>
							<!-- endloop -->

						</tbody>
					</table>
				</div>
				<!--翻页-->
				<div class="demandPage">
					<ul class="pagination fL">
						<!-- if {{page.previous}}==0 -->
						<li><a href="javascript:void(0)" title="上一页">&lt;</a></li>
						<!-- else -->
						<li><a href="/receiptTrainRevenueAchieve/{{page.previous}}{{get}}" title="上一页">&lt;</a></li>
						<!-- endif -->

						<!-- if {{page.on_page}}>=3 -->
						<li><a href="/receiptTrainRevenueAchieve/1{{get}}" title="上一页">1</a></li>
						<li class="point"><span>...</span></li>
						<!-- endif -->
						{{page.page}}
						<!-- if {{page.on_page}}<3 && {{page.total_page}}>5 -->
						<li><a href="/receiptTrainRevenueAchieve/4{{get}}" >4</a></li>
						<li><a href="/receiptTrainRevenueAchieve/5{{get}}" >5</a></li>
						<!-- endif -->

						<!-- if {{page.total_page}}>3 -->
						<li class="point"><span>...</span></li>
						<!-- endif -->

						<!-- if {{page.next}}=={{page.on_page}} -->
						<li><a href="javascript:void(0)" title="下一页">&gt;</a></li>
						<!-- else -->
						<li><a href="/receiptTrainRevenueAchieve/{{page.next}}{{get}}" title="下一页">&gt;</a></li>
						<!-- endif -->
					</ul>
				</div>


			</div>
			</div>
<!--弹出（日收支）-->
<div class="modal hide fade" id="editincome">
		<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">
							<tbody>
							<!--收入-->
							<tr>
								<th class="taC" colspan="2">收入信息填写</th>
							</tr>
													<tr>
								<th class="taC">费用类型</th>
								<td >
								<select>
									<option>请选择</option>
									<option>利息收入</option>
									<option>补贴收入</option>
									<option>纵横知道</option>
									<option>借款收回</option>
									<option>退汇</option>
									<option>其他</option>
									<option>理财本金</option>
								</select>
								<p>
								<!--利息收入 二级-->
								<label class="radio inline"><input type="radio">银行存款</label>
								<label class="radio inline"><input type="radio">理财收益</label>
								<label class="radio inline"><input type="radio">个人借款</label>
								<!--补贴收入 二级-->
								<!-- <label class="radio inline"><input type="radio">社保</label>
								<label class="radio inline"><input type="radio">财政</label> -->
								<!--借款收回 二级-->
								<!-- <label class="radio inline"><input type="radio">备用金</label>
								<label class="radio inline"><input type="radio">私人借款</label> -->
								<!--理财G 二级-->
								<!-- 可提取余额：￥30,000,000.00 -->
								</p>
								</td>
							</tr>
							<tr>
								<th class="taC">到款金额</th><td><input value="0" placeholder="输入开票金额" pattern="[0-9]" min="0" step="0.01" type="number"></td>
							</tr>
							<tr>
								<th class="taC">到款信息</th><td><input type="text"></td>
							</tr>
							<tr>
								<th class="taC">到款银行</th>
								<td>
									<select>
										<option>纵横广发</option>
										<option>个人广发</option>
										<option>华润银行</option>
									</select>
								</td>
							</tr>
							<tr>
								<th class="taC">银行到款时间</th><td><input type="date"></td>
							</tr>
							<!--收入-->
						</tbody>
					</table>
				</div>
				<div class="modal-footer">
					<a href="#" class="button" data-dismiss="modal" aria-hidden="true">确认修改</a>
					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
				</div>
			</div></div>
	</div>
<!--弹出（日收支）-->
<div class="modal hide fade" id="delincome">
		<div class="modal-dialog ">
			<div class="modal-content">
				<div class="modal-header">
					<h3>删除收支</h3>
				</div>
				<div class="modal-body">
					<p>确认删除该收支？</p>
				</div>
				<div class="modal-footer">
					<a href="#" class="button" data-dismiss="modal" aria-hidden="true">确认删除</a>
					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
				</div>
			</div></div>
	</div>	
<!--弹出（退款）-->
<div class="modal hide fade" id="refundincome">
		<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">
						<tbody>
						<tr>
							<th colspan="2" class="taC">退款信息</th>
						</tr>
						<tr>
							<th class="taC">退款单位名称</th>
							<td><input type="text" name="refundCompany" id="refundCompany" placeholder="请输入单位名称" aria-required="true" aria-invalid="true"></td>
						</tr>
						<tr>
							<th class="taC">退款的账号</th>
							<td><input type="text" name="refundNumber" id="refundNumber" placeholder="请输入账号" aria-required="true" aria-invalid="true"></td>
						</tr>
						<tr>
							<th class="taC">退款金额</th>
							<td><input type="text" name="refundPrice" id="refundPrice" placeholder="请输入退款金额" aria-required="true" aria-invalid="true"></td>
						</tr>
						<tr>
							<th class="taC">备注</th>
							<td><textarea name="refundRemarks" style="width:390px"></textarea></td>
						</tr>
						</tbody>
					</table>
				</div>
				<div class="modal-footer">
					<a href="#" class="button" data-dismiss="modal" aria-hidden="true">确认</a>
					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
				</div>
			</div></div>
	</div>	
<script type="text/javascript">autoFlashHeight();</script>

</body>
