瀏覽代碼

部分甲供

chenshilong 7 年之前
父節點
當前提交
7c2bd71f08

+ 10 - 2
web/building_saas/main/js/models/calc_program.js

@@ -469,8 +469,16 @@ let calcTools = {
                 }
             }
             else {
-                if (supplyGLJsIdx[glj.projectGLJID]) {
-                    sum = (sum + glj.basePrice * glj.quantity).toDecimal(decimalObj.process);
+                let tempSGLJ = supplyGLJsIdx[glj.projectGLJID];
+                if (tempSGLJ) {
+                    // 处理部分甲供
+                    if (baseName.includes('甲供') && (tempSGLJ.supply == supplyType.BFJG)){
+                        let Q = tempSGLJ.quantity ? tempSGLJ.quantity : 1;
+                        let X = tempSGLJ.supply_quantity / Q;
+                        sum = (sum + glj.basePrice * glj.quantity * X).toDecimal(decimalObj.process);
+                    }
+                    else
+                        sum = (sum + glj.basePrice * glj.quantity).toDecimal(decimalObj.process);
                 }
             };
 

+ 2 - 0
web/building_saas/main/js/models/project_glj.js

@@ -101,6 +101,8 @@ ProjectGLJ.prototype.testGLJs = function () {
          let o = new Object();
          o.name = glj.name;
          o.supply = glj.supply;
+         o.quantity = glj.quantity;
+         o.supply_quantity = glj.supply_quantity;
          gljs.push(o);
     };
     return gljs;

+ 3 - 3
web/building_saas/main/js/views/project_view.js

@@ -47,9 +47,9 @@ var projectObj = {
 
         // 基数
         // node.data.isSubcontract = true;
-        /*node.data.gljList = project.ration_glj.getGljArrByRation(node.data.ID);
-        let bname = '甲定额基价材料费';
-        projectObj.testDisplay(bname, rationCalcBases[bname](node));*/
+        node.data.gljList = project.ration_glj.getGljArrByRation(node.data.ID);
+        let bname = '甲定额基价材料费';
+        projectObj.testDisplay(bname, rationCalcBases[bname](node));
 
     },
     refreshBaseActn: function (tree) {