<%@ 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(obj){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
              if(obj == 2){
                  $("#inputForm").attr("action","${ctx}/workcontractrecord/workContractRecord/store");
              }else{
                  $("#inputForm").attr("action","${ctx}/workcontractrecord/workContractRecord/save");
              }
			  $("#inputForm").submit();
			  return true;
		  }else {
              parent.layer.msg("信息未填写完整!", {icon: 5});
          }
		  return false;
		}
		$(document).ready(function() {
			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>
<div class="single-form">
	<div class="container view-form">
		<form:form id="inputForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsrevise/workReceiptsRevise/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>

			<div class="form-group layui-row first lw8">
				<div class="form-group-label"><h2>基础信息</h2></div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">调整部门：</label>
					<div class="layui-input-block with-icon">
						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.office.name}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">调整编号：</label>
					<div class="layui-input-block">
						<input  htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.officeNum}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>调整日期：</label>
					<div class="layui-input-block">
						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy年MM月dd日" type="date" dateStyle="full"/>"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">调整人：</label>
					<div class="layui-input-block">
						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.userName}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>调整类型：</label>
					<div class="layui-input-block">
						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${fns:getDictLabel(workReceiptsRevise.reviseType, 'revise_type','')}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">调出合同：</label>
					<div class="layui-input-block">
						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.workContractInfo.name}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">调入部门：</label>
					<div class="layui-input-block">
						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.inreviseOffice.name}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>调整金额：</label>
					<div class="layui-input-block">
						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatNumber value="${workReceiptsRevise.reviseMoney}" pattern="#,#00.00"/>"/>

					</div>
				</div>
				<div class="layui-item layui-col-sm12  with-textarea">
					<label class="layui-form-label">说明：</label>
					<div class="layui-input-block">
						<textarea  htmlEscape="false" rows="4" readonly="true"    class="form-control ">${workReceiptsRevise.remarks}</textarea>
					</div>
				</div>
			</div>
			<div class="form-group layui-row page-end"></div>
		</form:form>
	</div>
</div>
</body>
</html>