|
|
@@ -860,6 +860,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap) {//
|
|
|
if(type == "freight" && temp.conveyance !="自办运输") return null;
|
|
|
let sum =0;
|
|
|
let gljMap = {};
|
|
|
+ let decimal = type == "freight"?getDecimal("glj.unitPrice"):getDecimal("glj.unitPriceHasMix");
|
|
|
//因为材料计算的数据是保存在单价文件里的,有可能存在共享的情况,这样的话就不能用单价文件里的项目工料机ID来匹配,要用5大项匹配
|
|
|
let pgljMap = {};
|
|
|
for(let pg of this.datas.gljList){
|
|
|
@@ -871,7 +872,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap) {//
|
|
|
for(let r of temp.rations){
|
|
|
sum = scMathUtil.roundForObj(sum + calcRation(r,gljMap[r.ID],pgljMap,priceMap),6);
|
|
|
}
|
|
|
- sum = scMathUtil.roundForObj(sum,getDecimal("glj.unitPrice"))+"";
|
|
|
+ sum = scMathUtil.roundForObj(sum,decimal)+"";
|
|
|
if(type == "freight" && temp.unitFreight!= sum) return {ID:temp.ID,doc:{unitFreight:sum}};
|
|
|
if(type == "price" && temp.supplyPrice !=sum) return {ID:temp.ID,doc:{supplyPrice:sum}};
|
|
|
}
|
|
|
@@ -986,6 +987,8 @@ ProjectGLJ.prototype.calcMaterialRation = function(ID,type){//计算带定额的
|
|
|
if(task && material){
|
|
|
if(type == "freight") projectObj.project.projectGLJ.updateFreightCalc([task],material.id);
|
|
|
if(type == "price") projectObj.project.projectGLJ.updatePriceCalc([task],material.id);
|
|
|
+ }else {
|
|
|
+ materialCalcObj.showDatas();
|
|
|
}
|
|
|
}
|
|
|
};
|