<!-- include 'header' -->
<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="borad-menu">
				</div>
				<div class="borad-news">
					<div class="saeaList">
						<div class="clearfix">
						
							<legend><div class="fR"></div>待确认退票</legend>
							<!-- if !empty({{untreadInvoice}}) -->
							<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">提交退票</th>
								<th class="taC">退票原因</th><th class="taC">退票快递</th><th class="taC" width="120">操作</th></tr>
								
								<!-- loop untreadInvoice -->
                                <tr>
                                    <td><a href="#invdetail" node-invoice='INFO' data-isKey="{{invoiceList' value.iidKeyK}}" data-toggle="modal">{{invoiceList' value.invoiceSerial}}</a></td>
                                    <td>
                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
                                   	{{invoiceList' value.invoiceCompany}}
                                    <!-- else -->
                                    {{invoiceList' value.invoiceTitle}}
                                    <!-- endif -->
                                    </td>
                                    <td>
                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
                                    <b>￥{{invoiceList' value.invoicePrice}}</b><sup>专</sup>
                                    <!-- else -->
                                    <b>￥{{invoiceList' value.invoicePrice}}</b>
                                    <!-- endif -->
                                    </td>
                                    
                                    <td>
                                  
                                   {{invoiceList' value.invoiceNo}}
                                   
                                    </td>
                                    
                                    <td>{{invoiceList' value.categoryName}}{{invoiceList' value.userName}} {{invoiceList' value.date}}</td>
                                    <td>{{invoiceList' value.untreadReason}}</td>
                                    <td>
                                    <!-- if {{invoiceList' value.untreadPost}}==0 -->
                                    	不需邮寄
                                    <!-- elseif {{invoiceList' value.untreadPost}}==1&&empty({{invoiceList' value.untreadNumber}}) -->
                                    	未填写快递
                                    <!-- elseif !empty({{invoiceList' value.untreadNumber}}) -->
                                    {{invoiceList' value.untreadCompany}}:
                                    <a href="#shipping" title="{{invoiceList' value.untreadItems}}" node-express="untread" data-toggle="modal">{{invoiceList' value.untreadNumber}}</a> 
                                    <a target="_blank" href="http://www.kuaidi100.com/chaxun?com={{invoiceList' value.untreadCom}}&nu={{invoiceList' value.untreadNumber}}">查询快递</a> 
                                    <!-- endif -->
                                    </td>
                                    <td>
                                    <div class="btn-group">
                                    <a class="button btn-inline" diss-data="{{pendingInvoice' value.iidKey}}" node-invoice="untreadInvoice"  href="#return" data-toggle="modal">确认退票</a>
                                    <a class="button btn-gray btn-inline" href="javascript:if(window.confirm('确认撤回申请?'))window.location='/invoiceUntreadRecallDo/{{invoiceList' value.iidKeyK}}'" data-toggle="modal">退回申请</a>
                                    </div>
                                    </td>
                                </tr>
                                <!-- endloop -->
								</tbody>
							</table>
							<!-- else -->
							<blockquote><p class="colGray">暂时没有需要邮寄的发票</p></blockquote>
							<!-- endif -->
						</div>
						<div class="clearfix">
							
							<legend><div class="fR"><a href="/invoiceUntreadAchieve">查看更多</a></div>最近退票</legend>
							<!-- if !empty({{establishedInvoice}}) -->
							<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">快递信息</th><th class="taC">确认退票</th>
								<th class="taC" width="90">负票抵销</th>
								</tr>
								
								<!-- loop establishedInvoice -->
                                <tr>
                                    <td><a href="#invdetail" node-invoice='INFO' data-isKey="{{invoiceList' value.iidKeyK}}" data-toggle="modal">{{invoiceList' value.invoiceSerial}}</a></td>
                                    <td>
                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
                                   	{{invoiceList' value.invoiceCompany}}
                                    <!-- else -->
                                    {{invoiceList' value.invoiceTitle}}
                                    <!-- endif -->
                                    </td>
                                    <td>
                                    <!-- if !empty({{invoiceList' value.invoiceType}}) -->
                                    <b>￥{{invoiceList' value.invoicePrice}}</b><sup>专</sup>
                                    <!-- else -->
                                    <b>￥{{invoiceList' value.invoicePrice}}</b>
                                    <!-- endif -->
                                    </td>
                                    <td>{{invoiceList' value.categoryName}}{{invoiceList' value.userName}} {{invoiceList' value.date}}</td>
                                    <td>{{invoiceList' value.untreadCompany}}:
                                    <a href="#shipping" title="{{invoiceList' value.untreadItems}}" node-express="untread" data-toggle="modal">{{invoiceList' value.untreadNumber}}</a> 
                                    <a target="_blank" href="http://www.kuaidi100.com/chaxun?com={{invoiceList' value.untreadCom}}&nu={{invoiceList' value.untreadNumber}}">查询快递</a> </td>
                                    <td>
                                    {{establishedInvoice' value.OperationLog.username}} {{establishedInvoice' value.OperationLog.date}}
                                    </td>
                                    <td>
                                    	<!-- if {{establishedInvoice' value.lossShow}} -->
	                                    	<!-- if {{establishedInvoice' value.lossIid}}==0 -->
	                                    	<a class="button btn-block" href="#request" node-invoiceLoss='INFO' data-isKey="{{establishedInvoice' value.iidKeyK}}" data-toggle="modal">申请打印</a>
	                                    	<!-- else -->
	                                    	<a href="#invdetail" node-invoice='INFO' data-isKey="{{invoiceList' value.lossDetail.iidKeyK}}" data-toggle="modal">{{invoiceList' value.lossDetail.invoiceSerial}}</a>
	                                    	<!-- endif -->
                                    	<!-- else -->
                                   		当月退票
                                   		<!-- endif -->
                                    </td>
                                </tr>
                                <!-- endloop -->
								</tbody>
							</table>
							<!-- else -->
							<blockquote><p class="colGray">暂时没有已邮寄的发票</p></blockquote>
							<!-- endif -->
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<div loading-msg='true' style="position:absolute;  left:50%;  top:50%;  "></div>
<div class="modal  fade" id="invdetail">
	<div id="nc"></div>
</div>
	
	

<div class="modal hide fade" id="request">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
		
		<form action="/invoiceLossDo" method="post" name="receivablesInvoiceBind">
			<input type="hidden" name="iidKey" id="inKey" value="">
			<div class="modal-header">
				<h3>打印信息</h3>
			</div>
			<div class="modal-body saeaList">
				
				<div id="irtc"></div>
			</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>
		</form>
		</div>
	</div>
</div>
	
	
	
	
	
	
	<!--弹出退票确认-->
<div class="modal hide fade" id="return">
<form action="/invoiceUntreadEstablishedDo" method="post" name="untreadInvoice">
	<input type="hidden" name='untreadIidKey' value="">
	<div class="modal-dialog">
		<div class="modal-content">
    <div class="modal-header">
    <h3>邮寄物品</h3>
    </div>
    <div class="modal-body">

		若发票是邮寄回来的，请确认已经接收到发票。

	</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="shipping">
	<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">退票邮寄物品</th>
			</tr>
			<tr>
				<td node-express="msg">发票</td>
			</tr>
			</tbody>
		</table>
		
    </div>
	<div class="modal-footer">
	    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
	</div>
			</div></div>
</div>
    <!--邮寄-->
<script type="text/javascript">autoFlashHeight();</script>	
</body>