yy_details.html 8.6 KB
<script type="text/javascript" src="__PUBLIC__/js/rem_new.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>预约详情</title>
    <include file="public/header" />
    <link rel="stylesheet" href="__STATIC__/css/public.css?v=__CSSVERSION__">
    <link rel="stylesheet" href="__STATIC__/css/maa_service_css/yy_details.css?v=__CSSVERSION__">
    <script type="text/javascript" src="__STATIC__/js/jquery.js"></script>
    <include file="public/my_msg"/>
    <style>
        .order_list dl .name{width: 70%}
        .ewm_span{ position: absolute; right: 0.2rem; top:0rem;border: 0;width: 0.4rem;}
        .bottom_button {
            width: 100%; height: auto; position: fixed;
            bottom: 0; left: 0;background: #fff;
            padding: 0.1rem 0; border-top: 1px solid  #eee;
        }
    </style>
</head>

<style>
</style>
<body>
<include file="public/navBall2"/>

<div class="page_div">
    <div class="page_div_frame">
        <div class="top flex  jc_sb ai_center fc fs028">
            <div> 预约状态:</div>
            <div><switch name="list.State" >
                    <case value="0">未服务</case>
                    <case value="1">已服务</case>
                    <case value="2">已过期</case>
                    <case value="3">已取消</case>
                    <case value="4">已评价</case>
                </switch>
            </div>
        </div>
    </div>
    <div class="central_section_frame">
        <div class="central_section fs026 rel">

            <div class="maa-frema rel">
                预约订单:{$list.Number}
                <if condition="$list.State eq 0">
                 <span  class="ewm_span"  onclick="openqrcode_order('{$list.Number}')">
                        <img src="__STATIC__/images/category/code.png"  height="25" alt="订单号二维码" title="订单号二维码">
                 </span>
                </if>
            </div>

            <div class="maa-frema">
                预约门店:{$list.StorageName}
            </div>

            <div class="maa-frema">
                预约项目:{$list.ServiceName}
            </div>

            <div class="maa-frema">
                预约时间:{:date("Y-m-d H:i", strtotime($list.ArrangeTime))}
            </div>

            <if condition="$list.WriteTime">
               <div class="maa-frema">
                  服务时间:{$list.WriteTime}
              </div>
            </if>

            <div class="central_section_button">
                <div class="service_people fs026">
                    <div class="maa-frema">
                        <if condition="$list.State eq 1 or $list.State eq 4">
                            服务美容师:{$list.BeauticianName}
                        <else/>
                            预约美容师:{$list.BeauticianName}
                        </if>
                    </div>
                    <div class="user_mobile">
                        预约人:{$user.nickname}
                    </div>
                    <div class="user_mobile">
                        手机号:{$user.mobile}
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="buttom-frame rel">
        <div class="abs link flex jc_sb">
        <div class="link_one"></div>
            <div class="link_one"></div>
        </div>
      <div class="frame fs026">
        <div class="tips-img flex ai_center jc_center fc " style="background-image: url('__STATIC__/images/maa_service/tips.png');">温馨提示</div>
        <div class="tips fs026" style="line-height: 0.36rem; margin-bottom: 0.5rem">
            1.预约成功后需要在指定时间前到达</br>
            2.如有任何问题可致电咨询</br>
            3.如需退约,需提前取消
        </div>

      </div>
    </div>
    <div class="bottom_button">
          <if condition="$list.State eq 0">
                <div class="frame flex jc_sb">
                    <div onclick="cancle_ord()" class="cancel_maa fc flex ai_center jc_center t_c fs030" style="background: #ffb03f">取消预约</div>
                    <if condition="date('H',strtotime($list.ArrangeTime)) egt date('H') or date('Y-m-d',strtotime($list.ArrangeTime)) gt date('Y-m-d') ">
                       <div onclick="change_time()"  class="cancel_maa fc flex ai_center jc_center t_c fs030">更改时间</div>
                    </if>
                </div>
          </if>
          <if condition="$list.State eq 1">
            <div class="frame flex jc_sb">
                <div onclick="go_m_yy()"  class="modify_time fc flex ai_center jc_center t_c fs030" style="background: #ffb03f">我的预约</div>
                <div onclick="go_ths_pj()" class="cancel_maa fc flex ai_center jc_center t_c fs030">发表评价</div>
            </div>
          </if>
          <if condition="$list.State eq 2">
             <div class="frame flex jc_sb">
                <div onclick="go_m_yy()" class="modify_time fc flex ai_center jc_center t_c fs030" style="background: #ffb03f">我的预约</div>
                <div onclick="go_re_yy()" class="cancel_maa fc flex ai_center jc_center t_c fs030">重新预约</div>
             </div>
          </if>
          <if condition="$list.State eq 3">
            <div class="frame flex jc_sb">
                <div onclick="go_m_yy()" class="modify_time fc flex ai_center jc_center t_c fs030" style="background: #ffb03f">我的预约</div>
                <div onclick="go_user_index()" class="cancel_maa fc flex ai_center jc_center t_c fs030">会员中心</div>
            </div>
          </if>

          <if condition="$list.State eq 4">
            <div class="frame flex jc_sb">
                <div onclick="go_m_yy()" class="modify_time fc flex ai_center jc_center t_c fs030" style="background: #ffb03f">我的预约</div>
                <div onclick="go_pj_details()" class="cancel_maa fc flex ai_center jc_center t_c fs030">查看评价</div>
            </div>
        </if>
    </div>

    <input id="number" value="{$number}" type="hidden">
