|
@@ -582,6 +582,7 @@ class CalcProgram {
|
|
|
|
|
|
// 汇总定额或子清单的费用类别
|
|
|
if (treeNode.calcType == treeNodeCalcType.ctGatherRations || treeNode.calcType == treeNodeCalcType.ctGatherBills){
|
|
|
+ treeNode.data.programID = null;
|
|
|
initFees(treeNode);
|
|
|
|
|
|
let objsArr = (treeNode.calcType == treeNodeCalcType.ctGatherRations) ? project.Ration.getRationsByNode(treeNode) : treeNode.children;
|
|
@@ -612,7 +613,7 @@ class CalcProgram {
|
|
|
treeNode.data.calcTemplate = {"calcItems": rst};
|
|
|
}
|
|
|
else{
|
|
|
- // 叶子清单的缺省计算程序需要提供总金额作为计算基数(不需要工料机),然后每条按比例(费率)计算,不需要工料机明细。
|
|
|
+ // 叶子清单的公式计算:使用缺省清单计算程序。需要提供总金额作为计算基数(不需要工料机),然后每条按比例(费率)计算,不需要工料机明细。
|
|
|
if (treeNode.calcType == treeNodeCalcType.ctCalcBaseValue){
|
|
|
delete treeNode.data.gljList;
|
|
|
|
|
@@ -626,16 +627,16 @@ class CalcProgram {
|
|
|
treeNode.data.marketTotalFee = (muf * q).toDecimal(me.digit);
|
|
|
treeNode.data.gljList = me.project.ration_glj.getGljArrByRation(treeNode.data.ID);
|
|
|
if (treeNode.data.programID == undefined){
|
|
|
- treeNode.data.programID = 1;
|
|
|
+ treeNode.data.programID = projectInfoObj.projectInfo.property.engineering;
|
|
|
};
|
|
|
}
|
|
|
else if (treeNode.calcType == treeNodeCalcType.ctBillCalcProgram) {
|
|
|
let rations = project.Ration.getBillsSortRation(treeNode.source.getID());
|
|
|
treeNode.data.gljList = project.ration_glj.getGatherGljArrByRations(rations);
|
|
|
|
|
|
- if (treeNode.data.programID == undefined){
|
|
|
- treeNode.data.programID = 1;
|
|
|
- };
|
|
|
+ if (treeNode.data.programID == undefined || treeNode.data.programID == defaultBillTemplate.ID){
|
|
|
+ treeNode.data.programID = projectInfoObj.projectInfo.property.engineering;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
let template = me.compiledTemplates[treeNode.data.programID];
|