129 lines
3.8 KiB
Plaintext
129 lines
3.8 KiB
Plaintext
<%@page import="com.amarsoft.app.edoc.EDocument"%>
|
|
<%@page import="org.jdom.JDOMException"%>
|
|
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@ include file="/IncludeBegin.jsp"%><%
|
|
/*
|
|
Author: fmwu 2008/01/09
|
|
Content: 电子文档模板状态
|
|
*/
|
|
String sEDocNo = CurPage.getParameter("EDocNo");
|
|
String sTagList = "";
|
|
String sCheckTagList = "";
|
|
String sStateFmt="正常";
|
|
String sStateDef="正常";
|
|
|
|
//格式文件状态
|
|
String sFullPathFmt = Sqlca.getString("select FullPathFmt from EDOC_DEFINE where EDocNo='"+sEDocNo+"'");
|
|
if (sFullPathFmt == null) sFullPathFmt="";
|
|
java.io.File dFileFmt=new java.io.File(sFullPathFmt);
|
|
if(!dFileFmt.exists()){
|
|
sStateFmt="<strong><font color=red>文档格式文件不存在,需要重新上传!!</font></strong>";
|
|
}else{
|
|
try {
|
|
sTagList = EDocument.getTagList(sFullPathFmt);
|
|
} catch (IOException e) {
|
|
throw new JDOMException("模板格式文件的格式不符合要求,请重新上传符合要求规范的格式文件");
|
|
}
|
|
}
|
|
|
|
String sFullPathDef = Sqlca.getString("select FullPathDef from EDOC_DEFINE where EDocNo='"+sEDocNo+"'");
|
|
if (sFullPathDef == null) sFullPathDef="";
|
|
java.io.File dFileDef =new java.io.File(sFullPathDef);
|
|
if(!dFileDef.exists()){
|
|
sStateDef="<strong><font color=red>数据定义文件不存在,需要重新上传!!</font></strong>";
|
|
}else{
|
|
if (dFileFmt.exists()) {
|
|
EDocument doc = new EDocument(sFullPathFmt,sFullPathDef);
|
|
sCheckTagList = doc.checkTag();
|
|
}
|
|
}
|
|
%>
|
|
<html>
|
|
<head>
|
|
<title>电子文档状态</title>
|
|
</head>
|
|
|
|
<body leftmargin="0" topmargin="0" style="{overflow:scroll;overflow-x:visible;overflow-y:visible}">
|
|
<table width="99%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td valign="top">
|
|
<table width="90%" align=center border="0" cellspacing="0" cellpadding="4">
|
|
<tr>
|
|
<td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<%
|
|
if (dFileFmt.exists()) {
|
|
%>
|
|
<%=new Button("查看格式文件","查看格式文件","javascript:TemplateViewFmt()","","").getHtmlText()%>
|
|
<%
|
|
}
|
|
%>
|
|
</td>
|
|
<td>
|
|
<%
|
|
if (dFileDef.exists()) {
|
|
%>
|
|
<%=new Button("查看数据定义文件","查看数据定义文件","javascript:TemplateViewDef()","","").getHtmlText()%>
|
|
<%
|
|
}
|
|
%>
|
|
</td>
|
|
<td>
|
|
<%
|
|
if (dFileFmt.exists() && dFileDef.exists()) {
|
|
%>
|
|
<%-- <%=new Button("查看文档示例","查看文档示例","javascript:TemplateViewExample()","","").getHtmlText()%> --%>
|
|
<%
|
|
}
|
|
%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>格式文件状态:</b></td>
|
|
<td><%=sStateFmt%> </td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>数据定义文件状态:</b></td>
|
|
<td><%=sStateDef%> </td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>文档格式文件存在的标签列表:</b></td>
|
|
<td>
|
|
<textarea name="TagList" rows="20" cols="120"><%=sTagList%></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>数据定义和格式文件标签检查:</b></td>
|
|
<td>
|
|
<textarea name="CheckList" rows="10" cols="120"><%=sCheckTagList%></textarea>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
<script type="text/javascript">
|
|
setDialogTitle("查看电子文档状态");
|
|
/*~[Describe=格式文件查看;InputParam=无;OutPutParam=无;]~*/
|
|
function TemplateViewFmt(){
|
|
sEDocNo = "<%=sEDocNo%>";
|
|
AsControl.OpenPage("/AppConfig/EDoc/TemplateView.jsp","EDocNo="+sEDocNo+"&EDocType=Fmt");
|
|
}
|
|
|
|
/*~[Describe=定义文件查看;InputParam=无;OutPutParam=无;]~*/
|
|
function TemplateViewDef(){
|
|
sEDocNo = "<%=sEDocNo%>";
|
|
AsControl.OpenPage("/AppConfig/EDoc/TemplateView.jsp","EDocNo="+sEDocNo+"&EDocType=Def");
|
|
}
|
|
|
|
/*~[Describe=生成文件预览;InputParam=无;OutPutParam=无;]~*/
|
|
function TemplateViewExample(){
|
|
sEDocNo = "<%=sEDocNo%>";
|
|
AsControl.OpenPage("/AppConfig/EDoc/TemplateViewExample.jsp","EDocNo="+sEDocNo);
|
|
}
|
|
</script>
|
|
<%@ include file="/IncludeEnd.jsp"%> |