<!-- include 'header' -->
 <script src="<?= WEB_SITE_GLOBAL ?>js/receipt.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">
					<ul>
						<!-- include 'receipt_menu' -->
					</ul>
				</div>
			</div>
			<div class="adminContent autoHeight" style="height: 821px;">
				<legend><div class="fR"></div>费用执行历史数据</legend>
				<div class="demandCate">
				<form action="/hisImplement" id="up" method="post" >
					<input type="hidden" name="item" <!-- if {{item}}=="pendImplement" --> value="pendImplement" <!-- else --> value="{{item}}" <!-- endif -->  />
					
					<input type="hidden" name="year" id="year"  />
					<input type="hidden" name="moth" id="month" value="MONTH"  />
					<input type="hidden" name="day" id="day" value="DAY"  />
					<input type="hidden" name="sop" id="sop" value="SOP"  />
					
					<ul class="cateList " style="display:inline;">
						<li>
							<a href="/hisImplement/expenses" <!-- if {{item}}=="expenses" --> class="now" <!-- endif --> >借款</a>
							<a href="/hisImplement/receipts" <!-- if {{item}}=="receipts" --> class="now" <!-- endif --> >报销单</a>
							<a href="/hisImplement/remits" <!-- if {{item}}=="remits" --> class="now" <!-- endif --> >对公汇款</a>
							<a href="/hisImplement/train" <!-- if {{item}}=="train" --> class="now" <!-- endif --> >培训班结算</a>
						</li>
						
						<li>
							<select name="status" node-implement>
							<option <!-- if {{status}}=="pendImplement" --> selected <!-- endif --> value="pendImplement">待执行</option>
							<option <!-- if {{status}}=="alerpts" --> selected <!-- endif --> value="alerpts">已执行</option>
							</select>
						</li>
						
						<li><input type="date" name="date" id="date" value="{{rdate}}" onChange="receiptDate();" style="width:120px"></li>
						
						<li>
							<select  name="cidKey" onchange="receiptSop();">
		  					<option value="ALL" <!-- if {{cidKey}}=='ALL' --> selected <!-- endif --> >所有</option>
		  					{{categoryScreenHtml}}
		  					</select>
						</li>
						<li>
							<select  id="S" onchange="receiptSop();">
		  					<option value="SOP" <!-- if {{sop}}=='SOP' --> selected <!-- endif --> >所有</option>
		  					{{sopHtml}}
		  					</select>
						</li>
						<li>
							<div class="search">
								<div class="input-append">
	  						<input name="receiptOrder" class="span3" placeholder="单号搜索" type="text" value="{{receiptOrder}}">
	  						<input type="submit" class="btn btn-small" value="搜索">
	  						</div>
	  					</div>
	  				</li>
						
	  			</ul>
	  			</form>
	  			<form action="/exportRemittance" id="up" method="post" >
	  			<input type="hidden" name="remittanceInfo" value='{{remittanceList}}'  />
	  			<ul class="cateList ">
	  			<li>
	  			<input type="submit" class="button" value="导出收款信息">
	  			</ul>
	  			</form>
	  		</div>
	  		
	  		
	  		
	  		
	  		<div class="saeaList">
				<div class="entry">
					<table class="table table-bordered table-condensed">
						<thead><tr><th width="54" >上报人</th><th width="100" class="taC">费用类型</th><th width="100" class="taC">费用金额</th><th width="120" class="taC">费用所在办事处</th><th width="120" class="taC">费用单号</th><th class="taC">费用说明</th><th width="100" class="taC">状态</th><th width="80" class="taC">操作</th></tr></thead>
						<tbody>
						<!-- loop receiptList -->
						<!-- if {{item}}=="pendImplement" -->
						<!-- if {{receiptList' value.Texe}}=='true'&&{{receiptList' value.TRexe}}=='true'&&({{receiptList' value.status}}==1 || {{receiptList' value.status}}==6) -->
						<tr>
						<td><div class="avtra"><img src="{{receiptList' value.staffDetail.avatar}}_2.jpg" width="32"><br>{{receiptList' value.staffDetail.username}}</div></td>
						
							<td>
							<!-- if {{receiptList' value.Rtype}}==1 -->
			  					借款申请
			  				<!-- elseif {{receiptList' value.Rtype}}==2 -->
			  					对公汇款
			  				<!-- elseif {{receiptList' value.Rtype}}==3 -->
			  					培训班结算
			  				<!-- elseif {{receiptList' value.Rtype}}==0 -->	
			  					报销单
			  				<!-- endif -->
							</td>
							<td class="taR ">
							<b class="colOrange">￥{{receiptList' value.sum}}</b>
							<!-- if {{receiptList' value.Rtype}}==1 -->
			  					<b <!-- if {{receiptList' value.sum}}>{{receiptList' value.loanSum}} --> class="colRed" <!-- else --> class="colGreen" <!-- endif --> > 
			  					￥{{receiptList' value.loanSum}}</b>
			  				<!-- endif -->
							</td>
							<td>{{receiptList' value.category}}</td>
							<td>{{receiptList' value.receiptOrder}}<p class="colGray">{{receiptDetail' value.date}}</p></td>
							<td>{{receiptList' value.explanation}}</td>
							<td>
							<!-- if {{receiptList' value.status}}==1 -->
								执行中
								<p class="colGray ">{{receiptList' value.pastDate}}</p>
							<!-- elseif {{receiptList' value.status}}==2 -->
								审批中
							<!-- elseif {{receiptList' value.status}}==3 -->
							终止
							<!-- elseif {{receiptList' value.status}}==4 -->
							撤回
							<!-- elseif {{receiptList' value.status}}==5 -->
							待提交
							<!-- elseif {{receiptList' value.status}}==6 -->
							执行中
							<!-- elseif {{receiptList' value.status}}==7 -->
							待提交
							<!-- elseif {{receiptList' value.status}}==8 and {{receiptList' value.Rtype}}==1  -->
							借款完成
							<!-- elseif ({{receiptList' value.status}}==8 and {{receiptList' value.Rtype}}!=1 ) or {{receiptList' value.status}}==9 -->
							费用完成
							{{receiptList' value.executeDate}}
							<!-- endif -->
							
							</td>
							<td>
							
							<!-- if {{receiptList' value.Texe}}=='true'&&{{receiptList' value.TRexe}}=='true'&&({{receiptList' value.status}}==1 || {{receiptList' value.status}}==6) -->
								<a href="/implement/{{receiptList' value.ridKey}}.html" class="button" target="_blank">去执行</a>
							<!-- else -->
							<a href="/expensesDoc/{{receiptList' value.rid}}" target="_blank">详情</a>
							
							<!-- endif -->
							
							</td>
						</tr>
						<!-- endif -->
						<!-- else -->
						
						
						<tr>
						<td><div class="avtra"><img src="{{receiptList' value.staffDetail.avatar}}_2.jpg" width="32"><br>{{receiptList' value.staffDetail.username}}</div></td>
						
							<td>
							<!-- if {{receiptList' value.Rtype}}==1 -->
			  					借款申请
			  				<!-- elseif {{receiptList' value.Rtype}}==2 -->
			  					对公汇款
			  				<!-- elseif {{receiptList' value.Rtype}}==3 -->
			  					培训班结算
			  				<!-- elseif {{receiptList' value.Rtype}}==0 -->	
			  					报销单
			  				<!-- endif -->
							</td>
							<td class="taR ">
							<b class="colOrange">￥{{receiptList' value.sum}}</b>
							<!-- if {{receiptList' value.Rtype}}==1 -->
			  					<b <!-- if {{receiptList' value.sum}}>{{receiptList' value.loanSum}} --> class="colRed" <!-- else --> class="colGreen" <!-- endif --> > 
			  					￥{{receiptList' value.loanSum}}</b>
			  				<!-- endif -->
							</td>
							<td>{{receiptList' value.category}}</td>
							<td>{{receiptList' value.receiptOrder}}<p class="colGray">{{receiptDetail' value.date}}</p></td>
							<td>{{receiptList' value.explanation}}</td>
							<td>
							<!-- if {{receiptList' value.status}}==1 -->
								执行中
								<p class="colGray ">{{receiptList' value.pastDate}}</p>
							<!-- elseif {{receiptList' value.status}}==2 -->
								审批中
							<!-- elseif {{receiptList' value.status}}==3 -->
							终止
							<!-- elseif {{receiptList' value.status}}==4 -->
							撤回
							<!-- elseif {{receiptList' value.status}}==5 -->
							待提交
							<!-- elseif {{receiptList' value.status}}==6 -->
							执行中
							<!-- elseif {{receiptList' value.status}}==7 -->
							待提交
							<!-- elseif {{receiptList' value.status}}==8 and {{receiptList' value.Rtype}}==1  -->
							借款完成
							<!-- elseif ({{receiptList' value.status}}==8 and {{receiptList' value.Rtype}}!=1 ) or {{receiptList' value.status}}==9 -->
							费用完成
							{{receiptList' value.executeDate}}
							<!-- endif -->
							
							</td>
							<td>
							
							<!-- if {{receiptList' value.Rtype}}==3 -->
								<!-- if {{receiptList' value.Texe}}=='true'&&{{receiptList' value.TRexe}}=='true'&&({{receiptList' value.status}}==1 || {{receiptList' value.status}}==6) -->
								<a href="/receiptTrain/implement/{{receiptList' value.ridKey7}}.html" class="button" target="_blank">去执行</a>
								<!-- else -->
								<a href="/receiptTrain/implement/{{receiptList' value.ridKey7}}.html"  target="_blank">详情</a>
								<!-- endif -->
							<!-- else -->
							<!-- if {{receiptList' value.Texe}}=='true'&&{{receiptList' value.TRexe}}=='true'&&({{receiptList' value.status}}==1 || {{receiptList' value.status}}==6) -->
								<a href="/implement/{{receiptList' value.ridKey}}.html" class="button" target="_blank">去执行</a>
							<!-- else -->
							<a href="/expensesDoc/{{receiptList' value.rid}}" target="_blank">详情</a>
							<!-- endif -->
							<!-- endif -->
							</td>
						</tr>
						
						<!-- endif -->
						<!-- endloop -->
						
						</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>