|
@@ -1578,6 +1578,8 @@ let executeObj = {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+let budgetFields = ['rationLabour', 'rationMaterial', 'rationMachine', 'marketMainMaterial', 'marketEquipment', 'common'];
|
|
|
+
|
|
|
class CalcProgram {
|
|
|
constructor(project){
|
|
|
let me = this;
|
|
@@ -1846,7 +1848,8 @@ class CalcProgram {
|
|
|
nodes = treeNode.children;
|
|
|
|
|
|
function isBaseFeeType(type){
|
|
|
- return ['labour', 'material', 'machine', 'mainMaterial', 'equipment'].indexOf(type) > -1;
|
|
|
+ // return ['labour', 'material', 'machine', 'mainMaterial', 'equipment'].indexOf(type) > -1;
|
|
|
+ return budgetFields.indexOf(type) > -1;
|
|
|
};
|
|
|
|
|
|
let nQ = calcTools.uiNodeQty(treeNode);
|
|
@@ -1924,6 +1927,7 @@ class CalcProgram {
|
|
|
|
|
|
rst.push(ftObj);
|
|
|
};
|
|
|
+ me.deleteUselessFees(treeNode, budgetFields);
|
|
|
treeNode.data.calcTemplate = {"calcItems": rst};
|
|
|
};
|
|
|
|
|
@@ -2013,10 +2017,7 @@ class CalcProgram {
|
|
|
|
|
|
calcTools.initFees(treeNode);
|
|
|
// 只有人、材、机、主、设。
|
|
|
- let fieldNames = ['labour', 'material', 'machine', 'mainMaterial', 'equipment', 'common'];
|
|
|
let funcNames = ['定额人工费','定额材料费','定额施工机具使用费','市场价主材费','市场价设备费'];
|
|
|
- // let funcNames = ['定额人工费','定额材料费','定额施工机具使用费','定额主材费','定额设备费'];
|
|
|
- // debugger;
|
|
|
let sum = 0;
|
|
|
for (let i = 0; i < 5; i++) {
|
|
|
if (!rationCalcBases[funcNames[i]]){
|
|
@@ -2024,7 +2025,7 @@ class CalcProgram {
|
|
|
return;
|
|
|
}
|
|
|
let obj = {};
|
|
|
- obj.fieldName = fieldNames[i];
|
|
|
+ obj.fieldName = budgetFields[i];
|
|
|
obj.unitFee = (rationCalcBases[funcNames[i]](treeNode)).toDecimal(decimalObj.decimal('unitPrice', treeNode));
|
|
|
obj.totalFee = (obj.unitFee * nQ).toDecimal(decimalObj.decimal('totalPrice', treeNode));
|
|
|
obj.tenderUnitFee = obj.unitFee;
|
|
@@ -2040,6 +2041,8 @@ class CalcProgram {
|
|
|
obj.tenderUnitFee = obj.unitFee;
|
|
|
obj.tenderTotalFee = obj.totalFee;
|
|
|
calcTools.checkFeeField(treeNode, obj);
|
|
|
+
|
|
|
+ me.deleteUselessFees(treeNode, budgetFields);
|
|
|
};
|
|
|
|
|
|
// 定额部分抽取出来,供分摊定额公用。
|