project_report2.jsp

来自「java jsp教程」· JSP 代码 · 共 448 行 · 第 1/2 页

JSP
448
字号
              </TR>
              <TR>
                <TD width="18%" height=25 align="right"  bgColor=#eef4ff class="unnamed1" >被审计人:</TD>
                <TD  height=10 align="left" bgColor=#eef4ff >
					<%=StringUtil.escapeNull(vo.getAuditedpersonname())%>
                <TD width="18%" height=10 align="left" bgColor=#eef4ff ><div align="right">被审单位: </div>
                <TD height=10 bgColor=#eef4ff >
					<%
						Iterator iter1 = auditUnits.iterator();
						while(iter1.hasNext())
						{
							AuditedOrgInfo aoInfo = (AuditedOrgInfo)iter1.next();
							out.print(aoInfo.getAuditedorgname() + " ");
						}
					%>
					</td>
				</TR> 
              <TR>
                <TD width="18%" height=25 align="right"  bgColor=#eef4ff class="unnamed1" >录入人:</TD>
                <TD  height=10 align="left" bgColor=#eef4ff ><%=(vo.getCreatorname()==null)?curPersonName:vo.getCreatorname()%></td>
                <TD width="18%" height=10 align="left" bgColor=#eef4ff ><div align="right">批准人:</div></td>
                <TD  height=10 align="left" bgColor=#eef4ff ><%=StringUtil.escapeNull(vo.getApprover())%></td>
				</TR>
			  <TR>
                <TD  height=25 align="right"  bgColor=#eef4ff class="unnamed1" >抄送:</TD>
                <TD  height=10 align="left" bgColor=#eef4ff ><%=(vo.getCopyfor()==null)?"":vo.getCopyfor()%></td>
                <TD  height=10 align="left" bgColor=#eef4ff ><div align="right">抄报:</div></td>
                <TD  height=10 align="left" bgColor=#eef4ff ><%=StringUtil.escapeNull(vo.getReport())%></td>
				</TR>	
              <TR>
                <TD  height=25 align="right"  bgColor=#eef4ff class="unnamed1" >文档附件:</TD>
                <TD  height=10 align="left" bgColor=#eef4ff  colspan="3">
                <%
                	if(attachList != null && attachList.size() > 0)
									{
										DocAttachmentInfo vo2 = (DocAttachmentInfo)attachList.get(0);
										String name = 	vo2.getAttachfilename();
										String attachno = vo2.getAttachmentno().toString();
										if(name!=null)
										{
                %>
									<a href ="#" onclick="download('<%=attachno%>')" ><%=name%></a>
                <%
                		}
									}
								%>
                </td>
              </TR>
              <TR>
                <TD  height=60 align="right"  bgColor=#eef4ff class="unnamed1" >备注:</TD>
                <TD  height=60 align="left" bgColor=#eef4ff  colspan="3"><%=vo.getNote()==null?"":vo.getNote()%></Td>
			  </tr>
<%
		if( "true".equals(isView) )
		{
%>
		<tr>
			<td colspan="4" align="center"  bgColor=#eef4ff class="unnamed1">
				<img src="<%=request.getContextPath()%>/images/close.gif" onclick="window.close()" style="cursor:hand">
		  </td>
		</tr>
<%
		}
	}
%>
  </TABLE>
</form>
<script>

