Ver código fonte

1.ration_glj getData错兼容处理,兼容定额人材机反找定额失败的情况
2.新建单位工程的时候,兼容建设项目基本信息缺失工程地点新建

vian 5 anos atrás
pai
commit
6cc57501eb

+ 1 - 1
modules/main/facade/project_facade.js

@@ -531,7 +531,7 @@ async function setDefaultInfo(rootProjectID,engineerInfos){
             if(attrs.indexOf(en.dispName) != -1){
                 let key = en.dispName;
                 if(key == "工程地点") key = "工程所在地";
-                en.value = baseMap[key].value;
+                en.value = baseMap[key] && baseMap[key].value || '';
             }
         }
     }

+ 1 - 1
modules/ration_glj/facade/ration_glj_facade.js

@@ -920,7 +920,7 @@ function getData(projectID, callback, isReport) {
         let ration = rations.find(function getElement(element) {
             return element.ID == ID;
         });
-        return ration._doc;
+        return ration && ration._doc;
     };
 
     ration_glj.find({'projectID': projectID}, (err, datas) => {