first commit
This commit is contained in:
83
bin/WebRoot/jsp/msg/alarmlevelForSelect.jsp
Normal file
83
bin/WebRoot/jsp/msg/alarmlevelForSelect.jsp
Normal file
@ -0,0 +1,83 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!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 = '{"id":"'+item.id +'","id":"'+item.id +'"}';
|
||||
});
|
||||
return $.parseJSON(datas);
|
||||
}
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgType.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '类型名称', field : 'name', sortable : true, halign:'center' },
|
||||
{width : '180', title : 'ID', field : 'id', sortable : true, halign:'center' },
|
||||
{width : '80', title : '类型种类', field: 'pid', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
var str = '';
|
||||
if(value=="personal"){
|
||||
str = "个人消息";
|
||||
}else if(value=="system"){
|
||||
str = "系统消息";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</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>
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" style="width: 180px;" /></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="$('#searchForm').form('clear');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>
|
||||
121
bin/WebRoot/jsp/msg/msgAdd.jsp
Normal file
121
bin/WebRoot/jsp/msg/msgAdd.jsp
Normal file
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/msg/saveMsgYM.do", $(".form").serialize(), function(data) {
|
||||
if(data.res.indexOf("成功")==-1){
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}else {
|
||||
top.$.messager.alert('提示', data.res, 'info', function(){
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectMsgType(msgtype,mtypename){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择消息类型',
|
||||
width: 600,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/msg/msgTypeForSelect.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
for (var i = 0; i < $("#"+msgtype+" option").length; i++) {
|
||||
if($("#"+msgtype).get(0).options[i].value==res.split(")")[0]){
|
||||
$("#"+msgtype).get(0).options[i].remove();
|
||||
}
|
||||
}
|
||||
//$("#"+msgtype).append("<option value='"+res.split(")")[0]+"' selected>"+res.split(")")[1]+"</option>");
|
||||
$("#"+mtypename).textbox('setValue',res.split(")")[1]);//easyui textbox赋值jquery不一样
|
||||
$("#"+msgtype).val(res.split(")")[0]);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
//dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th >消息类型</th>
|
||||
<td >
|
||||
<!-- <select id="mtype" name="mtype" > -->
|
||||
<!-- <option value="P">个人信息</option> -->
|
||||
<!-- </select> <a href="javascript:void(0)" onclick="selectMsgType('mtype')">更多</a> -->
|
||||
<input id="mtypename" name="mtypename" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'单击选择'" value="个人信息" readonly/>
|
||||
<input id="mtype" name="mtype" type="hidden" value="P" />
|
||||
</td>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#mtypename").textbox('textbox').bind("click", function () {
|
||||
selectMsgType("mtype","mtypename");
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>接收人</th>
|
||||
<td>
|
||||
<input id="recvname" name="recvname" class="easyui-textbox" data-options="required:true,validType:'isBlank',multiline:true,iconCls:'icon-man',readonly:true"
|
||||
style="overflow:auto;width:100%;height:80px;" value="" />
|
||||
<input id="recvid" name="recvid" type="hidden" />
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#recvname").textbox('textbox').bind("click", function () {
|
||||
selectUsers("recvname","recvid","${param.iframeId}");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >内容</th>
|
||||
<td ><input name="content" class="easyui-textbox" data-options="multiline:true" style="overflow:auto;width:100%;height:200px;" value=""validtype="length[0,250]" invalidMessage="有效长度0-250" ></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<th >发送方式</th>
|
||||
<td ><select id="sendway" name="sendway" >
|
||||
<option value="msg">仅消息发送</option>
|
||||
<option value="sms">仅短信发送</option>
|
||||
<option value="both">消息+短信发送</option>
|
||||
</select></td>
|
||||
</tr> -->
|
||||
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
129
bin/WebRoot/jsp/msg/msgAlarmlevelAdd.jsp
Normal file
129
bin/WebRoot/jsp/msg/msgAlarmlevelAdd.jsp
Normal file
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
var msguserids= $('#msguserids').val();
|
||||
var smsuserids= $('#smsuserids').val();
|
||||
//alert($(".form").serialize())
|
||||
$.post(ext.contextPath + "/msg/saveAlarmlevel.do", $(".form").serialize()+"&msguserids="+msguserids+"&smsuserids="+smsuserids, function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectFun(state,id){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择pid',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/msg/alarmlevelForSelect.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+state).textbox("setValue",res.id);
|
||||
$("#"+id).val(res.id);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>报警级别</th>
|
||||
<td><input id="alarmLevel" name="alarmLevel" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'请输入:一级报警、二级报警......'" style="width:100%" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >短信发送用户</th>
|
||||
<td ><input id="smssend" name="smssend" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:80px;" value="" />
|
||||
<input id="smsuserids" name="smsuserids" type="hidden" value="${smsuserids}"/>
|
||||
<input id="smsuseridname" name="smsuseridname" type="hidden" value="${smsuseridname}"/>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#smssend").textbox('textbox').bind("click", function () {
|
||||
selectUsers("smssend","smsuserids","${param.iframeId}");
|
||||
})
|
||||
})
|
||||
</script></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >消息发送用户</th>
|
||||
<td ><input id="msgsend" name="msgsend" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:80px;" value="" />
|
||||
<input id="msguserids" name="msguserids" type="hidden" value="${msguserids}">
|
||||
<input id="msguseridname" name="msguseridname" type="hidden" value="${msguseridname}">
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#msgsend").textbox('textbox').bind("click", function () {
|
||||
selectUsers("msgsend","msguserids","${param.iframeId}");
|
||||
})
|
||||
})
|
||||
</script></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >发送方式</th>
|
||||
<td >
|
||||
<select id="sendway" name="sendway" class="easyui-combobox" style="width:152px;">
|
||||
<option value='msg'>仅消息发送</option>
|
||||
<option value='sms'>仅短信发送</option>
|
||||
<option value='both'>消息+短信发送</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none;">
|
||||
<th>pid编号</th>
|
||||
<td ><input id="state" name="state" class="easyui-textbox" value="<%=request.getParameter("msgid") %>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>消息发送条件 例:(>1,=1,1-2)</th>
|
||||
<td><input id="msgrole" name="msgrole" class="easyui-textbox" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >备注</th>
|
||||
<td ><input id="remark" name="remark" class="easyui-textbox" validtype="length[0,250]" invalidMessage="有效长度0-250"
|
||||
data-options="multiline:true" style="overflow:auto;width:100%;height:80px;" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
99
bin/WebRoot/jsp/msg/msgAlarmlevelEdit.jsp
Normal file
99
bin/WebRoot/jsp/msg/msgAlarmlevelEdit.jsp
Normal file
@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@page import="com.sipai.tools.SessionManager"%>
|
||||
<%SessionManager sessionManager = new SessionManager();%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#sendway').combobox('setValue', '${msgAlarmlevel.sendway}');
|
||||
$("#smssend").textbox('textbox').bind("click", function () {
|
||||
selectUsers("smssend","smsuserids","${param.iframeId}");
|
||||
})
|
||||
$("#msgsend").textbox('textbox').bind("click", function () {
|
||||
selectUsers("msgsend","msguserids","${param.iframeId}");
|
||||
})
|
||||
|
||||
$("#msguserids").val('${msguserids}');
|
||||
$("#msgsend").textbox('setValue','${msgusernames}');
|
||||
|
||||
$("#smsuserids").val('${smsuserids}');
|
||||
$("#smssend").textbox('setValue','${smsusernames}');
|
||||
});
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
var msguserids= $('#msguserids').val();
|
||||
var smsuserids= $('#smsuserids').val();
|
||||
$.post(ext.contextPath + "/msg/updateAlarmlevel.do", $(".form").serialize()+"&msguserids="+msguserids+"&smsuserids="+smsuserids, function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" value="${msgAlarmlevel.id }" type="hidden"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>报警级别</th>
|
||||
<td><input id="alarmLevel" name="alarmLevel" class="easyui-textbox" value="${msgAlarmlevel.alarmLevel }"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >短信发送用户</th>
|
||||
<td ><input id="smssend" name="smssend" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:60px;" value="" />
|
||||
<input id="smsuserids" name="smsuserids" type="hidden" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >消息发送用户</th>
|
||||
<td ><input id="msgsend" name="msgsend" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:60px;" value="" />
|
||||
<input id="msguserids" name="msguserids" type="hidden" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >发送方式</th>
|
||||
<td >
|
||||
<select id="sendway" name="sendway" class="easyui-combobox" style="width:152px;">
|
||||
<option value='msg'>仅消息发送</option>
|
||||
<option value='sms'>仅短信发送</option>
|
||||
<option value='both'>消息+短信发送</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>消息发送条件 例:(>1,=1,1-2)</th>
|
||||
<td><input id="msgrole" name="msgrole" class="easyui-textbox" value="${msgAlarmlevel.msgrole}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >备注</th>
|
||||
<td ><input id="remark" name="remark" class="easyui-textbox" validtype="length[0,250]" invalidMessage="有效长度0-250"
|
||||
data-options="multiline:true" style="overflow:auto;width:100%;height:80px;" value="${msgAlarmlevel.remark }" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br /><br />
|
||||
<div id="p" >
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
177
bin/WebRoot/jsp/msg/msgAlarmlevelList.jsp
Normal file
177
bin/WebRoot/jsp/msg/msgAlarmlevelList.jsp
Normal file
@ -0,0 +1,177 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@page import="com.sipai.tools.SessionManager"%>
|
||||
<%SessionManager sessionManager = new SessionManager();%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if($('#pid').combobox('getValue')==""){
|
||||
alert("类型种类为必填项,不可为空");
|
||||
return 0;
|
||||
}
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/msg/updateMsgType.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
$('#pid').combobox('setValue', '${msgType.pid}');
|
||||
$('#sendway').combobox('setValue', '${msgType.sendway}');
|
||||
});
|
||||
|
||||
function doadd() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '消息报警级别',
|
||||
url : ext.contextPath + '/msg/addMsgAlarmlevel.do?iframeId=iframeadd',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgAlarmlevel.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
function dodeletes() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deletesMsgAlarmlevel.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var editFun = function(id) {
|
||||
alert();
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeedit',
|
||||
title : '编辑消息类型',
|
||||
url : ext.contextPath + '/msg/editAlarmlevel.do?iframeId=iframeedit&id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun = function(id) {
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看消息类型',
|
||||
url : ext.contextPath + '/msg/viewAlarmlevel.do?id=' + id
|
||||
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
$('#p').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '报警级别',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodeletes();}
|
||||
}]
|
||||
});
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgAlarmlevel.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
idfield :'id',
|
||||
columns :[[
|
||||
{checkbox:true, field:'ck'},
|
||||
{width : '100',title : '报警级别',field : 'alarmLevel', sortable : true, halign:'center'},
|
||||
{width : '100',title : '短信发送用户',field : 'smssend', sortable : true, halign :'center'},
|
||||
{width : '100',title : '消息发送用户',field : 'msgsend', sortable :true, halign :'center'},
|
||||
{width : '100',title : '发送方式', field : 'sendway', sortable: true, halign : 'center',formatter :function(value,row){
|
||||
if(value=="both"){
|
||||
return "消息+短信发送";
|
||||
}else if(value=="msg"){
|
||||
return "消息发送";
|
||||
} else if(value=="sms"){
|
||||
return "短信发送";
|
||||
}
|
||||
}},
|
||||
{width : '100',title : '备注' , field : 'remark' ,sortable : true, halign : 'center'},
|
||||
{width : '100',title : '操作' ,field :'action', halign:'center',align :'center', formatter : function(value, row){
|
||||
var str = '';
|
||||
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/> ';
|
||||
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/> ';
|
||||
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/> ';
|
||||
|
||||
return str;
|
||||
}}
|
||||
|
||||
]],
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="p" >
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
58
bin/WebRoot/jsp/msg/msgAlarmlevelView.jsp
Normal file
58
bin/WebRoot/jsp/msg/msgAlarmlevelView.jsp
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@page import="com.sipai.tools.SessionManager"%>
|
||||
<%SessionManager sessionManager = new SessionManager();%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" value="${msgAlarmlevel.id }" type="hidden"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>报警级别</th>
|
||||
<td><span id="alarmLevel" name="alarmLevel">${msgAlarmlevel.alarmLevel }</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >短信发送用户</th>
|
||||
<td ><span id="smssend" name="smssend" >${msgAlarmlevel.smssend }</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >消息发送用户</th>
|
||||
<td ><span id="msgsend" name="msgsend">${msgAlarmlevel.msgsend }</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >发送方式</th>
|
||||
<td >
|
||||
<span id="sendway" name="sendway" >
|
||||
<c:if test="${msgAlarmlevel.sendway=='msg'}">仅消息发送</c:if>
|
||||
<c:if test="${msgAlarmlevel.sendway=='sms'}">仅短信发送</c:if>
|
||||
<c:if test="${msgAlarmlevel.sendway=='both'}">消息+短信发送</c:if>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="width:100%;height:80px;">
|
||||
<th >备注</th>
|
||||
<td ><span id="remark" name="remark" >${msgAlarmlevel.remark }</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br /><br />
|
||||
<div id="p" >
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
264
bin/WebRoot/jsp/msg/msgListrecv.jsp
Normal file
264
bin/WebRoot/jsp/msg/msgListrecv.jsp
Normal file
@ -0,0 +1,264 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '新建消息',
|
||||
url : ext.contextPath + '/msg/addMsg.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看消息',
|
||||
url : ext.contextPath + '/msg/viewMsgRecv.do?id=' + id,
|
||||
onClose:function(){
|
||||
grid.datagrid('reload');
|
||||
},
|
||||
buttons : [
|
||||
{
|
||||
text : '回复',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreply(dialog, grid);
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '上一条',
|
||||
handler : function() {
|
||||
var morder="pre";
|
||||
var send="false";//判断是否为发送,还是接收,接收要更改未读状态
|
||||
dialog.find('iframe').get(0).contentWindow.doview(dialog, grid,morder,send);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '下一条',
|
||||
handler : function() {
|
||||
var morder="next";
|
||||
var send="false";//判断是否为发送,还是接收,接收要更改未读状态
|
||||
dialog.find('iframe').get(0).contentWindow.doview(dialog, grid,morder,send);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgRecv.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgRecvs.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgrecv.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
rowStyler: function(index,row){
|
||||
if (row.mrecv!=null){
|
||||
//必须两个if这样写
|
||||
if(row.mrecv[0].status=='U'){
|
||||
return 'font-weight:bold;';
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '类型', field : 'typename', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{width : '160', title : '内容', field : 'content', sortable : true, halign:'center'},
|
||||
{width : '80', title : '发送人', field: 'susername', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.caption;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{width : '160', title : '发送时间', field : 'sdt', sortable : true, halign:'center',formatter:function(value){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},
|
||||
{width : '80', title : '已读状态', field : 'mrecv', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value[0].status=="U"){
|
||||
return "未读";
|
||||
}else{
|
||||
return "已读";
|
||||
}
|
||||
}
|
||||
},
|
||||
{title : '操作', field : 'action', width : '90', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/> ';
|
||||
//str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsgRecv.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function formattime(val) {
|
||||
var year = parseInt(val.year) + 1900;
|
||||
var month = (parseInt(val.month) + 1);
|
||||
month = month > 9 ? month : ('0' + month);
|
||||
var date = parseInt(val.date);
|
||||
date = date > 9 ? date : ('0' + date);
|
||||
var hours = parseInt(val.hours);
|
||||
hours = hours > 9 ? hours : ('0' + hours);
|
||||
var minutes = parseInt(val.minutes);
|
||||
minutes = minutes > 9 ? minutes : ('0' + minutes);
|
||||
var seconds = parseInt(val.seconds);
|
||||
seconds = seconds > 9 ? seconds : ('0' + seconds);
|
||||
var time = year + '-' + month + '-' + date + ' ' + hours + ':'
|
||||
+ minutes + ':' + seconds;
|
||||
return time;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<!-- <td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>-->
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsgRecv.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<!-- <td><div class="datagrid-btn-separator"></div></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="">导入</a></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_go',plain:true" onclick="">导出</a></td> -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td>发送人</td>
|
||||
<td><input name="search_susername" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>内容</td>
|
||||
<td><input name="search_content" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>发送时间</td>
|
||||
<td><input id="sdt" name="sdt" class="Wdate" value="${param.sdt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',maxDate:'#F{$dp.$D(\'edt\')}'})"
|
||||
readonly></td>
|
||||
<td>到</td>
|
||||
<td><input id="edt" name="edt" class="Wdate" value="${param.edt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'#F{$dp.$D(\'sdt\')}'})"
|
||||
readonly></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="$('#searchForm').form('clear');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>
|
||||
|
||||
229
bin/WebRoot/jsp/msg/msgListrecv4main.jsp
Normal file
229
bin/WebRoot/jsp/msg/msgListrecv4main.jsp
Normal file
@ -0,0 +1,229 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var viewFun = function(id) {
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看消息',
|
||||
url : ext.contextPath + '/msg/viewMsgRecv.do?id=' + id,
|
||||
onClose:function(){
|
||||
grid.datagrid('reload');
|
||||
},
|
||||
buttons : [
|
||||
{
|
||||
text : '回复',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreply(dialog, grid);
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '上一条',
|
||||
handler : function() {
|
||||
var morder="pre";
|
||||
var send="false";//判断是否为发送,还是接收,接收要更改未读状态
|
||||
dialog.find('iframe').get(0).contentWindow.doview(dialog, grid,morder,send);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '下一条',
|
||||
handler : function() {
|
||||
var morder="next";
|
||||
var send="false";//判断是否为发送,还是接收,接收要更改未读状态
|
||||
dialog.find('iframe').get(0).contentWindow.doview(dialog, grid,morder,send);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgRecv.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgRecvs.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgrecv.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
/* pagination : true, */
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
/* pageSize : 50,
|
||||
pageList : [ 20, 50, 100], */
|
||||
rowStyler: function(index,row){
|
||||
if (row.mrecv!=null){
|
||||
//必须两个if这样写
|
||||
if(row.mrecv[0].status=='U'){
|
||||
return 'font-weight:bold;';
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
columns : [ [
|
||||
//{checkbox:true , field : 'ck'},
|
||||
{width : '70', title : '类型', field : 'typename', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{width : '160', title : '内容', field : 'content', sortable : true, halign:'center'},
|
||||
{width : '80', title : '发送人', field: 'susername', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.caption;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{width : '140', title : '发送时间', field : 'sdt', sortable : true, halign:'center',formatter:function(value){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},
|
||||
/* {width : '80', title : '已读状态', field : 'mrecv', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value[0].status=="U"){
|
||||
return "未读";
|
||||
}else{
|
||||
return "已读";
|
||||
}
|
||||
}
|
||||
}, */
|
||||
{title : '操作', field : 'action', width : '90', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/> ';
|
||||
//str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsgRecv.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
/* toolbar : '#toolbar', */
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="easyui-layout" data-options="fit:true,border:false">
|
||||
<%-- <div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<!-- <td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>-->
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsgRecv.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<!-- <td><div class="datagrid-btn-separator"></div></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="">导入</a></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_go',plain:true" onclick="">导出</a></td> -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td>发送人</td>
|
||||
<td><input name="search_susername" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>内容</td>
|
||||
<td><input name="search_content" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>发送时间</td>
|
||||
<td><input id="sdt" name="sdt" class="Wdate" value="${param.sdt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',maxDate:'#F{$dp.$D(\'edt\')}'})"
|
||||
readonly></td>
|
||||
<td>到</td>
|
||||
<td><input id="edt" name="edt" class="Wdate" value="${param.edt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'#F{$dp.$D(\'sdt\')}'})"
|
||||
readonly></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="$('#searchForm').form('clear');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>
|
||||
</div>
|
||||
|
||||
|
||||
229
bin/WebRoot/jsp/msg/msgListrecvdeleted.jsp
Normal file
229
bin/WebRoot/jsp/msg/msgListrecvdeleted.jsp
Normal file
@ -0,0 +1,229 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
var grid;
|
||||
var viewFun = function(id) {
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看消息',
|
||||
url : ext.contextPath + '/msg/viewMsgRecv.do?id=' + id,
|
||||
onClose:function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(recvid) {
|
||||
parent.$.messager.confirm('提示', '您确定要彻底删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgRecv.do', {id : recvid}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.mrecv[0].id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要彻底删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgRecvs.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgrecvdeleted.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
rowStyler: function(index,row){
|
||||
if (row.mrecv!=null){
|
||||
//必须两个if这样写
|
||||
if(row.mrecv[0].status=='U'){
|
||||
return 'font-weight:bold;';
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '20', title : '', field : 'redflag', sortable : false, halign:'center',formatter:function(value, row){
|
||||
var str = '';
|
||||
if(row.mrecv[0].redflag=='1'){
|
||||
str ='<img class="iconImg ext-icon-flag_red" title="重要" onclick="resetRedflag(\''+row.id+'\');"/> ';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{width : '100', title : '类型', field : 'typename', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{width : '160', title : '内容', field : 'content', sortable : true, halign:'center'},
|
||||
{width : '80', title : '发送人', field: 'susername', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.caption;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{width : '160', title : '发送时间', field : 'sdt', sortable : true, halign:'center',formatter:function(value){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},
|
||||
{width : '80', title : '已读状态', field : 'mrecv', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value[0].status=="U"){
|
||||
return "未读";
|
||||
}else{
|
||||
return "已读";
|
||||
}
|
||||
}
|
||||
},
|
||||
{title : '操作', field : 'action', width : '90', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/> ';
|
||||
//str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsgRecv.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.mrecv[0].id+'\');"/>';
|
||||
<%}%>
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function formattime(val) {
|
||||
var year = parseInt(val.year) + 1900;
|
||||
var month = (parseInt(val.month) + 1);
|
||||
month = month > 9 ? month : ('0' + month);
|
||||
var date = parseInt(val.date);
|
||||
date = date > 9 ? date : ('0' + date);
|
||||
var hours = parseInt(val.hours);
|
||||
hours = hours > 9 ? hours : ('0' + hours);
|
||||
var minutes = parseInt(val.minutes);
|
||||
minutes = minutes > 9 ? minutes : ('0' + minutes);
|
||||
var seconds = parseInt(val.seconds);
|
||||
seconds = seconds > 9 ? seconds : ('0' + seconds);
|
||||
var time = year + '-' + month + '-' + date + ' ' + hours + ':'
|
||||
+ minutes + ':' + seconds;
|
||||
return time;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsgRecv.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td>发送人</td>
|
||||
<td><input name="search_susername" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>内容</td>
|
||||
<td><input name="search_content" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>发送时间</td>
|
||||
<td><input id="sdt" name="sdt" class="Wdate" value="${param.sdt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',maxDate:'#F{$dp.$D(\'edt\')}'})"
|
||||
readonly></td>
|
||||
<td>到</td>
|
||||
<td><input id="edt" name="edt" class="Wdate" value="${param.edt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'#F{$dp.$D(\'sdt\')}'})"
|
||||
readonly></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="$('#searchForm').form('clear');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>
|
||||
|
||||
235
bin/WebRoot/jsp/msg/msgListrollbacked.jsp
Normal file
235
bin/WebRoot/jsp/msg/msgListrollbacked.jsp
Normal file
@ -0,0 +1,235 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var viewFun = function(id,issms) {
|
||||
if(issms=="sms"){
|
||||
//查看短信
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看短信',
|
||||
url : ext.contextPath + '/msg/viewSms.do?id=' + id ,
|
||||
onClose:function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看信息',
|
||||
url : ext.contextPath + '/msg/viewMsgSend.do?id=' + id+'&send=send'
|
||||
});
|
||||
}
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgsend.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgsends.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgrollbacked.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '20', title : '', field : 'redflag', sortable : false, halign:'center',formatter:function(value, row){
|
||||
var str = '';
|
||||
if(value=='1'){
|
||||
str ='<img class="iconImg ext-icon-flag_red" title="重要"/> ';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{width : '80', title : '类型', field : 'typename', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '80', title : '方式', field : 'issms', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value=="sms"){
|
||||
return "短信";
|
||||
}else{
|
||||
return "消息";
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '280', title : '内容', field : 'content', sortable : true, halign:'center'},
|
||||
{width : '80', title : '发送人', field: 'susername', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.caption;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '160', title : '发送时间', field : 'sdt', sortable : true, halign:'center',align:'center',formatter:function(value){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},
|
||||
{title : '操作', field : 'action', width : '160', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\',\''+row.issms+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsg.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
if(row.issms!='sms'){
|
||||
//str+=' <a href="#" onclick="viewstatus(\''+row.id+'\');">浏览情况</a>';
|
||||
str+=' <img class="iconImg ext-icon-eye" title="浏览情况" onclick="viewstatus(\''+row.id+'\');"/>';
|
||||
}else{
|
||||
str+=' ';
|
||||
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function formattime(val) {
|
||||
var year = parseInt(val.year) + 1900;
|
||||
var month = (parseInt(val.month) + 1);
|
||||
month = month > 9 ? month : ('0' + month);
|
||||
var date = parseInt(val.date);
|
||||
date = date > 9 ? date : ('0' + date);
|
||||
var hours = parseInt(val.hours);
|
||||
hours = hours > 9 ? hours : ('0' + hours);
|
||||
var minutes = parseInt(val.minutes);
|
||||
minutes = minutes > 9 ? minutes : ('0' + minutes);
|
||||
var seconds = parseInt(val.seconds);
|
||||
seconds = seconds > 9 ? seconds : ('0' + seconds);
|
||||
var time = year + '-' + month + '-' + date + ' ' + hours + ':'
|
||||
+ minutes + ':' + seconds;
|
||||
return time;
|
||||
}
|
||||
function viewstatus(id){
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '浏览情况',
|
||||
url : ext.contextPath + '/msg/viewMsgStatus.do?id=' + id
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsg.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td>发送人</td>
|
||||
<td><input name="search_susername" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>内容</td>
|
||||
<td><input name="search_content" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>发送时间</td>
|
||||
<td><input id="sdt" name="sdt" class="Wdate" value="${param.sdt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',maxDate:'#F{$dp.$D(\'edt\')}'})"
|
||||
readonly></td>
|
||||
<td>到</td>
|
||||
<td><input id="edt" name="edt" class="Wdate" value="${param.edt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'#F{$dp.$D(\'sdt\')}'})"
|
||||
readonly></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="$('#searchForm').form('clear');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>
|
||||
|
||||
269
bin/WebRoot/jsp/msg/msgListsend.jsp
Normal file
269
bin/WebRoot/jsp/msg/msgListsend.jsp
Normal file
@ -0,0 +1,269 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'send',
|
||||
title : '新建消息',
|
||||
url : ext.contextPath + '/msg/addMsg.do?iframeId=send',
|
||||
buttons : [ {
|
||||
text : '发送',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog,grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id,issms) {
|
||||
if(issms=="sms"){
|
||||
//查看短信
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看短信',
|
||||
url : ext.contextPath + '/msg/viewSms.do?id=' + id ,
|
||||
onClose:function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看信息',
|
||||
url : ext.contextPath + '/msg/viewMsgSend.do?id=' + id+'&send=send',
|
||||
buttons : [ {
|
||||
text : '上一条',
|
||||
handler : function() {
|
||||
var morder="pre";
|
||||
var send="true";//判断是否为发送,还是接收,接收要更改未读状态
|
||||
dialog.find('iframe').get(0).contentWindow.doview(dialog, grid,morder,send);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '下一条',
|
||||
handler : function() {
|
||||
var morder="next";
|
||||
var send="true";//判断是否为发送,还是接收,接收要更改未读状态
|
||||
dialog.find('iframe').get(0).contentWindow.doview(dialog, grid,morder,send);
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsg.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgs.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgsend.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '80', title : '类型', field : 'typename', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '80', title : '方式', field : 'issms', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value=="sms"){
|
||||
return "短信";
|
||||
}else{
|
||||
return "消息";
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '280', title : '内容', field : 'content', sortable : true, halign:'center'},
|
||||
{width : '80', title : '发送人', field: 'susername', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.caption;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '160', title : '发送时间', field : 'sdt', sortable : true, halign:'center',align:'center',formatter:function(value){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},
|
||||
{title : '操作', field : 'action', width : '160', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\',\''+row.issms+'\');"/> ';
|
||||
//str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsg.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
if(row.issms!='sms'){
|
||||
//str+=' <a href="#" onclick="viewstatus(\''+row.id+'\');">浏览情况</a>';
|
||||
str+=' <img class="iconImg ext-icon-eye" title="浏览情况" onclick="viewstatus(\''+row.id+'\');"/>';
|
||||
}else{
|
||||
str+=' ';
|
||||
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function formattime(val) {
|
||||
var year = parseInt(val.year) + 1900;
|
||||
var month = (parseInt(val.month) + 1);
|
||||
month = month > 9 ? month : ('0' + month);
|
||||
var date = parseInt(val.date);
|
||||
date = date > 9 ? date : ('0' + date);
|
||||
var hours = parseInt(val.hours);
|
||||
hours = hours > 9 ? hours : ('0' + hours);
|
||||
var minutes = parseInt(val.minutes);
|
||||
minutes = minutes > 9 ? minutes : ('0' + minutes);
|
||||
var seconds = parseInt(val.seconds);
|
||||
seconds = seconds > 9 ? seconds : ('0' + seconds);
|
||||
var time = year + '-' + month + '-' + date + ' ' + hours + ':'
|
||||
+ minutes + ':' + seconds;
|
||||
return time;
|
||||
}
|
||||
function viewstatus(id){
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '浏览情况',
|
||||
url : ext.contextPath + '/msg/viewMsgStatus.do?id=' + id
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"msg/addMsg.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsg.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<!-- <td><div class="datagrid-btn-separator"></div></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="">导入</a></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_go',plain:true" onclick="">导出</a></td> -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td>发送人</td>
|
||||
<td><input name="search_susername" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>内容</td>
|
||||
<td><input name="search_content" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>发送时间</td>
|
||||
<td><input id="sdt" name="sdt" class="Wdate" value="${param.sdt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',maxDate:'#F{$dp.$D(\'edt\')}'})"
|
||||
readonly></td>
|
||||
<td>到</td>
|
||||
<td><input id="edt" name="edt" class="Wdate" value="${param.edt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'#F{$dp.$D(\'sdt\')}'})"
|
||||
readonly></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="$('#searchForm').form('clear');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>
|
||||
|
||||
235
bin/WebRoot/jsp/msg/msgListsenddeleted.jsp
Normal file
235
bin/WebRoot/jsp/msg/msgListsenddeleted.jsp
Normal file
@ -0,0 +1,235 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var viewFun = function(id,issms) {
|
||||
if(issms=="sms"){
|
||||
//查看短信
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看短信',
|
||||
url : ext.contextPath + '/msg/viewSms.do?id=' + id ,
|
||||
onClose:function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看信息',
|
||||
url : ext.contextPath + '/msg/viewMsgSend.do?id=' + id+'&send=send'
|
||||
});
|
||||
}
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgsend.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgsends.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgsenddeleted.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '20', title : '', field : 'redflag', sortable : false, halign:'center',formatter:function(value, row){
|
||||
var str = '';
|
||||
if(value=='1'){
|
||||
str ='<img class="iconImg ext-icon-flag_red" title="重要"/> ';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{width : '80', title : '类型', field : 'typename', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '80', title : '方式', field : 'issms', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value=="sms"){
|
||||
return "短信";
|
||||
}else{
|
||||
return "消息";
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '280', title : '内容', field : 'content', sortable : true, halign:'center'},
|
||||
{width : '80', title : '发送人', field: 'susername', sortable : true, halign:'center',formatter:function(value){
|
||||
if(value!=null){
|
||||
return value.caption;
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{width : '160', title : '发送时间', field : 'sdt', sortable : true, halign:'center',align:'center',formatter:function(value){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},
|
||||
{title : '操作', field : 'action', width : '160', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\',\''+row.issms+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsg.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
if(row.issms!='sms'){
|
||||
//str+=' <a href="#" onclick="viewstatus(\''+row.id+'\');">浏览情况</a>';
|
||||
str+=' <img class="iconImg ext-icon-eye" title="浏览情况" onclick="viewstatus(\''+row.id+'\');"/>';
|
||||
}else{
|
||||
str+=' ';
|
||||
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function formattime(val) {
|
||||
var year = parseInt(val.year) + 1900;
|
||||
var month = (parseInt(val.month) + 1);
|
||||
month = month > 9 ? month : ('0' + month);
|
||||
var date = parseInt(val.date);
|
||||
date = date > 9 ? date : ('0' + date);
|
||||
var hours = parseInt(val.hours);
|
||||
hours = hours > 9 ? hours : ('0' + hours);
|
||||
var minutes = parseInt(val.minutes);
|
||||
minutes = minutes > 9 ? minutes : ('0' + minutes);
|
||||
var seconds = parseInt(val.seconds);
|
||||
seconds = seconds > 9 ? seconds : ('0' + seconds);
|
||||
var time = year + '-' + month + '-' + date + ' ' + hours + ':'
|
||||
+ minutes + ':' + seconds;
|
||||
return time;
|
||||
}
|
||||
function viewstatus(id){
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '浏览情况',
|
||||
url : ext.contextPath + '/msg/viewMsgStatus.do?id=' + id
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsg.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td>发送人</td>
|
||||
<td><input name="search_susername" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td>内容</td>
|
||||
<td><input name="search_content" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>发送时间</td>
|
||||
<td><input id="sdt" name="sdt" class="Wdate" value="${param.sdt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',maxDate:'#F{$dp.$D(\'edt\')}'})"
|
||||
readonly></td>
|
||||
<td>到</td>
|
||||
<td><input id="edt" name="edt" class="Wdate" value="${param.edt }"
|
||||
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'#F{$dp.$D(\'sdt\')}'})"
|
||||
readonly></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="$('#searchForm').form('clear');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>
|
||||
|
||||
236
bin/WebRoot/jsp/msg/msgTypeAdd.jsp
Normal file
236
bin/WebRoot/jsp/msg/msgTypeAdd.jsp
Normal file
@ -0,0 +1,236 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if($('#pid').combobox('getValue')==""){
|
||||
alert("类型种类为必填项,不可为空");
|
||||
return 0;
|
||||
}
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/msg/saveMsgType.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else if(data.res == 2){
|
||||
top.$.messager.alert('提示', "ID已被占用,不可重复", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function selectUserRoles(rolename,roleid){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择接收角色',
|
||||
width: 600,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/user/roleForSelect.do?roleids='+$("#"+roleid).val(),
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectOK();
|
||||
if(res!=null){
|
||||
dialog.dialog('destroy');
|
||||
$("#"+rolename).textbox('setValue',res.split(")")[1]);//easyui textbox赋值jquery不一样
|
||||
$("#"+roleid).val(res.split(")")[0]);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
//dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
function doadd() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'id',
|
||||
title : '消息报警级别',
|
||||
url : ext.contextPath + '/msg/addMsgAlarmlevel.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgAlarmlevel.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
function dodeletes() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deletesMsgAlarmlevel.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'id',
|
||||
title : '编辑消息类型',
|
||||
url : ext.contextPath + '/msg/editAlarmlevel.do?id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun = function(id) {
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看消息类型',
|
||||
url : ext.contextPath + '/msg/viewAlarmlevel.do?id=' + id
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
$(function() {
|
||||
/* $('#p').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '报警级别',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodeletes();}
|
||||
}]
|
||||
});
|
||||
|
||||
msgid=$('#id').textbox('getValue','${msgType.id}');
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgAlarmlevel.do?msgid='+msgid,
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns :[[
|
||||
{checkbox:true, field:'ck'},
|
||||
{width : '100',title : '报警级别',field : 'alarmLevel', sortable : true, halign:'center'},
|
||||
{width : '100',title : '短信发送用户',field : 'smssend', sortable : true, halign :'center'},
|
||||
{width : '100',title : '消息发送用户',field : 'msgsend', sortable :true, halign :'center'},
|
||||
{width : '100',title : '发送方式', field : 'sendway', sortable: true, halign : 'center',formatter :function(value,row){
|
||||
if(value=="both"){
|
||||
return "消息+短信发送";
|
||||
}else if(value=="msg"){
|
||||
return "消息发送";
|
||||
} else if(value=="sms"){
|
||||
return "短信发送";
|
||||
}
|
||||
}},
|
||||
{width : '100',title : '备注' , field : 'remark' ,sortable : true, halign : 'center'},
|
||||
{title : '操作', field : 'action', width : '100', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/> ';
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/> ';
|
||||
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
|
||||
}); */
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th >类型名称</th>
|
||||
<td ><input id="name" name="name" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;width:100%;" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >ID</th>
|
||||
<td ><input id="id" name="id" class="easyui-textbox" data-options="required:true,validType:'isBlank',prompt:'英文单词或字母,如:P,mail,INFO等。'" style="overflow:auto;width:100%;" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >类型种类</th>
|
||||
<td >
|
||||
<select id="pid" name="pid" class="easyui-combobox" style="width:152px;">
|
||||
<option value='' select>请选择</option>
|
||||
<option value='personal'>个人消息</option>
|
||||
<option value='system'>系统消息</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br />
|
||||
<div id="p" >
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
286
bin/WebRoot/jsp/msg/msgTypeEdit.jsp
Normal file
286
bin/WebRoot/jsp/msg/msgTypeEdit.jsp
Normal file
@ -0,0 +1,286 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@page import="com.sipai.tools.SessionManager"%>
|
||||
<%SessionManager sessionManager = new SessionManager();%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if($('#pid').combobox('getValue')==""){
|
||||
alert("类型种类为必填项,不可为空");
|
||||
return 0;
|
||||
}
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/msg/updateMsgType.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
$('#pid').combobox('setValue', '${msgType.pid}');
|
||||
});
|
||||
|
||||
|
||||
function doadd() {
|
||||
msgid=$('#id').textbox('getValue','${msgType.id}');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '消息报警级别',
|
||||
url : ext.contextPath + '/msg/addMsgAlarmlevel.do?iframeId=iframeadd&msgid='+msgid,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgAlarmlevel.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
function dodeletes() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deletesMsgAlarmlevel.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeedit',
|
||||
title : '编辑消息类型',
|
||||
url : ext.contextPath + '/msg/editAlarmlevel.do?iframeId=iframeedit&id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun = function(id) {
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看消息类型',
|
||||
url : ext.contextPath + '/msg/viewAlarmlevel.do?id=' + id
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$('#p').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '报警级别',
|
||||
tools: [{
|
||||
iconCls:'icon-add',
|
||||
handler:function(){doadd();}
|
||||
},{
|
||||
iconCls:'icon-remove',
|
||||
handler:function(){dodeletes();}
|
||||
}]
|
||||
});
|
||||
|
||||
msgid=$('#id').textbox('getValue','${msgType.id}');
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgAlarmlevel.do?msgid='+msgid,
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns :[[
|
||||
{checkbox:true, field:'ck'},
|
||||
{width : '100',title : '报警级别',field : 'alarmLevel', sortable : true, halign:'center'},
|
||||
{width : '100',title : '消息发送用户',field : 'smssend', sortable : true, halign :'center',formatter :function(value,row){
|
||||
var msgusers =row.msgusers;
|
||||
var msguserstr="";
|
||||
for(var i=0;i<msgusers.length;i++){
|
||||
if(msguserstr!=""){
|
||||
msguserstr+=","
|
||||
}
|
||||
msguserstr+=msgusers[i].user.caption;
|
||||
}
|
||||
return msguserstr;
|
||||
}},
|
||||
{width : '100',title : '短信发送用户',field : 'msgsend', sortable :true, halign :'center',formatter :function(value,row){
|
||||
var smsusers =row.smsusers;
|
||||
var smsuserstr="";
|
||||
for(var i=0;i<smsusers.length;i++){
|
||||
if(smsuserstr!=""){
|
||||
smsuserstr+=","
|
||||
}
|
||||
smsuserstr+=smsusers[i].user.caption;
|
||||
}
|
||||
return smsuserstr;
|
||||
}},
|
||||
{width : '100',title : '发送方式', field : 'sendway', sortable: true, halign : 'center',formatter :function(value,row){
|
||||
if(value=="both"){
|
||||
return "消息+短信发送";
|
||||
}else if(value=="msg"){
|
||||
return "消息发送";
|
||||
} else if(value=="sms"){
|
||||
return "短信发送";
|
||||
}
|
||||
}},
|
||||
{width : '100',title : '备注' , field : 'remark' ,sortable : true, halign : 'center'},
|
||||
{title : '操作', field : 'action', width : '100', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/> ';
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/> ';
|
||||
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th >类型名称</th>
|
||||
<td ><input id="name" name="name" class="easyui-textbox" data-options="required:true,validType:'isBlank'" style="overflow:auto;width:100%;" value="${msgType.name}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >ID</th>
|
||||
<td ><input id="id" name="id" class="easyui-textbox" data-options="required:true,validType:'isBlank',readonly:true" style="overflow:auto;width:100%;" value="${msgType.id}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >类型种类</th>
|
||||
<td >
|
||||
<select id="pid" name="pid" class="easyui-combobox" style="width:152px;">
|
||||
<option value='' >请选择</option>
|
||||
<option value='personal' >个人消息</option>
|
||||
<option value='system' >系统消息</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<th >接收角色</th>
|
||||
<td ><input id="msgrole-name" name="msgrole-name" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:80px;" value="${msgrolename}" />
|
||||
<input id="msgroleids" name="msgroleids" type="hidden" value="${msgroleids}">
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#msgrole-name").textbox('textbox').bind("click", function () {
|
||||
selectUserRoles("msgrole-name","msgroleids");
|
||||
})
|
||||
})
|
||||
</script></td>
|
||||
</tr> --%>
|
||||
<%-- <tr>
|
||||
<th >消息发送用户</th>
|
||||
<td ><input id="msguser-name" name="msguser-name" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:80px;" value="${msgusername}" />
|
||||
<input id="msguserids" name="msguserids" type="hidden" value="${msguserids}">
|
||||
<input id="msguseridname" name="msguseridname" type="hidden" value="${msguseridname}">
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#msguser-name").textbox('textbox').bind("click", function () {
|
||||
selectUsers("msguser-name","msguserids","${param.iframeId}");
|
||||
})
|
||||
})
|
||||
</script></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >短信发送用户</th>
|
||||
<td ><input id="smsuser-name" name="smsuser-name" class="easyui-textbox" data-options="prompt:'内容空默认全部',multiline:true,readonly:true" style="overflow:auto;width:100%;height:80px;" value="${smsusername}" />
|
||||
<input id="smsuserids" name="smsuserids" type="hidden" value="${smsuserids}">
|
||||
<input id="smsuseridname" name="smsuseridname" type="hidden" value="${smsuseridname}">
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#smsuser-name").textbox('textbox').bind("click", function () {
|
||||
selectUsers("smsuser-name","smsuserids","${param.iframeId}");
|
||||
})
|
||||
})
|
||||
</script></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >发送方式</th>
|
||||
<td >
|
||||
<select id="sendway" name="sendway" class="easyui-combobox" style="width:152px;">
|
||||
<option value='msg'>仅消息发送</option>
|
||||
<option value='sms'>仅短信发送</option>
|
||||
<option value='both'>消息+短信发送</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >备注</th>
|
||||
<td ><input id="remark" name="remark" class="easyui-textbox" validtype="length[0,250]" invalidMessage="有效长度0-250"
|
||||
data-options="multiline:true" style="overflow:auto;width:100%;height:80px;" value="${ msgType.remark}" />
|
||||
</td>
|
||||
</tr> --%>
|
||||
</table>
|
||||
</form>
|
||||
<br /><br />
|
||||
<div id="p" >
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
76
bin/WebRoot/jsp/msg/msgTypeForSelect.jsp
Normal file
76
bin/WebRoot/jsp/msg/msgTypeForSelect.jsp
Normal file
@ -0,0 +1,76 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
function selectOK() {
|
||||
var name="";
|
||||
var id="";
|
||||
var checkedItem = $('#grid').datagrid('getSelected');
|
||||
id=checkedItem.id;
|
||||
name=checkedItem.name;
|
||||
var retn= id+")"+name;
|
||||
return retn;
|
||||
}
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgTypeForSelect.do?querytype=select',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '类型名称', field : 'name', sortable : true, halign:'center' },
|
||||
{width : '100', title : 'ID', field : 'id', sortable : true, halign:'center' },
|
||||
{width : '80', title : '类型种类', field: 'pid', sortable : true, halign:'center' }
|
||||
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</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>
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" style="width: 180px;" /></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="$('#searchForm').form('clear');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>
|
||||
190
bin/WebRoot/jsp/msg/msgTypeList.jsp
Normal file
190
bin/WebRoot/jsp/msg/msgTypeList.jsp
Normal file
@ -0,0 +1,190 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ 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">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'sendAdd',
|
||||
height:400,
|
||||
title : '新建消息类型',
|
||||
url : ext.contextPath + '/msg/addMsgType.do?iframeId=sendAdd',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
grid.datagrid('clearChecked');
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '查看消息类型',
|
||||
url : ext.contextPath + '/msg/viewMsgType.do?id=' + id
|
||||
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'sendEdit',
|
||||
title : '编辑消息类型',
|
||||
url : ext.contextPath + '/msg/editMsgType.do?iframeId=sendEdit&id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgType.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
top.$.messager.alert('提示','删除成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
top.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/msg/deleteMsgTypes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
top.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
top.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgType.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
ctrlSelect:true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '类型名称', field : 'name', sortable : true, halign:'center' },
|
||||
{width : '180', title : 'ID', field : 'id', sortable : true, halign:'center' },
|
||||
{width : '80', title : '类型种类', field: 'pid', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
var str = '';
|
||||
if(value=="personal"){
|
||||
str = "个人消息";
|
||||
}else if(value=="system"){
|
||||
str = "系统消息";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
{title : '操作', field : 'action', width : '160', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.id+'\');"/> ';
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/> ';
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsgType.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"msg/addMsgType.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"msg/deleteMsgType.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<!-- <td><div class="datagrid-btn-separator"></div></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true" onclick="">导入</a></td>
|
||||
<td><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_go',plain:true" onclick="">导出</a></td> -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
<td>类型名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" data-options="prompt:'请输入关键字'" style="width: 150px;" value=""/></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="$('#searchForm').form('clear');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>
|
||||
|
||||
77
bin/WebRoot/jsp/msg/msgTypeView.jsp
Normal file
77
bin/WebRoot/jsp/msg/msgTypeView.jsp
Normal file
@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@page import="com.sipai.tools.SessionManager"%>
|
||||
<%SessionManager sessionManager = new SessionManager();%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#p').panel({
|
||||
width:"100%",
|
||||
height:"300",
|
||||
title: '报警级别',
|
||||
});
|
||||
msgid= document.getElementById("id").innerText;
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/msg/getMsgAlarmlevel.do?msgid='+msgid,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns :[[
|
||||
{checkbox:true, field:'ck'},
|
||||
{width : '100',title : '报警级别',field : 'alarmLevel', sortable : true, halign:'center'},
|
||||
{width : '100',title : '短信发送用户',field : 'smssend', sortable : true, halign :'center'},
|
||||
{width : '100',title : '消息发送用户',field : 'msgsend', sortable :true, halign :'center'},
|
||||
{width : '100',title : '发送方式', field : 'sendway', sortable: true, halign : 'center',formatter :function(value,row){
|
||||
if(value=="both"){
|
||||
return "消息+短信发送";
|
||||
}else if(value=="msg"){
|
||||
return "消息发送";
|
||||
} else if(value=="sms"){
|
||||
return "短信发送";
|
||||
}
|
||||
}},
|
||||
{width : '100',title : '备注' , field : 'remark' ,sortable : true, halign : 'center'},
|
||||
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th >类型名称</th>
|
||||
<td ><span id="name" name="name" class="content" >${msgType.name}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >ID</th>
|
||||
<td ><span id="id" name="id">${msgType.id}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >类型种类</th>
|
||||
<td id="pid" name="pid" >
|
||||
<c:if test="${msgType.pid=='personal'}">个人消息</c:if>
|
||||
<c:if test="${msgType.pid=='system'}">系统消息</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br /><br />
|
||||
<div id="p" >
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
78
bin/WebRoot/jsp/msg/msgViewRecv.jsp
Normal file
78
bin/WebRoot/jsp/msg/msgViewRecv.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function doview(dialog, grid,morder,send){
|
||||
//grid.datagrid('reload');
|
||||
var id=$('#id').val();
|
||||
var sdt=$('#sdtt').val();
|
||||
$.post(ext.contextPath + '/msg/viewMsgFast.do',{id:id,morder:morder,sdt:sdt,send:send},function(data){
|
||||
if(data.rows==""){
|
||||
top.$.messager.alert('提示',data.res,'info');
|
||||
}
|
||||
$('#suser').html(data.suser);
|
||||
$('#recv').html(data.recv);
|
||||
$('#sdt').html(data.rows[0].sdt.substring(0,19));
|
||||
$('#content').html(data.rows[0].content);
|
||||
$('#id').val(data.rows[0].id);
|
||||
$('#sdtt').val(data.rows[0].sdt.substring(0,19));
|
||||
},'json');
|
||||
}
|
||||
function formattime(val) {
|
||||
var year = parseInt(val.year) + 1900;
|
||||
var month = (parseInt(val.month) + 1);
|
||||
month = month > 9 ? month : ('0' + month);
|
||||
var date = parseInt(val.date);
|
||||
date = date > 9 ? date : ('0' + date);
|
||||
var hours = parseInt(val.hours);
|
||||
hours = hours > 9 ? hours : ('0' + hours);
|
||||
var minutes = parseInt(val.minutes);
|
||||
minutes = minutes > 9 ? minutes : ('0' + minutes);
|
||||
var seconds = parseInt(val.seconds);
|
||||
seconds = seconds > 9 ? seconds : ('0' + seconds);
|
||||
var time = year + '-' + month + '-' + date + ' ' + hours + ':'
|
||||
+ minutes + ':' + seconds;
|
||||
return time;
|
||||
}
|
||||
function doreply(dialog, grid){
|
||||
var id=$('#id').val();
|
||||
var dialog2 = parent.ext.modalDialog({
|
||||
title : '回复消息',
|
||||
url : ext.contextPath + '/msg/replymsg.do?id=' + id
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" id="id" name="id" value="${msg.id }"/>
|
||||
<input type="hidden" id="sdtt" name="sdtt" value="${msg.sdt}"/>
|
||||
<table class="table" id="table1">
|
||||
<tr>
|
||||
<th>发送人</th>
|
||||
<td id="suser">${suser}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>发送时间</th>
|
||||
<td id="sdt">${fn:substring(msg.sdt,0,19)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>接收人</th>
|
||||
<td id="recv">${recv}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>内容</th>
|
||||
<td id="content">${msg.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
70
bin/WebRoot/jsp/msg/msgViewReply.jsp
Normal file
70
bin/WebRoot/jsp/msg/msgViewReply.jsp
Normal file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
<c:forEach items="${viewlist}" var="viewlistobj">
|
||||
if('${viewlistobj.suserid}'=='${suser.id}'){
|
||||
var longstr='<div style="float:left;width:400px;"><br><table class="table" ><tr><th>'+'${suser.caption}'+'<br>'+'${viewlistobj.sdt.substring(0,19)}'+'</th>'
|
||||
+'<td height="50px">'+'${viewlistobj.content}'+'</td></tr></table></div>';
|
||||
}else{
|
||||
var longstr='<div style="float:right;width:400px;"><br><table class="table" ><tr><td height="50px">'+'${viewlistobj.content}'+'</td>'
|
||||
+'<th>'+'${cu.caption}'+'<br>'+'${viewlistobj.sdt.substring(0,19)}'+'</th></tr></table></div>';
|
||||
}
|
||||
$("#screen").append(longstr);
|
||||
$("#parentid").val('${viewlistobj.id}');
|
||||
</c:forEach>
|
||||
$("#content").val("000000");
|
||||
});
|
||||
function sendnew(){
|
||||
var content = $("#content").val();
|
||||
var parentid = $("#parentid").val();
|
||||
if(content==null ||content==""){
|
||||
alert("发送内容不能为空");
|
||||
return;
|
||||
}
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/msg/replynewMsg.do", {recvid:"${recvid}",typeid:"${msg.typeid}",content:content,parentid:parentid} , function(data) {
|
||||
if (data.res== 1) {
|
||||
$("#content").textbox("setValue","");
|
||||
top.$.messager.alert('提示', "发送成功", 'info');
|
||||
//刷新页面
|
||||
$("#parentid").val(data.parentid);
|
||||
var longstr='<div style="float:right;width:400px;"><br><table class="table" ><tr><td height="50px">'+data.rows[0].content+'</td>'
|
||||
+'<th>'+data.susername+'<br>'+data.rows[0].sdt.substring(0,19)+'</th></tr></table></div>';
|
||||
$("#screen").append(longstr);
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input type="hidden" id="recvid" name="recvid" value="${recvid}"/>
|
||||
<input type="hidden" id="typeid" name="typeid" value="${msg.typeid}"/>
|
||||
<input type="hidden" id="parentid" name="parentid" value="${msg.id}"/>
|
||||
<div class="easyui-layout" style="width:750px;height:500px;">
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div data-options="region:'center',title:'联系人:${suser.caption }',iconCls:'icon-man'" id="screen">
|
||||
</div>
|
||||
<div region="south" split="true" border="false" style="height:20%;" >
|
||||
<input class="easyui-textbox" data-options="buttonText:'发送',prompt:'输入消息内容',multiline:true,onClickButton:sendnew" style="width:100%;height:100%;" id="content" name="content"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
71
bin/WebRoot/jsp/msg/msgViewSend.jsp
Normal file
71
bin/WebRoot/jsp/msg/msgViewSend.jsp
Normal file
@ -0,0 +1,71 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function doview(dialog, grid,morder,send){
|
||||
//grid.datagrid('reload');
|
||||
var id=$('#id').val();
|
||||
var sdt=$('#sdtt').val();
|
||||
$.post(ext.contextPath + '/msg/viewMsgFast.do',{id:id,morder:morder,sdt:sdt,send:send},function(data){
|
||||
if(data.rows==""){
|
||||
top.$.messager.alert('提示',data.res,'info');
|
||||
}
|
||||
$('#suser').html(data.suser);
|
||||
$('#recv').html(data.recv);
|
||||
$('#sdt').html(data.rows[0].sdt.substring(0,19));
|
||||
$('#content').html(data.rows[0].content);
|
||||
$('#id').val(data.rows[0].id);
|
||||
$('#sdtt').val(data.rows[0].sdt.substring(0,19));
|
||||
},'json');
|
||||
}
|
||||
function formattime(val) {
|
||||
var year = parseInt(val.year) + 1900;
|
||||
var month = (parseInt(val.month) + 1);
|
||||
month = month > 9 ? month : ('0' + month);
|
||||
var date = parseInt(val.date);
|
||||
date = date > 9 ? date : ('0' + date);
|
||||
var hours = parseInt(val.hours);
|
||||
hours = hours > 9 ? hours : ('0' + hours);
|
||||
var minutes = parseInt(val.minutes);
|
||||
minutes = minutes > 9 ? minutes : ('0' + minutes);
|
||||
var seconds = parseInt(val.seconds);
|
||||
seconds = seconds > 9 ? seconds : ('0' + seconds);
|
||||
var time = year + '-' + month + '-' + date + ' ' + hours + ':'
|
||||
+ minutes + ':' + seconds;
|
||||
return time;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" id="id" name="id" value="${msg.id }"/>
|
||||
<input type="hidden" id="sdtt" name="sdtt" value="${msg.sdt}"/>
|
||||
<table class="table" id="table1">
|
||||
<tr>
|
||||
<th>发送人</th>
|
||||
<td id="suser">${suser}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>发送时间</th>
|
||||
<td id="sdt">${fn:substring(msg.sdt,0,19)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>接收人</th>
|
||||
<td id="recv">${recv}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>内容</th>
|
||||
<td id="content">${msg.content}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
28
bin/WebRoot/jsp/msg/msgViewstatus.jsp
Normal file
28
bin/WebRoot/jsp/msg/msgViewstatus.jsp
Normal file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th style="text-align:center">已浏览人</th>
|
||||
<td style="overflow:auto;width:100%;height:80px;">${checker}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">未浏览人</th>
|
||||
<td style="overflow:auto;width:100%;height:80px;">${notchecker}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
73
bin/WebRoot/jsp/msg/smsView.jsp
Normal file
73
bin/WebRoot/jsp/msg/smsView.jsp
Normal file
@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
<c:forEach items="${listuserrecv}" var="obj">
|
||||
$("#selectUsers").append("<option value='"+'${obj.id}'+"'>"+'${obj.caption}'+"</option>");
|
||||
</c:forEach>
|
||||
<c:forEach items="${viewlist}" var="viewlistobj">
|
||||
var longstr='<div style="float:right;width:400px;"><br><table class="table" ><tr><td height="50px">'+'${viewlistobj.content}'+'</td>'
|
||||
+'<th>'+'${suser.caption}'+'<br>'+'${viewlistobj.sdt.substring(0,19)}'+'</th></tr></table></div>';
|
||||
$("#screen").append(longstr);
|
||||
$("#parentid").val('${viewlistobj.id}');
|
||||
</c:forEach>
|
||||
});
|
||||
function sendnew(){
|
||||
var content = $("#content").val();
|
||||
var parentid = $("#parentid").val();
|
||||
if(content==null ||content==""){
|
||||
alert("短信内容不能为空");
|
||||
return;
|
||||
}
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/msg/sendnewSms.do", {recvid:"${recvid}",typeid:"${msg.typeid}",content:content,parentid:parentid} , function(data) {
|
||||
if (data.res== 1) {
|
||||
top.$.messager.alert('提示', "发送成功", 'info');
|
||||
//刷新页面
|
||||
$("#parentid").val(data.parentid);
|
||||
var longstr='<div style="float:right;width:400px;"><br><table class="table" ><tr><td height="50px">'+data.rows[0].content+'</td>'
|
||||
+'<th>'+data.susername+'<br>'+data.rows[0].sdt.substring(0,19)+'</th></tr></table></div>';
|
||||
$("#screen").append(longstr);
|
||||
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input type="hidden" id="recvid" name="recvid" value="${recvid}"/>
|
||||
<input type="hidden" id="typeid" name="typeid" value="${msg.typeid}"/>
|
||||
<input type="hidden" id="parentid" name="parentid" value="${msg.id}"/>
|
||||
<div class="easyui-layout" style="width:750px;height:450px;">
|
||||
<!-- <div data-options="region:'north'" style="height:50px"></div>-->
|
||||
<!-- <div data-options="region:'west',split:true" title="West" style="width:100px;"></div> -->
|
||||
<div data-options="region:'east',split:true,iconCls:'icon-man'" title="收信人" style="width:20%;padding:0;">
|
||||
<select name="selectUsers" id="selectUsers" ondblclick="" style="width:100%; height:100%;margin:-2px" multiple="multiple"></select>
|
||||
</div>
|
||||
<div data-options="region:'center',title:'内容',iconCls:'icon-ok'">
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div region="center" border="false" id="screen">
|
||||
|
||||
</div>
|
||||
<div region="south" split="true" border="false" style="height:20%;" >
|
||||
<input class="easyui-textbox" data-options="buttonText:'发送',prompt:'输入短信内容',multiline:true,onClickButton:sendnew" style="width:100%;height:100%;" id="content" name="content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user