<%@ 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 () {
				jp.prompt("审核意见", function (message) {
					jp.post("${ctx}/act/task/auditDrawings", {
						"taskId":"${uploadImages.act.taskId}",
						"taskName":"${uploadImages.act.taskName}",
						"taskDefKey":"${uploadImages.act.taskDefKey}",
						"procInsId":"${uploadImages.act.procInsId}",
						"procDefId":"${uploadImages.act.procDefId}",
						"flag":"yes",
						"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/auditDrawings", {
								"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>
				<input type="hidden" id="procInsId" name="procInsId" value="${uploadImages.act.procInsId}"/>
				<table id="testPicTable"   data-toolbar="#toolbar"></table>
				<div class="panel-body">
					<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>