</div>
<script>
     //----跳转到预约列表----
     function go_m_yy() {
         window.location.href="/index.php/mobile/Yyservice/yy_order_list/stoid/{$Think.request.stoid}";
     }

     var cancle_ing=0;
     function cancle_ord() {
         if(cancle_ing) return false;
         cancle_ing=1;
         var num=$("#number").val();

         var ui= layer.open({type:2,shadeClose: false});
         $.ajax({
             url:"/index.php/mobile/yyservice/fuwu_cancle/stoid/{$Think.request.stoid}",
             data:{number:num},
             success:function (res) {
                 cancle_ing=0;
                 if(res.code==0){
                     layer.open({content:"取消成功",time:1});
                     window.location.href= window.location.href;
                 }else{
                     layer.open({content:res.msg,time:1});
                 }
             }
         });
     }

     //---更改时间---
     function change_time() {
         if(confirm("确定要更改时间吗?")){
             var number=$("#number").val();
             var url="/index.php/Mobile/Yyservice/yy_beautician_details/number/"+number+"/stoid/{$Think.request.stoid}";
             url+="?old_url="+encodeURIComponent(window.location.href);
             window.location.href=url;
         }
     }

     //---跳到评价页面---
     function go_ths_pj() {
         var number=$("#number").val();
         window.location.href="/index.php/mobile/Yyservice/yy_evaluate/stoid/{$Think.request.stoid}/fromid/"+number+"/fromtype/2";
     }

     //---预约二维码----
     function  openqrcode_order(ordersn) {
         var img="/vendor/barcodegen/test_1D2.php?text="+ordersn;
         var img1="/index.php?m=Home&c=Index&a=qr_code&data="+ordersn;
         var html="<img src='"+img+"' style='padding: 5px; max-width: 98%' ><br/><img src='"+img1+"' style='padding: 5px;'><br/>请将二维码展示给核销员,取货更快捷!";
         layer.open({
             content:html,
             shadeClose: true
         });
     }
     
     //---跳转到会员中心----
     function go_user_index() {
        window.location.href="/index.php/mobile/user/index/stoid/{$Think.request.stoid}";
     }
     
     function go_re_yy() {
         var url="/index.php/Mobile/Yyservice/service_homepage/number/"+$("#number").val()+"/stoid/{$Think.request.stoid}";
         window.location.href=url;
     }
     
     function go_pj_details() {
         var url="/index.php/Mobile/Yyservice/yy_evaluate/fromid/"+$("#number").val()+"/stoid/{$Think.request.stoid}/fromtype/2";
         window.location.href=url;
     }

</script>
</body>

</html>