<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>施工交底管理</title>
	<meta name="decorator" content="ani"/>
	<!-- SUMMERNOTE -->
	<%@include file="/webpage/include/summernote.jsp" %>
	<script type="text/javascript">

		$(document).ready(function() {
			jp.ajaxForm("#inputForm",function(data){
				if(data.success){
					jp.success(data.msg);
					jp.go("${ctx}"+ data.body.targetUrl);
				}else{
					jp.error(data.msg);
					$("#inputForm").find("button:submit").button("reset");
				}
			});


			$('#acceptDate').datetimepicker({
				format: "YYYY-MM-DD HH:mm:ss"
			});
			$('#examineDate').datetimepicker({
				format: "YYYY-MM-DD HH:mm:ss"
			});
			//富文本初始化
			$('#reason').summernote({
				height: 300,
				lang: 'zh-CN',
				callbacks: {
					onChange: function(contents, $editable) {
						$("input[name='reason']").val($('#reason').summernote('code'));//取富文本的值
					}
				}
			});

			$("#${id}Button, #${id}Name").click(function(){
				// 是否限制选择，如果限制，设置为disabled
				if ($("#${id}Button").hasClass("disabled")){
					return true;
				}
			});

			$("#${id}DelButton").click(function(){
				// 是否限制选择，如果限制，设置为disabled
				if ($("#${id}Button").hasClass("disabled")){
					return true;
				}
				// 清除
				$("#${id}Id").val("");
				$("#${id}Name").val("");
				$("#${id}Name").focus();

			});
		});
	</script>
</head>
<body>
<div class="wrapper wrapper-content">
	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-primary">
				<div class="panel-heading">
					<h3 class="panel-title">
						<a class="panelButton"  href="#"  onclick="history.go(-1)"><i class="ti-angle-left"></i> 返回</a>
					</h3>
				</div>
				<div class="panel-body">
					<form:form id="inputForm" modelAttribute="uploadImages" action="${ctx}/managementcenter/upload/uploadSave" 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" />
						<div class="form-group text-center">
							<h3> 施工交底申请</h3>
						</div>
						<table class="table table-bordered">
							<tbody>
							<tr>
								<td class="width-15 active"><label class="pull-right"><font color="red">*</font>申请人：</label></td>
								<td class="width-35">
									<input type='text'  name="userName" class="form-control required"  value="${construction.userName}"/>
								</td>
								<td class="width-15 active"><label class="pull-right"><font color="red">*</font>文件上传：</label></td>
								<td class="width-35">
									<sys:fileUpload  path="pic" fileNumLimit="50" fileSizeLimit="50" value="${testPic.pic}" type="file" uploadPath="/list"></sys:fileUpload>
								</td>
							</tr>
							</tbody>
						</table>
						<div class="form-group">
							<div class="col-lg-3"></div>
								<div class="col-lg-6">
									<div class="form-group text-center">
										<div>
											<button class="btn btn-primary btn-block btn-lg btn-parsley" data-loading-text="正在提交...">提 交</button>
										</div>
									</div>
								</div>
						</div>
					</form:form>
					<c:if test="${not empty uploadImages.id}">
						<act:flowChart procInsId="${uploadImages.act.procInsId}"/>
						<act:histoicFlow procInsId="${uploadImages.act.procInsId}" />
					</c:if>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>