|
@@ -49,24 +49,31 @@ let gljUtil = {
|
|
|
//计算经过场外运输损耗后的总消耗量
|
|
//计算经过场外运输损耗后的总消耗量
|
|
|
for(let pglj of project_gljs ){
|
|
for(let pglj of project_gljs ){
|
|
|
let offSiteTransportLossRate = this.getOffSiteTransportLossRate(pglj);
|
|
let offSiteTransportLossRate = this.getOffSiteTransportLossRate(pglj);
|
|
|
- pglj.offSiteTransportLossRate = offSiteTransportLossRate;
|
|
|
|
|
|
|
+ pglj.offSiteTransportLossRate = scMathUtil.roundForObj(offSiteTransportLossRate,getDecimal("glj.unitPrice")) ;
|
|
|
offSiteTransportLossRate = offSiteTransportLossRate/100;
|
|
offSiteTransportLossRate = offSiteTransportLossRate/100;
|
|
|
pglj.transportLossQuantity = scMathUtil.roundForObj(pglj.quantity*offSiteTransportLossRate,q_decimal);
|
|
pglj.transportLossQuantity = scMathUtil.roundForObj(pglj.quantity*offSiteTransportLossRate,q_decimal);
|
|
|
pglj.quantity = scMathUtil.roundForObj(pglj.quantity + pglj.transportLossQuantity ,q_decimal);
|
|
pglj.quantity = scMathUtil.roundForObj(pglj.quantity + pglj.transportLossQuantity ,q_decimal);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
getOffSiteTransportLossRate:function (pglj) {
|
|
getOffSiteTransportLossRate:function (pglj) {
|
|
|
- let offSiteTransportLossRate;
|
|
|
|
|
|
|
+ let offSiteTransportLossRate;//场外运输损耗率
|
|
|
|
|
+ let handlingLossRate;//每增加一次装卸损耗率
|
|
|
|
|
+ let totalLoadingTimes = 1;//没有材料计算,获取不到装卸总次数,则按1计算
|
|
|
|
|
+ //场外总损耗率=场外运输损耗率%+(装卸总次数-1)*每增加一次装卸损耗率%。
|
|
|
if(pglj.unit_price){
|
|
if(pglj.unit_price){
|
|
|
if(pglj.unit_price.calcMaterial == 1){//如果是材料计算,则用修改过的新值
|
|
if(pglj.unit_price.calcMaterial == 1){//如果是材料计算,则用修改过的新值
|
|
|
offSiteTransportLossRate = pglj.unit_price.offSiteTransportLossRate_n;
|
|
offSiteTransportLossRate = pglj.unit_price.offSiteTransportLossRate_n;
|
|
|
|
|
+ handlingLossRate = pglj.unit_price.handlingLossRate_n;
|
|
|
|
|
+ if(pglj.unit_price.totalLoadingTimes && pglj.unit_price.totalLoadingTimes > 1) totalLoadingTimes = parseFloat(pglj.unit_price.totalLoadingTimes)
|
|
|
} else {
|
|
} else {
|
|
|
offSiteTransportLossRate = pglj.unit_price.offSiteTransportLossRate;
|
|
offSiteTransportLossRate = pglj.unit_price.offSiteTransportLossRate;
|
|
|
|
|
+ handlingLossRate = pglj.unit_price.handlingLossRate;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return offSiteTransportLossRate?parseFloat(offSiteTransportLossRate):0;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ offSiteTransportLossRate = offSiteTransportLossRate?parseFloat(offSiteTransportLossRate):0;
|
|
|
|
|
+ handlingLossRate = handlingLossRate?parseFloat(handlingLossRate):0;
|
|
|
|
|
+ // 场外运输损耗率%+(装卸总次数-1)*每增加一次装卸损耗率%
|
|
|
|
|
+ return (offSiteTransportLossRate + (totalLoadingTimes - 1) * handlingLossRate);
|
|
|
},
|
|
},
|
|
|
getQuantityPerGLJ : function (ration_glj_list,rations,rationMap,pglj,billIDs,tech_billIDS,q_decimal,_,scMathUtil,isTender) {
|
|
getQuantityPerGLJ : function (ration_glj_list,rations,rationMap,pglj,billIDs,tech_billIDS,q_decimal,_,scMathUtil,isTender) {
|
|
|
let result={};
|
|
let result={};
|