@@ -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 || '';
}
@@ -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) => {