<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>图片管理管理</title>
	<meta name="decorator" content="ani"/>
	<script type="text/javascript">

		$(document).ready(function() {

		});
		function save() {
			var isValidate = jp.validateForm('#inputForm');//校验表单
			var path = $("input[name='pic']").val();
			var procInsId = $("#procInsId").val();
			var id = $("#xmImgId").val();
			// alert(path);
			if(!isValidate){
				return false;
			}else{
				jp.loading();
				jp.post("${ctx}/managementcenter/upload/save",
						{
							"path": path,
							"procInsId":procInsId,
							"id":id
						}
						,function(data){
					if(data.success){
						jp.getParent().refresh();
						var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
						parent.layer.close(dialogIndex);
						jp.success(data.msg)

					}else{
						jp.error(data.msg);
					}
				})
			}
		}
	</script>
</head>
<body class="bg-white">
		<form:form id="inputForm" modelAttribute="uploadImages" class="form-horizontal">
		<form:hidden path="id"/>
			<input id="procInsId" type="hidden" value="${uploadImages.procInsId}">
			<input id="xmImgId" type="hidden" value="${uploadImages.id}">
			<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">
							<sys:fileUpload  path="pic"  value="${uploadImages.path}" type="file" uploadPath="/list"/>
						</td>
					</tr>
				</tbody>
			</table>
		</form:form>
</body>
</html>