list.jsp 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@taglib prefix="p" uri="http://www.test.com/jsp/permission" %>
  3. <!doctype html>
  4. <html>
  5. <head>
  6. <%@ include file="../../common/head.jsp"%>
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  9. <link href="../res/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
  10. <script src="../res/js/plugins/bootstrap-table/bootstrap-table.js"></script>
  11. <script src="../res/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
  12. <script src="../res/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
  13. <script>
  14. function test(value,row,index){
  15. // return '<a href="#">' + row['id'] + '</a>';
  16. return '<a href="#">编辑 </a>|<a href="#">删除</a>';
  17. }
  18. $(function(){
  19. $('#btnSearch').click(function () {
  20. $('#tab_user').bootstrapTable('refresh');
  21. });
  22. $('#clearHref').click(function () {
  23. $('#myform')[0].reset();
  24. });
  25. });
  26. function queryParams(params){
  27. var page = params.offset / params.limit + 1;
  28. var dataObj = new Object();
  29. //alert($("#search").val());
  30. dataObj.cname=$("#cname").val();
  31. dataObj.cphone=$("#cphone").val();
  32. dataObj.pname=$("#pname").val();
  33. return { page:page,
  34. pageSize:params.limit,
  35. data:JSON.stringify(dataObj),
  36. sort:params.sort,
  37. order:params.order,
  38. };
  39. }
  40. function format_state(value,row,index){
  41. if(value==1){
  42. return '上架中';
  43. }else if(value==2){
  44. return '已下架';
  45. }
  46. }
  47. </script>
  48. </head>
  49. <body class="gray-bg">
  50. <div class="wrapper wrapper-content animated fadeInUp">
  51. <!-- <div class="ibox " style=""> -->
  52. <!-- <div class="ibox-content"> -->
  53. <div class="row row-lg">
  54. <div class="col-sm-12">
  55. <div class="ibox-content m-b-sm border-bottom">
  56. <div class="ibox-title">
  57. <h5>查询条件</h5>
  58. </div>
  59. <form class="form-inline" id="myform">
  60. <div class="form-group"><label>&nbsp;客户名称:</label><input id="cname" name="cname" class="form-control" type="text" value=""></div>
  61. &nbsp;&nbsp;
  62. <div class="form-group"><label>&nbsp;客户手机:</label><input id="cphone" name="cphone" class="form-control" type="text" value=""></div>
  63. &nbsp;&nbsp;
  64. <div class="form-group"><label>&nbsp;产品名称:</label><input id="pname" name="pname" class="form-control" type="text" value=""></div>
  65. <label><a href="#" id="btnSearch" class="btn btn-primary"><i class="icon-search"></i> 搜索</a></label>&nbsp;&nbsp;
  66. <label><a href="#" id="clearHref" class="btn btn-primary"><i class="icon-search"></i> 清除搜索条件</a></label>
  67. </form>
  68. </div>
  69. <cs:toolbar title="意向订单" tableId="tab_user" width="80%" height="90%" menuCode="${menuCode }">
  70. </cs:toolbar>
  71. <table id="tab_user"
  72. data-toggle="table"
  73. data-url="list2.cs"
  74. data-method="get"
  75. data-click-to-select="true"
  76. data-pagination="true"
  77. data-data-type="json"
  78. data-show-refresh="true"
  79. data-show-columns="true"
  80. data-show-toggle="true"
  81. data-single-select="true"
  82. data-search-on-enter-key="true"
  83. data-toolbar="#def_toolbar"
  84. data-side-pagination="server"
  85. data-query-params="queryParams"
  86. data-mobile-responsive="true"
  87. >
  88. <thead>
  89. <tr>
  90. <th data-checkbox="true" data-click-to-select="true"></th>
  91. <th data-field="ID" data-visible="false">id</th>
  92. <th data-field="CUSTOMER_NAME">客户姓名</th>
  93. <th data-field="CUSTOMER_PHONE">客户手机</th>
  94. <th data-field="JOB_NUMBER">客户工号</th>
  95. <th data-field="PRODUCTNAME">产品名称</th>
  96. <th data-field="INTENT_TIME" data-formatter="format_time">提交时间</th>
  97. </tr>
  98. </thead>
  99. </table>
  100. </div>
  101. </div>
  102. <!-- </div> -->
  103. <!-- </div> -->
  104. </div>
  105. </body>
  106. </html>