| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>短信接收管理</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/Table/table1.css" rel="stylesheet" />
- <link href="../css/init.css" rel="stylesheet" />
- <script src="../css/laydate/laydate.js"></script>
- </head>
- <body>
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:
- <a href="javaScript:;" class="indexreturn">首页</a>>
- <a href="javaScript:;">短信接收管理</a>>
- <a href="" style="color: #000;">发送失败管理</a>
- </sapn>
- </div>
- </div>
- <div class="th-box">
- <div class="th-bar">
- <!--<a class="sc_btn remove">删除</a>-->
- <div class="seach-box fr">
- <ul>
- <li>手机号码:<input class="photo x-color" type="text" id="Phone" /></li>
- <li>
- <a class="sc_btn Block" id="sc_btns">搜索</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div style="width: 100%;padding: 10px;">
- <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <th data-field="state" data-checkbox="true" data-align="center"></th>
- <th data-align="center" data-formatter="Code">编号</th>
- <th data-field="Telephone" data-align="center">手机号码</th>
- <th data-field="Detail" data-align="center">短信内容</th>
- <th data-field="CreateDate" data-align="center">接收时间</th>
- </tr>
- </thead>
- <tbody id="tbody"></tbody>
- </table>
- </div>
- </div>
- <script>
- $(document).ready(function() {
- initTable();
- $("#sc_btns").click(function() {
- initTable();
- })
- })
- function initTable() {
- //先销毁表格
- $('#list').bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $("#list").bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "SMSZXZB/GetRecvList", //获取数据的Servlet地址
- contentType: 'application/x-www-form-urlencoded',
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- page: params.pageNumber,
- pagesize: params.pageSize,
- tel: $("#Phone").val(),
- token: $.cookie("token")
- };
- return param;
- },
- onLoadSuccess: function() { //加载成功时执行
- //layer.msg("加载成功");
- },
- onLoadError: function() { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- //编号
- function Code(val, row, index) {
- return index + 1;
- }
- //状态
- function States(val) {
- var str = '';
- switch(val + '') {
- case '0':
- str = "未读";
- break;
- case '1':
- str = "已读";
- break;
- }
- return str;
- }
- </script>
- </body>
- </html>
|