|
@@ -249,6 +249,7 @@ let calcTools = {
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
},
|
|
},
|
|
|
|
+ // 这里的小数取舍比较复杂,必须严格遵循需求,不能随意改动,否则计算结果会差1分钱。
|
|
estimateFee: function (treeNode, isBase = false){
|
|
estimateFee: function (treeNode, isBase = false){
|
|
let me = this, sumU = 0, sumT = 0;
|
|
let me = this, sumU = 0, sumT = 0;
|
|
// 父清单暂估费的汇总计算走计算程序逻辑,不在这里。
|
|
// 父清单暂估费的汇总计算走计算程序逻辑,不在这里。
|
|
@@ -313,7 +314,8 @@ let calcTools = {
|
|
for (let md of mds){
|
|
for (let md of mds){
|
|
if (md.isEstimate){
|
|
if (md.isEstimate){
|
|
let isExist = false;
|
|
let isExist = false;
|
|
- let mdQ = (rq * me.uiGLJQty(glj.quantity) * me.uiGLJQty(md.consumption)).toDecimal(decimalObj.process);
|
|
|
|
|
|
+ let totalQ = (rq * me.uiGLJQty(glj.quantity)).toDecimal(decimalObj.glj.quantity);
|
|
|
|
+ let mdQ = (totalQ * me.uiGLJQty(md.consumption)).toDecimal(decimalObj.process);
|
|
|
|
|
|
for (let obj of GLJObjs){
|
|
for (let obj of GLJObjs){
|
|
if (gljOprObj.getIndex(md, gljKeyArray) == gljOprObj.getIndex(obj, gljKeyArray)){
|
|
if (gljOprObj.getIndex(md, gljKeyArray) == gljOprObj.getIndex(obj, gljKeyArray)){
|
|
@@ -331,7 +333,7 @@ let calcTools = {
|
|
};
|
|
};
|
|
|
|
|
|
for (let obj of GLJObjs){
|
|
for (let obj of GLJObjs){
|
|
- sumT = sumT + (obj.quantity * me.uiGLJPrice(obj.marketPrice)).toDecimal(decimalObj.process);
|
|
|
|
|
|
+ sumT = sumT + (me.uiGLJQty(obj.quantity) * me.uiGLJPrice(obj.marketPrice)).toDecimal(decimalObj.process);
|
|
sumT = sumT.toDecimal(decimalObj.process);
|
|
sumT = sumT.toDecimal(decimalObj.process);
|
|
};
|
|
};
|
|
sumT = sumT.toDecimal(decimalObj.bills.totalPrice);
|
|
sumT = sumT.toDecimal(decimalObj.bills.totalPrice);
|