<%@ 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() {
			$('#startDate').datetimepicker({
				format: "YYYY-MM-DD"
			});
			$('#endDate').datetimepicker({
				format: "YYYY-MM-DD"
			});
		});
		function save() {
            let isValidate = jp.validateForm('#inputForm');//校验表单
			let formData = $('#inputForm').serialize();
			let startTime = $('#startTime').val();
			let stopTime = $('#stopTime').val();
            if(!isValidate){
                return false;
			}else{
                jp.loading();
				jp.post("${ctx}/finance/budget/save", formData + "&startTime=" + startTime + "&stopTime=" + stopTime, function (data) {
					if (data.success) {
						jp.getParent().refresh();
						let 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="projectBudget" class="form-horizontal">
		<form:hidden path="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">
						<form:input path="projectName" htmlEscape="false"    class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">项目编码：</label></td>
					<td class="width-35">
						<form:input readonly="true" path="projectId" 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="designUnit" htmlEscape="false"    class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">施工单位：</label></td>
					<td class="width-35">
						<form:input path="constructionUnit" 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="buildingAddress" htmlEscape="false"    class="form-control"/>
					</td>
					<td class="width-15 active"><label class="pull-right">建筑属性：</label></td>
					<td class="width-35">
						<form:input path="buildingProperty" 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="totalInvestment" htmlEscape="false"    class="form-control number"/>
					</td>
					<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 required" id="startTime"  value="<fmt:formatDate value="${projectBudget.startTime}" 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='endDate'>
							<input type='text'  name="endDate" class="form-control required" id="stopTime"  value="<fmt:formatDate value="${projectBudget.stopTime}" pattern="yyyy-MM-dd"/>"/>
							<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			            </span>
						</div>
					</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">
						<form:input path="constructionCost" htmlEscape="false"    class="form-control number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">安装费：</label></td>
					<td class="width-35">
						<form:input path="installationCost" htmlEscape="false"    class="form-control number"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">设备购置费：</label></td>
					<td class="width-35">
						<form:input path="equipmentCost" htmlEscape="false"    class="form-control number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">主材费：</label></td>
					<td class="width-35">
						<form:input path="materialCost" htmlEscape="false"    class="form-control number"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">设计费：</label></td>
					<td class="width-35">
						<form:input path="designCost" htmlEscape="false"    class="form-control number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">监理费：</label></td>
					<td class="width-35">
						<form:input path="supervisorCost" htmlEscape="false"    class="form-control number"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">项目前期工作费：</label></td>
					<td class="width-35">
						<form:input path="preliminaryWorkCost" htmlEscape="false"    class="form-control number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">线路施工赔偿费：</label></td>
					<td class="width-35">
						<form:input path="compensationCost" htmlEscape="false"    class="form-control number"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">法人管理费：</label></td>
					<td class="width-35">
						<form:input path="administrationCost" htmlEscape="false"    class="form-control number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">设计合同折扣：</label></td>
					<td class="width-35">
						<form:input path="designContractDiscount" htmlEscape="false"    class="form-control number"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">设计典设折扣：</label></td>
					<td class="width-35">
						<form:input path="designTypicalDiscount" htmlEscape="false"    class="form-control number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">设计含税税率</label></td>
					<td class="width-35">
						<form:input path="designTaxRate" htmlEscape="false"    class="form-control number"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">监理合同折扣：</label></td>
					<td class="width-35">
						<form:input path="supervisorContractDiscount" htmlEscape="false"    class="form-control number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">监理含税税率</label></td>
					<td class="width-35">
						<form:input path="supervisorTaxRate" htmlEscape="false"    class="form-control number"/>
					</td>
				</tr>
		 	</tbody>
		</table>
	</form:form>
</body>
</html>