<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>退票管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }
	
		  return false;
		}
		$(document).ready(function() {
			$("#name").focus();
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body class="gray-bg">
	 <div class="ibox-content">
		<form:form id="inputForm" modelAttribute="workInvoiceDetail" action="${ctx}/workinvoicedetail/workInvoiceDetail/saveAudit" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<form:hidden path="act.taskId"/>
		<form:hidden path="act.taskName"/>
		<form:hidden path="act.taskDefKey"/>
		<form:hidden path="act.procInsId"/>
		<form:hidden path="act.procDefId"/>
		<form:hidden id="flag" path="act.flag"/>
		<sys:message content="${message}"/>
		<fieldset>
			<legend>${workInvoiceDetail.act.taskName}</legend>
			<div class="tab-content">
				<div class="tabs-container">
					<ul class="nav nav-tabs">
						<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true" >退票信息</a>
						</li>
					</ul>
				</div>
				<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
					<tbody>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>被退票号：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.number}
						</td>
						<td class="width-15 active"><label class="pull-right">退票申请编号：</label></td>
						<td class="width-35">
								${workInvoiceDetail.returnNumber}
						</td>
						<td class="width-35">
							<c:choose>
								<c:when test="${ empty workInvoiceDetail.status}">
									新添
								</c:when>
								<c:otherwise>
									${fns:getDictLabel(workInvoiceDetail.status, 'audit_state','')}
								</c:otherwise>
							</c:choose>
						</td>
					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">项目名称：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.project.projectName}
						</td>
						<td class="width-15 active"><label class="pull-right">项目编号：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.project.projectId}
						</td>

					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">合同名称：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.project.workContractInfo.name}
						</td>
						<td class="width-15 active"><label class="pull-right">所属部门：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.office.name}
						</td>
					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">委托方：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.project.workContractInfo.client.name}
						</td>
						<td class="width-15 active"><label class="pull-right">项目负责人：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.project.leaderNameStr}
						</td>
					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">发票类型：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.invoiceType}
						</td>
						<td class="width-15 active"><label class="pull-right">实际开票单位：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.client.name}
						</td>
					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">纳税人识别号：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.client.uscCode}
						</td>
						<td class="width-15 active"><label class="pull-right">地址：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.client.address}
						</td>
					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">电话：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.client.telephone}
						</td>
						<td class="width-15 active"><label class="pull-right">开户银行：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.bank}
						</td>
					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">银行账号：</label></td>
						<td class="width-35">
								${workInvoiceDetail.workInvoice.bankNumber}
						</td>
						<td class="width-15 active"><label class="pull-right">开票时间：</label></td>
						<td class="width-35">
							<fmt:formatDate value="${workInvoiceDetail.workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>
						</td>
					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">价税合计：</label></td>
						<td class="width-35">
							<fmt:formatNumber value="${workInvoiceDetail.totalMoney}" pattern="#,#00.00"/>
						</td>
						<td class="width-15 active"><label class="pull-right">税率：</label></td>
						<td class="width-35">
								${workInvoiceDetail.tax}
						</td>
					</tr>
					<tr >
						<td class="width-15 active"><label class="pull-right">金额：</label></td>
						<td class="width-35">
							<fmt:formatNumber value="${workInvoiceDetail.taxMoney}" pattern="#,#00.00"/>
						</td>
						<td class="width-15 active"><label class="pull-right">税额：</label></td>
						<td class="width-35">
							<fmt:formatNumber value="${workInvoiceDetail.taxRate}" pattern="#,#00.00"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>退票原因：</label></td>
						<td class="width-35" colspan="3">
								${workInvoiceDetail.returnReason}
						</td>
					</tr>
					</tbody>
				</table>

				<div class="tabs-container">
					<ul class="nav nav-tabs">
						<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true" style="margin-top: 15px">财务受理信息</a>
						</li>
					</ul>
				</div>
				<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
					<tbody>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>作废/退票：</label></td>
						<td class="width-35">
							<c:if test="${1 eq workInvoiceDetail.returnCancle}">
								退票
							</c:if>
							<c:if test="${2 eq workInvoiceDetail.returnCancle}">
								作废
							</c:if>
						</td>
						<td class="width-15 active"><label class="pull-right">发票号：</label></td>
						<td class="width-35">
								${workInvoiceDetail.number}
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>原票是否退回：</label></td>
						<td class="width-35">
							<c:if test="${1 eq workInvoiceDetail.returnSign}">
								是
							</c:if>
							<c:if test="${2 eq workInvoiceDetail.returnSign}">
								否
							</c:if>
						</td>
						<td class="width-15 active"><label class="pull-right">退票人：</label></td>
						<td class="width-35">
								${workInvoiceDetail.returnUser}
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>退票时间：</label></td>
						<td class="width-35">
							<fmt:formatDate value="${workInvoiceDetail.returnDate}" pattern="yyyy-MM-dd"/>
						</td>
					</tr>
					</tbody>
				</table>
			</div>
		</fieldset>
		<div class="form-actions hide">
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
		<%--<act:flowChart procInsId="${workInvoice.act.procInsId}"/>
		<act:histoicFlow procInsId="${workInvoice.act.procInsId}" />--%>
	</form:form>
	
	</div>
</body>
</html>