|
@@ -2,6 +2,7 @@
|
|
|
* Created by Tony on 2017/4/28.
|
|
|
*/
|
|
|
var rationGLJOprObj = {
|
|
|
+ processDecimal: -6,
|
|
|
sheet: null,
|
|
|
currentRationItem: null,
|
|
|
distTypeTree: null,
|
|
@@ -436,29 +437,29 @@ var rationGLJOprObj = {
|
|
|
if(price.gljType1.length > 0){
|
|
|
let labourPrice = 0;
|
|
|
price.gljType1.forEach(function (singlePrc) {
|
|
|
- labourPrice += singlePrc;
|
|
|
+ labourPrice = scMathUtil.roundTo(labourPrice + singlePrc, me.processDecimal);
|
|
|
});
|
|
|
let roundPrice = scMathUtil.roundTo(labourPrice, -2);
|
|
|
rst.labourPrice = roundPrice;
|
|
|
- rationBasePrc += roundPrice;
|
|
|
+ rationBasePrc = scMathUtil.roundTo(rationBasePrc + roundPrice, -2);
|
|
|
}
|
|
|
if(price.gljType2.length > 0){
|
|
|
let materialPrice = 0;
|
|
|
price.gljType2.forEach(function (singlePrc) {
|
|
|
- materialPrice += singlePrc;
|
|
|
+ materialPrice = scMathUtil.roundTo(materialPrice + singlePrc, me.processDecimal);
|
|
|
});
|
|
|
let roundPrice = scMathUtil.roundTo(materialPrice, -2);
|
|
|
rst.materialPrice = roundPrice;
|
|
|
- rationBasePrc += roundPrice;
|
|
|
+ rationBasePrc = scMathUtil.roundTo(rationBasePrc + roundPrice, -2);
|
|
|
}
|
|
|
if(price.gljType3.length > 0){
|
|
|
let machinePrice = 0;
|
|
|
price.gljType3.forEach(function (singlePrc) {
|
|
|
- machinePrice += singlePrc;
|
|
|
+ machinePrice = scMathUtil.roundTo(machinePrice + singlePrc, me.processDecimal);
|
|
|
});
|
|
|
let roundPrice = scMathUtil.roundTo(machinePrice, -2);
|
|
|
rst.machinePrice = roundPrice;
|
|
|
- rationBasePrc += roundPrice;
|
|
|
+ rationBasePrc = scMathUtil.roundTo(rationBasePrc + roundPrice, -2);
|
|
|
}
|
|
|
rst.rationBasePrc = rationBasePrc;
|
|
|
}
|