83 lines
3.1 KiB
Plaintext
83 lines
3.1 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%><%@
|
|
include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
|
/*
|
|
Describe: 电子合同模板管理详情
|
|
*/
|
|
String PG_TITLE = "电子文档模板详情";
|
|
//获得页面参数
|
|
String sEDocNo = CurPage.getParameter("EDocNo");
|
|
if(sEDocNo==null) sEDocNo="";
|
|
|
|
ASObjectModel doTemp = new ASObjectModel("EdocTemplateInfo");
|
|
if (sEDocNo != "") {
|
|
doTemp.setReadOnly("EDocNo,EDocName",true);
|
|
}
|
|
doTemp.setUnit("FileNameFmt","<input type=button class=inputDate value=\" 查看..\" name=button2 onClick=\"javascript:TemplateViewFmt();\"> ");
|
|
doTemp.setUnit("FileNameDef","<input type=button class=inputDate value=\" 查看..\" name=button4 onClick=\"javascript:TemplateViewDef();\"> ");
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
|
dwTemp.genHTMLObjectWindow(sEDocNo);
|
|
|
|
String sButtons[][] = {
|
|
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
|
|
};
|
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
setDialogTitle("<%=PG_TITLE%>");
|
|
var bIsInsert = false; //标记DW是否处于“新增状态”
|
|
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
|
|
function saveRecord(sPostEvents){
|
|
if(bIsInsert){
|
|
beforeInsert();
|
|
sEDocNo = getItemValue(0,getRow(),"EDocNo");
|
|
sReturn = RunJavaMethodTrans("com.amarsoft.app.edoc.EDocManager","checkEDocNoExist","EDocNo="+sEDocNo);
|
|
if(sReturn == sEDocNo){
|
|
alert("["+sEDocNo+"]模板编号已经存在,请输入新的模板编号");
|
|
bIsInsert = true;
|
|
return;
|
|
}
|
|
}
|
|
beforeUpdate();
|
|
as_save("myiframe0",sPostEvents);
|
|
//打开业务类型关联页面
|
|
sEDocNo = getItemValue(0,getRow(),"EDocNo");
|
|
sEDocType = getItemValue(0,getRow(),"EDocType");
|
|
parent.OpenRelativeList(sEDocNo,sEDocType);
|
|
}
|
|
|
|
/*~[Describe=执行插入操作前执行的代码;InputParam=无;OutPutParam=无;]~*/
|
|
function beforeInsert(){
|
|
bIsInsert = false;
|
|
}
|
|
|
|
/*~[Describe=执行更新操作前执行的代码;InputParam=无;OutPutParam=无;]~*/
|
|
function beforeUpdate(){
|
|
}
|
|
|
|
/*~[Describe=格式文件查看;InputParam=无;OutPutParam=无;]~*/
|
|
function TemplateViewFmt(){
|
|
sEDocNo = getItemValue(0,getRow(),"EDocNo");//--永久类型编号
|
|
sFileName = getItemValue(0,getRow(),"FileNameFmt");//--格式文件
|
|
if(typeof(sFileName)=="undefined" || sFileName.length==0) {
|
|
alert("文件未上传!");
|
|
return ;
|
|
}
|
|
AsControl.OpenPage("/AppConfig/EDoc/TemplateView.jsp","EDocNo="+sEDocNo+"&EDocType=Fmt");
|
|
}
|
|
|
|
/*~[Describe=定义文件查看;InputParam=无;OutPutParam=无;]~*/
|
|
function TemplateViewDef(){
|
|
sEDocNo = getItemValue(0,getRow(),"EDocNo");//--永久类型编号
|
|
sFileName = getItemValue(0,getRow(),"FileNameDef");//--格式文件
|
|
if(typeof(sFileName)=="undefined" || sFileName.length==0) {
|
|
alert("文件未上传!");
|
|
return ;
|
|
}
|
|
AsControl.OpenPage("/AppConfig/EDoc/TemplateView.jsp","EDocNo="+sEDocNo+"&EDocType=Def");
|
|
}
|
|
|
|
sEDocType = getItemValue(0,getRow(),"EDocType");
|
|
parent.OpenRelativeList("<%=sEDocNo%>",sEDocType);
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |