Chenshilong 7 سال پیش
والد
کامیت
bf5ba2641b

+ 1 - 0
modules/main/models/bills.js

@@ -30,6 +30,7 @@ let billsSchema = new Schema({
     feeRate:String,
     isFromDetail:{type: Number,default:0},//1 true 0 false
     programID: Number,
+    calcBase: String,
     // 工程量计算规则
     ruleText: String,
     // 说明

+ 3 - 1
web/building_saas/main/js/models/ration.js

@@ -105,8 +105,10 @@ var Ration = {
             var newData = {'ID': id, 'serialNo': serialNo, projectID: this.project.ID()};
             newData[project.masterField.ration] = billsID;
             newData['type'] = rType;
-            if (rType == rationType.volumePrice)
+            if (rType == rationType.volumePrice){
                 newData['subType'] = gljType.GENERAL_MATERIAL;   // 默认的量价类型为材料
+                newData['programID'] = projectInfoObj.projectInfo.property.engineering;
+            };
             return newData;
         };
 

+ 2 - 2
web/building_saas/main/js/views/main_tree_col.js

@@ -49,7 +49,7 @@ let MainTreeCol = {
             return node.sourceType === projectObj.project.Ration.getSourceType();
         },
         volumePrice: function (node) {
-            return node.sourceType === (node.data.type == rationType.volumePrice || node.data.type == rationType.gljRation);
+            return (node.data.type == rationType.volumePrice || node.data.type == rationType.gljRation);
         },
         non_bills: function (node) {
             return node.sourceType !== projectObj.project.Bills.getSourceType();
@@ -58,7 +58,7 @@ let MainTreeCol = {
             return node.sourceType !== projectObj.project.Ration.getSourceType();
         },
         non_volumePrice: function (node) {
-            return node.sourceType !== (node.data.type == rationType.volumePrice || node.data.type == rationType.gljRation);
+            return !(node.data.type == rationType.volumePrice || node.data.type == rationType.gljRation);
         },
         billsParent: function (node) {
             return node.sourceType === projectObj.project.Bills.getSourceType() && node.source.children.length > 0;