|
@@ -1641,6 +1641,7 @@
|
|
|
// total_checked_change_positive_price = ZhCalc.add(total_checked_change_positive_price, t.change_p_tp);
|
|
|
// total_checked_change_negative_price = ZhCalc.add(total_checked_change_negative_price, t.change_n_tp);
|
|
|
total_after_change_price = ZhCalc.add(total_after_change_price, ZhCalc.add(t.total_price, t.change_tp));
|
|
|
+ console.log(total_after_change_price, t.total_price, t.change_tp);
|
|
|
total_stage_price = ZhCalc.add(total_stage_price, t.end_gather_tp);
|
|
|
// total_material_price = ZhCalc.add(total_material_price, t.material_tp);
|
|
|
total_advance_price = ZhCalc.add(total_advance_price, t.advance_tp);
|
|
@@ -1988,7 +1989,10 @@
|
|
|
s = 0;
|
|
|
return s.toFixed(decimal);
|
|
|
}
|
|
|
- s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(decimal) + '';
|
|
|
+ console.log(parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(decimal) + '');
|
|
|
+ // 按decimal位数四舍五入方法
|
|
|
+ s = decimal === 0 ? parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(decimal) + '' : (Math.round(parseFloat((s + '').replace(/[^\d\.-]/g, '')) * Math.pow(10, decimal)) / Math.pow(10, decimal)).toFixed(decimal) + '';
|
|
|
+ console.log(s, Math.pow(10, decimal));
|
|
|
if (!decimal) {
|
|
|
s += '.';
|
|
|
}
|