zhongzewei 7 роки тому
батько
коміт
382aa1f510
1 змінених файлів з 5 додано та 4 видалено
  1. 5 4
      modules/pm/facade/pm_facade.js

+ 5 - 4
modules/pm/facade/pm_facade.js

@@ -24,7 +24,7 @@ module.exports={
     isFirst: isFirst,
     getShareInfo: getShareInfo,
     prepareInitialData: prepareInitialData,
-    changeFile:changeFile
+    changeFile:changeFile,
 };
 
 
@@ -929,13 +929,13 @@ async function isShare(userId, project){
 //用户是否第一次进入费用定额
 async function isFirst(userId, compilationId) {
     let userData = await userModel.findOne({_id: mongoose.Types.ObjectId(userId)}, '-_id used_list');
-    let isFirst = false;
+    let first = false;
     if (userData) {
-        isFirst = !_.find(userData.used_list, function (o) {
+        first = !_.find(userData.used_list, function (o) {
             return o.compilationId === compilationId;
         });;
     }
-    return isFirst;
+    return first;
 }
 
 //用户第一次进入费用定额的数据准备
@@ -988,6 +988,7 @@ async function copyCompleGljSection(userId, compilationId) {
     }
 }
 
+
 async function changeFile(datas,userID,fileID,name,from,type){//from 费率或单价文件,type从单前建设项目还是从其它建设项目中复制
     let projectIDs = [],newFile = {id:fileID,name:name};//计录从其它项目中复制的文件,选中多个的时候只需复制一次
     let projectUpdateType = from == "feeRateFile"?"feeRate":"unitFile";