<%@ 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" %>
	<%@include file="economicsDesignChange.js"%>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#agree").click(function () {
				var currentFileValues = $("input[name='pic']").val();
				if (currentFileValues==""||currentFileValues==null) {
					jp.error("请上传文件");
				}else {
					jp.prompt("上传完成", function (message) {
						jp.post("${ctx}/act/task/notSignUpload",
							{
								"taskId":"${uploadImages.act.taskId}",
								"taskName":"${uploadImages.act.taskName}",
								"taskDefKey":"${uploadImages.act.taskDefKey}",
								"procInsId":"${uploadImages.act.procInsId}",
								"procDefId":"${uploadImages.act.procDefId}",
								"flag":"yes",
								"pic":currentFileValues,
								"comment":window.encodeURI(message)
							},
							function (data) {
								if(data.success){
									jp.success(data.msg);
									jp.go("${ctx}/act/task/todo")
								}
							})
					});
				}
			});

			$("#no").click(function () {
				jp.prompt("驳回意见", function (message) {
					jp.post("${ctx}/act/task/notSignUpload",
						{
							"taskId":"${uploadImages.act.taskId}",
							"taskName":"${uploadImages.act.taskName}",
							"taskDefKey":"${uploadImages.act.taskDefKey}",
							"procInsId":"${uploadImages.act.procInsId}",
							"procDefId":"${uploadImages.act.procDefId}",
							"flag":"no",
							"comment":window.encodeURI(message)
						},
						function (data) {
							if(data.success){
								jp.success(data.msg);
								jp.go("${ctx}/act/task/todo")
							}
						})
				});
			});
		});
	</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">
					<table id="testPicTable"   data-toolbar="#toolbar"></table>
					<form:form id="inputForm" modelAttribute="uploadImages" 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" />
						<input type="hidden" id="procInsId" name="procInsId" value="${uploadImages.act.procInsId}"/>
						<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" fileNumLimit="50" fileSizeLimit="50" value="${testPic.pic}" type="file" uploadPath="/list"></sys:fileUpload>
								</td>
							</tr>
							</tbody>
						</table>
					</form:form>
					<div class="row">
						<div class="col-sm-3"></div>
						<div class="col-sm-6">
							<div class="form-group text-center">
								<input id="agree" class="btn  btn-primary btn-lg btn-parsley" type="submit" value="审核" />&nbsp;
								<input id="no" class="btn  btn-primary btn-lg btn-danger" type="submit" value="驳回" />&nbsp;
							</div>
						</div>
					</div>
					<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>