134 lines
4.9 KiB
Plaintext
134 lines
4.9 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||
/*
|
||
Author: undefined 2020-07-24
|
||
Content:
|
||
History Log:
|
||
*/
|
||
String flowunid=CurPage.getParameter("ObjectNo");
|
||
String sObjectType=CurPage.getParameter("FlowNo");
|
||
ASObjectModel doTemp = new ASObjectModel("APPFeedbackOpinionList");
|
||
String isHistory=CurPage.getParameter("IsHistory");
|
||
String RightType=CurPage.getParameter("RightType");
|
||
String userName=CurUser.getUserName();
|
||
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||
dwTemp.Style="1"; //--设置为Grid风格--
|
||
dwTemp.ReadOnly = "1"; //只读模式
|
||
dwTemp.setPageSize(10);
|
||
dwTemp.genHTMLObjectWindow("");
|
||
|
||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||
String sButtons[][] = {
|
||
/* {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, */
|
||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'')","","","","btn_icon_delete"},
|
||
};
|
||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||
<script type="text/javascript">
|
||
|
||
//在加载完表格后调用
|
||
function afterSearch(){
|
||
var isHistory="<%=isHistory%>";
|
||
var rightType="<%=RightType%>";
|
||
var userName="<%=userName%>";
|
||
var sObjectType="<%=sObjectType%>";//该流程类型
|
||
for(var i=0;i<getRowCount(0);i++){
|
||
var filelist=getObj(0,i,"filelist").innerHTML;
|
||
var obj=eval('('+filelist+')');
|
||
var html="";
|
||
for(var file in obj){
|
||
html+='<a onclick=downloadFile(\''+obj[file]['id']+'\')><font color="blue">'+obj[file]['filename']+'</font></a>';
|
||
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']+'\',\''+obj[file]['inputuser']+'\')"> </a> ';
|
||
if(rightType!='ReadOnly'&&isHistory!="true"&&sObjectType==obj[file]['objecttype']&&userName==obj[file]['inputuser']){
|
||
html+='<a class="btn_icon btn_icon_close" onclick="deleteFile(\''+obj[file]['id']+'\')"> </a>';
|
||
}
|
||
if(obj[file]['image']=="true"){
|
||
html+='<a class="btn_icon btn_icon_search" onclick="showImage(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> </a>';
|
||
}
|
||
if(obj[file]['word']=="true"){
|
||
html+='<a class="btn_icon btn_icon_search" onclick="showWord(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> </a>';
|
||
}
|
||
if(obj[file]['pdf']=="true"){
|
||
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> </a>';
|
||
}
|
||
html+='</br>';
|
||
}
|
||
getObj(0,i,"filelist").innerHTML=html;
|
||
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
|
||
};
|
||
}
|
||
function showPDF(id,name){
|
||
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
|
||
var param="attrid="+id;
|
||
AsControl.OpenPage(sUrl,param,"","");
|
||
}
|
||
function showWord(id,name){
|
||
var sUrl="/Tenwa/Comm/DocList/showWord.jsp";
|
||
var param="attrid="+id;
|
||
AsControl.OpenPage(sUrl,param,"","");
|
||
}
|
||
function showImage(id,name){
|
||
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
|
||
var param="attrid="+id;
|
||
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;",function(message){
|
||
|
||
},name);
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
function upload(id){
|
||
//saveRecord();
|
||
|
||
var param="Library_id="+id;
|
||
var sUrl="/Tenwa/Comm/DocList/DocListInfo.jsp";
|
||
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
|
||
var str=RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","updateBussinessCheck","library_id="+id+",BussinessCheck=DocCheck_0");
|
||
// reloadSelf();
|
||
location.reload();
|
||
heping();
|
||
},"上传附件");
|
||
}
|
||
function downloadFile(id){
|
||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
|
||
}
|
||
function deleteFile(id){
|
||
var sParams="attId="+id+",BussinessCheck=DocCheck_2";
|
||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteAttr",sParams);
|
||
reloadSelf();
|
||
heping();
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
function newRecord(){
|
||
var sUrl = "";
|
||
AsControl.OpenView(sUrl,'','_self','');
|
||
}
|
||
function viewAndEdit(){
|
||
var sUrl = "";
|
||
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||
alert("参数不能为空!");
|
||
return ;
|
||
}
|
||
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||
}
|
||
</script>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%> |