|
|
@@ -924,7 +924,7 @@ ProjectGLJ.prototype.getHighlandFee = function (feeType) {
|
|
|
return rate*0.01
|
|
|
};
|
|
|
|
|
|
-ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap) {//
|
|
|
+ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap,needUpdate=false) {//
|
|
|
if(temp){
|
|
|
if(type == "freight" && temp.conveyance !="自办运输") return null;
|
|
|
let sum =0;
|
|
|
@@ -934,7 +934,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap) {//
|
|
|
let decimal = type == "freight"?getDecimal("glj.unitPrice"):getDecimal("glj.unitPriceHasMix");
|
|
|
//因为材料计算的数据是保存在单价文件里的,有可能存在共享的情况,这样的话就不能用单价文件里的项目工料机ID来匹配,要用5大项匹配
|
|
|
let pgljMap = {};
|
|
|
- if(!temp.rations || temp.rations.length == 0 )return null;//没有定额时不计算
|
|
|
+ if(needUpdate==false && (!temp.rations || temp.rations.length == 0))return null;//没有定额时不计算
|
|
|
for(let pg of this.datas.gljList){
|
|
|
pgljMap[gljUtil.getIndex(pg)] = pg
|
|
|
}
|
|
|
@@ -953,7 +953,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap) {//
|
|
|
}
|
|
|
sum = scMathUtil.roundForObj(sum,decimal)+"";
|
|
|
if(type == "freight"){
|
|
|
- let exp = `((${expList.join("+")})+${temp.otherFee})x${temp.weightCoe}`
|
|
|
+ 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;
|
|
|
@@ -1000,7 +1000,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap) {//
|
|
|
let hs = scMathUtil.roundForObj(tt*hightFeeRate,processDecimal);//(人工定额消耗量*定额价*定额工程量+机械定额消耗量*定额价*定额工程量)*高原取费类别费率
|
|
|
exp = expList.join("+");
|
|
|
if(hightFeeRate!=0) exp += `+${tt}x${hightFeeRate*100}%`;
|
|
|
- if(assFeeRate!=0) exp += '+'+assList.join("+");
|
|
|
+ if(assFeeRate!=0 && assList.length > 0) exp += '+'+assList.join("+");
|
|
|
result = scMathUtil.roundForObj(as + result,processDecimal);
|
|
|
result = scMathUtil.roundForObj(hs + result,processDecimal);
|
|
|
heightFee = hs;
|