<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<script type="text/javascript" src="${pageContext.request.contextPath }/pms/pub/combobox/comboboxUtil.js" charset="utf-8"></script>
|
<script type="text/javascript">
|
|
function queryEqu(){
|
var name=$("input[name='name']").val();
|
var gender = $("select[name='gender']").val();
|
var queryParams = {name:name,gender:gender};
|
var table = $("#eid").combogrid({
|
url:"${pageContext.request.contextPath}/pms/msg/getEquInfo.do?id=${msgInfo.eid }",
|
panelWidth:500,
|
panelheight:400,
|
queryParams :queryParams,
|
toolbar:"#grid-toolbar",
|
textField:'equipmentName',
|
fit : true,
|
fitColumns : false,
|
multiple: true,
|
idField : 'id',
|
nowrap : false,
|
checkOnSelect: true,
|
columns : [ [
|
{
|
field : 'id',
|
title : '编号',
|
width : 150,
|
checkbox : true
|
}, {
|
field : 'equipmentName',
|
title : '设备',
|
width : 160,
|
align:'center',
|
sortable : true
|
} , {
|
field : 'equipmentCode',
|
title : '编号',
|
align:'center',
|
width : 80,
|
sortable : true
|
}
|
] ],
|
// onCheck:function (rowIndex, rowData) {
|
// var rows = table.combogrid('grid').datagrid("getSelections");
|
// console.info(rows);
|
//
|
// },
|
// onUncheck: function (rowIndex, rowData) {
|
// var rows = table.combogrid('grid').datagrid("getSelections");
|
// console.info(rows);
|
//
|
// },
|
// onCheckAll:function (data) {
|
// var select = $("#grid-toolbar").find("table");//.datagrid("getSelections");
|
// var rows = table.combogrid('grid').datagrid("getSelections");
|
// console.info(rows);
|
// },
|
// onUncheckAll:function (data) {
|
// var rows = table.combogrid('grid').datagrid("getSelections");
|
// console.info(rows);
|
// },
|
onLoadSuccess : function(row) {
|
var rowData = row.rows;
|
$.each(rowData,function(idx,val){//遍历JSON
|
if(val.attr1 == "select"){
|
table.combogrid('grid').datagrid("checkRow", idx);//如果数据行为已选中则选中改行
|
}
|
});
|
}
|
|
});
|
}
|
|
$(function(){
|
queryEqu();
|
});
|
|
|
$(function() {
|
$('#hoUser').searchbox({
|
searcher:function(value,name){
|
var dialog = parent.$.modalDialog({
|
title : '选择用户',
|
width : 430,
|
height : 420,
|
href : '${pageContext.request.contextPath}/pms/sys/user/userPicker.jsp',
|
buttons : [ {
|
text : '选择',
|
iconCls:'icon-standard-disk',
|
handler : function() {
|
var row = dialog.find("#userPickGrid").datagrid('getSelected');
|
if(row){
|
$("#userid").attr("value",row.id);
|
$("#hoUser").searchbox("setValue",row.name);
|
dialog.dialog('destroy');
|
}else{
|
$.messager.show('提示', '请选择工单', 'info');
|
}
|
}
|
} ]
|
});
|
}
|
});
|
$('#hoUser1').searchbox({
|
searcher:function(value,name){
|
var dialog = parent.$.modalDialog({
|
title : '选择用户',
|
width : 430,
|
height : 420,
|
href : '${pageContext.request.contextPath}/pms/sys/user/userPicker.jsp',
|
buttons : [ {
|
text : '选择',
|
iconCls:'icon-standard-disk',
|
handler : function() {
|
var row = dialog.find("#userPickGrid").datagrid('getSelected');
|
if(row){
|
$("#userid1").attr("value",row.id);
|
$("#hoUser1").searchbox("setValue",row.name);
|
dialog.dialog('destroy');
|
}else{
|
$.messager.show('提示', '请选择工单', 'info');
|
}
|
}
|
} ]
|
});
|
}
|
});
|
});
|
</script>
|
|
<div id="grid-toolbar" style="display: none;">
|
<table>
|
<tr>
|
<td>
|
<form id="searchForm" style="margin:4px 0px 0px 0px">
|
<table>
|
<tr>
|
<th>设备名</th>
|
<td><input type="text" name="name" class="easyui-validatebox " style="width:80px;" /></td>
|
<th>类型</th>
|
<td>
|
<select name="gender" class="easyui-combobox fselect" data-options="panelHeight:'auto'">
|
<option value="">设备类型</option>
|
<option value="1">卷接机</option>
|
<option value="2">包装机</option>
|
<option value="3">成型机</option>
|
<option value="4">发射机</option>
|
</select>
|
</td>
|
<td>
|
<input type="button" value="筛选" onclick="queryEqu()">
|
</td>
|
</tr>
|
</table>
|
</form>
|
</td>
|
</tr>
|
</table>
|
</div>
|
|
|
<div class="easyui-layout" data-options="fit:true,border:false">
|
<div data-options="region:'center',border:false" title="" style="overflow: auto;padding:5px">
|
<form id="form" method="post">
|
<fieldset>
|
<legend>机台通知信息</legend>
|
<table class="table" style="width: 100%;">
|
<tr>
|
<th>标题</th>
|
<td colspan="3">
|
<input type=hidden name=id value="${msgInfo.id }"/>
|
<input type="text" class="e-input" name="title" value="${msgInfo.title }">
|
</td>
|
</tr>
|
<tr>
|
<th>通知内容</th>
|
<td colspan="3">
|
<textarea style="width:460px;height:60px;resize:none" name="content">${msgInfo.content }</textarea>
|
</td>
|
</tr>
|
|
<%-- <tr>
|
<th>推送机台</th>
|
<td colspan="3">
|
<input type="text" id="eid" name="eid" value="${msgInfo.issuerName }" style="width: 460px" class="easyui-combogrid easyui-validatebox" data-options="textField:'equipmentName',valueField:'id'"/>
|
|
</td>
|
</tr>--%>
|
</table>
|
</fieldset>
|
</form>
|
</div>
|
</div>
|