Browse Source

工程量清单项目新建问题

zhongzewei 7 years atrás
parent
commit
70f556f69f

+ 6 - 0
modules/pm/models/project_model.js

@@ -181,6 +181,12 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
                     data.updateData.property.zanguCalcMode = 0;
                     //计算选项
                     data.updateData.property.calcOptions = calcOptions;
+                    if (data.updateData.property.valuationType == 'bill') {//价差预备费
+                        //年造价增涨率
+                        data.updateData.property.costGrowthRate = 0;
+                        //增涨计费年限
+                        data.updateData.property.growthPeriod = 0;
+                    }
                     //安装增加费
                     if(data.updateData.property.isInstall == true || data.updateData.property.isInstall=='true'){//判断是否安装工程
                         await installationFacade.copyInstallationFeeFromLib(data.updateData.ID,data.updateData.property.engineering_id);

+ 1 - 1
modules/users/models/compilation_model.js

@@ -61,7 +61,7 @@ class CompilationModel extends BaseModel {
             let enableValuation = [];
             for (let index in compilationData.ration_valuation) {
                 if (compilationData.ration_valuation[index].enable) {
-                    enableValuation.push(compilationData.bill_valuation[index]);
+                    enableValuation.push(compilationData.ration_valuation[index]);
                 }
             }
             compilationData.ration_valuation = enableValuation;

+ 1 - 2
web/building_saas/main/js/models/calc_base.js

@@ -362,8 +362,7 @@ let cbTools = {
             return cbAnalyzer.standar(data.name) === cbAnalyzer.standar(name);
         });
         if (!matchData) {
-            return 0;//--temp
-            //throw `计算基数{${name}}不存在累进区间数据`;
+            throw `计算基数{${name}}不存在累进区间数据`;
         }
         let progression = matchData.progression;
         //获取区间中的最小值(0, 10] = 0

+ 0 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -2524,7 +2524,6 @@ function AddTender() {
         }
         let unitPriceFileObj = getAddTenderFile(tenderName, $('#unit-price'), $("#unit-price").children());
         let feeFileObj = getAddTenderFile(tenderName, $('#tender-fee-rate'), $("#tender-fee-rate").children());
-
         let valuation = $("#valuation").val();
         /*if(!valuation || valuation === ''){
             setDangerInfo($('#valuation-info'), '请选择计价规则');