|
@@ -126,14 +126,14 @@ let calcTools = {
|
|
|
isRationCategory: function(treeNode){
|
|
|
return treeNode.sourceType === ModuleNames.ration;
|
|
|
},
|
|
|
- isRation: function(treeNode){
|
|
|
- return treeNode.sourceType === ModuleNames.ration && treeNode.data.type === rationType.ration;
|
|
|
+ isRationItem: function(treeNode){
|
|
|
+ return this.isRationCategory(treeNode) && treeNode.data.type === rationType.ration;
|
|
|
},
|
|
|
isVolumePrice: function (treeNode) {
|
|
|
- return treeNode.sourceType === ModuleNames.ration && treeNode.data.type === rationType.volumePrice;
|
|
|
+ return this.isRationCategory(treeNode) && treeNode.data.type === rationType.volumePrice;
|
|
|
},
|
|
|
isGljRation: function (treeNode) {
|
|
|
- return treeNode.sourceType === ModuleNames.ration && treeNode.data.type === rationType.gljRation;
|
|
|
+ return this.isRationCategory(treeNode) && treeNode.data.type === rationType.gljRation;
|
|
|
},
|
|
|
|
|
|
initFees: function (treeNode){
|
|
@@ -1019,24 +1019,29 @@ class CalcProgram {
|
|
|
|
|
|
if (me.project.property.billsCalcMode == leafBillGetFeeType.rationPriceConverse ||
|
|
|
me.project.property.billsCalcMode == leafBillGetFeeType.rationPrice) {
|
|
|
- buf = (sum_rtf / bq).toDecimal(decimalObj.process);
|
|
|
- btuf = (sum_rttf / bq).toDecimal(decimalObj.process);
|
|
|
+ buf = (sum_rtf / bq).toDecimal(decimalObj.bills.unitPrice);
|
|
|
+ btuf = (sum_rttf / bq).toDecimal(decimalObj.bills.unitPrice);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ buf = buf.toDecimal(decimalObj.bills.unitPrice);
|
|
|
+ btuf = btuf.toDecimal(decimalObj.bills.unitPrice);
|
|
|
};
|
|
|
+
|
|
|
if (isBaseFeeType(ft.type) ||
|
|
|
(me.project.property.billsCalcMode === leafBillGetFeeType.rationPrice && ft.type == "common")){
|
|
|
- btf = sum_rtf;
|
|
|
- bttf = sum_rttf;
|
|
|
+ btf = sum_rtf.toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ bttf = sum_rttf.toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
else{
|
|
|
- btf = (buf * bq).toDecimal(decimalObj.process);
|
|
|
- bttf = (btuf * bq).toDecimal(decimalObj.process);
|
|
|
+ btf = (buf * bq).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ bttf = (btuf * bq).toDecimal(decimalObj.bills.totalPrice);
|
|
|
};
|
|
|
};
|
|
|
|
|
|
- ftObj.unitFee = buf.toDecimal(decimalObj.bills.unitPrice);
|
|
|
- ftObj.totalFee = btf.toDecimal(decimalObj.bills.totalPrice);
|
|
|
- ftObj.tenderUnitFee = btuf.toDecimal(decimalObj.bills.unitPrice);
|
|
|
- ftObj.tenderTotalFee = bttf.toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ ftObj.unitFee = buf;
|
|
|
+ ftObj.tenderUnitFee = btuf;
|
|
|
+ ftObj.totalFee = btf;
|
|
|
+ ftObj.tenderTotalFee = bttf;
|
|
|
calcTools.checkFeeField(treeNode, ftObj);
|
|
|
|
|
|
rst.push(ftObj);
|