<%@ 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="humanReview.js"%>
	<script type="text/javascript">
		$(document).ready(function () {
			$("#agree").click(function () {
				var closed = true;
				var design = true;
				var noProblem = true;
				var cValue = "";
				$('input[name="favorite"]:checked').each(function(){//遍历每一个名字为interest的复选框，其中选中的执行函数
                    if ("noProblem" == $(this).val()){
						noProblem = false;
					}
					if ("design" == $(this).val()){
						design = false;
					}
					if ("closed" == $(this).val()){
						closed = false;
					}
					cValue += $(this).val()
				});
				if (closed && noProblem && design) {
					jp.error("请选择类型");
					return false;
				}
				if (!noProblem) {
					if (!design || !closed) {
						jp.error("请正确选择问题类型");
						return false;
					}
				}
				if (!closed) {
					if (!design) {
						jp.error("项目关闭不可与其它类型同时发起");
						return false;
					}
				}
				jp.prompt(" 审批意见", function (message) {
					jp.post("${ctx}/act/task/humanReview",
					{
						"taskId":"${construction.act.taskId}",
						"taskName":"${construction.act.taskName}",
						"taskDefKey":"${construction.act.taskDefKey}",
						"procInsId":"${construction.act.procInsId}",
						"procDefId":"${construction.act.procDefId}",
						"flag":cValue,
						"projectName":"${fns:unescapeHtml(construction.projectName)}",
						"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">
						<h3 class="panel-title">运行人员审核</h3>
					</h3>
				</div>
				<div class="panel-body">
					<form:form id="inputForm" modelAttribute="construction" action="${ctx}/managementcenter/divide/save"
							   method="post" class="form-horizontal">
						<form:hidden path="id"/>
						<input id="procInsId" type="hidden" value="${fns:unescapeHtml(construction.procInsId)}">
						<input type="hidden" value="${fns:unescapeHtml(construction.id)}">
						<table class="table table-bordered">
							<tbody>
							<tr>
								<td class="width-15 active"><label class="pull-right">问题类型：</label></td>
								<td class="width-35">
									<input type="checkbox" name="favorite" value="noProblem"
										   <c:if test="${noProblem}">checked="checked"</c:if>> 无问题
									<input type="checkbox" name="favorite" value="design"
										   <c:if test="${design}">checked="checked"</c:if>> 设计变更
									<input type="checkbox" name="favorite" value="closed"
										   <c:if test="${closed}">checked="checked"</c:if>> 项目关闭
								</td>
								<td class="width-15 active"><label class="pull-right">储备项目暂定名称：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.reserveProjectName)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">项目号：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.projectId)}
								</td>
								<td class="width-15 active"><label class="pull-right">项目名称：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.projectName)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">市公司：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.municipalCompany)}
								</td>
								<td class="width-15 active"><label class="pull-right"> 县公司：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.countyCompany)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">项目性质：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.projectNature)}
								</td>
								<td class="width-15 active"><label class="pull-right"> 需求单位：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.demandUnit)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">运维单位：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.operationUnit)}
								</td>
								<td class="width-15 active"><label class="pull-right"> 供电区域：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.powerSupplyArea)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">网格编号：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.gridNumber)}
								</td>
								<td class="width-15 active"><label class="pull-right"> 单元格编号：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.cellNumber)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">项目储备编号：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.projectReserveNo)}
								</td>
								<td class="width-15 active"><label class="pull-right">电网项目编号</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.gridProjectNo)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right"> ERP编号</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.erpNo)}
								</td>
								<td class="width-15 active"><label class="pull-right">建设必要性及内容：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.necessityContent)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right"> 变电站名称：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.subStationName)}
								</td>
								<td class="width-15 active"><label class="pull-right">线路名称：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.lineName)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">项目类型：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.projectType)}
								</td>
								<td class="width-15 active"><label class="pull-right">是否迎峰度夏项目：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.whetherSummer)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right"> 项目基本说明：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.basicDescription)}
								</td>
								<td class="width-15 active"><label class="pull-right">工区备注：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.basicInformation.workAreaRemarks)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">是否已实施：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.hasImplemented)}
								</td>
								<td class="width-15 active"><label class="pull-right"> 现场情况描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.sceneDescription)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">是否有实施必要性：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.isImplement)}
								</td>
								<td class="width-15 active"><label class="pull-right"> 实施无必要描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.noImplementation)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">图纸是否完整：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.whetherComplete)}
								</td>
								<td class="width-15 active"><label class="pull-right"> 图纸完整性描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.drawingDescription)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">图纸是否规范：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.whetherStandard)}
								</td>
								<td class="width-15 active"><label class="pull-right"> 图纸规范性描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.normativeDrawings)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">是否存在典设图问题：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.whetherDrawing)}
								</td>
								<td class="width-15 active"><label class="pull-right">典设图问题描述</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.problemDescription)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right"> 是否存在施工通道</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.whetherChannel)}
								</td>
								<td class="width-15 active"><label class="pull-right">施工通道情况描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.constructionDescription)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right"> 土建是否需要调整：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.civilAdjusted)}
								</td>
								<td class="width-15 active"><label class="pull-right">土建方案变更内容描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.descriptionPlans)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right">土建工作量调整内容描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.descriptionAdjustment)}
								</td>
								<td class="width-15 active"><label class="pull-right">电气方案是否需要调整：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.electricalAdjusted)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right"> 调整原因描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.adjustmentDescription)}
								</td>
								<td class="width-15 active"><label class="pull-right">自动化是否需要变更：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.doesChange)}
								</td>
							</tr>
							<tr>
								<td class="width-15 active"><label class="pull-right"> 自动化方案调整内容：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.automatedContent)}
								</td>
								<td class="width-15 active"><label class="pull-right">自动化工作内容调整：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.automatedAdjustment)}
								</td>
							</tr>
							<tr>

								<td class="width-15 active"><label class="pull-right"> 其他方案是否需要调整：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.otherAdjusted)}
								</td>
								<td class="width-15 active"><label class="pull-right">其他方案调整原因描述：</label></td>
								<td class="width-35">
										${fns:unescapeHtml(construction.disclose.descriptionReasons)}
								</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;
								</div>
							</div>
						</div>

					<c:if test="${not empty construction.id}">
						<act:flowChart procInsId="${construction.act.procInsId}"/>
						<act:histoicFlow procInsId="${construction.act.procInsId}" />
					</c:if>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>