|
@@ -263,12 +263,13 @@ class BillsCalcHelper {
|
|
|
};
|
|
|
calcRationLeaf (node, fields, isIncre) {
|
|
|
nodeCalcObj.node = node;
|
|
|
- nodeCalcObj.digit = this.project.Decimal.unitFee;
|
|
|
+ nodeCalcObj.digit = this.project.Decimal.common.unitFee;
|
|
|
calcFees.checkFields(node.data, fields);
|
|
|
let nodeCalc = nodeCalcObj, virData= null, decimal = this.project.Decimal;
|
|
|
|
|
|
// 清单单价:套用定额计算程序
|
|
|
- if (this.project.calcFlag === billsPrice) {
|
|
|
+ // if (this.project.calcFlag === billsPrice) {
|
|
|
+ if (this.project.projSetting.billsCalcMode === billsPrice) {
|
|
|
rationCalcObj.calcGljs = this.getBillsGLjs(node);
|
|
|
console.log(rationCalcObj.calcGljs);
|
|
|
rationCalcObj.calcFields = rationCalcFields;
|
|
@@ -352,6 +353,7 @@ class BillsCalcHelper {
|
|
|
if (parent && parent.sourceType === this.project.Bills.getSourceType()) {
|
|
|
calcFees.checkFields(parent.data, [field]);
|
|
|
parent.data.feesIndex[field.type].totalFee = (parent.data.feesIndex[field.type].totalFee + Incre).toDecimal(this.project.Decimal.common.totalFee);
|
|
|
+ parent.data.feesIndex[field.type].unitFee = 0; // AAAAA 临时补上,使存储 unitFee.toFixed(2) 时不出错
|
|
|
this.updateParent(parent.parent, field, Incre);
|
|
|
}
|
|
|
};
|
|
@@ -359,9 +361,11 @@ class BillsCalcHelper {
|
|
|
if (isIncre) {
|
|
|
let incre = value - node.data.feesIndex[field.type].totalFee;
|
|
|
node.data.feesIndex[field.type].totalFee = value;
|
|
|
+ node.data.feesIndex[field.type].unitFee = 0; // AAAAA 临时补上,使存储 unitFee.toFixed(2) 时不出错
|
|
|
this.updateParent(node.parent, field, incre);
|
|
|
} else {
|
|
|
node.data.feesIndex[field.type].totalFee = value;
|
|
|
+ node.data.feesIndex[field.type].unitFee = 0; // AAAAA 临时补上,使存储 unitFee.toFixed(2) 时不出错
|
|
|
}
|
|
|
};
|
|
|
converseCalc (node) {
|