|
@@ -366,7 +366,9 @@ let calcTools = {
|
|
|
|
|
|
if (priceType == priceTypes.ptDiffPrice){
|
|
|
if (typeof isCQ2018 != 'undefined'){
|
|
|
- result = (temp - temp2).toDecimal(decimalObj.ration.unitPrice) // 重庆2018所有都是先汇总相减后再取舍
|
|
|
+ // 如下这一句十分重要!JS计算误差导致379.08-331.695=47.38499999999999。如果直接取2位会变成47.38。所以先取6位47.385,再取2位47.39。
|
|
|
+ result = (temp - temp2).toDecimal(decimalObj.process);
|
|
|
+ result = result.toDecimal(decimalObj.ration.unitPrice) // 重庆2018所有都是先汇总相减后再取舍
|
|
|
}
|
|
|
else{
|
|
|
if (gljTypes == baseMaterialTypes)
|