Selaa lähdekoodia

多条机械时,机上人工费累计有错误。

chenshilong 7 vuotta sitten
vanhempi
commit
dbe2af10e9
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      web/building_saas/main/js/models/calc_program.js

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

@@ -226,12 +226,13 @@ let calcTools = {
     },
     machineLabourFee: function (gljArr) {
         if (!gljArr) return 0;
-        let result = 0, mdSum = 0;
+        let result = 0;
         for (let glj of gljArr) {
             if (glj.type == gljType.GENERAL_MACHINE) {
                 // 获取机械组成物
                 let mds = projectObj.project.composition.getCompositionByGLJ(glj);
                 if (!mds) mds = [];
+                let mdSum = 0;
                 for (let md of mds) {
                     if (md.type == gljType.MACHINE_LABOUR) {
                         let q = md["consumption"] ? md["consumption"] : 0;
@@ -938,7 +939,7 @@ class CalcProgram {
     innerCalc(treeNode, changedArr){
         let me = this;
         // 仅用作树节点显示的工料机不能参与计算。
-        if (treeNode.sourceType === me.project.ration_glj.getSourceType()) return;
+        if (treeNode.sourceType === ModuleNames.ration_glj) return;
 
         treeNode.calcType = calcTools.getCalcType(treeNode);