<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>项目前期阶段管理</title>
	<meta name="decorator" content="ani"/>
	<%@ include file="/webpage/include/bootstraptable.jsp" %>
	<style type="text/css">
		/* 下边两行是去掉input 输入框右边的上下箭头按钮*/
		.deal::-webkit-inner-spin-button {
			-webkit-appearance: none !important;
		}
		.deal::-webkit-outer-spin-button {
			-webkit-appearance: none !important;
		}
		input[type="number"]{
			-moz-appearance:textfield;
		}
	</style>
	<script type="text/javascript">

		$(document).ready(function() {
	        $('#dateOfApproval').datetimepicker({
				 format: "YYYY-MM-DD"
		    });
			$('#approvalDate').datetimepicker({
				format: "YYYY-MM-DD"
			});
			$('#milestoneStartDate').datetimepicker({
				format: "YYYY-MM-DD"
			});
			$('#milestoneCommissioningDate').datetimepicker({
				format: "YYYY-MM-DD"
			});
			$('#startDate').datetimepicker({
				format: "YYYY-MM-DD"
			});
			$('#internalControl').datetimepicker({
				format: "YYYY-MM-DD"
			});
			$('#earliestArrival').datetimepicker({
				format: "YYYY-MM-DD"
			});
			$('#arrivalPlan').datetimepicker({
				format: "YYYY-MM-DD"
			});
		});

		function save() {
            var isValidate = jp.validateForm('#inputForm');//校验表单
            if(!isValidate){
                return false;
			}else{
                jp.loading();
                jp.post("${ctx}/filing/earlyStage/save",$('#inputForm').serialize(),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);
                    }
                })
			}

        }

		function noFue(val){
			document.getElementById('approvedAmount').value = val >= 0 ? val : 0;
		}

		function noFue2(val){
			document.getElementById('staticInvestment').value = val >= 0 ? val : 0;
		}

		function noFue3(val){
			document.getElementById('dynamicInvestment').value = val >= 0 ? val : 0;
		}

		function noFue4(val){
			document.getElementById('constructionScaleVA').value = val >= 0 ? val : 0;
		}

		function noFue5(val){
			document.getElementById('constructionScaleKM').value = val >= 0 ? val : 0;
		}

		function noFue6(val){
			document.getElementById('numberOf').value = val >= 0 ? val : 0;
		}

	</script>
