| 
  
 | 
  
 | 
<!doctype html> 
 | 
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> 
 | 
<head> 
 | 
<meta charset="utf-8"> 
 | 
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
 | 
  
 | 
<meta 
 | 
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" 
 | 
    name="viewport" /> 
 | 
<title th:text="${session.userInfo.shopName }"></title> 
 | 
  
 | 
<!-- Set render engine for 360 browser --> 
 | 
<meta name="renderer" content="webkit"> 
 | 
  
 | 
<!-- No Baidu Siteapp--> 
 | 
<meta http-equiv="Cache-Control" content="no-siteapp" /> 
 | 
  
 | 
  
 | 
  
 | 
<!-- Add to homescreen for Chrome on Android --> 
 | 
<meta name="mobile-web-app-capable" content="yes"> 
 | 
  
 | 
  
 | 
<!-- Add to homescreen for Safari on iOS --> 
 | 
<meta name="apple-mobile-web-app-capable" content="yes"> 
 | 
<meta name="apple-mobile-web-app-status-bar-style" content="black"> 
 | 
<meta name="apple-mobile-web-app-title" content="Amaze UI" /> 
 | 
  
 | 
  
 | 
<!-- Tile icon for Win8 (144x144 + tile color) --> 
 | 
  
 | 
<meta name="msapplication-TileColor" content="#0e90d2"> 
 | 
<script type="text/javascript" 
 | 
    th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> 
 | 
<script type="text/javascript" 
 | 
    th:src="@{/js/systools/DDMBase.js}"></script> 
 | 
<link rel="stylesheet" 
 | 
    th:href="@{/plugin/amazingUI/css/amazeui.min.css}"> 
 | 
<link rel="stylesheet" 
 | 
    th:href="@{/plugin/amazingUI/css/app.css}"> 
 | 
<link rel="stylesheet" type="text/css" 
 | 
    th:href="@{/css/dingOrderList.css}"> 
 | 
  
 | 
</head> 
 | 
<script> 
 | 
  
 | 
</script> 
 | 
  
 | 
  
 | 
