 <!-- include 'header' -->
  <script src="<?= receipt ?>"></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>
				您有{{receiptApprovalCount}}份报销单需要审批
				</legend>
				
				<div class="demandCate">
				<form action="/approvalExpenses/{{status}}" id="up" method="get">
				
	  				<ul class="cateList " >
	  					<li>
	  					
	  					<a <!-- if {{status}}=='pendApproval' --> class="now" <!-- endif --> href="/approvalExpenses/pendApproval">待审批</a>
	  					<a <!-- if {{status}}=='ongoing' --> class="now" <!-- endif --> href="/approvalExpenses/ongoing">进行中</a>
	  					<a  <!-- if {{status}}=='done' --> class="now" <!-- endif --> href="/approvalExpenses/done">费用完成</a>
	  					<a <!-- if {{status}}=='termination' --> class="now" <!-- endif --> href="/approvalExpenses/termination">终止</a>
	  					
	  					<a <!-- if {{status}}=='finish' --> class="now" <!-- endif --> href="/approvalExpenses/finish" >审批完成</a>
	  					
	  					</li>
	  					
	  					<!-- if {{status}}=='pendApproval'|| {{status}}=='ongoing'  -->
	  					
	  					<li>
	  					
	  					<select id="reportCate" onChange="reportCatePM();">
	  						<option value="ALL">办事处</option>
	  						{{reportCateHtml}}
	  						</select>
	  					
	  					<select id="report" onChange="reportPM();">
	  					<option value="ALL">员工</option>
	  					{{reportHtml}}
	  					</select>
						</li>
	  					
	  					<!-- endif -->
	  					
	  					<!-- if {{status}}=='done' || {{status}}=='termination'|| {{status}}=='finish' --> 
	  					<li style="display:none" >
	  					<input type="month" name="date" id="date" style="width:120px" onChange="receiptDate();" value="">
	  					</li>
	  					
	  					<li >
						<select name="year" id="Y" onChange="receiptYear();">
	  					{{dateHtml}}
	  					</select>
	  					<select name="month" id="M" onChange="receiptMoth();">
	  					<option value="">所有月份</option>
	  					{{mothHtml}}
	  					</select>
						</li>
						
	  					<li>
	  						<select name="cid" onChange="receiptYear();">
	  						<option value="">办事处</option>
	  						<!-- loop categoryList -->
	  						<option <!-- if {{categoryList' value.cid}}=={{cid}} --> selected <!-- endif --> value="{{categoryList' value.cid}}">{{categoryList' value.title}}</option>
	  						<!-- endloop -->
	  						</select>
	  						<select name="sid" onChange="receiptYear();">
	  						<option value="">员工</option>
	  						<!-- loop staffList -->
	  							<option <!-- if {{categoryList' value.sid}}=={{sid}} --> selected <!-- endif --> value="{{categoryList' value.sid}}">{{categoryList' value.username}}</option>
	  						<!-- endloop -->
	  						</select>
	  					</li>
	  					<!-- endif -->
	  					
	  					<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>
	  		</div>
				
	  		<div class="saeaList">
	  		
	  			<div class="entry">
	  				
	  				<table class="table table-bordered table-condensed">
	  					<thead><tr><th width="54">上报人</th><th width="80" class="taC">费用类型</th><th width="100">报销总金额</th>
	  					<th width="120">费用所在办事处</th><th width="120">报销单号</th><th>报销说明</th><th width="100">状态</th><th width="100">操作</th></tr></thead>
	  					<tbody>
	  					<!-- loop receiptList -->
	  						<tr node-all='true' node-box='{{receiptList' value.staffDetail.username}}' node-boxCate='{{receiptList' value.staffDetail.category}}' >
	  							<td><div class="avtra"><img src="{{receiptList' value.staffDetail.avatar}}_2.jpg" width="32"><br>{{receiptList' value.staffDetail.username}}</div></td>
	  							<td><!-- if {{receiptDetail' value.Rtype}}==1 --> 
	  							借款
	  							<!-- if {{receiptDetail' value.status}}==10 --> 
	  							<br/><a href="/receiptTrain/info/{{receiptDetail' value.trainRidKey7}}.html" >培训班</a>
	  							<!-- endif -->
	  							<!-- elseif {{receiptDetail' value.Rtype}}==2 --> 
	  							对公汇款
	  							<!-- elseif {{receiptDetail' value.Rtype}}==3 -->
	  							培训班结算
	  							<!-- elseif {{receiptDetail' value.Rtype}}==0 --> 
	  							 报销单 
	  							 <!-- endif --> 
	  							 </td>
	  							 
	  							<td class="taR colOrange"><b>￥{{receiptDetail' 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>{{receiptDetail' value.category}}</td>
	  							<td>{{receiptDetail' value.receiptOrder}}<p class="colGray">{{receiptDetail' value.date}}</p></td>
	  							<td>{{receiptDetail' value.explanation}}</td>
	  							<td>
	  							<!-- if {{receiptDetail' value.status}}==2 --> 
	  							审批中
	  							<!-- elseif {{receiptDetail' value.status}}==5 or {{receiptDetail' value.status}}==7 --> 
	  							待审批
	  							<!-- elseif {{receiptDetail' value.status}}==1 or {{receiptDetail' value.status}}==6 --> 
	  							执行中
	  							<!-- elseif {{receiptDetail' value.status}}==8 or {{receiptDetail' value.status}}==9 --> 
	  							<!-- if {{receiptDetail' value.loanDate}}!=0 --> 
	  							借款完成
	  							<p class="colGray">{{receiptDetail' value.loanDate}}</p>
	  							<!-- endif -->
	  							 费用完成
	  							 <p class="colGray">{{receiptDetail' value.pastDate}}</p>
	  							 
	  							 <!-- elseif {{receiptDetail' value.status}}==4 --> 
	  							 撤回
	  							  <!-- elseif {{receiptDetail' value.status}}==3 --> 
	  							 终止
	  							 <!-- endif --> 
	  							</td>
	  							<td>
	  							<!-- if {{receiptDetail' value.status}}==2&&in_array({{staff.0.sid}}, {{receiptDetail' value.nowStaffArray}}) --> 
	  								<!-- if {{receiptDetail' value.Rtype}}==1 -->
	  									<!-- if {{receiptDetail' value.isBK}}==1 -->
	  									<a class="button" target="_blank" href="/receiptburEdi/{{receiptDetail' value.rid}}">去审批</a>
	  									<!-- else -->
	  									<a class="button" target="_blank" href="/expensesEdi/{{receiptDetail' value.rid}}">去审批</a>
	  									<!-- endif --> 
	  									
	  								<!-- elseif {{receiptDetail' value.Rtype}}==2 --> 
	  									<a class="button" target="_blank" href="/remitApproval/{{receiptDetail' value.rid}}">去审批</a>
	  								<!-- elseif {{receiptDetail' value.Rtype}}==3 --> 
	  <a class="button" target="_blank" href="/receiptTrain/approval/{{receiptDetail' value.ridKey}}.html">去审批</a>
	  								<!-- elseif {{receiptDetail' value.Rtype}}==0 -->
	  									<a class="button" target="_blank" href="/receiptburEdi/{{receiptDetail' value.rid}}">去审批</a>
	  								<!-- endif -->
	  							<!-- else --> 
	  							<!-- if {{receiptDetail' value.Rtype}}==3 --> 
	  							<a  target="_blank" href="/receiptTrain/approval/{{receiptDetail' value.ridKey}}.html">详情</a>
	  							<!-- else -->
	  							<a  target="_blank" href="/expensesDoc/{{receiptDetail' value.rid}}">详情</a>
	  							<!-- endif --> 
	  							<!-- endif --> 
	  							</td>
	  						</tr>
	  					<!-- endloop -->	
	  					</tbody>
	  				
	  				</table>
	  			<!-- if {{status}}=='done' || {{status}}=='termination'|| {{status}}=='finish' --> 
	  				<ul class="pagination fR">
	  							<!-- if {{page.previous}}==0 -->
								<li><a href="javascript:void(0)" title="上一页">&lt;</a></li>
								<!-- else -->
								<li><a href="/approvalExpenses/{{status}}/{{page.previous}}?year={{year}}&month={{month}}&cid={{cid}}&sid={{sid}}" title="上一页">&lt;</a></li>
								<!-- endif -->	
	  							<!-- if {{page.on_page}}>=3 -->
	  							<li><a href="/approvalExpenses/{{status}}/1?year={{year}}&month={{month}}&cid={{cid}}&sid={{sid}}" 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="/approvalExpenses/{{status}}/4?year={{year}}&month={{month}}&cid={{cid}}&sid={{sid}}" >4</a></li>
	  							<li><a href="/approvalExpenses/{{status}}/5?year={{year}}&month={{month}}&cid={{cid}}&sid={{sid}}" >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="/approvalExpenses/{{status}}/{{page.next}}?year={{year}}&month={{month}}&cid={{cid}}&sid={{sid}}" title="下一页">&gt;</a></li>
								<!-- endif -->
			  					
			  		</ul>
	  			<!-- endif -->
	  			
	  			</div>
	  		
	  		</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>