94 lines
3.8 KiB
Plaintext
94 lines
3.8 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@ include file="/IncludeBegin.jsp"%>
|
|
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
|
|
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
|
|
<%@ page import="java.util.List" %>
|
|
<style>
|
|
* { margin: 0; padding: 0;}
|
|
#jq22 { width: 100%; margin: 0 auto; font-size: 0;}
|
|
#jq22 li { display: inline-block; width: 32%; margin-left: 1%; padding-top: 1%;}
|
|
#jq22 li img { width: 100%;}
|
|
ul{ border-top:1px solid #BCBCBC;
|
|
border-bottom:1px solid #BCBCBC;}
|
|
.filetile{
|
|
margin-top:20px;
|
|
font-size:12px;
|
|
color:#363636;
|
|
}
|
|
</style>
|
|
<%
|
|
|
|
String flowunid=CurPage.getParameter("ObjectNo");
|
|
String sObjectType=CurPage.getParameter("FlowNo");
|
|
String type=CurPage.getParameter("type");
|
|
String query = CurPage.getParameter("query");//用于区别是不是合同查询时查询附件
|
|
|
|
if(type==null)type="";
|
|
|
|
|
|
String otherWhere="";
|
|
|
|
if(type==""){
|
|
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象
|
|
otherWhere=DocListInitAction.getFlowWhere(flow,"","rela");
|
|
}else if("proj".equals(type)){
|
|
otherWhere=" and rela.proj_id='"+CurPage.getParameter("proj_id")+"'";
|
|
}else if("contract".equals(type)){
|
|
otherWhere=" and (rela.contract_id='"+CurPage.getParameter("contract_id")+"' OR rela.proj_id='"+CurPage.getParameter("proj_id")+"')";
|
|
}
|
|
if("query".equals(query)){
|
|
otherWhere = otherWhere+" and rela.objecttype in ('BusinessApplyFlow','FundPaymentCarFlow','MortgageFileFlow') ";
|
|
}else{
|
|
otherWhere = otherWhere+" and rela.objecttype='"+sObjectType+"' ";
|
|
}
|
|
String compClientID = request.getParameter("CompClientID");
|
|
String sql="select O.id,lib.doc_name,filename from O left join jbo.app.tenwa.doc.LB_DOCLIBRARY lib on o.library_id=lib.id left join jbo.app.tenwa.doc.LB_DOCRELATIVE rela on lib.relative_id=rela.id";
|
|
sql+=" where O.content_type LIKE '%image%' and O.DELETEED<>'Y' or O.DELETEED is null"+otherWhere+" order by lib.doc_name,O.filename";
|
|
System.out.println(sql);
|
|
List<BizObject> list=JBOFactory.createBizObjectQuery("jbo.app.tenwa.doc.LB_DOCATTRIBUTE", sql).getResultList(false);
|
|
|
|
|
|
%>
|
|
<body style="overflow:hidden;background-color:#f1f1f1;" >
|
|
<div id="img_div" class="img-box" style="height:500px;overflow-y:scroll;">
|
|
|
|
<%
|
|
String beforeClass="";
|
|
for(int i=0;i<list.size();i++) {
|
|
if(i==0){
|
|
beforeClass=list.get(i).getAttribute("doc_name").getString();
|
|
%>
|
|
<span class="filetile"><%=list.get(i).getAttribute("doc_name").getString() %></span>
|
|
<ul id="jq22">
|
|
<%}else{
|
|
if(!beforeClass.equals(list.get(i).getAttribute("doc_name").getString())){
|
|
beforeClass=list.get(i).getAttribute("doc_name").getString();
|
|
%>
|
|
</ul>
|
|
<span class="filetile"><%=list.get(i).getAttribute("doc_name").getString() %></span>
|
|
<ul id="jq22">
|
|
<%
|
|
}} %>
|
|
<li>
|
|
<img id="_id_<%=i%>" onclick="showImage('<%=list.get(i).getAttribute("id").getString()%>','<%=list.get(i).getAttribute("doc_name").getString()+"-->"+list.get(i).getAttribute("filename").getString()%>')" title="<%=list.get(i).getAttribute("doc_name").getString()+"-->"+list.get(i).getAttribute("filename").getString() %>" data-original="<%=sWebRootPath%>/servlet/view/image?CompClientID=<%=compClientID%>&attrid=<%=list.get(i).getAttribute("id").getString() %>" src="<%=sWebRootPath%>/servlet/view/image?CompClientID=<%=compClientID%>&attrid=<%=list.get(i).getAttribute("id").getString() %>" />
|
|
</li>
|
|
<%if(i==list.size()-1){%>
|
|
</ul>
|
|
<%} %>
|
|
<%}%>
|
|
|
|
</div>
|
|
</body>
|
|
<script>
|
|
function showImage(id,name){
|
|
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
|
|
var param="attrid="+id+"&flowunid=<%=flowunid%>";
|
|
AsDialog.PopView(sUrl,param,"dialogWidth="+(parent.innerWidth-100)+"px;dialogHeight="+(parent.innerHeight+80)+"px;",function(message){
|
|
|
|
},name);
|
|
}
|
|
$(function(){
|
|
$("#img_div").height($(document.body).height()-65);
|
|
})
|
|
</script>
|
|
<%@ include file="/IncludeEnd.jsp"%> |