smsList.jsp 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  2. <jsp:include page="../../common/include.jsp" />
  3. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  4. <script type="text/javascript">
  5. /**列表显示区*/
  6. $(function() {
  7. $('#smsDataGrid').datagrid({
  8. rownumbers:true,
  9. fit:true,
  10. pageSize:20,
  11. pageList : [ 10, 20, 30, 40, 50 ],
  12. fitColumns:false,
  13. border:false,
  14. sortOrder:'desc',
  15. pagination:true,
  16. idField:'id',
  17. url:whzl.basePath + '/smsAction_listSms',
  18. toolbar:'#searchtool',
  19. checkOnSelect:true,
  20. selectOnCheck:true,
  21. singleSelect:true,
  22. loadFilter:function(result){
  23. if(result.success){
  24. console.log(result.obj)
  25. return result.obj;
  26. }else{
  27. $.messager.alert("提示",result.message);
  28. return ;
  29. }
  30. }
  31. });
  32. });
  33. var statusFormatter = function(value , row , index){
  34. if(row.status=="1"){
  35. return "有效";
  36. }else{
  37. return "无效";
  38. }
  39. }
  40. var nameFormatter = function(value , row , index){
  41. return row.user.fullName;
  42. }
  43. /**查询*/
  44. function searchFun(){
  45. $("#smsDataGrid").datagrid("load", {
  46. "sms.phone":$("#tblQuery").find("input[id='phone']").val(),
  47. "sms.sendTime":$('#sendTime').datebox('getValue')
  48. });
  49. }
  50. /*清除查询条件**/
  51. function ClearQuery() {
  52. $("#tblQuery").find("input").val("");
  53. }
  54. </script>
  55. <div class="easyui-layout" data-options="fit:true,border:false">
  56. <div data-options="region:'center',border:false">
  57. <div id="searchtool" data-options="region:'north' , border:false">
  58. <table id="tblQuery" style="width:100%;font-size:12px;" >
  59. <tr>
  60. <td align="right" style="width: 12%"><span>发送号码</span></td>
  61. <td style="width: 10%"><input id="phone" name="sms.phone" type="text"/></td>
  62. <td align="right" style="width: 8%"><span>发送时间</span></td>
  63. <td style="width: 20%"><input id="sendTime" name="sendTime" class="easyui-datebox"/></td>
  64. <td style="width: 50%">
  65. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  66. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  67. </td>
  68. </tr>
  69. </table>
  70. </div>
  71. <table id="smsDataGrid">
  72. <thead>
  73. <tr>
  74. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  75. <th data-options="field:'phone',width:100">发送号码</th>
  76. <th data-options="field:'name',width:100,formatter:nameFormatter">收信人</th>
  77. <th data-options="field:'sendTime',width:140">发送时间</th>
  78. <th data-options="field:'content',width:300">发送内容</th>
  79. <th data-options="field:'status',width:100,formatter:statusFormatter">验证码状态</th>
  80. </tr>
  81. </thead>
  82. </table>
  83. </div>
  84. </div>
  85. <div id="setSmsDialog" data-options="title:'&nbsp;个性化设置',iconCls:'icon-cog',width:500,height:370,modal:true,href:'<%=basePath %>/columnSetAction_toSet?tname=sms'">
  86. </div>
  87. <script type="text/javascript">
  88. $(function(){
  89. parent.$.messager.progress('close');
  90. })
  91. </script>