warningList.jsp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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 format_action(value,row,index){
  19. return '<a href="javascript:show('+row.id+');">查看 </a>|<a href="javascript:orderEnd('+row.id+');">终止</a>|<a href="javascript:orderContinuation('+row.id+');">订单继续</a>';
  20. }
  21. function init_pwd(){
  22. var data = getSelectedRow("tab_user");
  23. if(null == data){
  24. return;
  25. }
  26. $.confirm("确定初始化密码吗? ", function(){
  27. $.post('initPwd.cs?id=' + data.id,
  28. function(result){
  29. window.location.reload();
  30. }
  31. );
  32. });
  33. }
  34. function format_type(value,row,index){
  35. if(value == 0){
  36. return '平台管理员';
  37. }else if(value==1){
  38. return '机场管理员';
  39. }else if(value==2){
  40. return '航空公司管理员';
  41. }
  42. }
  43. $(function(){
  44. $('#btnSearch').click(function () {
  45. $('#tab_user').bootstrapTable('refresh');
  46. });
  47. $('#clearHref').click(function () {
  48. $('#myform')[0].reset();
  49. });
  50. });
  51. // 分配角色
  52. function show(id){
  53. $.openDlg({
  54. url:'transfer.cs?action=view&id=' + id,
  55. title:'查看详情',
  56. width:'95%',
  57. height:'95%',
  58. });
  59. }
  60. //订单继续
  61. function orderContinuation(id){
  62. $.confirm("确定订单继续? ", function(){
  63. $.post('orderContinuation.cs?id=' + id,
  64. function(result){
  65. window.location.reload();
  66. }
  67. );
  68. });
  69. }
  70. //订单终止
  71. function orderEnd(id){
  72. $.confirm("确定终止订单吗? ", function(){
  73. $.post('orderEnd.cs?id=' + id,
  74. function(result){
  75. window.location.reload();
  76. }
  77. );
  78. });
  79. }
  80. // 分配角色
  81. function setRole(){
  82. var data = getSelectedRow("tab_user");
  83. if(null == data){
  84. return;
  85. }
  86. $.openDlg({
  87. url:'transfer.cs?action=setRole&id=' + data.id,
  88. title:'分配角色',
  89. width:'100%',
  90. height:'100%',
  91. });
  92. }
  93. function queryParams(params){
  94. var page = params.offset / params.limit + 1;
  95. var dataObj = new Object();
  96. //alert($("#search").val());
  97. dataObj.name=$("#name").val();
  98. dataObj.orderNo=$("#orderNo").val();
  99. return { page:page,
  100. pageSize:params.limit,
  101. search:JSON.stringify(dataObj),
  102. sort:params.sort,
  103. order:params.order,
  104. };
  105. }
  106. </script>
  107. </head>
  108. <body class="gray-bg">
  109. <div class="wrapper wrapper-content animated fadeInUp">
  110. <div class="row row-lg">
  111. <div class="col-sm-12">
  112. <div class="ibox-content m-b-sm border-bottom">
  113. <div class="">
  114. <h4>查询条件</h4>
  115. </div>
  116. <form class="form-inline" id="myform">
  117. <div class="form-group">
  118. <label>&nbsp;客户名称:</label><input id="name" name="name" class="form-control" type="text" value="">
  119. <label>&nbsp;订单编号:</label><input id="orderNo" name="orderNo" class="form-control" type="text" value="">
  120. </div>
  121. &nbsp;&nbsp;
  122. <label><a href="#" id="btnSearch" class="btn btn-primary"><i class="icon-search"></i> 搜索</a></label>&nbsp;&nbsp;
  123. <label><a href="#" id="clearHref" class="btn btn-primary"><i class="icon-search"></i> 清除搜索条件</a></label>
  124. </form>
  125. </div>
  126. <table id="tab_user"
  127. data-toggle="table"
  128. data-url="warningList2.cs"
  129. data-method="get"
  130. data-click-to-select="true"
  131. data-pagination="true"
  132. data-data-type="json"
  133. data-show-refresh="true"
  134. data-show-columns="true"
  135. data-show-toggle="true"
  136. data-search-on-enter-key="true"
  137. data-toolbar="#def_toolbar"
  138. data-side-pagination="server"
  139. data-query-params="queryParams"
  140. data-mobile-responsive="true"
  141. >
  142. <thead>
  143. <tr>
  144. <th data-checkbox="true" data-click-to-select="true"></th>
  145. <th data-field="id" data-visible="false">id</th>
  146. <th data-field="order_no">订单编号</th>
  147. <th data-field="customer_name">客户姓名</th>
  148. <th data-field="customer_phone">客户电话</th>
  149. <th data-field="user_name">推荐人姓名</th>
  150. <th data-field="saler_name">销售人员姓名</th>
  151. <th data-field="create_date" data-formatter="format_time">创建时间</th>
  152. <th data-field="state_name">订单状态</th>
  153. <th data-formatter="format_action">操作</th>
  154. </tr>
  155. </thead>
  156. </table>
  157. </div>
  158. </div>
  159. </div>
  160. </body>
  161. </html>