<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" session="true"%>
<%@ taglib uri="/WEB-INF/lib/zero-html.tld" prefix="html" %>
<%
String username = request.getParameter("username");
String partent = request.getParameter("partent");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>项目文档搜索</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="/eposs/easyUI/easyui-index.css" type="text/css"></link>
<link rel="stylesheet" href="/eposs/easyUI/icon.css" type="text/css"></link>
<link rel="stylesheet" href="/eposs/jTip/global.css" type="text/css"></link>
<link rel="stylesheet" href="/eposs/css/custom-table.css" type="text/css"></link>
<script type="text/javascript" src="/eposs/easyUI/jquery-1.4.2.js"></script>
<script type="text/javascript" src="/eposs/easyUI/jquery.easyui.min.js"></script>
<script src="/eposs/easyUI/mask.js" type="text/javascript"></script>
<script type="text/javascript" src="/eposs/jTip/jtip.js"></script>
<script type="text/javascript" src="/eposs/cookie/cookie.js"></script>
<style type="text/css">
.custom-div{
padding-top:30px;
padding-bottom:28px;
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
font-size:11px;
}
.custom-table input{
width:150px;
}
.custom-table select{
width:150px;
}
</style>
<script type="text/javascript">
var username='<%=username == null ? "" : username%>';
var partent = '<%=partent == null ? "" : partent%>';
var pw = window.parent;
$(function(){
$('#fileList').datagrid({
url:"/eposs/ProjectFileFindServlet",
queryParams : {
'partent' : partent
},
pagination : true,
loadMsg : '数据加载中请稍候......',
style : 'overflow:hidden;',
striped : true,
pageList : [16],
width: getWidth(0.97),
animate:true,
collapsible:true,
fitColumns:false,
remoteSort:true,
height: 625,
toolbar:"#toolbar",
columns:[[
<%if("FBB".equals(partent)){%> /*FBB的Tab页*/
{field:'id',hidden:true},
{field:'name',title:'资料名称',width:getWidth(0.2),
formatter:function(val,row){
var id = row.id;
return "<span style='text-decoration:underline;' onclick='download(" + id + ")'><font color = 'blue'> "+val+" </font> </span>";
}
},{field:'file_type',title:'资料类型',align:"center",width:getWidth(0.1)},
{field:'bur_line',title:'产品线',align:"center",width:getWidth(0.1)},
{field:'bur_area',title:'所在地区',align:"center",width:getWidth(0.1)},
{field:'bur_operator',title:'运营商',align:"center",width:getWidth(0.09)},
{field:'scene_property',title:'场景',align:"center",width:getWidth(0.09)},
{field:'bur_editer',title:'项目责任人',align:"center",width:getWidth(0.09)},
{field:'upload_date',title:'上传时间',align:"center",width:getWidth(0.1)},
{field:'author',title:'上传者',align:"center",width:getWidth(0.1)}
<%}else{%> /*oss和专业服务的tab页*/
{field:'id',hidden:true},
{field:'name',title:'资料名称',width:getWidth(0.3),
formatter:function(val,row){
var id = row.id;
return "<span style='text-decoration:underline;' onclick='download(" + id + ")'><font color = 'blue'> "+val+" </font> </span>";
}
},
{field:'file_type',title:'资料类型',align:"center",width:getWidth(0.1)},
{field:'bur_line',title:'产品线',align:"center",width:getWidth(0.1)},
{field:'bur_area',title:'所在地区',align:"center",width:getWidth(0.1)},
{field:'bur_operator',title:'运营商',align:"center",width:getWidth(0.09)},
{field:'bur_editer',title:'项目责任人',align:"center",width:getWidth(0.09)},
{field:'upload_date',title:'上传时间',align:"center",width:getWidth(0.1)},
{field:'author',title:'上传者',align:"center",width:getWidth(0.1)}
<%}%>
]],
onLoadSuccess:function(){
JT_init();
}
})
});
function getWidth(percent){
return document.body.clientWidth * percent;
}
/*高级搜索*/
function complexSearch(){
var bur_area = document.getElementById('bur_area').value
var bur_line = document.getElementById('bur_line').value
var file_type = document.getElementById('file_type').value
var para = {
'partent' : partent,
'burLine' : bur_line == '-1.000001' ? '' : bur_line,
'bur_area' : bur_area == '-1.000001' ? '' : bur_area ,
'file_type' : file_type == '-1' ? '' : file_type,
<%if("FBB".equals(partent)){%> /*如果是fbb就将场景值传到后台*/
'scene_property' : document.getElementById('scene_property').value,
<%} %>
'bur_operator' : document.getElementById('bur_operator').value
};
for(var cell in para){
para[cell] = jQuery.trim(para[cell]);
}
para['search'] = 'true';
$('#fileList').datagrid('load',para);
}
function download(id){
var p = pw.parent;
var url = '/eposs/ProjectFileDownloadServlet?id=' + id;
p.$('#exportIFrame').attr('src',url);
}
/*用户使用搜索功能时 处理回车事件*/
$(function(){
$('#fileFind').bind('keydown',function(et){
var e = et || event;
if(e.keyCode==13){
complexSearch();
}
})
});
</script>
</head><body>
<div style="padding-left:20px;padding-bottom:20px;">
<div class="custom-div" id = "fileFind">
<table class="custom-table">
<tr>
<td>资料类型:</td>
<td>
<html:ComboBox id="file_type" datasource="file_type_all" itemText="dict_value" itemValue="dict_key" onchange="complexSearch()"/>
</td>
<td>运营商:</td>
<%if("FBB".equals(partent)){%> <!-- 上传了资料的FBB项目的运营商 -->
<td>
<html:ComboBox id="bur_operator" datasource="bur_operator_fbb_all" itemText="bur_operator" itemValue="bur_operator" onchange="complexSearch()"/>
</td>
<%}else if("service".equals(partent)){ %>
<td>
<html:ComboBox id="bur_operator" datasource="bur_operator_service_all" itemText="bur_operator" itemValue="bur_operator" onchange="complexSearch()"/>
</td>
<%}else if("OSS".equals(partent)){ %>
<td>
<html:ComboBox id="bur_operator" datasource="bur_operator_oss_all" itemText="bur_operator" itemValue="bur_operator" onchange="complexSearch()"/>
</td>
<%} %>
<%if("FBB".equals(partent)){%> <!-- 如果是FBB就显示场景 -->
<td>项目场景:</td>
<td>
<html:ComboBox id="scene_property" datasource="bureau_scene_all" itemText="dict_value" itemValue="dict_value" onchange="complexSearch()"/>
</td>
<%} %>
<td>产品线:</td>
<td>
<html:ComboBox id="bur_line" datasource="bureau_line_all" itemText="dict_value" itemValue="dict_key" onchange="complexSearch()"/>
</td>
<td>所在地区:</td>
<td>
<html:ComboBox id="bur_area" datasource="bureau_area_all" itemText="dict_value" itemValue="dict_key" onchange="complexSearch()"/>
</td>
</tr>
</table>
</div>
<table id="fileList"></table>
<div style='display:none'>
<iframe id='exportIFrame' src=""></iframe>
</div>
</div>
</body>
</html>
?
?