160 lines
6.9 KiB
Plaintext
160 lines
6.9 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%><%@
|
|
include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
|
/*
|
|
Content: --电子合同模板管理列表
|
|
*/
|
|
ASObjectModel doTemp = new ASObjectModel("EdocTemplateList");
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
|
dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
|
|
dwTemp.setPageSize(20); //设置页面显示的列数
|
|
dwTemp.genHTMLObjectWindow("");
|
|
|
|
String sButtons[][] = {
|
|
{"true","","Button","新增","新增一条记录","newRecord()","","","",""},
|
|
{"true","","Button","详情","查看/修改详情","viewAndEdit()","","","",""},
|
|
{"true","","Button","删除","删除所选中的记录","deleteRecord()","","","",""},
|
|
{"true","","Button","格式文件上传","电子文档格式文件上传","TemplateUploadFmt()","","","","btn_icon_up"},
|
|
{"true","","Button","数据定义文件上传","电子文档数据定义文件上传","TemplateUploadDef()","","","","btn_icon_up"},
|
|
{"true","","Button","电子文档状态查看","电子文档状态查看","TemplateView()","","","","btn_icon_detail"},
|
|
{"false","","Button","打印借款合同测试","打印借款合同案例","BCSample()","","","","btn_icon_print"}, //案例,上线前请删除
|
|
{"false","","Button","清单文件编辑","清单文件编辑","EdocEdit('Def')","","","","btn_icon_edit"},
|
|
{"true","","Button","格式文件编辑","格式文件编辑","EdocEdit('Fmt')","","","","btn_icon_edit"},
|
|
};
|
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
|
<script type="text/javascript">
|
|
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
|
function newRecord(){
|
|
var tabinfo={"title":"新增电子合同模型"};
|
|
AsControl.OpenTab("/AppConfig/EDoc/TemplateFrame.jsp","",tabinfo);
|
|
reloadSelf();
|
|
}
|
|
|
|
/*~[Describe=查看及修改详情;InputParam=无;OutPutParam=无;]~*/
|
|
function viewAndEdit(){
|
|
var sEDocNo = getItemValue(0,getRow(),"EDocNo");//--永久类型编号
|
|
if(typeof(sEDocNo)=="undefined" || sEDocNo.length==0) {
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return ;
|
|
}
|
|
var tabinfo={"title":"电子合同模型["+sEDocNo+"]"};
|
|
AsControl.OpenTab("/AppConfig/EDoc/TemplateFrame.jsp","EDocNo="+sEDocNo,tabinfo);
|
|
reloadSelf();
|
|
}
|
|
|
|
/*~[Describe=电子文档格式文件上传;InputParam=无;OutPutParam=无;]~*/
|
|
function TemplateUploadFmt(){
|
|
var sEDocNo = getItemValue(0,getRow(),"EDocNo");//--永久类型编号
|
|
if(typeof(sEDocNo)=="undefined" || sEDocNo.length==0) {
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return ;
|
|
}
|
|
sFileName = getItemValue(0,getRow(),"FileNameFmt");//模板文件名称
|
|
if(typeof(sFileName)!="undefined" && sFileName.length!=0) {
|
|
if(!confirm("电子文档格式文件已经存在,确定要覆盖上传吗?")){
|
|
return;
|
|
}
|
|
}
|
|
AsDialog.PopView("/AppConfig/EDoc/TemplateChooseDialog.jsp","EDocNo="+sEDocNo+"&DocType=Fmt","dialogWidth=650px;dialogHeight=250px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;");
|
|
reloadSelf();
|
|
}
|
|
|
|
/*~[Describe=电子文档模板上传;InputParam=无;OutPutParam=无;]~*/
|
|
function TemplateUploadDef(){
|
|
var sEDocNo = getItemValue(0,getRow(),"EDocNo");//--永久类型编号
|
|
if(typeof(sEDocNo)=="undefined" || sEDocNo.length==0) {
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return ;
|
|
}
|
|
sFileName = getItemValue(0,getRow(),"FileNameDef");//模板文件名称
|
|
if(typeof(sFileName)!="undefined" && sFileName.length!=0) {
|
|
if(!confirm("电子文档数据定义文件已经存在,确定要覆盖上传吗?")){
|
|
return;
|
|
}
|
|
}
|
|
AsDialog.PopView("/AppConfig/EDoc/TemplateChooseDialog.jsp","EDocNo="+sEDocNo+"&DocType=Def","dialogWidth=650px;dialogHeight=250px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;");
|
|
reloadSelf();
|
|
}
|
|
|
|
/*~[Describe=电子文档状态查看;InputParam=无;OutPutParam=无;]~*/
|
|
function TemplateView(){
|
|
var sEDocNo = getItemValue(0,getRow(),"EDocNo");//--永久类型编号
|
|
if(typeof(sEDocNo)=="undefined" || sEDocNo.length==0) {
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return ;
|
|
}
|
|
var tabinfo={"title":"查看电子文档状态["+sEDocNo+"]"};
|
|
AsControl.OpenTab("/AppConfig/EDoc/TemplateState.jsp","EDocNo="+sEDocNo,tabinfo);
|
|
}
|
|
|
|
/*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/
|
|
function deleteRecord(){
|
|
var sEDocNo = getItemValue(0,getRow(),"EDocNo");//--永久类型编号
|
|
if(typeof(sEDocNo)=="undefined" || sEDocNo.length==0) {
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return ;
|
|
}
|
|
|
|
if(confirm("确定要删除该模板吗?如果该模板在代码表中存在定义!下次进入该页面会自动初始化该记录!")){
|
|
sReturn = RunJavaMethodTrans("com.amarsoft.app.edoc.EDocManager","deleteEDocRela","EDocNo="+sEDocNo);
|
|
if(sReturn == "SUCCEEDED") {
|
|
alert("删除关联信息及模板文件成功!");
|
|
}
|
|
as_delete("myiframe0");
|
|
}
|
|
}
|
|
|
|
/*~[Describe=案例,上线前请删除;InputParam=无;OutPutParam=无;]~*/
|
|
function BCSample(){
|
|
var sManageUserID = " <%=CurUser.getUserID()%>" ;
|
|
var sParaString = "ManageUserID," +sManageUserID;
|
|
AsDialog.selectCatalogDialog("SelectEDocContract",sParaString,"", function(sReturn){
|
|
if (typeof(sReturn)=="undefined" || sReturn.length==0) return;
|
|
sReturn = sReturn.split("@");
|
|
sObjectNo = sReturn[0];
|
|
sObjectType = sReturn[1];
|
|
sEDocNo = AsControl.RunJsp("/AppConfig/EDoc/EDocNo.jsp","ObjectType="+sObjectType);
|
|
alert(sEDocNo);
|
|
if (typeof(sObjectNo)=="undefined" || sObjectNo.length==0){
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return;
|
|
}
|
|
sReturn = AsControl.RunJsp("/AppConfig/EDoc/EDocCreateCheckAll.jsp","ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&EDocNo="+sEDocNo);
|
|
alert("Return1=="+sReturn);
|
|
if(sReturn == "nodef"){
|
|
alert("没有对应的模板,电子合同生成失败!");
|
|
return;
|
|
}
|
|
if(sReturn == "nodoc"){
|
|
sReturn = AsControl.RunJsp("/AppConfig/EDoc/EDocCreateActionAll.jsp","ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&EDocNo="+sEDocNo);
|
|
}
|
|
alert("Return2=="+sReturn);
|
|
if (typeof(sReturn)=="undefined" || sReturn.length==0){
|
|
sSerialNo = sReturn;
|
|
AsControl.OpenNewWin("/AppConfig/EDoc/EDocView.jsp","SerialNo="+sSerialNo,OpenStyle);
|
|
reloadSelf();
|
|
}
|
|
});
|
|
}
|
|
|
|
// 文档模板在线编辑
|
|
function EdocEdit(sDocType) {
|
|
if(sDocType) sDocType = "Fmt";
|
|
var sEDocNo = getItemValue(0,getRow(),"EDocNo");//--永久类型编号
|
|
if(typeof(sEDocNo)=="undefined" || sEDocNo.length==0) {
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return ;
|
|
}
|
|
|
|
var sFileName = getItemValue(0,getRow(),"FileNameFmt");//模板格式文件名称
|
|
var sFilePathFmt = getItemValue(0,getRow(),"FullPathFmt");//模板格式文件
|
|
var sDefFileName = getItemValue(0,getRow(),"FullPathDef");//模板定义文件
|
|
if(typeof(sFileName)!="undefined" && sFileName.length!=0) {
|
|
//alert("DefFileName="+sDefFileName+"&SerialNo="+sSerialNo+"&DocType="+sDocType+"&FileName="+sFileName);
|
|
AsControl.OpenNewWin("/AppConfig/EDoc/EDocManage/EDocEditView.jsp","EDocNo="+sEDocNo+"&DocType="+sDocType+"&FilePath="+sFilePathFmt+"&FileName="+sFileName+"&DefFileName="+sDefFileName,"");
|
|
}else{
|
|
alert("相关文件还未上传,请先上传后再编辑.");
|
|
}
|
|
}
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |