个人代码记录

function applyView(id){
	buffalo.remoteCall("viewApplyServiceAjax.findApplyById",[id], function(reply) {
			var rs = reply.getResult();
			entity=rs;
			
		var infoListActionTtable = $('showtable');
		var tr = infoListActionTtable.getElementsByTagName("tr");
		var useStartTime = entity.useStartTime;
		var useEndTime = entity.useEndTime;
		tr[0].getElementsByTagName("td")[1].innerHTML = entity.useTimeBegin+" "+useStartTime+"   ~     "+entity.useTimeEnd+" "+useEndTime;
		tr[2].getElementsByTagName("td")[1].innerHTML = splitResult(entity.useReson);
		tr[4].getElementsByTagName("td")[1].innerHTML = entity.useCarNum;
		tr[4].getElementsByTagName("td")[3].innerHTML = entity.useDriverNum;
		tr[6].getElementsByTagName("td")[1].innerHTML = splitResult(entity.carStartingStation);
		tr[8].getElementsByTagName("td")[1].innerHTML = entity.applicantName;
		tr[8].getElementsByTagName("td")[3].innerHTML = entity.applicantTime;
		tr[10].getElementsByTagName("td")[1].innerHTML = entity.applicantDepartMentName;
		var sta=entity.state;
		if(sta=="4")
		tr[10].getElementsByTagName("td")[3].innerHTML = "申请通过";
		else if(sta=="5")
		tr[10].getElementsByTagName("td")[3].innerHTML = "申请未通过";
		else
		tr[10].getElementsByTagName("td")[3].innerHTML = "审批中";
		tr[12].getElementsByTagName("td")[1].innerHTML = entity.approvedByName;
		document.getElementById("showDiv").style.display = "block";
		document.getElementById("popIframe").style.display="block";
		document.getElementById("bg").style.display="block";
		});
	}

你可能感兴趣的:(代码)