zhangweicheng 5 rokov pred
rodič
commit
1ef2a55262

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

@@ -956,7 +956,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap,needU
           let exp = expList.length == 0?`${temp.otherFee}x${temp.weightCoe}`:`((${expList.join("+")})+${temp.otherFee})x${temp.weightCoe}`
           let ndoc = {};
           if(temp.unitFreight != sum) ndoc['unitFreight'] = sum;
-          if(temp.exp != exp) ndoc['exp'] = exp;
+          ndoc['exp'] = exp;
           if(temp.heightFee != heightFee) ndoc['heightFee'] = heightFee;
           if(!_.isEmpty(ndoc)) return {ID:temp.ID,doc:ndoc};
         }

+ 0 - 2
web/building_saas/main/js/views/electrovalence_view.js

@@ -43,8 +43,6 @@ let electrovalenceObj = {
         this.sheet.bind(GC.Spread.Sheets.Events.SelectionChanged,this.onElectrovalenceSelectionChange);
         this.sheet.bind(GC.Spread.Sheets.Events.ValueChanged, this.onElectrovalenceValueChange);
         this.sheet.bind(GC.Spread.Sheets.Events.EditStarting,this.onElectrovalenceEditStarting);
-    /*
-        ;*/
         this.sheet.name('electrovalence_sheet');
         if(projectReadOnly){
             disableSpread(this.spread);

+ 3 - 2
web/building_saas/main/js/views/material_calc_view.js

@@ -56,7 +56,7 @@ materialCalcObj = {
         },
          getText:{
           forExp:function (item) {
-             return _.isEmpty(item.exp)?materialCalcObj.getFreightEXP(item):item.exp;
+             return item.exp&&item.exp!=""?item.exp:materialCalcObj.getFreightEXP(item);
           }
       }
 
@@ -366,6 +366,7 @@ materialCalcObj = {
                     if(freigth.conveyance == "自办运输") args.cancel = true;
                 }
                 if(dataCode == "unitFreight"){
+                    if(freigth.conveyance == "自办运输") args.cancel = true;
                     if(freigth.rations && freigth.rations.length > 0) args.cancel = true;
                     if(gljUtil.isDef(freigth.materialType) && freigth.materialType != "") args.cancel = true;//当材料类型有值时,说明是内蒙古计算,运费是通过运距算出来的,不能编辑
                 }
@@ -466,7 +467,7 @@ materialCalcObj = {
       //(单位运价×(1+运距增加率%)+装卸费单价×装卸次数+其它费用)×单位毛重×加权系数
       if(item.conveyance == "自办运输"){
         let t = projectObj.project.projectGLJ.calcEachFreightOrPrice(item,"freight",{},needUpdate);
-        return t.doc.exp;
+        if(t) return t.doc.exp;
       }
 
       //(单位运价×km运距×(1+运距增加率%)+装卸费单价×装卸次数+其它费用)×单位毛重×加权系数