Kaynağa Gözat

bugs 和 辅助生产间接费默认值设置

zhangweicheng 5 yıl önce
ebeveyn
işleme
5344996292

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

@@ -956,6 +956,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap) {//
           let ndoc = {};
           if(temp.unitFreight != sum) ndoc['unitFreight'] = sum;
           if(temp.exp != exp) ndoc['exp'] = exp;
+          if(temp.heightFee != heightFee) ndoc['heightFee'] = heightFee;
           if(!_.isEmpty(ndoc)) return {ID:temp.ID,doc:ndoc};
         }
         if(type == "price" && temp.supplyPrice !=sum) return {ID:temp.ID,doc:{supplyPrice:sum,heightFee:heightFee}}

+ 18 - 22
web/building_saas/main/js/views/locate_view.js

@@ -358,6 +358,7 @@ let locateObject={
         }
         setBgColour(datas,priceMap);
         datas =  _.sortByAll(datas,['code']);
+        
         return datas;
 
 
@@ -365,31 +366,26 @@ let locateObject={
             let outStd = $("#outstanding").prop("checked");
             let outInp = $("#outInp").val();
             if(outStd == true && outInp && outInp!=""){
-                for(let b of bills){
-                    if(b.code && b.code.length >= 9){
-                        let key = b.code.substr(0,9);
-                        if(map[key] && map[key].count > 1){
-                            let avg = map[key].total/map[key].count;
-                            let unitPrice = b.unitPrice?parseFloat(b.unitPrice):0;
-                            if(unitPrice ==0 ) continue;
-                            if(Math.abs(unitPrice - avg)/avg * 100  >= parseFloat(outInp)) b.bgColour = "#FFFACD"
-                        }
-                    }
+              let key = "smartcost";// 2020-06-02  养护与建筑不同,养护是把所有结果相加取平均
+              if(map[key] && map[key].count > 1){
+                let avg = map[key].total/map[key].count;
+                for(let b of bills){ 
+                  let unitPrice = b.unitPrice?parseFloat(b.unitPrice):0;
+                  if(unitPrice ==0 ) continue;
+                  if(Math.abs(unitPrice - avg)/avg * 100  >= parseFloat(outInp)) b.bgColour = "#FFFACD"
                 }
+              }
             }
         }
-        function setPriceMap (bills,map) {
-            if(bills.code && bills.code.length >= 9){
-                let key = bills.code.substr(0,9);
-                let unitPrice = bills.unitPrice?parseFloat(bills.unitPrice):0;
-                if(map[key]){
-                    map[key].total += unitPrice;
-                    map[key].count ++;
-                }else {
-                    map[key] = {total:unitPrice,count:1}
-                }
-
-            }
+        function setPriceMap (bills,map) { // 2020-06-02  养护与建筑不同,养护是把所有结果相加取平均
+          let key = "smartcost";
+          let unitPrice = bills.unitPrice?parseFloat(bills.unitPrice):0;
+          if(map[key]){
+              map[key].total += unitPrice;
+              map[key].count ++;
+          }else {
+              map[key] = {total:unitPrice,count:1}
+          }
 
             return map;
         }

+ 7 - 0
web/over_write/js/shandong_2016.js

@@ -0,0 +1,7 @@
+if (typeof module !== 'undefined') {
+  module.exports = { 
+      getDefalutAssistProductionFeeRate: function () {
+          return 5
+      }
+  };
+}

+ 7 - 0
web/over_write/js/sichuan_2013.js

@@ -0,0 +1,7 @@
+if (typeof module !== 'undefined') {
+  module.exports = { 
+      getDefalutAssistProductionFeeRate: function () {
+          return 5
+      }
+  };
+}