zhangweicheng 5 年之前
父节点
当前提交
3197e5667a

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

@@ -508,7 +508,7 @@ ProjectGLJ.prototype.freightCalc= function (glj,grossWeightCoe_n,dataMap,tfreigh
         loadingTimes = scMathUtil.roundForObj(loadingTimes,unitPirce);
         let s = scMathUtil.roundForObj(unitLoadingFee*loadingTimes,process);//装卸费单价×装卸次数
         t = scMathUtil.roundForObj(t + s,process);//单位运价×km运距×(1+运距增加率%)+装卸费单价×装卸次数
-        if(calcType == "内蒙古") t = scMathUtil.roundForObj(t/1.09,process);  //内蒙古要除以税率1.09;
+        if(gljUtil.isDef(materialType)&&materialType != "") t = scMathUtil.roundForObj(t/1.09,process);  //内蒙古要除以税率1.09; 当材料类型有值时,说明是内蒙古计算
         otherFee = scMathUtil.roundForObj(otherFee,unitPirce);
         t = scMathUtil.roundForObj(t+otherFee,process);//单位运价×km运距×(1+运距增加率%)+装卸费单价×装卸次数+其它费用
         t = scMathUtil.roundForObj(t*grossWeightCoe_n,process); //(单位运价×km运距×(1+运距增加率%)+装卸费单价×装卸次数+其它费用)×单位毛重”。 单位毛重:毛重系数
@@ -524,7 +524,7 @@ ProjectGLJ.prototype.freightCalc= function (glj,grossWeightCoe_n,dataMap,tfreigh
 
 
     function getPrice(unitFreight,kmDistance,conveyance,calcType,materialType,process){
-        if(calcType =="内蒙古") return materialCalcObj.calNeiMengTotalFreight(kmDistance,materialType);
+        if(gljUtil.isDef(materialType)&&materialType != "") return materialCalcObj.calNeiMengTotalFreight(kmDistance,materialType);
         //如果运输方式为自办运输,则直接返回单位运价即可;
         let price = conveyance == "自办运输" ? scMathUtil.roundForObj(unitFreight,process):scMathUtil.roundForObj(unitFreight * kmDistance,process);//单位运价×km运距
         return price

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

@@ -514,11 +514,11 @@ var Ration = {
                         newSource = data.ration;
                         newNode = project.mainTree.insert(billItemID, nextID, newSource.ID);
                         newNodes.push(newNode);
-                        nextID = project.mainTree.selected.getNextSiblingID();
                         newNode.source = newSource;
                         newNode.sourceType = project.Ration.getSourceType();
                         newNode.data = newSource;
                         ProjectController.syncDisplayNewNode(sheetController, newNode);
+                        nextID = project.mainTree.selected.getNextSiblingID();
                     }
                     project.projectGLJ.calcQuantity();
                     for(let data of rstData){

+ 0 - 1
web/building_saas/main/js/views/glj_view.js

@@ -718,7 +718,6 @@ var gljOprObj = {
                     ration_gljs[i].shortName =projectObj.project.projectGLJ.getShortNameByID(ration_gljs[i].type);
                     ration_gljs[i].isAdd = glj.unit_price.is_add;
                     ration_gljs[i]=this.setGLJPrice(ration_gljs[i],glj,false);//设置工料机价格
-                    delete ration_gljs[i].subList; //置空,再设置
                     let connect_index = this.getIndex(glj, gljKeyArray);
                     if (needRatio==true&&mixRatioMap.hasOwnProperty(connect_index)) {
                         let mixRatios = this.getMixRationShowDatas(mixRatioMap[connect_index], projectGljs);

+ 1 - 1
web/building_saas/main/js/views/material_calc_view.js

@@ -369,7 +369,7 @@ materialCalcObj = {
                 }
                 if(dataCode == "unitFreight"){
                     if(freigth.rations && freigth.rations.length > 0) args.cancel = true;
-                    if(gljUtil.isDef(freigth.materialType) && freigth.materialType != "") args.cancel = true;//当材料类型有值时,说明是内蒙古计算,运费是过运距算出来的,不能编辑
+                    if(gljUtil.isDef(freigth.materialType) && freigth.materialType != "") args.cancel = true;//当材料类型有值时,说明是内蒙古计算,运费是过运距算出来的,不能编辑
                 }
             }
         }