applyList.jsp 5.9 KB

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