|
@@ -728,8 +728,14 @@ let calcTools = {
|
|
|
getRationsByProjectGLJ(PGLJID){
|
|
|
let rationIDs = [];
|
|
|
let RGs = projectObj.project.ration_glj.datas;
|
|
|
+ let PGLJIDs = [];
|
|
|
+ if(Array.isArray(PGLJID)){//为了提高效率,改成支持传入数组
|
|
|
+ PGLJIDs = PGLJID
|
|
|
+ }else {
|
|
|
+ PGLJIDs = [PGLJID];
|
|
|
+ }
|
|
|
for (let rg of RGs){
|
|
|
- if (rg.projectGLJID == PGLJID){
|
|
|
+ if (PGLJIDs.indexOf(rg.projectGLJID) !== -1){
|
|
|
rationIDs.push(rg.rationID);
|
|
|
}
|
|
|
};
|
|
@@ -743,7 +749,7 @@ let calcTools = {
|
|
|
// 工料机形式的定额
|
|
|
let items = projectObj.project.mainTree.items;
|
|
|
for (let item of items){
|
|
|
- if (item.data.projectGLJID == PGLJID)
|
|
|
+ if (PGLJIDs.indexOf(item.data.projectGLJID) !== -1)
|
|
|
rationNodes.push(item);
|
|
|
};
|
|
|
|