123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@taglib prefix="p" uri="http://www.test.com/jsp/permission" %>
- <!doctype html>
- <html>
- <head>
- <%@ include file="../../common/head.jsp"%>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <link href="../res/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
- <script src="../res/js/plugins/bootstrap-table/bootstrap-table.js"></script>
- <script src="../res/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
- <script src="../res/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
- <script>
-
- function test(value,row,index){
- // return '<a href="#">' + row['id'] + '</a>';
- return '<a href="#">编辑 </a>|<a href="#">删除</a>';
- }
-
- function format_type(value,row,index){
- if(value == 0){
- return '平台管理员';
- }else if(value==1){
- return '机场管理员';
- }else if(value==2){
- return '航空公司管理员';
- }
- }
-
- function format_state(value,row,index){
- var returnhtml = '';
-
- if( row.order_state == 0){
- if(row.attr1 != ''){
- if(row.attr1 > 1){
- returnhtml='(重复客户)';
- }
- }
- }
-
- return returnhtml;
- }
-
-
- function format_action(value,row,index){
- var returnhtml = '<a href="javascript:show('+row.id+');">查看 </a>';
-
- if(row.roleCodeN==2){
- if(row.order_state==0){
- returnhtml +='|<a href="javascript:assignSalesmen('+row.id+');">指派销售人员</a>';
- if(row.attr1 != ''){
- if(row.attr1 > 1){
- returnhtml += '|<a href="javascript:assignUserTj('+row.customer_id+','+row.id+');">指定推荐人员</a>';
- }
- }
- }
-
- if(row.order_type==2){
- if(row.order_state==1){
- returnhtml +='|<a href="javascript:transferOder('+row.id+');">转单</a>';
-
- }else if(row.order_state==2){
- returnhtml +='|<a href="javascript:sign('+row.id+');">确认签约</a>';
- }
-
- }else{
- if(row.order_state >0 && row.order_state < 5){
- returnhtml +='|<a href="javascript:transferOder('+row.id+');">转单</a>';
- if(row.attr1 != ''){
-
- }
- }else if(row.order_state==5){
- returnhtml +='|<a href="javascript:sign('+row.id+');">确认签约</a>';
- }//else if(row.order_state==6){
- //returnhtml +='|<a href="#">交房</a>';
- //}
- }
- }
-
- return returnhtml;
-
- }
-
- $(function(){
- $('#btnSearch').click(function () {
- $('#tab_user').bootstrapTable('refresh');
- });
-
- $('#clearHref').click(function () {
- $('#myform')[0].reset();
- });
- });
-
- function jiaofagn(id){
- $.confirm("确定交房操作吗? ", function(){
- $.post('deliveryAction.cs?id=' + id,
- function(result){
- window.location.reload();
- }
- );
- });
- }
-
- function queryParams(params){
- var page = params.offset / params.limit + 1;
- var dataObj = new Object();
- //alert($("#search").val());
- dataObj.name=$("#name").val();
- dataObj.orderNo=$("#orderNo").val();
- return { page:page,
- pageSize:params.limit,
- search:JSON.stringify(dataObj),
- sort:params.sort,
- order:params.order,
- };
- }
-
-
- // 分配角色
- function show(id){
- $.openDlg({
- url:'transfer.cs?action=view&id=' + id,
- title:'查看详情',
- width:'95%',
- height:'95%',
- });
- }
- //sign
- //签约
- function sign(id){
- $.openDlg({
- url:'transfer.cs?action=sign&id=' + id,
- title:'签约确认',
- width:'95%',
- height:'95%',
- });
- }
-
-
-
- function assignSalesmen(id){
- $.openDlg({
- url:'salesmen.cs?id=' + id,
- title:'指派销售员',
- width:'60%',
- height:'95%',
- });
- }
-
-
- function assignUserTj(custid,id){
- $.openDlg({
- url:'salesmenTj.cs?id=' + id+"&custid="+custid,
- title:'指派销售员',
- width:'60%',
- height:'95%',
- });
- }
-
- function transferOder(id){
- $.openDlg({
- url:'transfera.cs?id=' + id,
- title:'指派销售员',
- width:'95%',
- height:'95%',
- });
- }
-
- </script>
- </head>
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInUp">
- <div class="row row-lg">
- <div class="col-sm-12">
- <div class="ibox-content m-b-sm border-bottom">
- <div class="">
- <h4>查询条件</h4>
- </div>
- <form class="form-inline" id="myform">
- <div class="form-group">
- <label> 客户名称:</label><input id="name" name="name" class="form-control" type="text" value="">
- <label> 订单编号:</label><input id="orderNo" name="orderNo" class="form-control" type="text" value="">
-
- </div>
-
-
- <label><a href="#" id="btnSearch" class="btn btn-primary"><i class="icon-search"></i> 搜索</a></label>
- <label><a href="#" id="clearHref" class="btn btn-primary"><i class="icon-search"></i> 清除搜索条件</a></label>
- </form>
- </div>
- <table id="tab_user"
- data-toggle="table"
- data-url="list2.cs"
- data-method="get"
- data-click-to-select="true"
- data-pagination="true"
- data-data-type="json"
- data-show-refresh="true"
- data-show-columns="true"
- data-show-toggle="true"
- data-search-on-enter-key="true"
- data-toolbar="#def_toolbar"
- data-side-pagination="server"
- data-query-params="queryParams"
- data-mobile-responsive="true"
- >
- <thead>
- <tr>
- <th data-checkbox="true" data-click-to-select="true"></th>
- <th data-field="id" data-visible="false">id</th>
- <th data-field="order_no">订单编号</th>
- <th data-field="customer_name">客户姓名</th>
- <th data-field="customer_phone">客户电话</th>
- <th data-field="user_name">推荐人姓名</th>
- <th data-field="saler_name">销售人员姓名</th>
- <th data-field="create_date" data-formatter="format_time">创建时间</th>
- <th data-field="attr1" data-formatter="format_state">待定状态</th>
- <th data-field="state_name" >订单状态</th>
- <th data-formatter="format_action">操作</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
- </body>
- </html>
|