<!-- 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="<?= receipt ?>"></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" style="height: 821px;">
			<!-- include 'receiptTrainApprovalForm' -->
				
				<div class="borad-news">
					<div class="subNav">
			    		<!-- include 'receiptTrainMenu' -->
					</div>
			  		<div class="saeaList" <!-- if {{trainEdiType}}!='INFO' --> style="display:none" <!-- endif --> >
			  		<form action="/receiptTrainInfoEdiDo" name="receiptTrainAdd" method="post">
			  		<input type="hidden" name="rid" value="{{receiptDetail.ridKey}}">
			  		<input type="hidden" name="rtid" value="{{receiptTrainingDetail.rtidKey}}">
			  			<legend>培训班信息</legend>
			  			<table class="table table-bordered table-condensed">
							<tbody>
								<tr>
									<th colspan="4" class="taC">培训班信息</th>
								</tr>
								<tr>
									<th class="taC" width="150"><span class="colRed" title="必填">*</span>培训班名称</th>
									<td><input placeholder="必填" name="trainName" id='trainName' value='{{receiptTrainingDetail.trainName}}' type="text"></td>
									<th class="taC" width="150">所在办事处</th><td>{{staff.0.category}}</td>
								</tr>
								<tr>
									<th class="taC"><span class="colRed" title="必填">*</span>开班时间</th>
									<td><input placeholder="必填" name="trainStartDate" id="trainStartDate" value='{{receiptTrainingDetail.trainStartDate}}' type="date"></td>
									<th class="taC"><span class="colRed" title="必填">*</span>结束时间</th>
									<td><input placeholder="必填" name="trainEndDate" id="trainEndDate" value='{{receiptTrainingDetail.trainEndDate}}' type="date"></td>
								</tr>
								<tr>
									<th class="taC"><span class="colRed" title="必填">*</span>参加人数</th>
									<td><input name="participants" id="participants" value="{{receiptTrainingDetail.participants}}" placeholder="输入数量" pattern="[0-9]" type="number" min="1" step="1" aria-required="true" class="n-valid">
									</td>
									<th class="taC"><span class="colRed" title="必填">*</span>免费参加人数</th>
									<td><input name="freeParticipants" id="freeParticipants"  value="{{receiptTrainingDetail.freeParticipants}}" placeholder="必填" placeholder="输入数量" pattern="[0-9]" type="number" min="1" step="1" aria-required="true" class="n-valid"></td>
								</tr>
								<tr>
									<th class="taC"><span class="colRed" title="必填">*</span>培训班地址</th>
									<td colspan="3"><input placeholder="必填" name="trainAddress" id="trainAddress" value="{{receiptTrainingDetail.trainAddress}}" type="text"></td>
								</tr>
								<tr>
									<th class="taC">备注</th><td colspan="3"><textarea placeholder="选填项" name="trainRemarks" id="trainRemarks" style="width:600px">{{receiptTrainingDetail.trainRemarks}}</textarea></td>
								</tr>
								<tr>
									<th colspan="4" class="taC">审批信息</th>
								</tr>
								<tr>
									<th class="taC"><span class="colRed" title="必填">*</span>审批组
									</th>
									<td>
									<select name="verify" id="verify">
								<option  value="" >请选择审批组</option>
								<!-- loop veList -->
								<option <!-- if {{receiptDetail.verify}}=={{veList' value.vid}} --> selected <!-- endif --> value="{{veList' value.vid}}" >{{veList' value.description}}（
								{{veList' value.staff}}
								
								）</option>
								<!-- endloop -->
								</select>
									</td>
									<th class="taC"><span class="colRed" title="必填">*</span>所在办事处</th>
									<td>
									<select name="cid" class="span2">
								<!-- loop category -->
								<option <!-- if {{category' value.cid}} == {{receiptDetail.cid}}  --> selected <!-- endif -->  value="{{category' value.cidKey}}" >{{category' value.title}}</option>
								<!-- endloop -->
								</select>
									
									</td>
								</tr>
								<tr>
									<th colspan="4" class="taC">汇款信息</th>
								</tr>
								
								
							<tr>
									<th class="taC"><span class="colRed" title="必填">*</span>汇款人户名
									</th><td><input type="text" name="remittanceName" id="remittanceName" placeholder="请输入汇款人户名" value="{{receiptDetail.remittanceName}}"></td>
									<th class="taC"><span class="colRed" title="必填">*</span>汇款银行</th>
									<td>
									<select node-rbt name="remittanceBankType">
							<option <!-- if 0 == {{receiptDetail.remittanceBankType}}  --> selected <!-- endif --> value="0">广发银行</option>
							<option <!-- if 1 == {{receiptDetail.remittanceBankType}}  --> selected <!-- endif --> value="1">其他</option>
							</select>
									</td>
								</tr>
								<tr>
									<th class="taC"><span class="colRed" title="必填">*</span>汇款开户银行名称
									</th><td><input type="text" placeholder="请输入汇款开户银行名称" name="bankName" id="bankName" value="{{receiptDetail.bankName}}"></td>
									<th class="taC"><span class="colRed" title="必填">*</span>汇款帐号</th>
									<td><input type="text" placeholder="请输入汇款帐号" id="bankNumber" name="bankNumber" value="{{receiptDetail.bankNumber}}"></td>
								</tr>
								<tr  node-cn <!-- if 0 == {{receiptDetail.remittanceBankType}} --> style="display:none" <!-- endif --> >
									<th class="taC"><span class="colRed" title="必填">*</span>联行号
									<div class="tipContent"><span class="tipGray">?</span><div class="tipConactive"><p>1.如果不是公司广发，务必填上银行联行号</p><p>2.如不清楚银行联行号请咨询报销查款专用 QQ：2870766094</p></div></div></th>
									<td><input type="text" placeholder="请输入联行号" id="coupletNumber" name="coupletNumber" value="{{receiptDetail.coupletNumber}}"></td>
									<th class="taC"></th><td></td>
								</tr>
								
								
							</tbody>
						</table>
						<p class="taR">
						<input type="submit" value="保存修改" class="button">
						</p>
						</form>
					</div>
					<!-- 汇总表 -->
					<div class="saeaList" <!-- if {{trainEdiType}}!='COLLECT' --> style="display:none" <!-- endif -->>
			  			<legend>汇总表</legend>
			  			
			  			
			  			
			  			<table class="table table-condensed table-hover table-bordered" >
								<tbody><tr>
									<th class="taC" rowspan="2">汇总项目</th><th class="taC" colspan="2">收入按开票金额计算</th><th class="taC" colspan="2">收入按入账金额计算</th>
								</tr><tr>
									<th class="taC">金额</th><th class="taC" rowspan="2">占比</th><th class="taC">金额</th><th class="taC" rowspan="2">占比</th>
								</tr>
								<tr>
									<th>收入</th>
									<td class="taR">{{invoiceTrainingDetail.invoiceTotalAmount}}</td>
									<td class="taR">{{invoiceTrainingDetail.invoiceArriveAmount}}</td>
								</tr>
								<tr>
									<th>支出</th>
									<td class="taR">{{total}}</td>
									<td class="taR">{{invoicetotalProportion}}%</td>
									
									<td class="taR">{{total}}</td>
									<td class="taR">{{totalProportion}}%</td>
								</tr>
								<tr>
									<th>利润</th>
									<td class="taR"><b>{{invoiceProfit}}</b></td>
									<td class="taR">{{invoiceprofitProportion}}%</td>
									
									<td class="taR"><b>{{profit}}</b></td>
									<td class="taR">{{profitProportion}}%</td>
								</tr>
								<tr>
									<td colspan="5" class="taC colGray">收入-支出=利润</td>
								</tr>
								<tr>
									<th>公司利润</th>
									<td class="taR">{{invoiceCompanyProfit}}</td>
									<td class="taR">{{invoicecompanyProfitProportion}}%</td>
									<td class="taR">{{companyProfit}}</td>
									<td class="taR">{{companyProfitProportion}}%</td>
								</tr>
								<tr>
									<th>办事处利润</th>
									<td class="taR">{{invoiceCategoryProfit}}</td>
									<td class="taR">{{invoicecategoryProportion}}%</td>
									<td class="taR">{{categoryProfit}}</td>
									<td class="taR">{{categoryProportion}}%</td>
								</tr>
								<tr>
									<th>公司收款</th>
									<td class="taR">{{invoiceTrainingDetail.invoiceCompanyAmount}}</td>
									<td class="taR">{{invoiceTotalAmountProportionB}}%</td>
									<td class="taR">{{invoiceTrainingDetail.invoiceCompanyAmount}}</td>
									<td class="taR">{{invoiceTotalAmountProportion}}%</td>
								</tr>
								<tr>
									<td colspan="5" class="taC colGray">收入×40%=办事处利润&nbsp;&nbsp;&nbsp;收入×60%=公司利润</td>
								</tr>
								<tr>
									<th>备用金（借款）</th>
									<td class="taR">{{receiptLoanDetail.sum}}</td>
									<td class="taR">{{invoicesumProportion}}%</td>
									<td class="taR">{{receiptLoanDetail.sum}}</td>
									<td class="taR">{{sumProportion}}%</td>
								</tr>
								<tr>
									<th>办事处收款</th>
									<td class="taR">{{invoiceTrainingDetail.RIAmount}}</td>
									<td class="taR">{{invoiceRIAmountProportion}}%</td>
									<td class="taR">{{invoiceTrainingDetail.RIAmount}}</td>
									<td class="taR">{{RIAmountProportion}}%</td>
								</tr>
								<tr>
									<th>办事处实际支出</th>
									<td class="taR">{{categoryActualExpenditure}}</td>
									<td class="taR">{{ICAEP}}%</td>
									<td class="taR">{{categoryActualExpenditure}}</td>
									<td class="taR">{{categoryActualExpenditureProportion}}%</td>
								</tr>
								<tr>
									<th>付总部款</th>
									<td class="taR"><b>{{payment}}</b></td>
									<td class="taR">{{invoicepaymentProportion}}%</td>
									<td class="taR"><b>{{payment}}</b></td>
									<td class="taR">{{paymentProportion}}%</td>
								</tr>
								<tr>
									<td colspan="5" class="taC colGray">备用金+办事处收款-办事处实际支出=付总部款</td>
								</tr>
								<tr><td colspan="5">学员：{{receiptTrainingDetail.participantsTotal}}人(缴费{{receiptTrainingDetail.participants}}&nbsp;免费{{receiptTrainingDetail.freeParticipants}})&nbsp;&nbsp;&nbsp;讲师：{{lectureCount}} 人</td></tr>
						</tbody></table>
			  			
			  			
			  			
			  			
			  			<table class="table table-bordered table-condensed table-hover">
							<tbody>
								<tr>
									<th class="taC" colspan="4">项目</th><th class="taC">金额</th><th class="taC" >占入账金额比例</th>
								</tr>
								
								
								<!-- loop aiList -->
								<!-- if {{aiList' key}}==0 -->
								<tr>
									<th rowspan="{{aiCount}}" width="20">支出明细</th><th colspan="2">{{aiList' value.name}}</th>
									<td colspan="2" class="taR">{{aiList' value.priceFormat}}</td><td>{{aiList' value.proportion}}%</td>
								</tr>
								<!-- elseif {{aiList' value.name}}=='讲课费' -->
								<tr>
									<th rowspan="3" colspan="2">讲课费</th><td class="taC colGray">外聘</td>
									<td class="taR">{{aiList' value.outsideTaxPrice}}</td>
									<td>{{aiList' value.outsideTaxProportion}}%</td>
								</tr>
								<tr>
									<td class="taC colGray">外聘(不计税)</td><td class="taR">{{aiList' value.outsideNoTaxPrice}}</td>
									<td>{{aiList' value.outsideNoTaxProportion}}%</td>
								</tr>
								<tr>
									<td class="taC colGray">员工</td><td class="taR">{{aiList' value.insidePrice}}</td>
									<td>{{aiList' value.insideProportion}}%</td>
								</tr>
								<!-- elseif {{aiList' value.name}}=='办公费' -->
								<tr>
									<th rowspan="2" colspan="2">{{aiList' value.name}}</th>
									<td class="taC colGray">办事处支出</td><td class="taR">{{aiList' value.categoryPrice}}</td><td>{{aiList' value.categoryProportion}}%</td>
								</tr>
								<tr>
									<td class="taC colGray">公司支出</td><td class="taR">{{aiList' value.companyPrice}}</td><td>{{aiList' value.companyProportion}}%</td>
								</tr>
								<!-- elseif {{aiList' value.name}}=='邮寄费' -->
								<tr>
									<th rowspan="2" colspan="2">{{aiList' value.name}}</th>
									<td class="taC colGray">办事处支出</td><td class="taR">{{aiList' value.categoryPrice}}</td><td>{{aiList' value.categoryProportion}}%</td>
								</tr>
								<tr>
									<td class="taC colGray">公司支出</td><td  class="taR">{{aiList' value.companyPrice}}</d><td>{{aiList' value.companyProportion}}%</td>
								</tr>
								<!-- else -->
								<tr>
									<th colspan="2">{{aiList' value.name}}</th><td colspan="2" class="taR">{{aiList' value.priceFormat}}</td><td>{{aiList' value.proportion}}%</td>
								</tr>
								<!-- endif -->
								<!-- endloop -->
								<tr>
									<th colspan="2">小计</th><td colspan="2" class="taR">{{total}}</td>
									<td>{{totalProportion}}%</td>
								</tr>
								
								
								
								
								
							</tbody>
						</table>
					</div>
					
					
				</div>
		</div>
	</div>
	<!--弹出-->
<div class="modal hide fade" id="addCallout">
    <div class="modal-header">
    <h3>添加批注</h3>
    </div>
    <div class="modal-body">
    <form class="">
	    	<div class="control-group">
				<div class="controls clearfix">
					<label>
	                	批注内容
	              	</label>
	              	<textarea rows="8" class="span6"></textarea>
				</div>
	    	</div>
    </form>
    </div>
	<div class="modal-footer">
	    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">取消</a>
	   	<a href="#" class="button">确定</a>
	</div>
</div>
    <!--弹出内容-->
<script type="text/javascript">autoFlashHeight();</script>
</body>