</head>
<body class="bg-white">
		<form:form id="inputForm" modelAttribute="earlyStage" action="${ctx}/filing/basicInformation/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<table class="table table-bordered">
		   <tbody>
				<tr>
					<td class="width-15 active"><label class="pull-right">项目编码：</label></td>
					<td class="width-35">
						<form:input path="projectCode" readonly="true" htmlEscape="false"  class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">单体编码：</label></td>
					<td class="width-35">
						<form:input path="monomerCode" readonly="true" htmlEscape="false"  class="form-control"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">项目名称：</label></td>
					<td class="width-35">
						<form:input path="entryName" readonly="true" htmlEscape="false" class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">核准文号：</label></td>
					<td class="width-35">
						<form:input path="approvalNumber" htmlEscape="false" class="form-control"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">核准日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='dateOfApproval'>
							<input type='text'  name="dateOfApproval" class="form-control"  value="<fmt:formatDate value="${earlyStage.dateOfApproval}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
						</div>
					</td>
					</td>
					<td class="width-15 active"><label class="pull-right">核准金额：</label></td>
					<td class="width-35">
						<form:input type="number" onblur="noFue(this.value)" path="approvedAmount" htmlEscape="false" rows="4" class="form-control"/>
					</td>
		  		</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">核准附件：</label></td>
					<td class="width-35">
						<sys:fileUpload path="approvedAnnex"  value="${earlyStage.approvedAnnex}" type="*" uploadPath="/photo"  readonly="false"/></td>
					</td>
					</td>
					<td class="width-15 active"><label class="pull-right">可研批复文号：</label></td>
					<td class="width-35">
						<form:input path="replyNo" htmlEscape="false" class="form-control"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">可研批复日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='approvalDate'>
							<input type='text'  name="approvalDate" class="form-control"  value="<fmt:formatDate value="${earlyStage.approvalDate}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
						</div>
					</td>
					</td>
					<td class="width-15 active"><label class="pull-right">可研静态态投资金额：</label></td>
					<td class="width-35">
						<form:input type="number" onblur="noFue2(this.value)" path="staticInvestment" htmlEscape="false" rows="4" class="form-control"/>
					</td>
				</tr>
				<tr>

					<td class="width-15 active"><label class="pull-right">可研动态投资金额：</label></td>
					<td class="width-35">
						<form:input type="number" onblur="noFue3(this.value)" path="dynamicInvestment" htmlEscape="false" rows="4" class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">可研附件：</label></td>
					<td class="width-35">
						<sys:fileUpload path="studyAppendix"  value="${earlyStage.studyAppendix}" type="*" uploadPath="/photo"  readonly="false"/></td>
					</td>
				</tr>
				<tr>

					<td class="width-15 active"><label class="pull-right">建设规模（变电容量）万伏安：</label></td>
					<td class="width-35">
						<form:input type="number" onblur="noFue4(this.value)" path="constructionScaleVA" htmlEscape="false" rows="4" class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">建设规模（线路长度）千米：</label></td>
					<td class="width-35">
						<form:input type="number" onblur="noFue5(this.value)" path="constructionScaleKM" htmlEscape="false" rows="4" class="form-control"/>
					</td>
				</tr>
				<tr>

					<td class="width-15 active"><label class="pull-right">铁塔数量/钢管杆数量：</label></td>
					<td class="width-35">
						<form:input type="number" onblur="noFue6(this.value)" path="numberOf" htmlEscape="false" rows="4" class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">导线型号及双回否型号：</label></td>
					<td class="width-35">
						<form:input path="conductorType" htmlEscape="false" class="form-control"/>
					</td>
				</tr>
				<tr>

					<td class="width-15 active"><label class="pull-right">导线型号及双回否长度：</label></td>
					<td class="width-35">
						<form:input path="conductorLength"  htmlEscape="false" class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">变压器来源新购/利旧，主变来源的变电站：</label></td>
					<td class="width-35">
						<form:input path="theSource" htmlEscape="false" class="form-control"/>
					</td>
				</tr>
				<tr>

					<td class="width-15 active"><label class="pull-right">模块化建设方案：</label></td>
					<td class="width-35">
						<form:input path="modularConstructionScheme"  htmlEscape="false" class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">工程难点描述：</label></td>
					<td class="width-35">
						<form:input path="descriptionOf"  htmlEscape="false" class="form-control"/>
					</td>
				</tr>
				<tr>

					<td class="width-15 active"><label class="pull-right">里程碑开工日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='milestoneStartDate'>
							<input type='text'  name="milestoneStartDate" class="form-control"  value="<fmt:formatDate value="${earlyStage.milestoneStartDate}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
						</div>
					</td>
					</td>
					<td class="width-15 active"><label class="pull-right">里程碑投产日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='milestoneCommissioningDate'>
							<input type='text'  name="milestoneCommissioningDate" class="form-control"  value="<fmt:formatDate value="${earlyStage.milestoneCommissioningDate}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
						</div>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">内控开工日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='startDate'>
							<input type='text'  name="startDate" class="form-control"  value="<fmt:formatDate value="${earlyStage.startDate}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
						</div>
					</td>
					</td>
					<td class="width-15 active"><label class="pull-right">内控投产日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='internalControl'>
							<input type='text'  name="internalControl" class="form-control"  value="<fmt:formatDate value="${earlyStage.internalControl}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
						</div>
					</td>
				</tr>

				<tr>

					</td>
					<td class="width-15 active"><label class="pull-right">主设备最早到货时间：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='earliestArrival'>
							<input type='text'  name="earliestArrival" class="form-control"  value="<fmt:formatDate value="${earlyStage.earliestArrival}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
						</div>
					</td>
					</td>
					<td class="width-15 active"><label class="pull-right">线路塔材到货计划：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='arrivalPlan'>
							<input type='text'  name="arrivalPlan" class="form-control"  value="<fmt:formatDate value="${earlyStage.arrivalPlan}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
						</div>
					</td>
					</td>
				</tr>
		 	</tbody>
		</table>
		</div>
		</form:form>
</body>
</html>