<body > 
 | 
    <!-- 已完成列表页面 --> 
 | 
    <div class="wrap"> 
 | 
        <!-- 头部开始 --> 
 | 
        <header data-am-widget="header" class="am-header color-w back-m1 am-header-fixed"> 
 | 
            <div class="am-header-left am-header-nav"> 
 | 
                <a th:href="@{/admin/redirect/hive/mobile/order}" class=""> <i 
 | 
                    class="am-header-icon am-icon-chevron-left"></i> 
 | 
                </a> 
 | 
            </div> 
 | 
  
 | 
            <h1 class="am-header-title"> 
 | 
                <a href="#title-link" class=""> 服务单 </a> 
 | 
            </h1> 
 | 
  
 | 
            <!-- <div class="am-header-right am-header-nav"> 
 | 
                 
 | 
            </div> --> 
 | 
        </header> 
 | 
        <!-- 头部结束 --> 
 | 
           
 | 
        <!-- 订单内容 --> 
 | 
        <div class="main main1"> 
 | 
            <form class="am-form am-form-horizontal"  id="dataform" onsubmit="javascripr:return false;"> 
 | 
                <div id="serach" style="display: none" 
 | 
                    class="am-form-group am-form-select am-input-group  am-input-group-primary am-g  title"> 
 | 
                    <div id="orderSelect" class="am-u-sm-4"> 
 | 
                        <select name="state" id="state" > 
 | 
                            <option value=''>服务单状态</option> 
 | 
                            <option value="待预约">待预约</option> 
 | 
                            <option value="预约成功待处理">预约成功待处理</option> 
 | 
                            <option value="预约失败">预约失败</option> 
 | 
                            <option value="预约取消">预约取消</option> 
 | 
                            <option value="需配料">需配料</option> 
 | 
                            <option value="配料完成">配料完成</option> 
 | 
                            <option value="服务中">服务中</option> 
 | 
                            <option value="服务完成">服务完成</option> 
 | 
                            <option value="服务单结束">服务单结束</option> 
 | 
                        </select> 
 | 
                    </div> 
 | 
                    <div class="am-u-sm-5 search"> 
 | 
                        <input autocomplete="off"   type="text" class="searchIn" name="vipName" placeholder="用户姓名"/> 
 | 
                        <!-- 记录当前页 --> 
 | 
                        <input autocomplete="off"   type="hidden" name="offset" id="_offset"  value="0" /> 
 | 
                        <input autocomplete="off"   type="hidden" name="limit"   value="10" /> 
 | 
                    </div> 
 | 
                    <div class="am-u-sm-3 btn"> 
 | 
                        <button type="button" class="am-btn am-btn-default am-radius searchBtn"  onclick="Pagination.serchDate()">搜索</button> 
 | 
                    </div> 
 | 
                </div> 
 | 
                 
 | 
                <!-- 商品表格 --> 
 | 
                <div data-am-widget="list_news" id="context" style="display: none;" 
 | 
                    class="am-list-news am-list-news-default"> 
 | 
                    <!--列表标题--> 
 | 
                    <div class="am-list-news-hd am-cf am-g"> 
 | 
                        <div class="am-u-sm-4 "> 
 | 
                            <h2 class="am-list-news-more am-fr">编号</h2> 
 | 
                        </div>         
 | 
                        <div class="am-u-sm-3 "> 
 | 
                            <h2 class="am-list-news-more am-fr">客户姓名</h2> 
 | 
                        </div> 
 | 
                        <div class="am-u-sm-3 "> 
 | 
                            <h2 class="am-list-news-more am-fr">状态</h2> 
 | 
                        </div> 
 | 
                        <div class="am-u-sm-2 "> 
 | 
                            <h2 class="am-list-news-more am-fr">操作</h2> 
 | 
                        </div> 
 | 
                    </div> 
 | 
                    <div class="am-list-news-bd"> 
 | 
                        <ul class="am-list" id="showdataBox">                             
 | 
                        </ul> 
 | 
                    </div> 
 | 
                    <div id="pagingBox" align="center" style="margin-top: 10px"> 
 | 
                    </div> 
 | 
                </div> 
 | 
                <!-- 商品展示结束 --> 
 | 
                <!-- 测试 --> 
 | 
            </form> 
 | 
        </div> 
 | 
        <!-- 订单内容结束 --> 
 | 
  
 | 
    </div> 
 | 
     
 | 
    <script    th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script> 
 | 
    <script th:src="@{/plugin/amazingUI/js/amazeui.min.js}"></script> 
 | 
    <script> 
 | 
  
 | 
    /** 
 | 
    加载数据 
 | 
    **/ 
 | 
    $(function(){ 
 | 
        Pagination.init({ 
 | 
            url: basePath+"/admin/projService/getStaffServiceOrder", 
 | 
            builderDate:function(loj){ 
 | 
                var html=""; 
 | 
                //构建数据 
 | 
                if(loj.getRowCount()>0){ 
 | 
                    $("#serach").show(); 
 | 
                    $("#context").show(); 
 | 
  
 | 
  
 | 
  
 | 
                    for(var i=0 ; i<loj.getRowCount(); i++ ){ 
 | 
                        var option=''; 
 | 
                        var id=loj.getString(i,"id"); 
 | 
                        if(loj.getString(i,"state")=='配料完成'){ 
 | 
                            option='<a class="am-list-item-hd"   onclick="startService('+id+')" >开始服务</a>'; 
 | 
                        }else if(loj.getString(i,"state")=='服务中'){ 
 | 
                            option='<a class="am-list-item-hd"   onclick="endService('+id+')" >结束服务</a>'; 
 | 
                        } 
 | 
  
 | 
                        html+=' <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left"> <div class="am-u-sm-4 "> <h3 class="am-list-item-hd">' 
 | 
                            +loj.getString(i,"serviceNo")+ 
 | 
                            '</h3> </div> <div class="am-u-sm-3 "><h3 class="am-list-item-hd">' 
 | 
                            +loj.getString(i,"vipInfo.vipName")+ 
 | 
                            '</h3> </div> <div class="am-u-sm-3 "> <h3 class="am-list-item-hd">' 
 | 
                            +loj.getString(i,"state")+ 
 | 
                            '</h3> </div><div class="am-u-sm-2 ">' 
 | 
                            +'<a class="am-list-item-hd"   href="'+basePath+'/admin/projService/serviceInfo?id='+loj.getString(i,"id")+'&page=mobile" >详情</a> | ' +option+ '</div></li>' 
 | 
                    } 
 | 
                    //显示数据 
 | 
                    //$("#showdataBox").html(html); 
 | 
                    return html; 
 | 
                }else{ 
 | 
                    $("#pagingBox").hide(); 
 | 
  
 | 
                } 
 | 
            } 
 | 
        }).serchDate(); 
 | 
    }) 
 | 
  
 | 
    function endService(id) { 
 | 
  
 | 
        var url = basePath + "/admin/projService/endService?id=" + id; 
 | 
        $ 
 | 
                .AjaxProxy() 
 | 
                .invoke( 
 | 
                        url, 
 | 
                        function (loj) { 
 | 
                            console.log(loj); 
 | 
                            if (loj.status = '200') { 
 | 
                                layer 
 | 
                                        .open({ 
 | 
                                            content: "服务结束~", 
 | 
                                            className: 'shouBox', 
 | 
                                            time: 2, 
 | 
                                            end: function (elem) { 
 | 
                                                Pagination.serchDate(); 
 | 
                                            } 
 | 
                                        }); 
 | 
  
 | 
                            } 
 | 
                        }) 
 | 
    } 
 | 
  
 | 
    function startService(id) { 
 | 
        var url = basePath + "/admin/projService/startService?id=" + id; 
 | 
        $ 
 | 
                .AjaxProxy() 
 | 
                .invoke( 
 | 
                        url, 
 | 
                        function (loj) { 
 | 
                            console.log(loj); 
 | 
                            if (loj.status = '200') { 
 | 
                                layer 
 | 
                                        .open({ 
 | 
                                            content: "服务开始~", 
 | 
                                            className: 'shouBox', 
 | 
                                            time: 2, 
 | 
                                            end: function (elem) { 
 | 
                                                Pagination.serchDate(); 
 | 
                                            } 
 | 
                                        }); 
 | 
                            } 
 | 
                        }) 
 | 
    } 
 | 
           
 | 
    </script> 
 | 
    <!-- index js --> 
 | 
</body> 
 | 
</html> 
 |