wangshan hace 7 años
padre
commit
99d395d111
Se han modificado 1 ficheros con 7 adiciones y 5 borrados
  1. 7 5
      src/web/staticres/js/proproject.js

+ 7 - 5
src/web/staticres/js/proproject.js

@@ -313,14 +313,16 @@ function appendDatas(datas,isNew){
 			}
 		}
 		listHtml += '</div></li>';
-		if(datas[i].projectinfo!=undefined){
+		if(typeof(datas[i].projectname) != "undefined" || datas[i].projectinfo!=undefined){
 			tableHtml +='<tr onclick="noIn(this)" dataid="'+datas[i]._id+'" target="_blank">'
 					+'<td width="48"><div>'+index+'</div></td>'
 			//
 			var proinfo = datas[i].projectinfo;
 			//		
-			if(typeof(proinfo.approvecode) != "undefined" && proinfo.approvecode != null && proinfo.approvecode != ""){
+			if(proinfo!=undefined && typeof(proinfo.approvecode) != "undefined" && proinfo.approvecode != null && proinfo.approvecode != ""){
 				tableHtml += '<td class="tt-l" width="134"><div>'+proinfo.approvecode+'</div></td>';
+			}else if(typeof(datas[i].projectcode) != "undefined" && datas[i].projectcode != null && datas[i].projectcode != ""){
+				tableHtml += '<td class="tt-l" width="134"><div>'+datas[i].projectcode+'</div></td>';
 			}else{
 				tableHtml += '<td class="tt-l" width="134"><div></div></td>';
 			}
@@ -332,19 +334,19 @@ function appendDatas(datas,isNew){
 				tableHtml += '<td class="tt-l" width="324"><div>'+datas[i].title+'</div></td>';
 			}
 					
-			if(typeof(proinfo.approvecontent) != "undefined" && proinfo.approvecontent != null && proinfo.approvecontent != ""){
+			if(proinfo!=undefined && typeof(proinfo.approvecontent) != "undefined" && proinfo.approvecontent != null && proinfo.approvecontent != ""){
 				tableHtml += '<td width="265"><div>'+proinfo.approvecontent+'</div></td>';
 			}else{
 				tableHtml += '<td width="265"><div></div></td>';
 			}	
 			//
-			if(typeof(proinfo.approvestatus) != "undefined" && proinfo.approvestatus != null && proinfo.approvestatus != ""){
+			if(proinfo!=undefined && typeof(proinfo.approvestatus) != "undefined" && proinfo.approvestatus != null && proinfo.approvestatus != ""){
 				tableHtml += '<td width="155"><div>'+proinfo.approvestatus+'</div></td>';
 			}else{
 				tableHtml += '<td width="155"><div></div></td>';
 			}
 			
-			if(typeof(proinfo.approvetime) != "undefined" && proinfo.approvetime != null && proinfo.approvetime != ""){
+			if(proinfo!=undefined && typeof(proinfo.approvetime) != "undefined" && proinfo.approvetime != null && proinfo.approvetime != ""){
 				tableHtml += '<td width="115"><div>'+proinfo.approvetime.substring(0,16)+'</div></td>';
 			}else{
 				tableHtml += '<td width="115"><div></div></td>';