|
@@ -1080,6 +1080,16 @@ let calcTools = {
|
|
|
return calcTools.isVP_or_GLJR(node) ? node.data.rationQuantityCoe : (node.data.quantityCoe ? node.data.quantityCoe.labour : 0)
|
|
|
else if (tender == tenderTypes.ttReverseRation)
|
|
|
return node.data.rationQuantityCoe;
|
|
|
+ },
|
|
|
+ getUsedTemplateIDs: function(){
|
|
|
+ let IDsArr = [];
|
|
|
+ let rations = projectObj.project.Ration.datas;
|
|
|
+ for (const r of rations) {
|
|
|
+ let ID = r.programID;
|
|
|
+ if (!IDsArr.includes(ID))
|
|
|
+ IDsArr.push(ID);
|
|
|
+ };
|
|
|
+ return IDsArr;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1499,12 +1509,14 @@ let analyzer = {
|
|
|
else return false;
|
|
|
},
|
|
|
templateIsUsed: function (ID, tree = projectObj.project.mainTree){
|
|
|
+
|
|
|
let nodes = tree.items;
|
|
|
for (let node of nodes){
|
|
|
if (node.data && node.data.programID && node.data.programID == ID) {
|
|
|
return true;
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
return false;
|
|
|
},
|
|
|
fieldNameIsUsed: function(template, fieldName){
|
|
@@ -2757,6 +2769,7 @@ class CalcProgram {
|
|
|
|
|
|
let gatherObj = {};
|
|
|
gatherObj.programID = programID;
|
|
|
+ gatherObj.name = projectObj.project.calcProgram.compiledTemplates[programID].name;
|
|
|
for (let ft of cpFeeTypes) {
|
|
|
let ftObj = {};
|
|
|
ftObj.name = ft.name;
|
|
@@ -2786,6 +2799,18 @@ class CalcProgram {
|
|
|
return gatherObj;
|
|
|
// });
|
|
|
// $.bootstrapLoading.end();
|
|
|
+ };
|
|
|
+
|
|
|
+ //报表用:汇总所有。projectObj.project.calcProgram.gatherAllRationFees();
|
|
|
+ gatherAllRationFees(){
|
|
|
+ let IDsArr = calcTools.getUsedTemplateIDs();
|
|
|
+ let rstObj = {};
|
|
|
+ for (const ID of IDsArr) {
|
|
|
+ let obj = this.gatherRationFees(ID);
|
|
|
+ rstObj[ID] = obj;
|
|
|
+ }
|
|
|
+ console.log(rstObj);
|
|
|
+ return rstObj;
|
|
|
}
|
|
|
};
|
|
|
|