106 lines
4.1 KiB
Plaintext
106 lines
4.1 KiB
Plaintext
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
|
<%@ page import="com.sipai.tools.SessionManager"%>
|
||
|
|
<%
|
||
|
|
SessionManager sessionManager = new SessionManager();
|
||
|
|
%>
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<title></title>
|
||
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||
|
|
<script type="text/javascript">
|
||
|
|
function selectFun(dialog, grid) {
|
||
|
|
var checkedItems = $('#grid').datagrid('getChecked');
|
||
|
|
var datas="";
|
||
|
|
$.each(checkedItems, function(index, item){
|
||
|
|
datas = '{"equipmentid":"'+item.equipmentcardid +'","id":"'+item.id+'","equipmentname":"'+item.equipmentname +'",'+
|
||
|
|
'"equipmentmodel":"'+item.equipmentmodel +'","equipmentclass":"'+item.equipmentclass.name+'",'+
|
||
|
|
'"geographyarea":"'+item.geographyarea.name +'","currentmanageflag":"'+item.currentmanageflag +'","remark":"'+item.remark +'"}';
|
||
|
|
});
|
||
|
|
return $.parseJSON(datas);
|
||
|
|
}
|
||
|
|
|
||
|
|
var grid;
|
||
|
|
$(function() {
|
||
|
|
grid = $('#grid').datagrid({
|
||
|
|
title : '',
|
||
|
|
url : ext.contextPath + '/equipment/getEquipmentCard.do?querytype=select',
|
||
|
|
striped : true,
|
||
|
|
rownumbers : true,
|
||
|
|
pagination : true,
|
||
|
|
singleSelect: true,
|
||
|
|
idField : 'id',
|
||
|
|
pageSize : 50,
|
||
|
|
pageList : [ 20, 50, 100],
|
||
|
|
columns : [ [
|
||
|
|
{checkbox:true , field : 'ck'},
|
||
|
|
{width : '160', title : '设备编号', field : 'equipmentcardid', sortable : true, halign:'center'},
|
||
|
|
{width : '240', title : '设备名称', field : 'equipmentname', sortable : true, halign:'center'},
|
||
|
|
{width : '80', title : '设备型号', field : 'equipmentmodel', sortable : true, halign:'center'},
|
||
|
|
{width : '80', title : '设备类型', field : 'equipmentclass', sortable : true, halign:'center' ,formatter:function(value){
|
||
|
|
if(value!=null){
|
||
|
|
if(value.status=="禁用"){
|
||
|
|
return value.name+"<img class='iconImg ext-icon-bullet_error' title='该类型已禁用' /> ";
|
||
|
|
}else{
|
||
|
|
|
||
|
|
return value.name;
|
||
|
|
}}}
|
||
|
|
},
|
||
|
|
{width : '180', title : '存放位置', field : 'geographyarea', sortable : true, halign:'center',formatter:function(value){
|
||
|
|
if(value!=null){
|
||
|
|
if(value.status=="禁用"){
|
||
|
|
return value.name+"<img class='iconImg ext-icon-bullet_error' title='该位置已禁用' /> ";
|
||
|
|
}else{
|
||
|
|
return value.name;
|
||
|
|
}}
|
||
|
|
}},
|
||
|
|
{width : '80', title : '状态', field : 'currentmanageflag', sortable : true, halign:'center'},
|
||
|
|
{width : '80', title : '备注', field : 'remark', sortable : true, halign:'center'},
|
||
|
|
] ],
|
||
|
|
toolbar : '#toolbar'
|
||
|
|
});
|
||
|
|
|
||
|
|
$('#search_dept').combotree({
|
||
|
|
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||
|
|
parentField : 'pid',
|
||
|
|
method:'get',
|
||
|
|
onBeforeSelect:function(node){
|
||
|
|
if(node.id=="-1"){
|
||
|
|
$("#deptid").tree("unselect");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
</script>
|
||
|
|
</head>
|
||
|
|
<body class="easyui-layout" data-options="fit:true,border:false">
|
||
|
|
<div id="toolbar" style="display: none;">
|
||
|
|
<table>
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<form id="searchForm">
|
||
|
|
<table class="tooltable">
|
||
|
|
<tr>
|
||
|
|
<td>设备名称</td>
|
||
|
|
<td><input id="search_name" name="search_name" class="easyui-textbox" /></td>
|
||
|
|
<td>存放位置</td>
|
||
|
|
<td><input id="search_areaid" name="search_areaid" class="easyui-texbox"/></td>
|
||
|
|
<td>
|
||
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||
|
|
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||
|
|
onclick="$('#search_name').textbox('setValue','');$('#search_line').combobox('setValue','');grid.datagrid('load',{});">重置</a>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</form>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<div data-options="region:'center',fit:true,border:false">
|
||
|
|
<table id="grid" data-options="fit:true,border:false"></table>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|