91 lines
3.7 KiB
Plaintext
91 lines
3.7 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@ include file="/Frame/resources/include/include_begin_simplelist.jspf"%>
|
||
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
|
||
<%
|
||
/*
|
||
Author: undefined 2016-09-01
|
||
Content:
|
||
History Log:
|
||
*/
|
||
String flowunid=CurPage.getParameter("flowunid");
|
||
String sRightType = CurPage.getParameter("RightType");//权限
|
||
|
||
String compClientID = request.getParameter("CompClientID");
|
||
ASObjectModel doTemp = new ASObjectModel("LBContractList");
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||
dwTemp.Style="1"; //--设置为Grid风格--
|
||
dwTemp.ReadOnly = "1";
|
||
dwTemp.setPageSize(50);
|
||
dwTemp.genHTMLObjectWindow(flowunid);
|
||
|
||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||
String sButtons[][] =null;
|
||
if("ReadOnly".equals(sRightType)){
|
||
sButtons=new String[][]{
|
||
};
|
||
}else{
|
||
sButtons=new String[][]{
|
||
{"true","","Button","上传","上传","upload()","","","",""}
|
||
};
|
||
}
|
||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||
<script type="text/javascript">
|
||
//在加载完表格后调用
|
||
function afterSearch(){
|
||
for(var i=0;i<getRowCount(0);i++){
|
||
//getObj(0,i,"operation").innerHTML='<a class="box" onclick="upload()" style={color:#000;text-decoration:underline;}><font color="blue">上传</font></a>';
|
||
|
||
var filelist=getObj(0,i,"filelist").innerHTML;
|
||
var obj=eval('('+filelist+')');
|
||
var html="";
|
||
for(var file in obj){
|
||
html+=obj[file]['filename'];
|
||
html+='【上传时间:'+obj[file]['inputtime']+'】';
|
||
html+='【上传人:'+obj[file]['inputuser']+'】';
|
||
html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】<a class="btn_icon_detail" onclick="editOffice(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\')"> </a><a class="btn_icon btn_icon_close" onclick="deleteFile('+obj[file]['id']+');"> </a></br>';
|
||
}
|
||
getObj(0,i,"filelist").innerHTML=html;
|
||
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
|
||
};
|
||
}
|
||
function editOffice(id,filename){
|
||
var filetype=filename.substr(filename.indexOf(".")+1);
|
||
var status=2;
|
||
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/OnlineOperation/online/editOfficeOnLine.jsp","filetype="+filetype+"&status="+status+"&id="+id+"&CompClientID=<%=compClientID%>","dialogWidth=1024px;dialogHeight=1000px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
|
||
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
|
||
return;
|
||
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
|
||
alert("提交成功!");
|
||
reloadSelf();
|
||
}else{
|
||
alert("提交失败!");
|
||
}
|
||
},"编辑文档");
|
||
}
|
||
function upload(){
|
||
var id=getItemValue(0,getRow(),"id");
|
||
var sDocType=getItemValue(0,getRow(),"doc_Type");
|
||
var sOneClassify=getItemValue(0,getRow(),"one_Classify");
|
||
var sTwoClassify=getItemValue(0,getRow(),"Two_Classify");
|
||
if(typeof(id)=="undefined")id="";
|
||
if(typeof(sDocType)=="undefined")sDocType="";
|
||
if(typeof(sOneClassify)=="undefined")sOneClassify="";
|
||
if(typeof(sTwoClassify)=="undefined")sTwoClassify="";
|
||
|
||
var param="Library_id="+id+"&DocType="+sDocType+"&TwoClassify="+sTwoClassify+"&OneClassify="+sOneClassify;
|
||
param+="&flowunid=<%=flowunid%>";
|
||
var sUrl="/Tenwa/Comm/Document/LBDocumentInfo.jsp";
|
||
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
|
||
|
||
reloadSelf();
|
||
},"上传附件");
|
||
}
|
||
|
||
function deleteFile(id){
|
||
var sParams="attId="+id;
|
||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteFile",sParams);
|
||
reloadSelf();
|
||
}
|
||
|
||
</script>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%> |