function selectUnit()
{
	wx=500;
	wy=400;
	urlstr="unitframe.html";
	x=(window.screen.width-wx)/2;
	y=(window.screen.height-wy)/2;
	wposition=",left="+x+",top="+y;
	window.open(urlstr,"选择单位","width="+wx+",height="+wy+",scrollbars=yes,status=no"+wposition);
}
function download(attachno)
{
	if(attachno == "")
	{
		alert("无法获取要下载的文件信息");
		return;
	}
	var url = "<%=request.getContextPath()%>/servlet/DownloadAttachServlet?attachNo="+attachno;
	window.location = url;
}
function uploaddoc()
{
	wx=450;
	wy=200;
	var fileobj = document.getElementById("filename");
	var fileName = "";
	var attachno = "";
	var docno = '<c:out value="${docinfo.docno}"/>';
	if(docno == "")
		docno = "0";
	<c:if test="${!empty attachList}" >
		attachno = '<c:out value="${attachList[0].attachmentno}"/>';
	</c:if>
	if(fileobj)
	{
		fileName = fileobj.innerText;
	}
	var aSpan = document.getElementById("attachSpan");
	if(aSpan.innerHTML != "")
	{
		urlstr = "<%=request.getContextPath()%>/jsp/project/project_upload_attach.jsp?attachno=fake&filename=" 
			+ aSpan.innerText + "&docno=" + docno + "&attachmenttype=1";
	}
	else
	{	
		urlstr="<%=request.getContextPath()%>/jsp/project/project_upload_attach.jsp?"
			+  "docno=" + docno + "&attachmenttype=1&filename="+fileName+"&attachno="+attachno;
	}
	x=(window.screen.width-wx)/2;
	y=(window.screen.height-wy)/2;
	wposition=",left="+x+",top="+y;
	
	window.open(urlstr,"上传报告文档","width="+wx+",height="+wy+",scrollbars=no,status=no"+wposition);
}

function popUpCalendarDlg(ctrlobj) {
	showx = event.screenX - event.offsetX - 4 - 210 ; // + deltaX;
	showy = event.screenY - event.offsetY + 18; // + deltaY;
	newWINwidth = 210 + 4 + 18;
	retval = window.showModalDialog("<%=request.getContextPath()%>/include/date.htm", "", "dialogWidth:220px; dialogHeight:220px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scroll:no;Resizable:no; "  );
	if( retval != null ){
		ctrlobj.value = retval;
	}
}

function save()
{
	var sForm = document.form1;
	if(sForm.docnumber.value == "")
	{
		alert("请输入公文编号");
		sForm.docnumber.focus();
		return;
	}

	if(sForm.docname.value == "")
	{
		alert("请输入公文名称");
		sForm.docname.focus();
		return;
	}
	var date1 = sForm.createtime.value;
	var date2 = sForm.receivetime.value;
	if(date1 == "")
	{
		alert("请选择成文时间");
		return;
	}

	if(date2 == "")
	{
		alert("请选择送达时间");
		return;
	}

	if(sForm.createtime.value == "")
	{
		alert("请输入成文时间");
		sForm.createtime.focus();
		return;
	}

	if(sForm.receivetime.value == "")
	{
		alert("请输入送达时间");
		sForm.receivetime.focus();
		return;
	}
	if(!_compareDate(form1.createtime.value,form1.receivetime.value)){
		alert("结束时间必须大于开始时间");
		return;
	}

	
	if(sForm.approver.value == "")
	{
		alert("请输入批准人");
		sForm.approver.focus();
		return;
	}
	form1.action ="<%=request.getContextPath()%>/servlet/SaveDocInfoServlet";
	form1.submit();
}

function checkDate(date1,date2){

	if(Compare_Date(date1,date2))
	{
		return false;
	}
	else
	{
		return true;
	}
}

function _addAuditedOrg(valueObj,idObj)
{
	var url = "<%=request.getContextPath()%>/ShowAuditedUnitServlet?valueObj="	+ valueObj + "&idObj=" + idObj + "&projNo=<%=prjno%>";
	window.open(url,"_blank","width=400,height=200,menu=0");
}

function _compareDate(d1,d2){
	var arr1 = d1.split("-");
	var arr2 = d2.split("-");
	var date1 = new Date(arr1[0],arr1[1],arr1[2]);
	var date2 = new Date(arr2[0],arr2[1],arr2[2]);
	if(date2.getTime() < date1.getTime())
		return false;
	return true;
}

</script>		
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?