|
@@ -47,6 +47,13 @@
|
|
|
top.layer.alert('请选择委托方联系人!', {icon: 0});
|
|
|
return;
|
|
|
}
|
|
|
+ var startDate = new Date($("#startDate").val());
|
|
|
+ var endingDate = new Date($("#endingDate").val());
|
|
|
+
|
|
|
+ if(startDate.getTime() > endingDate.getTime()){
|
|
|
+ parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
/*if($("#workConstructionLinkmanList tr").length==0){
|
|
|
top.layer.alert('请至少选择一个施工方联系人!', {icon: 0});
|
|
|
return;
|
|
@@ -56,11 +63,22 @@
|
|
|
top.layer.msg('附件信息未上传完成,请等待!', {icon: 0});
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ var startDate = new Date($("#startDate").val());
|
|
|
+ var endingDate = new Date($("#endingDate").val());
|
|
|
+
|
|
|
+ if(startDate.getTime() > endingDate.getTime()){
|
|
|
+ parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
if(i==2){
|
|
|
$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectRecords/tstore");
|
|
|
}
|
|
|
$("#inputForm").submit();
|
|
|
return true;
|
|
|
+ }else{
|
|
|
+ parent.layer.msg("信息未填写完整!", {icon: 5});
|
|
|
}
|
|
|
|
|
|
return false;
|
|
@@ -597,6 +615,54 @@
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ function getApprovalFee() {
|
|
|
+ //总价
|
|
|
+ var af = $("#estimateTotalFees").val();
|
|
|
+ if(af !=''){
|
|
|
+ $("#estimateTotalFees").val(af)
|
|
|
+ }
|
|
|
+ $("#buildingFees").val("");
|
|
|
+ $("#installFees").val("");
|
|
|
+ $("#buildingPercent").val("");
|
|
|
+ $("#installPercent").val("");
|
|
|
+ }
|
|
|
+
|
|
|
+ function getInstallFee() {
|
|
|
+ var af = $("#estimateTotalFees").val();
|
|
|
+ //安装
|
|
|
+ var inf = $("#installFees").val();
|
|
|
+ if(inf != ''&& af !=''){
|
|
|
+ var hf = parseInt(af)-parseInt(inf);
|
|
|
+ var rate = (Math.round(parseInt(inf) / parseInt(af) * 100) / 100 * 100).toFixed(2);
|
|
|
+ $("#installPercent").val(rate);
|
|
|
+ $("#buildingFees").val(hf);
|
|
|
+ bf = hf;
|
|
|
+ var bRate = (Math.round(parseInt(hf) / parseInt(af) * 100) / 100 * 100).toFixed(2);
|
|
|
+ $("#buildingPercent").val(bRate);
|
|
|
+ }
|
|
|
+ if(inf == ''|| af ==''){
|
|
|
+ $("#installPercent").val("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function getBuildingFee() {
|
|
|
+ var af = $("#estimateTotalFees").val();
|
|
|
+ //土建
|
|
|
+ var bf = $("#buildingFees").val();
|
|
|
+ if(bf != ''&& af !=''){
|
|
|
+ var hf = parseInt(af)-parseInt(bf);
|
|
|
+ var rate = (Math.round(parseInt(bf) / parseInt(af) * 100) / 100 * 100).toFixed(2);
|
|
|
+ $("#buildingPercent").val(rate);
|
|
|
+ $("#installFees").val(hf);
|
|
|
+ inf = hf;
|
|
|
+ var inRate = (Math.round(parseInt(hf) / parseInt(af) * 100) / 100 * 100).toFixed(2);
|
|
|
+ $("#installPercent").val(inRate);
|
|
|
+ }
|
|
|
+ if(bf == ''|| af ==''){
|
|
|
+ $("#buildingPercent").val("");
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -766,13 +832,13 @@
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
|
<label class="layui-form-label double-line"><span class="require-item">*</span>工作开始日期:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <input class="laydate-icondate required form-control layui-input layer-date laydate-icon" id="startDate" name="startDate" value="<fmt:formatDate value="${ruralProjectRecords.startDate}" pattern="yyyy-MM-dd"/>">
|
|
|
+ <input class="laydate-icondate required form-control layui-input layer-date laydate-icon" readonly="readonly" id="startDate" name="startDate" value="<fmt:formatDate value="${ruralProjectRecords.startDate}" pattern="yyyy-MM-dd"/>">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
|
<label class="layui-form-label double-line"><span class="require-item">*</span>工作结束日期:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <input class="laydate-icondate required form-control layui-input layer-date laydate-icon" id="endingDate" name="endingDate" value="<fmt:formatDate value="${ruralProjectRecords.endingDate}" pattern="yyyy-MM-dd"/>">
|
|
|
+ <input class="laydate-icondate required form-control layui-input layer-date laydate-icon" readonly="readonly" id="endingDate" name="endingDate" value="<fmt:formatDate value="${ruralProjectRecords.endingDate}" pattern="yyyy-MM-dd"/>">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
@@ -829,25 +895,25 @@
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
|
<label class="layui-form-label double-line"><span class="require-item">*</span>预估总投资额(万元):</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input path="estimateTotalFees" htmlEscape="false" id="estimateTotalFees" class="form-control required layui-input number"/>
|
|
|
+ <form:input path="estimateTotalFees" htmlEscape="false" id="estimateTotalFees" class="form-control required layui-input number" onchange="getApprovalFee()"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
|
<label class="layui-form-label double-line">咨询标的额(万元):</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input number" onchange="getBudlingFees()"/>
|
|
|
+ <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input number"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
|
<label class="layui-form-label double-line">其中土建造价(万元):</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input path="buildingFees" htmlEscape="false" id="buildingFees" class="form-control layui-input" onchange="getBudlingFees()"/>
|
|
|
+ <form:input path="buildingFees" htmlEscape="false" id="buildingFees" class="form-control layui-input" onchange="getBuildingFee()"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
|
<label class="layui-form-label double-line">其中安装造价(万元):</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getBudlingFees()"/>
|
|
|
+ <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getInstallFee()"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|