Quellcode durchsuchen

项目信息:修改‘建筑面积或规模’、‘咨询标的额(万元)’、‘土建单位造价’、‘安装单位造价’、‘其中土建百分比’、‘其中安装百分比’进行数据关联修改

user5 vor 4 Jahren
Ursprung
Commit
8285c3d08a

+ 28 - 5
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsForm.jsp

@@ -227,20 +227,43 @@
             }
         }
 
+        //计数计算方法
         function getBudlingFees() {
+            $("#unitFees").val('');
             $("#buildingPercent").val('');
             $("#buildingUnitFees").val('');
+            $("#installPercent").val('');
+            $("#installUnitFees").val('');
             var totalFee = $("#totalFees").val();
             var budFee = $("#buildingFees").val();
+            var insFee = $("#installFees").val();
             var count = $("#buildingScale").val();
             if(totalFee != '') {
                 var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+                var ins = Math.round(parseInt(insFee) / parseInt(totalFee) * 100 * 100) / 100;
             }
             if(count != '') {
                 var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+                var insFe = Math.round(parseInt(insFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            if(count != '' && totalFee != '') {
+                var cFee = Math.round(parseInt(totalFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            if(!isNaN(cFee)){
+                $("#unitFees").val(cFee);
+            }
+            if(!isNaN(p)){
+                $("#buildingPercent").val(p);
+            }
+            if(!isNaN(pp)){
+                $("#buildingUnitFees").val(pp);
+            }
+            if(!isNaN(ins)){
+                $("#installPercent").val(ins);
+            }
+            if(!isNaN(insFe)){
+                $("#installUnitFees").val(insFe);
             }
-            $("#buildingPercent").val(p);
-            $("#buildingUnitFees").val(pp);
         }
 
         function getInstallFees() {
@@ -759,7 +782,7 @@
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label double-line">建筑面积或规模:</label>
                     <div class="layui-input-block">
-                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input number" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -783,7 +806,7 @@
                 <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="getFee()"/>
+                        <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input number" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -795,7 +818,7 @@
                 <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="getInstallFees()"/>
+                        <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">

+ 28 - 5
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsModify.jsp

@@ -187,20 +187,43 @@
             }
         }
 
+        //计数计算方法
         function getBudlingFees() {
+            $("#unitFees").val('');
             $("#buildingPercent").val('');
             $("#buildingUnitFees").val('');
+            $("#installPercent").val('');
+            $("#installUnitFees").val('');
             var totalFee = $("#totalFees").val();
             var budFee = $("#buildingFees").val();
+            var insFee = $("#installFees").val();
             var count = $("#buildingScale").val();
             if(totalFee != '') {
                 var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+                var ins = Math.round(parseInt(insFee) / parseInt(totalFee) * 100 * 100) / 100;
             }
             if(count != '') {
                 var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+                var insFe = Math.round(parseInt(insFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            if(count != '' && totalFee != '') {
+                var cFee = Math.round(parseInt(totalFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            if(!isNaN(cFee)){
+                $("#unitFees").val(cFee);
+            }
+            if(!isNaN(p)){
+                $("#buildingPercent").val(p);
+            }
+            if(!isNaN(pp)){
+                $("#buildingUnitFees").val(pp);
+            }
+            if(!isNaN(ins)){
+                $("#installPercent").val(ins);
+            }
+            if(!isNaN(insFe)){
+                $("#installUnitFees").val(insFe);
             }
-            $("#buildingPercent").val(p);
-            $("#buildingUnitFees").val(pp);
         }
 
         function getInstallFees() {
@@ -517,7 +540,7 @@
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label double-line">建筑面积或规模:</label>
                     <div class="layui-input-block">
-                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input number" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -541,7 +564,7 @@
                 <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="getFee()"/>
+                        <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input number" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -553,7 +576,7 @@
                 <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="getInstallFees()"/>
+                        <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">

+ 28 - 5
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsForm.jsp

@@ -234,20 +234,43 @@
             }
         }
 
+        //计数计算方法
         function getBudlingFees() {
+            $("#unitFees").val('');
             $("#buildingPercent").val('');
             $("#buildingUnitFees").val('');
+            $("#installPercent").val('');
+            $("#installUnitFees").val('');
             var totalFee = $("#totalFees").val();
             var budFee = $("#buildingFees").val();
+            var insFee = $("#installFees").val();
             var count = $("#buildingScale").val();
             if(totalFee != '') {
                 var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+                var ins = Math.round(parseInt(insFee) / parseInt(totalFee) * 100 * 100) / 100;
             }
             if(count != '') {
                 var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+                var insFe = Math.round(parseInt(insFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            if(count != '' && totalFee != '') {
+                var cFee = Math.round(parseInt(totalFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            if(!isNaN(cFee)){
+                $("#unitFees").val(cFee);
+            }
+            if(!isNaN(p)){
+                $("#buildingPercent").val(p);
+            }
+            if(!isNaN(pp)){
+                $("#buildingUnitFees").val(pp);
+            }
+            if(!isNaN(ins)){
+                $("#installPercent").val(ins);
+            }
+            if(!isNaN(insFe)){
+                $("#installUnitFees").val(insFe);
             }
-            $("#buildingPercent").val(p);
-            $("#buildingUnitFees").val(pp);
         }
 
         function getInstallFees() {
@@ -769,7 +792,7 @@
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label double-line">建筑面积或规模:</label>
                     <div class="layui-input-block">
-                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input number" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -793,7 +816,7 @@
                 <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="getFee()"/>
+                        <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input number" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -805,7 +828,7 @@
                 <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="getInstallFees()"/>
+                        <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">

+ 28 - 5
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsModify.jsp

@@ -187,20 +187,43 @@
             }
         }
 
+        //计数计算方法
         function getBudlingFees() {
+            $("#unitFees").val('');
             $("#buildingPercent").val('');
             $("#buildingUnitFees").val('');
+            $("#installPercent").val('');
+            $("#installUnitFees").val('');
             var totalFee = $("#totalFees").val();
             var budFee = $("#buildingFees").val();
+            var insFee = $("#installFees").val();
             var count = $("#buildingScale").val();
             if(totalFee != '') {
                 var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+                var ins = Math.round(parseInt(insFee) / parseInt(totalFee) * 100 * 100) / 100;
             }
             if(count != '') {
                 var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+                var insFe = Math.round(parseInt(insFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            if(count != '' && totalFee != '') {
+                var cFee = Math.round(parseInt(totalFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            if(!isNaN(cFee)){
+                $("#unitFees").val(cFee);
+            }
+            if(!isNaN(p)){
+                $("#buildingPercent").val(p);
+            }
+            if(!isNaN(pp)){
+                $("#buildingUnitFees").val(pp);
+            }
+            if(!isNaN(ins)){
+                $("#installPercent").val(ins);
+            }
+            if(!isNaN(insFe)){
+                $("#installUnitFees").val(insFe);
             }
-            $("#buildingPercent").val(p);
-            $("#buildingUnitFees").val(pp);
         }
 
         function getInstallFees() {
@@ -517,7 +540,7 @@
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label double-line">建筑面积或规模:</label>
                     <div class="layui-input-block">
-                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input number" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -541,7 +564,7 @@
                 <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="getFee()"/>
+                        <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input number" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -553,7 +576,7 @@
                 <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="getInstallFees()"/>
+                        <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getBudlingFees()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">