list.jsp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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_type(value,row,index){
  19. if(value == 0){
  20. return '平台管理员';
  21. }else if(value==1){
  22. return '机场管理员';
  23. }else if(value==2){
  24. return '航空公司管理员';
  25. }
  26. }
  27. function format_state(value,row,index){
  28. var returnhtml = '';
  29. if( row.order_state == 0){
  30. if(row.attr1 != ''){
  31. if(row.attr1 > 1){
  32. returnhtml='(重复客户)';
  33. }
  34. }
  35. }
  36. return returnhtml;
  37. }
  38. function format_action(value,row,index){
  39. var returnhtml = '<a href="javascript:show('+row.id+');">查看 </a>';
  40. if(row.roleCodeN==2){
  41. if(row.order_state==0){
  42. returnhtml +='|<a href="javascript:assignSalesmen('+row.id+');">指派销售人员</a>';
  43. if(row.attr1 != ''){
  44. if(row.attr1 > 1){
  45. returnhtml += '|<a href="javascript:assignUserTj('+row.customer_id+','+row.id+');">指定推荐人员</a>';
  46. }
  47. }
  48. }
  49. if(row.order_type==2){
  50. if(row.order_state==1){
  51. returnhtml +='|<a href="javascript:transferOder('+row.id+');">转单</a>';
  52. }else if(row.order_state==2){
  53. returnhtml +='|<a href="javascript:sign('+row.id+');">确认签约</a>';
  54. }
  55. }else{
  56. if(row.order_state >0 && row.order_state < 5){
  57. returnhtml +='|<a href="javascript:transferOder('+row.id+');">转单</a>';
  58. if(row.attr1 != ''){
  59. }
  60. }else if(row.order_state==5){
  61. returnhtml +='|<a href="javascript:sign('+row.id+');">确认签约</a>';
  62. }//else if(row.order_state==6){
  63. //returnhtml +='|<a href="#">交房</a>';
  64. //}
  65. }
  66. }
  67. return returnhtml;
  68. }
  69. $(function(){
  70. $('#btnSearch').click(function () {
  71. $('#tab_user').bootstrapTable('refresh');
  72. });
  73. $('#clearHref').click(function () {
  74. $('#myform')[0].reset();
  75. });
  76. });
  77. function jiaofagn(id){
  78. $.confirm("确定交房操作吗? ", function(){
  79. $.post('deliveryAction.cs?id=' + id,
  80. function(result){
  81. window.location.reload();
  82. }
  83. );
  84. });
  85. }
  86. function queryParams(params){
  87. var page = params.offset / params.limit + 1;
  88. var dataObj = new Object();
  89. //alert($("#search").val());
  90. dataObj.name=$("#name").val();
  91. dataObj.orderNo=$("#orderNo").val();
  92. return { page:page,
  93. pageSize:params.limit,
  94. search:JSON.stringify(dataObj),
  95. sort:params.sort,
  96. order:params.order,
  97. };
  98. }
  99. // 分配角色
  100. function show(id){
  101. $.openDlg({
  102. url:'transfer.cs?action=view&id=' + id,
  103. title:'查看详情',
  104. width:'95%',
  105. height:'95%',
  106. });
  107. }
  108. //sign
  109. //签约
  110. function sign(id){
  111. $.openDlg({
  112. url:'transfer.cs?action=sign&id=' + id,
  113. title:'签约确认',
  114. width:'95%',
  115. height:'95%',
  116. });
  117. }
  118. function assignSalesmen(id){
  119. $.openDlg({
  120. url:'salesmen.cs?id=' + id,
  121. title:'指派销售员',
  122. width:'60%',
  123. height:'95%',
  124. });
  125. }
  126. function assignUserTj(custid,id){
  127. $.openDlg({
  128. url:'salesmenTj.cs?id=' + id+"&custid="+custid,
  129. title:'指派销售员',
  130. width:'60%',
  131. height:'95%',
  132. });
  133. }
  134. function transferOder(id){
  135. $.openDlg({
  136. url:'transfera.cs?id=' + id,
  137. title:'指派销售员',
  138. width:'95%',
  139. height:'95%',
  140. });
  141. }
  142. </script>
  143. </head>
  144. <body class="gray-bg">
  145. <div class="wrapper wrapper-content animated fadeInUp">
  146. <div class="row row-lg">
  147. <div class="col-sm-12">
  148. <div class="ibox-content m-b-sm border-bottom">
  149. <div class="">
  150. <h4>查询条件</h4>
  151. </div>
  152. <form class="form-inline" id="myform">
  153. <div class="form-group">
  154. <label>&nbsp;客户名称:</label><input id="name" name="name" class="form-control" type="text" value="">
  155. <label>&nbsp;订单编号:</label><input id="orderNo" name="orderNo" class="form-control" type="text" value="">
  156. </div>
  157. &nbsp;&nbsp;
  158. <label><a href="#" id="btnSearch" class="btn btn-primary"><i class="icon-search"></i> 搜索</a></label>&nbsp;&nbsp;
  159. <label><a href="#" id="clearHref" class="btn btn-primary"><i class="icon-search"></i> 清除搜索条件</a></label>
  160. </form>
  161. </div>
  162. <table id="tab_user"
  163. data-toggle="table"
  164. data-url="list2.cs"
  165. data-method="get"
  166. data-click-to-select="true"
  167. data-pagination="true"
  168. data-data-type="json"
  169. data-show-refresh="true"
  170. data-show-columns="true"
  171. data-show-toggle="true"
  172. data-search-on-enter-key="true"
  173. data-toolbar="#def_toolbar"
  174. data-side-pagination="server"
  175. data-query-params="queryParams"
  176. data-mobile-responsive="true"
  177. >
  178. <thead>
  179. <tr>
  180. <th data-checkbox="true" data-click-to-select="true"></th>
  181. <th data-field="id" data-visible="false">id</th>
  182. <th data-field="order_no">订单编号</th>
  183. <th data-field="customer_name">客户姓名</th>
  184. <th data-field="customer_phone">客户电话</th>
  185. <th data-field="user_name">推荐人姓名</th>
  186. <th data-field="saler_name">销售人员姓名</th>
  187. <th data-field="create_date" data-formatter="format_time">创建时间</th>
  188. <th data-field="attr1" data-formatter="format_state">待定状态</th>
  189. <th data-field="state_name" >订单状态</th>
  190. <th data-formatter="format_action">操作</th>
  191. </tr>
  192. </thead>
  193. </table>
  194. </div>
  195. </div>
  196. </div>
  197. </body>
  198. </html>